Monday, April 28, 2008

Believe it or not, these 3 cars have all the same size


Oh Shiiiiiiiiiiiiiiit!

You've probably wondered how many search results will Google get with the term "oh shit"... right? But have you ever wondered how many search results will Google get if you continually add "i"s in the middle of the word?


No? Me neither. But that doesn't make it less interesting. Check the results here.

Programming Joke

You don't have to be a programmer to laugh at this picture:

Math 2.0

Due to numerous complaints from students around the world, Math has a new version. Check what's new here.

Ring! Ring!


Who is it? It's a wake up call from Earth.


Standards a la Microsoft

Am I the only one that finds it strange that Office 2007 fails to comply with the new ISO Office Open XML Standard, which was ironically "imposed" to be accepted as a standard by Microsoft?

Another interesting problem: crossing the bridge

Every once in a while I like to propose some interesting problems, and this one certainly fits the profile:

  • Four friends need to cross a bridge
  • A maximum of two people can cross the bridge at the same time
  • It's night and it's very dark, so they use the only lamp they have, to see the way
  • Each pair can only cross the bridge at the rate of the slower person (each person's crossing rate is given by the number showed on top of each person)
  • Try to make them all cross the bridge in a total of 17 minutes
Yes, 17 minutes. It is possible! Here's a snapshot of the result...just to tease you :-)


If you got 21...that's not bad! That's the second fastest solution. But 17 is still possible and it's the fastest solution. If you really want to cheat know the solution check out this picture that's hiding the solution.

Monday, April 21, 2008

What if programming languages were...

To define a programming language is never easy. You can describe their syntax/features/capabilities but that doesn't translate in its real potential. In fact, most of the times, the whole is not equal to the sum of its parts. So, what better way to describe the true potential of programming languages than to use clever analogies of the real world.

What if programming languages were...

Friday, April 18, 2008

How to see YouTube videos that are blocked

You've probably came across this message on YouTube, right?


Or maybe that other message saying that the current video has restricted content and you have to login and verify your age to see the movie, right?

Well, there's a way to bypass that restriction. YouTube video links have the following format:

http://www.youtube.com/watch?v=VIDEOID

where VIDEOID is that sequence of letters and numbers that univocally identifies a youtube video in their huge database. The access to the video through this link format will feature any restrictions that the uploader may have set.

However, a simple hack lets you see the movie (but only that, since this link will only give you access to the YouTube embedded player). Just change the link to the following format:

http://www.youtube.com/v/VIDEOID

And that's it! Now you should have access to the same video without any restrictions.

But I guess this won't work for long. As soon as YouTube figures out that this "back door is opened", they'll probably apply the same restrictions and "close" it for good.

What is this?

What if suddenly this "thing" pops up in front of your car?



What is this strange looking "car"? Here's another picture from the side, to help you have a better look at this "vehicle".


After some searching on the web, I discovered that this is a SECMA Fun Runner 140, a kind of buggy that is becoming popular. I spotted this one in Lisbon yesterday afternoon. Sorry for the bad picture quality, it was raining hard and the picture was taken with my cellphone.

Not something you see everyday, eh?

Using QuickTime to create stop-motion movies

While exploring the "Open Image Sequence" feature on Quicktime to create a simple Slideshow of images, I noticed that the combo box presented some values that were odd for someone trying to create a slideshow of pictures:


Although values like "3 seconds per frame" may seem acceptable for showing a slideshow of photos (each photo would be displayed for 3 seconds), "15 frames per second" seems to be just a little bit too fast to see all your photos (it means that 15 photos would be displayed in a second, which basically means that you wouldn't be appreciating any of them).

This got me thinking: "Why would you need to go through a slideshow in such a rush?". And then the geeky part of the brain kicked in and I remembered that this is how stop-motion animation movies work.

The idea of stop-motion is as old as cinema since the whole concept of films/movies is based on a stop-motion technique. Basically a camera is a mechanism that captures photos at a very fast rate (usually 24 frames per second). When we reproduce the captured images at the same rate, our brain fills in the gaps between the images, producing the illusion of movement.

Stop-motion works in that exact way: we capture some still images and then while reproducing them at a very fast rate, the images will perceive as having movement between them. To get a clear idea of how this is made, check out the Wikipedia page on this subject.

Excited with the idea of creating a stop-motion animation movie (basically because the movie "Nightmare Before Christmas" is one of my favourite movies of all time - well, at least my favourite animated musical) after discovering how easy it would be to put it all together on Quicktime, I decided to give it a try.

So, I mounted my camera (Canon Digital IXUS 400) on a tripod and took some sequenced photos of my USB Pen being disconnected from the USB hub. After putting it together on Quicktime, this is the result (reproduced at different speeds):
  • 6 frames per second:

  • 10 frames per second:

  • 15 frames per second:


Looks nice, eh? You can also apply this same concept to time lapse movies (that will be my next try).

Tuesday, April 15, 2008

Technology to beat World/Olympic records...but only for swimmers

The Speedo LZR Racer Suit is a ultra-lightweight and water-repellent swimming suit that gives shark-like swimming capabilities to athletes. It reduces the drag effect and skin resistance of the swimmer's body, allowing him/her to gain those milliseconds that could make a difference when beating World/Olympic records.


An in fact, this swimsuit really gives athletes that extra boost they need. 36 of the 39 world records that were beaten since last February were achieved by athletes with this swimsuit from Speedo. This clearly states that an athlete with this particular swimsuit has an advantage over other athletes.

Doesn't this sends out the wrong message to the sporting community? At this rate, world records will only be beaten by the athletes that are lucky enough to be sponsored by these companies.

But, even though some controversy exists around this issue, nothing is done to stop swimmers from using the special-purposed suits.


This kind of reminds me of a similar situation that had a completely different outcome. Oscar Pistorius, a double-amputee paralympic runner that is only able to run through the use of a prosthetic device (a set of carbon fibre transtibial artificial limbs), wanted to participate in the able-bodied competitions (for people with no handicaps or disabilities). 

However, his artificial legs generated claims that he had an unfair advantage over able-bodied runners. And because the rules clearly state that an athlete using a device cannot have an "advantage over another athlete not using such a device", he was ruled ineligible for competitions.

I don't think this decision was wrong but some questions remain: why was this particular athlete unable to participate in a competition? Why isn't the same rule applied to swimmers? Shouldn't all enhancing devices be forbidden from sporting competitions? Or at least shouldn't ALL athletes be given the opportunity to use the same equipment so as to really boost the competition level?

Google App Engine and PHP

If the idea of creating great web applications on top of the Google infrastructure (through the newly-announced Google App Engine) excites you but you'd rather see support for PHP instead of (or in addition to) Python, then you may want to sign this petition.


Why use PHP in Google App Engine? Well, these articles may enlighten you.

Friday, April 11, 2008

How to access Hotmail from Mozilla Thunderbird

If you have a Hotmail account and you're tired of accessing it through the annoying and slow MSN Live web page, maybe you should consider accessing your Hotmail account through your e-mail client.


Using Mozilla Thunderbird? Not a problem. The WebMail extension will solve that problem.


It installs a "bridge" between your e-mail client and the Hotmail server, which allows you to access and send e-mails through your Hotmail account, directly on Thunderbird.

If you're unable to run the services, try changing the values of the ports to values above 1024 (as shown in the picture).

I know what you're going to say next: "why do you still use Hotmail anyway?". I was asking myself the same question ...

How to setup Apache, PHP and MySQL on your Mac

If you're a PHP developer and have recently switched to a Mac, you'll have noticed by now that setting up PHP and MySQL on Mac OS X (Apache is already bundled with Macs) is not that simple, especially for a newbie.

Luckily, MAMP (acronym for Mac, Apache, MySQL, PHP) comes to the rescue. This special-purposed application allows you to manage the three applications automatically on your Mac, making it ready to start coding your PHP-based web sites with MySQL databases right away.


The configuration created by MAMP is not intended to be the appropriate web environment for you to host your dynamic web pages, but at least is good enough for the developing stage. You can even choose between PHP4 or PHP5.

Yahoo and the Semantic Web

The news that Yahoo was making a shift to the Semantic Web was ignored by most people. And when everybody is talking about how the next big gadget will revolutionise the world of technology, it's quite ironic that not enough attention was given to this particular decision by Yahoo. I have to admit that my background on this matter might make me a bit biased towards this subject, but I actually believe that bringing "meaning" to the world wide web will revolutionise the way we use the Internet for our daily tasks.


The Semantic Web is an initiative to produce a set of standards that will allow the web content to be readable by both persons and machines. The Web as it is today is focused on the human user. Even though we use specific programming languages to code web pages (which are only readable by experienced programmers), these languages are mere vehicles to produce a "visual element" that can only be "read" by a human user. For a machine or a program, that "visual element" won't have any "meaning", that is, it won't "understand" what that web page represents.

Because of this limitation, technologies like the Google Crawler can only index pages by searching for specific words/terms that are linked often, which, although providing a useful search mechanism for the web as it is today, does not leverage the potential of using semantics to automatically extract the "real juice" from the world wide web (not to mention the fact that it also leaves room for unexpected searches, such as Google Bombs).

An example is quite useful to fully understand the importance of bringing this kind of technology to the World Wide Web:

Imagine that you need to plan an evening that includes a dinner and a movie and maybe an after-hours clubbing. In order to plan this evening with the current Internet you would have to use a search engine (like Yahoo or Google) to look up these activities. And you would do it separately, that is, you would first look for restaurants that fit your tastes and then for a cinema that has the movie that you want to see and finally some info on clubs. Optionally, you may also look for directions/maps information regarding your all evening. You can see by now, that this would involve quite a lot of browsing on different websites of different domains.

Now imagine that there is an automatic process that can do all of this for you. But how? Simple. Basically, the Semantic Web is kind of like an Internet for these automatic processes, so imagine that these programs see the Internet as you see it. When they look at a page, they "know what" they are looking for and most importantly, they "know how" to look for it. Of course, they may need for you to provide some input (what kind of cuisine would you like? what genre of movie?...) but, add a bit of AI to it and the hard work is done by the program.

So imagine yourself on a website that would ask you the following information:
  •  Restaurant Type
  •  Movie Genre
  •  Music Genre
  •  Number of People
and that would automatically produce an evening plan with:
  •  Reservations at a nice restaurant
  •  Movie tickets booked for a nice thriller movie
  •  Recommendations for some nice clubs in the area
  •  Complete maps and directions from your house (or current location) to the restaurant, to the cinema, to the club and back
And no, this is not technology of the future. This is the kind of thing that we have been researching on since 2002.

Of course, this requires a huge effort from web developers to change their view and start creating Semantic Web-friendly web sites (Amazon is a great example). But at least, Yahoo is taking a great step and, by supporting this kind of technology, is making way for the next Internet revolution. Or so I hope :-)

Ladies and Gentlemen: all the gaming consoles' laptop versions

I was already amazed when some guy decided to create a laptop version of the XBox 360. But this guy went all the way with laptop versions of all the gaming consoles:








I'm speechless, except to say: WOW!

Images source: Engagdet

Monday, April 07, 2008

Retro-blogging: Best posts of April 2007

Previously on the Tech In Me: