Threaded dreams

There is an urban legend that drinking tequilla before going to sleep will guarantee you some really cool colorful dreams. Unfortunately, that’s more than an urban legend. I’ve tried it myself several times and it never worked out.

But another thing that I’ve tried myself and that worked out just fine, but which I haven’t heard anyone talking about, is threaded dreams.

What are threaded dreams? Well, threaded dreams are those that you (or should I say – I) have after programming threads or forks too much. I’ve always had a suspecion about the existance of threaded dreams, but I never had to program threads often enough to notice the trend.

This month though confirmed my suspecions a few times in a row. Two of these dreams were particularly interesting.

Continue reading Threaded dreams

Oscar, Oscar, have you seen the Oscar?

Usually, I am not that interested in watching The Oscar. Usually they are pretty boring. And usually I don’t agree with both nominations and awards.

But this time I had two reasons to watch the show.

The first one was Jon Stewart of The Daily Show fame. He is hilarious. This is the only TV show that I have watched almost religiously in my life. I missed him already, because he didn’t appear on the show for the few days (probably because of his preparations for the Oscar ceremony). I needed my humor fix.

The second reason was “Crash“. I was very surprised to see it nominated. If you don’t remember, I reviewed it earlier last year. It was one of the best movies I’ve seen ever. And it was one of the most underpromoted movies too.

In case “Crash” would have won any awards I could read about it the next day, so I didn’t have to see the show for that. What I wanted to see the show for was the reaction of the audience if wouldn’t have won anything.

I’m glad to report that I both enjoyed watching the ceremony (Jon Stewart was as good as I expected him to be, or even better) and “Crash” won a few Oscars, including the “main” one – The best motion picture of the year.

My faith in Oscar awards and ceremony shows might just get a little stronger…

Re: digitally tagging height

This is my response to this post in Sanjay’s blog. I originally wrote this as a comment, but before I pressed “Submit” button, I thought that it would be better to have it here, with all the crosslinks.

Sanjay noticed that pictures like the one of Maxim on his birthday are a cool new way of saving height measurements. That is instead of using old ways of pen, rule, and wall. He regrets only that there is no date and time information on the picture.

Well, that’s not a problem at all, my dear friend! Most of the modern digital cameras save a lot of meta information in the image file. With right tools that information is trivial to extract (Google search for “EXIF”).

I put a bit more thought into the idea and realized that it can actually be much more fun. With data and time of the image available from the image file itself, we are missing only one bit for a complete picture – the age of a child. Since there is no automatic way of getting it, a human interaction is necessary.

And where there is human interaction, there is social interaction. Flickr comes to mind. Consider this for a moment:

Parents make pictures of their kids against a height meter. Then, they upload these images to Flickr. Then, they tag these images with three tags. One tag for the age of the child, say “age14month” or “age2years”. One tag for the height itself, say “76cm” or “132cm”. And one additional tag to make these pictures easy to find, say “kidsgrow”. Maybe an image pool or user group would be a better way of goind about it.

With setup like this, there is a central location, where all such images are stored (backup). People can then easily find all pictures of their own kids, as well as other kids of the same age or the same height.

There are also a whole bunch of third-party applications that can utilize data from Flickr, like, for example, fd’s Flickr Toys.

How do you like the sound of that?

I can’t believe I did it so fast

Remember how I mentioned Python only yesterday? Well, I’ve had a really long (and fun) programming session (about 10 hours), and I have a warm feeling of deep familiarity with the language. Yup, I know it. I am surprised though. It usually took me much longer to learn the language.

Of course, I can’t claim that I know it all. Here are the things that I used in the last few hours:

  • Lists and dictionaries
  • Functions (with parameters and default values) and objects
  • Database interaction (MySQL with MySQLdb)
  • Forking
  • Regular expressions
  • Documenting code … Really.

I wrote and re-wrote almost a 1000 lines of code, which made me feel much more comfortable with Python syntax and concepts.

P.S.: I still got it…