Monthly Archives: June 2006

A bad day

NOTICE: Find more in my tech blog: liopic.me.

Yesterday was one of those days where it’s better to not wake up. Maybe the whole week was bad!

At the office the bosses were complaining about everything (from timetable to holidays to our time to have lunch) . They are making a lot of changes, and it seems this company is not going to have a nice and friendly ambience anymore. They are growing and maybe they want to be more productive, but it’s a wrong idea to tell the workers to work hard and more hours (and of course to make them angry). It’s not the way to obtain the best from the workers.

At home the washing machine pass away. Yesterday the main cilinder went out of axis and a big oil stain appeared on the ground. So I have to look for another one.

I’m fed up this week. I want to stop the train and jump out on to the grass. Where is the stop-handle?

Metaphysics on programming

NOTICE: Find more in my tech blog: liopic.me.

Mirror by Jesús One of those things which sometimes made me crazy while programming are quotes (single ‘ and double ” quotes). Let me explain…

Most of the modern programming languages include a way to manage strings, normally it’s surrounding them with quotes (for example, in PHP: $response=”Hi there!”). The question arrives when you want to add a quote as a part of the string… because every language has its own way (and it’s a little problem if you usually program in different languages). For example, in PHP this is correct: \”, but this doesn’t work: \” (instead, you must directly use ), and it’s not exactly the same in Javascript. Next, the real problem happens when the user of your program starts to write lots of quotes as part of the input… you have to be really careful, programming some filters.

I imagine a string looking at itself, thinking “is this quote a part of myself or my end?” ;-), like the mirror in the clever drawing made by Jesús (he is a really fantastic artist, you should take a look at his new drawings). What happens when the limit of something is a part of itself? What happens when you see your limit is a part of yourself? Then you can change it, openning it!

By the way, most programmers do the laziest focus: to not allow the user to introduce quotes. But I think it’s the wrong solution, because it’s not a solution at all, but a patch. The professional way to do this is to implement a real solution, so the user can do what he/she wants. You are the person who has to spend time thinking, and not the opposite. This is the reason of this post: I spent the whole day trying to solve this problem in the most elegant form, in a AJAX-powered CMS I’m working on.

Update: At Sunday night I got it. Now I have an “edit in place” system with support of quotes marks, with an easy plus elegant code 🙂

Five things I should be doing instead of writing this post

NOTICE: Find more in my tech blog: liopic.me.

  1. Finish the AEGo (Spanish Go Association) website. I’m working on a new website with an easy CMS made with AJAX. I’m researching new ways to manage the content, focusing on the idea “if you want to change something, just touch it”. It’s really difficult to combine the maximum “user needs = site objectives” with the rule “clean programming”.
  2. Play music. Maybe I need to buy a guitar. I miss playing it. Or maybe I should play my keyboard, it could be enough. I have lots of ideas, and my fingers are waiting.
  3. Do some housework. I have to clean the corridor and my room. Also I want to “build” a new shelf for one of my music machines.
  4. Not think about the future. These days are changing my world, my thoughts, my future. But I should (simply) let the things happens.
  5. Fall in love. Scratch my thick front and look at your eyes with a never-seen intensity. I’ll work hard to make you feel like you are on top of the world. Sigh in every one of your nerves.

This post is over. So I must select one…

The best and the worst of summer

Summer is now here! Barcelona is raising the temperature up to 30ºC.

The worst part is that it’s too hot. The weather changes suddenly from a comfortable spring temperature to a sticky and sweaty ambient. Your body needs to get used to this heat, and this means at least one week feeling sick and having problems to sleep. For me that week was this one, and some days ago I felt I was burning my pillow with my head, and it was impossible to sleep on this hot iron that my bed was. But now I got over this, and I can start to enjoy the summer.
Summer tomatoesThe best thing in summer, here in Spain, are (as you can guess) tomatoes!! (IMO). They turn red, with an intense taste. In the market next to my home there is a shop were two olds sell the best tomatoes you can find in Barcelona. They are very fond of everybody, always giving me some fruit when I buy tomatoes. Also another nice thing from this shop is that they give you an empty bag and you can select by yourself the vegetables and fruit you want. The last time I was there I got a small bag and the old woman suggested to me to get a bigger one, but I said “I’m alone at home”, and she said “it’s better to be alone than to be with bad company”. Next she started to tell me about a couple who usually went to buy together, but one day only the guy came, and told her his girlfriend tricked him with another guy. It was nice to listen to the way this old woman told the story. Finally I got some tomatoes, potatoes, cherries and one lemon only for 80cent! It’s a different shop indeed. These olds remind me of my grandfather, years ago, when he used to arrive home with a lot of tomatoes from his small house in the countryside. Lots of tasty tomatoes!! Summer starts, again… enjoy it!

Engineer in the kitchen

NOTICE: Find more in my tech blog: liopic.me.

Engineer in the kitchen My father usually says “an engineer is a person who solves problems with ingenious ideas”. Both words, engineer and ingenious, have the same latin root: ingenium. Both persons, him and I, are engineers. So I must agree with him!

Last Saturday I was in the “Spanish Women’s Go Championships”. Obviously I didn’t play. But I was called to be the official chef of the event. I created a menu for six persons, and the same morning we went to the supermarket to buy the food, but unfortunatelly I didn’t find all of what I needed (I wanted to cook macaroni with pesto). So I had to invent an alternative… finally the menu was: (1st) macaroni with spicy tomato sauce; (2nd) brochettes with chicken, red pepper and small (cherry) tomatoes; (3rd) fruit salad with bananas and oranges. It tasted good, specially the brochettes, and they congratulated me for the lunch. They enjoyed my creations. Someone said “luckily you came to cook for us!” (because the organizer doesn’t cook). I enjoy cooking… it’s like creating something from nothing, as when I’m programming. To build ideas.

It reminds me of the (probably) best day I’ve had as an engineer. I was in a train, heading towards Barcelona. In front of me, on the opposite side of the table, a small girl was sitting. She was maybe 7 or 8 years old. She was travelling with her young parents. A man from the train company gave us one earphones box per person, and I folded it. Suddenly the child gave me her small box and I joint with mine, using the boxes’ lips. She was surprised and smiled. So I started to use these 2 boxes to build different things, without saying anything. And every figure I made was a surprise for the girl. Later I got 4 boxes and started to build more complicated things. It was incredible, because there are a lot of different things you can build with only some small boxes (it’s like maths, where you start with the addition and create more complicated operations like exponentiation). We spent two hours playing! She told me “build a dog!” and I made it, without opening my mouth. Her parents were so amused and surprised! Finally the man started to speak with me and he said: “you are an engineer, aren’t you?”. I felt proud 🙂

Nothing to say

nothingI want to write every day, but it’s difficult to find interesting issues. I have lots of ideas, but almost all of them seem worthless. Why write or say something which is not adding new information to the reader? Here there are some of my non-adding-information thoughts:

Dogs are for the countryside
Barcelona is full of dogs, I really can’t believe it. How can these dogs live, with only one (or less) walk per day? Things get worse if I speak about my neighbour, who uses the terrace (the shared terrace for the whole building) to walk his dogs; and, of course, we are always complaining about it, because the dogs piss (and do other things) there. I think dogs need to run, to feel free, as they are animals… and cities are not made for dogs. I feel the dogs in cities are like in a jail. But maybe the same reason can be argued regarding humans (which are also a kind of animal).

Is Catalonia becoming a nation?
What is a nation? Catalonian governers used 2 years to try to define, as aseptic as they could, the word “nation”. They wrote a new statute (a paper which describes the relation between Spanish and Catalonian government powers). Today is the referendum, and all catalonians are called to decide whether it’s a good statute or not. This morning I was reading the BBC News and its reference about the referendum was surprisingly innacurate (in my opinion). It’s not easy to speak about Catalonia, as to speak about the Basque Country, Northern Ireland, Palestine, etc. In fact it’s really difficult to have a clear opinion. In this case the most complicated thing is all about the meaning of “nation”. Outside of Catalonia almost all of the people understand it with one meaning, but here there are lots of diferent subtle interpretations.

SPAM disturbs me
I really hate when I’m “receiving 5 mails” and when they all arrive they go directly to the junk folder. It’s like you are hopping to read some news from your friends worldwide and suddenly you get nothing. Now we have some environment laws to sue pollution makers… but what about this pollution on the Internet?

Magnolia flowers in my street
These last weeks the magnolia trees in my street are flowering. White flowers which say it’s the beginning of summer. Also they say one year ago my cousin was here visiting me. They suggests to me that time is moving. However, they are wonderfull. I should take some photos.

Ouch! All of these thoughts are adding information. Maybe I’m too critical with my own ideas 😉

How many words?

NOTICE: Find more in my tech blog: liopic.me.

Yesterday I thought about this question: “how many english words do I have in my mind?” . How vast is my English vocabulary?

So I have had an idea: to program a small script in PHP which counts words from my English posts here.

At the moment, with only 14 entries, the statistics are:
· 3234 total words.
· 1094 different words.

Top 5:
the (177)
to (97)
a (96)
i (83) [it’s actually “I” lowercased]
and (71)

I’m happy because “nice” it’s not even in the top 50. My teacher is always complaining about the excessive use of this world 😉

Travel non-stop

Columbus' monument in Barcelona What happens when you start to live in different cities? You actually realized you can’t stop… you can’t stay in one city although you feel it’s the best city to live in. You start to discover the world, and you feel if you stop too long in one city you are losing time. This is an idea I was thinking today in a cloudy way, but a German girl (a friend of my flat mate) said it in this easy manner. You can’t stop! Your friends from your hometown still remain, but you are discovering the world… it’s like a way to improve your own life. Your old friends buy a car, a house, and you have nothing, but more experience and an more open mind. I prefer the latter.

Sometimes I think of Barcelona. It’s a really pretty city to live in, I enjoy it. But if I’m staying here for a long time, it seems I’m missing the rest of the world. Some months ago I had a thought about living in every interesting European city for 2 years. It was a good idea, to spend my best years discovering the world. Maybe it’s time to change, maybe I must go away… but I’m sure I’ll come back. Barcelona is really special. So it’s difficult to say “bye”. I enjoy living here, with it’s funny people, with the magic fountain near home, with it’s magic mood. But it’s a question of evolution… and the world is waiting for me!

Orange’s triumph

Orange thinking!Looking at some photos of me in Zürich, I realized that I love my orange T-shirt. Moreover I also enjoy wearing my orange sweater. But the most interesting discovery I made was that the walls of my bedroom are (dark) orange too. Hold on!, also my favourite towel is orange.

So I looked for some information in internet about this colour. It’s sunny, full of live, happy, warm; it suggests creativity, determination, success, etc. And it’s the colour of the orange fruit, typical from Valencian country (where I am from). Therefore it must be my (new) favourite colour!

Should I change this blog according to my favourite colour? Maybe I have to.

This is the “bad” thing about talking too much with graphic designers 😉

Biological cleaning

Teapot bio-cleanedA month ago I drunk the last tea from my old teapot. I neglected it in a corner of the kitchen, with some water and green tea leaves. I thought the cheap iron that it was made of was too old, and the teas didn’t taste good.

Today I thought of giving it a second opportunity. What a surprise!! The inside of the teapot was full of mould. It seems that some bacteria had grown with the help of the water and the leaves. But when I threw the leaves I discovered the bottom was totally clean. These bacteria had eaten all the dirt, so (as you can see in the photo) the iron at the bottom is now totally new.

Maybe I should recover these bacteria from the trash, and feed them. I’m sure they’ll help me with the dishes 😉