Ruby Quiz

Maybe one of the best ways to learn a new programming language is playing with it. Nowadays if you don’t code in Ruby you aren’t cool. I have to recognize that programming in Ruby is funnier than in other language and for the moment I don’t have anything bad to say about it.

Well, I want to introduce Ruby Quiz. It is a collection of minigames prepared to learn Ruby (or to improve your skills). Every week they publish one game, and if you are brave you can send your solution to them and it will be public. I think it’s one of the best ways to learn because you can compare solutions and find were you are weak in Ruby and redo your solution doing it smarter.

Share/Save/Bookmark

The madness of captchas

Nowadays computers still can’t pass the Turing Test (but some researches show that they will pass it at 2029) , well, there are still some humans that can’t. But they have achieved to pass some captcha images.

Captchas

Captchas

BitDefender and SoftScan articles show that in the last days some spam bots have registered email accounts at Hotmail, Gmail or Yahoo mail. This is a big step for spammers that produce on me two side feelings. On the one hand I’m so sad because my mail filter has to work a lot to deal with this nasty plague, but on the other hand this has to wake on us encouraging feelings of a near future where computer can pass the Turing Test. This is like in my Science Fiction books.

Share/Save/Bookmark

Managing the music between iTunes and the iPod

Suppose you have an iPod. Now suppose your music library size is by far bigger than your iPod memory. This is not an unusual situation, specially if your iPod is a Shuffle, Mini or Nano version, since the ones able to play videos usually have much more memory.

Now suppose you’re a busy person or simply don’t have the time to select what music you’ll want to hear every morning before going to work, so sitting in front of your iTunes program and selecting what you thing you’re in the mood to hear is out of the question. But of course, the chances you want to listen to different music from yesterday is high. And because you are a pragmatic geek, you’re trying to find a way to perfectly update your iPod music to fit your needs automatically.

Smart playlists come to the rescue!

Read the rest of this entry »

Share/Save/Bookmark

Sofa Control, or how to operate your Mac from the sofa

When I decided to buy my first Apple Computer, a MacBook, some months ago, I was planning on using it as a Media Center, connecting it to my HD Ready TV. And one of the features that I expected to use the most with it was the FrontRow. However, I was a little disappointed on the lack of configuration options you have on that software, specially when playing movies (I found it extremely useful anb beautiful for iTunes and iPhoto integration).

One of the first problems I encountered was with some codecs. FrontRow uses the QuickTime player, and that program seem to have some problems with video formats. I had to install some third party plugins for it to be able to play such a [now] standard video format as WMV. Another big problem I found was the lack of subtitle rendering option. English is not my native language, and although I’m improving every day, I often need to have my English spoken videos bundled with subtitles that come in external files such as SRT or SUB files. As far as I know, QuickTime player does not have support to render those files.

So one of the features I expected to use on my MacBook was ruined for some of those reasons, because using another video player in a FrontRow style was impossible… until I found Sofa Control. I’m not the kind of man to believe in the typical company “mottos”, but I firmly believe in this one: “Applications that should have been in the box”. This is the motto of CASE Apps, people responsible of Sofa Control, and I have to absolutely agree with them.

Sofa Control is a software that takes out the best use of the new Mac Family Remote Controls, which allow you to use FrontRow. Sofa Control goes further and allows you to absolutely control almost every typical piece of software for Mac OS, including some popular video players such as VLC, the one I use on Mac OS and one that supports almost every video coden and has builtin subtitle support. With Sofa Control you can use you remote to play/stop/resume multimedia files, slide pages on PowerPoint, Keynote or PDF presentations, use it as a virtual mouse moving with the control arrows, and a lot more. This is exactly what you need to simply be able to fully control your Mac when you’re laying on your bed or your sofa. The perfect software for lazy people like me! And it has a builting script manager to allow you to write your own scripts for new applications.

The only thing I miss from it it’s that it’s not free, but it costs only $14.95, and to be honest, it’s worth the price.

Share/Save/Bookmark

Ubuntu 7.04, Mac OS X and Parallels howto

The virtualization world is not only for Windows and its name is not only VMWare. Specially since the migration of Apple’s Macs to the Intel x86 platform, that kind of software has seen in the Cupertino computers a new and fresh market to exploit. And one of the software pieces who has built one of the best virtuaization products for the Macs has been Parallels Desktop.

Altough the Windows virtualization offered by Parallels is pretty nice (I’m still impressed of the Coherence Mode and I can’t wait to test the new 3D support features of the last version), it has also support for other Operating Systems such as Linux. And because Ubuntu is at this moment one of the most popular Linux distributions, a lot of people (including myself) have tried to install it in a virtual image on a Mac.

Unfortunately, the latest Ubuntu version, 7.04, aka Feisty Fawn, seems to have some problems installing on Parallels. The most important one is that the Live and installer CD will simply not boot correctly, showing a “Black Screen of Death” when loading the frame buffered splash screen.

But don’t worry, everything should be fine if you choose Solaris and Other Solaris as a OS Type and OS Version respectively when creating the virtual machine. Simply boot the Live CD, install the Linux distribution and when it asks you to reboot, shut down, change the virtual machine type to Linux and “Other 2.6 Linux” and it’s done! Enjoy the wonderful open source operating system on your Mac OS!

Share/Save/Bookmark

Avoid firefox message: Install missing plugins

My laptop is an ibook G4 and maybe because of madness or because I’m so geek, I use linux on my ibook. One of the most annoying problems is that there is no good support for flash in linux PPC. This causes that all webpages viewed with firefox that requires the flash player plugins makes firefox requesting to install it.

Install Missing Plugins

Install Missing Plugins

After being annoyed for months I search for this configuration in about:config page and I finally found it. The only action to avoid this message is to set plugin.default_plugin_disabled to false and that’s all!. Now I can surf the web without any Install missing plugins message.

Share/Save/Bookmark

Customizing IRB

While developing a Ruby application or while learning ruby, one of the things you must use is IRB (interactive ruby). As in its man page is said “irb is a tool to execute interactively ruby expressions read from stdin.”. In this tool you can type and execute directly ruby code. It’s very useful but like most other programs like ViM (Vi IMproved) the real power is its customization.

Here I post my .irbrc and to make things clear there are some explanations on each line.

# autocompletion of methods when pressing TAB
require 'irb/completion'
# Wirble is a plugin to colorize your irb, it's installed from a gem (gem install -y wirble)
require 'rubygems'
require 'wirble'
 
# Make use of readline library
ARGV.concat [ "--readline" ]
 
# autoindent of code while typing it
IRB.conf[:AUTO_INDENT]=true
 
# wirble initializations
Wirble.init
Wirble.colorize

As I said before, IRB is very powerful and a proof is that in Ruby Lang they encourage you to try ruby in your browser with an embedded IRB.

Also in rails the console for debugging your application is an irb instance preloaded with all rails configuration. In RailsCasts there is a screencast that shows you some tricks about it.

Share/Save/Bookmark

Developing Javascript involved web applications with Firebug

If you’ve been assigned to a new web application project lately, you’ll probably have had to deal with this [not] new AJAX technology. To be honest, AJAX is good, and websites like Google Mail and Flickr are good examples of that. But remember something: it’s always bad to abuse of something. It’s always bad to abuse AJAX. Don’t use it if it doesn’t really make sense to do it, and if your boss insists on it, ask him if he would use truck wheels on his BMW.

Read the rest of this entry »

Share/Save/Bookmark

Subversioning a Rails App

The time when application versions where stored in different folders or in zip files has ended. Today we have great tools like Subversion or CVS. This tools must be known by everybody, but for those who aren’t known, they are applications that control versions of files.

While developing a Ruby on Rails application it’s good to use a system like Subversion. In this howto I’ll explain my experience subversioning my Rails app.

Read the rest of this entry »

Share/Save/Bookmark

Create your own local domain with DHCP and BIND

If you begin to have a lot of computers at home, or even you manage a little LAN on an office, it may come in handy to have a little domain configured. Having a domain configured has some advantages, including easy machine naming and name resolution of those machines. We’ll explain here how to setup a little domain with a linux machine and an opensource DHCP and DNS servers.

For this to work you’ll need:

Read the rest of this entry »

Share/Save/Bookmark