[Thu Aug 20 15:10:08 CEST 2009]

One more configuration tip for the mutt email client: configuring mutt to behave nicely when dealing with messags sent to mailing lists. Mind you, most GUI clients don't handle this in a very nice manner either. At least mutt allows you to configure it. {link to this story}

[Thu Aug 20 14:59:13 CEST 2009]

Dr. Dobbs has a good piece on the confusing nomenclature used for XHTML 2. Basically, they point to this cool comic strip that explains the differences between XHTML 2 and HTML 5. So, what's the beef, then? Summing up, XHTML 2 is truly not related to XHTML 1.0 or XHTML 1.1. The reality is that XHTML has pretty much morphed into HTML 5. Do you like to do things like closing all tags and quoting attributes? You can do that and be HTML 5 compatible. On the other hand, do you prefer a more lax syntax? You can also do that and be HTML 5 compatible. {link to this story}

[Wed Aug 19 11:36:25 CEST 2009]

I recently had to configure the colors on mutt's index to display messages from separate mailing lists in different colors, depending on the topic, and found out that using the regular web color codes would not work. It then dawned on me: of course, mutt is a text-based application and, therefore, it relies on the console configuration, as far as colors are concerned. In any case, I searched around and realized that there were quite a few people asking about this issue. The answer, as it could be suspected, is already on the manual. Check out section 3.7 of the mutt's manual, which lists the colors that you can use for the background and/or foreground configuration. Basically, the list is limited to the following:

  • white
  • black
  • green
  • magenta
  • blue
  • cyan
  • yellow
  • red
  • default
  • colorx
Default can be used as a transparent color, if the terminal you are using it supports it. Also, colorx would be, for instance, color0, or color1, where the number is the number corresponding to the map of colors supported by the terminal. Finally, bright can be preppended to the color in order to use boldface, which is what I tend to do for unread messages.

On another note, once I started using mutt to read my GMail accounts, I noticed that I had to figure out how to configure the email client to trigger a refresh via IMAP. It's easy. Just add the following line to your ~/.muttrc file to be able to refresh the index by using the ^ key:

bind index "^" imap-fetch-mail

{link to this story}

[Wed Aug 19 10:06:49 CEST 2009]

Good old console-based applications save the day again. The thing is that I do like Rhythmbox and Banshee. They are both nice apps. They both show the cover art, allow for easy management of a music library, searches, etc. Still, they are memory hogs, and I'm still doing most of my work on an old Dell Latitude D610 that is several years old and it only has half a Gig of memory. Needless to say, Firefox eats up most of it too. So, I truly cannot afford having an application use up to 200 MB of my precious RAM just to play music in the background. The solution? Run mplayer in console mode. It only uses about 50 MB of memory and it plays the music just as well. Sure, I don't have access to all those nifty music library management features and I cannot see any cover art, but for the most part I listen to music streams off the Net anyways. Big deal. {link to this story}

[Wed Aug 19 09:07:17 CEST 2009]

Now, this is sort of funny. During a conversation via email at work, one of the field engineers complained about the fact that certain sites seem to be running very old software and asked why. Another engineer replied with a good reason as to why certain users of Fluent, for instance, may prefer to stick to older releases, especially when they are in the middle of a long-term project:

I remember a discussion long,long time ago when people doing long term studies on climate changes were seriously thinking about freezing early versions of os and compilers. They found that after an upgrade they basically had sunny weather where there were severe thunderstorms in the previous version...

{link to this story}

[Tue Aug 18 16:18:23 CEST 2009]

Somehow I missed when this news broke out, but I read on Linux Magazine that Microsoft has submitted a patch to the Linux kernel. It's not a little patch either. It contains a total of some 20,000 lines of code. So, what is it they are patching? Apparently, it contains three drivers to enhance the performance of Linux when used as a virtual guest under Hyper-V, Microsoft's virtualization product. So, in other words, Microsoft is just trying to make sure that Linux runs well under a product they are selling. Is this bad? Of course not. It just means that Microsoft has finally come to the realization that Linux is here to stay. Not only that, but they also must have customers who are interested in their virtualization product who want it precisely to run Linux. That can never be a bad thing. Sure, there are people who are already talking about Trojan horses and licensing issues, but the fact is that they have released the patch under the GPL and, as is always the case, the code will obviously be reviewed by peers before being merged (if it is merged at all in the end). So, really, I don't see what the whole brouhaha is all about. {link to this story}

[Mon Aug 17 15:33:10 CEST 2009]

