Wednesday, June 20, 2007

New ideas

Here's an interesting article about innovation and how we can feed our brain to breed new ideas. I still haven't tried the techniques, but they seem logical enough to work.
And no, the reason this blog hasn't been updated has nothing to do with lack of ideas, but with time-consuming personal matters :)
Cheers.

Friday, March 09, 2007

Groovy impressions

Recently I've been doing some work in Groovy. First impressions were very good, but I won't start using it for everything. I think we should choose the right tool for the job, and dynamic languages like Groovy are great for some tasks, but are worse for others (and this is not an universal truth, some people function better in one way, others in other ways). I already knew some of the syntax-sugar (map handling, duck typing, etc) that is also common to Ruby or Python, so that was not a surprise. What really impressed me in Groovy was how complex tasks were made simple. For example: file handling. Here's a small example:


File f = new File("a.txt")
f << "text"

This is enough to append the given string to the file. This is different from just "typing less characters". What's great here is that resource handling is completely hidden from the programmer. We just tell it to read or write something to a file and don't have to remember to open or close resources.
Another gem:

URL url = new URL("http://www.google.com")
File f = new File("a.txt")
f << url.text

Yes, it does what you're thinking: automatically fetches the contents of the given URL and stores it in the file a.txt. Now, if you add closures and regular expressions, page scraping just became a lot easier :)

Some people see less typing as the ultimate goal to increase productivity. Although I think much faster than I type, I still spend more time thinking than typing. In the end I don't think a few less characters make any difference. I think is much more a psychological effect than anything else (I constantly see people writing how Ruby makes programming more "fun"). But this kind of simplicity shown above does make a difference because it make file handling easier and less error-prone (no more forgetting to close resources).

Sunday, March 04, 2007

Fixing dead pixels

Fortunately I don't have any dead pixels on my monitor. If I had I could try this, although I'm highly skeptical about it's effectiveness. But, who knows...every now an then I get surprised at something :)

Thursday, March 01, 2007

Java 6 Hotpatching

I already knew of the ability for a java process to attach itself to another process for monitoring purposes. Java 6 comes with a nice graphical console (jconsole) that shows several statistics about the running process, like memory usage, etc.
What I didn't know was that the API for that allowed to do this. According to the article we can substitute a class for a new version of it in runtime!! Although I don't see this sort of thing being used very often, it's still very cool :)

Tuesday, January 16, 2007

Linux needs better IM clients!

There are several IM clients for Linux and they work perfectly fine for the most basic operations, like chatting and file transfer. I personally like Gaim. It's fast, stable and the simplicity of its interface is great. I've also tried aMsn, Kopete, Mercury with different degrees of success. But looking at their Window's counterparts (msn messenger, yahoo, icq, etc) they seem a lot behind. Modern IMs now have things like animated smileys, custom and animated backgrounds, small flash animations and most importantly web cam and audio support.
Well, some Linux IMs actually have most of those features, being aMsn probably the most complete and Gaim the least (doesn't have any of those features). My experience with aMsn (and others) is not very successful. aMsn seemed very unstable, and although I could get my webcam to work, it was too sluggish to be of any use. Mercury seemed promising but I couldn't get the web cam to work. And audio definitely didn't work with neither. I know some have had success with these programs, but they definitely need much work to be able to compete with windows IMs.

Many Linux users don't care about these features, but they are important. And if we want Desktop Linux to be successful they're essential, like it or not. Audio and video is the most important. And is not only to keep up with your friends. Many companies use this for internal video-conferencing (it's simpler, cheaper and perfectly suffices in many cases).
But custom backgrounds, flash animations, etc are also important. And I know many people dislike these features and don't understand why it matters. For several years I lived without those flash animations and fancy backgrounds, but now I'm rebooting to others OSes to use them. Before you think I got some sort of mental illness, let me give you a simple compelling reason why it matters: when you want to talk to a girl (non-techie) that happens to like those features, the whole argument "I use Gaim because I have Linux and it's open source and it's better..." just doesn't seem that strong all of a sudden. And you'll end up using (or letting her use) those features. It's just an example :) but it shows that there are people that want to use those features.

The point is: in many aspects Linux is leading the innovation (take XGL for example), but IM is several years behind. I know it's a very difficult subject because most of the communication protocols are not public. But I'm not sure this lack of good and innovating IMs has all to do with hidden protocols. I just think there's not enough motivation in Linux programmers for implementing it. Maybe distros like Redhat, Suse or Ubuntu start seeing this and start promoting more advances in this area.