Friday, July 25, 2008

Car Record Player

Earlier today at work, we were chatting about old audio players and I happened to say that once there were in-car record players. Yes, record players. Everyone laughed at me and thought that I had gone completely insane. Of course everybody in this industry is in the process of going mad but I still have a few years of sanity to enjoy... 2 at least. Maybe less after I finish this post.

Well, here it is, behold the Chrysler Highway Hi-Fi:

phonograph1_270x374

And here is a video of the Philips Car Record Player:

Watch it, Kenwood, you never know... Philips may be planning a retro comeback with this hi-tech gadget.

I'm also starting to consider trading my Creative Zen 16GB with this useful portable player. I'll have to carry a backpack with 30kg worth of vinyl discs, though.

1744_2926-712839

Tuesday, March 25, 2008

Virtual Water

Professor John Anthony Allan (University of London), the Inventor of the Virtual Water concept, was awarded the 2008 Stockholm Water Prize last week.

I had never heard of this concept but it's very interesting. It is a method of calculating the amount of water spent in the production of certain products, particularly food products.

Did you know, for instance, that it takes 140 liters of water to produce a cup of coffee? (this is a calculation based on the water that was consumed to grow, produce, package and ship the coffee beans). That is the same amount of water that is consumed daily by a person in England by drinking, bathing, cooking, etc.

Take a look at these links:

http://www.reuters.com/article/inDepthNews/idUSL1850227220080319

http://www.worldwatercouncil.org/index.php?id=866

Monday, March 10, 2008

Head Tracking for Desktop VR Displays using the Wii Remote

I just saw this video and I had to share it.

This guy, Johnny Lee, has been developing very interesting projects with the Wii Remote. His last project, shown in this video, is a head tracking system which creates a very interesting 3D experience. Just see it.

Don't forget to check Johnny Lee's website and blog.

Friday, February 8, 2008

Online Javascript Formatter

Every now and then I need to format some javascript code that I find online.

I have been using this online javascript formatter. It's simple and it usually fills my needs.

Wednesday, February 6, 2008

How to make sexy buttons with CSS

I just found this article on how to make sexy buttons with round corners with CSS. It's a little hard to customize your own buttons but if you comprehend how they work, you can do it.

Saturday, January 26, 2008

New blog address

Finally I've changed my blog's address. You're already reading the new one :-)

The Atom/RSS feed has a new location too:

http://feeds.feedburner.com/tiagoe

The old posts will remain in the old location as well as in the new one. I will have the old blog redirect the users automatically to the new one. That way I will not have broken links.

In a future post I will discuss the steps I've made to change blog's address without loosing anything.

The old feed will not be updated, though. You should update your feed reader.

Monday, January 14, 2008

The translation of Buzz! The Mega Quiz

Last birthday I was offered a game for my Playstation 2... Buzz!™ The Mega Quiz. It's a very nice Quiz game where you can play with up to 8 player with these funny controllers that they call the "Buzz! Buzzers".

It's a very fun game to play at home parties. The game/show is hosted by Buzz who is voiced (in the Portuguese version) by a famous Portuguese TV show presenter.

The game is composed by a few different rounds where you try to answer the question correctly and, hopefully, faster than your opponents.

There's a round that's called the Globetrotter. In this round you're supposedly traveling around the world and have to answer questions about the country you're in. The player that answers correctly has to choose the next destination.

The other day I was playing this game and I had to choose the next destination, so I chose Peru. I was surprised by the fact that the plane didn't go to Peru... it went to Turkey...

Why did the plane go to Turkey? Why is this funny? Well, in Portuguese, Peru is also a word... the name of an animal. Which animal? The Turkey!!! For some reason, the translators translated the word Peru when it was supposed to be the name a country.

Anyway, I'm still having fun playing Buzz. And it's extra fun every time I choose to go to Peru.

Didn't you find this funny? Well, I wouldn't too. It's just that I haven't posted anything for a while and was fearing you'd forget about me. Geez, this just got worse, right? Buzz, turkeys and trying to be funny. What's next? One day I will be photographing myself playing violin on a laptop. I will then be doomed.

Thursday, December 20, 2007

The ultimate solution to blogging source code

Finally Mário Romano found the answer to the Ultimate Question of Life, the Universe, and Everything. Well... not quite but he found a great solution to the question "how do I post source code in my blog posts". Find it here:

pre {
  background-color:#FCFBF8;
  border-color:#CCCCCC;
  border-style:solid;
  border-width:1px 1px 1px 2px;
  line-height:1.2em;
  margin:1em auto;
  overflow:auto;
  padding:1em;
  width:90%;
  word-wrap:normal; /* IE Fix */
}

And by the way, the answer to the Ultimate Question of Life, the Universe, and Everything is 42.

Monday, November 19, 2007

How to exclude your own visits from Google Analytics and ClustrMaps

After a 5 minute Google (re)search I found a few ways to exclude my own visits to my sites/blog from the Google Analytics and ClustrMaps reports.

Google recommends two ways of doing this:

  • Creating a filter that excludes your IP address from the reports
  • Installing a cookie in your browser and creating a filter that excludes your visits from the reports

I don't find the first option very useful because I don't use static IP addresses.

As for the other option, I really didn't try that. Google doesn't explain very well how to do it and I didn't have the patience to explore that option.

Another downside of both of these options is that they require that you edit your html. OK, that's not really a problem but when you're managing a blog, you don't want to mess with your HTML too much.

I found an easier approach in here:

Use AdBlock Plus to block communication with Google Analytics and ClustrMaps.

These are the addresses I had to block:

  • http://www.google-analytics.com/urchin.js
  • http://www3.clustrmaps.com/counter/index2.php?url=http://(enter your address here)

Don't forget to disable the Collapse blocked elements option in AdBlock. If you don't disable that option, you won't be able to see the link to you ClustrMap (Adblock simply doesn't show anything).

[Update]

Ok, there's a problem with the approach I described for Google Analytics: It will block the analytics scripts of other sites you open (including your friends' blogs).

To fix this you have to... well, change the HTML of your site :-D

In your HTML find the following tag:

<script src="http://www.google-analytics.com/urchin.js" type="text/javascript">

and replace with:

<script src="http://www.google-analytics.com/urchin.js#url=http://(replace with your site url)" type="text/javascript">

I added the #url=http:(replace with your site url) which in fact doesn't do anything when getting the script from the server but allows us to setup AdBlock to block this URL.

Next, you have to setup AdBlock to block only http://www.google-analytics.com/urchin.js#url=http://(replace with your site url) instead of the late http://www.google-analytics.com/urchin.js.

Thursday, November 8, 2007

input image objects not found in form.elements

Imagine you write the following javascript sentence in an html page:

self.document.forms[0].elements

That will give you all the elements inside the first form (forms[0]) in the current page, right? Well, no. For some reason, if you have an input of type image (<input type="image">) in the form, that element will not be in the forms[0].elements object.

Every other input (button, text, select, submit, ...) will be in the elements object, but do not expect to find image type inputs. I've tried that in IE and Firefox unsuccessfully.

(If you don't know what an input of type image is, well it's behaviour is the same as the submit inputs but instead of a button, the user is presented with an image.)

So, how do we solve this? Well, instead of using:

self.document.forms[0].elements

we have to use the following:

self.document.all

Of course, that way, you will get a list of all the elements in the current page instead of all the elements in a form but you will find the inputs of type image in there, for certain.