Came across a good (although short) piece on designing for MySQL performance published by the folks at Linux Magazine. Centered on web development, it emphasizes, in the first place, the dangers of scope creep (i.e., the idea that everything and anything fits into a relational database:

Relational databases like MySQL excel at storing and retrieving structured data via ad-hoc queries. But that doesn't mean it's the best system to store all your data. It's not uncommon for people to use BLOB fields in MySQL to store images, Word documents, Excel spreadsheets, JPEG images, and so on. And if you've never tried to manage and scale a growing repository of BLOBs in MySQL, you're not going to like what you're building yourself.

There are well known workarounds. Mainly, use the database just to store the metadata about the objects while the actual content (the Word files, the spreadsheets, etc.) are actually sitting on a file system somewhere.

Likewise, MySQL should not be used for logging. That's what other tools, such as syslog-ng were written for. Do you need centralize information for a whole network? Then make sure you configure a log server, but don't try to shoehorn the information into a relational database. Finally, consider caching:

It's no longer the case that the typical site is a vanilla LAMP stack with Linux, Apache, MySQL and your favorite "P" scripting language (Perl, PHP, or Python). Not only a lot more languages out there nowadays (Ruby, for example), but there's a new layer in the stack: caching. It's become fairly common to use memcached as a place to store transient data that's too expensive to fetch from MySQL. Performance is excellent. With gigabit networks connecting 64 bit machines that have anywhere from 16 to 64GB of RAM and no disk involved, you easily get response times measured in the single digit milliseconds.

Memcached isn't the only game in town. There are numerous Open Source Distributed Hash Table (DHT) projects working to make fast and scalable systems for storing and retrieving arbitrary key/value pairs.

Plan for a caching layer in your application. Instead of writing code that directly queries the database for data that rarely changes or data you expect to re-use frequently, either within or across user sessions, hide that logic behind a function. Doing so provides a layer of separation that makes it far easier to begin making use of a caching layer (since you'll have a single library of functions to update), even if you don't actually have memcached or a DHT of some sort running from the start.

This is all sensible advise, I think. {link to this story}

[Mon Aug 17 13:25:45 CEST 2009]

After consolidating a few accounts on GMail, I decided to go ahead and configure mutt to access the messages via IMAP and I have to say I am surprised at how easy it was to set up. There are plenty of documents on the Web telling you how to do this, but I used this one. Simply edit your ~/.muttrc file and make sure it contains the following:

set imap_user = 'youremailid@gmail.com'
set imap_pass = 'your password'
set spoolfile = imaps://imap.gmail.com:993/INBOX
set folder = imaps://imap.gmail.com:993
set record = "imaps://imap.gmail.com/[Gmail]/Sent Mail"
set postponed = "imaps://imap.gmail.com/[Gmail]/Drafts"
set header_cache = "~/.mutt/cache/headers"
set message_cachedir = "~/.mutt/cache/bodies"
set certificate_file=~/.mutt/certificates

Since the file now contains your password, you may want to make sure it is not world-readable. Also, you may choose to leave the set imap_pass line out and manually enter at the prompt every single time you connect. Mutt will ask you for it. It seems to be working pretty well so far. {link to this story}

[Mon Aug 10 14:40:54 CEST 2009]

Not so long ago I wrote on these very same pages that I was spending sometime testing the Google Chromium browser because I couldn't stand Firefox's memory leaks anymore. It truly got to a point where I had to kill the process and launch the application again at least twice a day, especially if I opened more than one tab with some Shockwave Flash applet. Well, it is just fair to report now that, ever since I upgraded to the latest Firefox 3.5 on my Ubuntu 8.04 Hardy Heron, things are running very smooth indeed and I have learned to love the browser again. I am running it parallel to the default browser that comes installed with the operating system and had to install a new version of the Adobe Flash plugin (this was easy: I just had to accept the instructions from the pop-up window), but it is quite stable and, while perhaps not as fast as Google's browser, it has far many more features and customizations that I can benefit from. In other words, that I haven't fired up Chromium in a while now, to be honest. {link to this story}

[Mon Aug 10 13:10:48 CEST 2009]

Although news broke out a couple of weeks ago and the situation has already been solved, it's still worth mentioning that Lance Davis, the CentOS project lead, seemed to disappear for sometime and nobody knew how to contact him or a relative or friend who could provide an update on his situation. As the sole administrator of the CentOS project, its domain, the IRC channels and also the project's funds, his temporary disappearance obviously caused some concern. In the end, although Lance has reappeared and everything seems to be under control, the incident definitely points out a possible weakness in some open source projects where the disappearance of the leader might cause some major disruptions. It's something to bear in mind whenever setting up the structure of any project. That's for sure. However, the very fact that many of these communities start as an informal project to "scratch an itch" increases the chances of something like this happening somewhere else. All too often, these communities grow larger than originally expected and the tough decisions about setting up a more or less permanent infrastructure and formal organization are continuously postponed because they are considered to be somehow "boring" or " too serious". That attitude has been about to cost to all those trusting the CentOS project to run their servers. {link to this story}

[Mon Aug 10 11:06:30 CEST 2009]

A friend sent me this link to the errorwear inc. website. My favorite is the 256th level in Pac-Man t-shirt: upon reaching this level, the game just broke. Not that I ever reached level 256, of course. I've never been a big gamer. Yes, I did play Pac-Man, of course. Who didn't? But I never liked wasting my time away with computer and video games. I didn't like it back then, and still don't like it today. There are plenty of other things I have fun doing. {link to this story}