Monthly Archives: March 2007

Time drift in MRTG log file.

I have been writing a small Perl script (which is part of a large Perl script) to parse the log file generated by MRTG at work. However, apparently for an unknown reason (so far), MRTG is introducing a time drift in the first few entries in the log file consistently. Although I have [...]

The global modifier in Perl’s regular expressions.

Just this afternoon, I had the occasion to think up of a quick regular expression to match some numbers in a fixed string within a large block of string. The regular expression didn’t take long to figure out. However, after testing it against the block of string, it became obvious that the string [...]

Namespace Clobbering in Perl.

Last night, I was bitten by namespace clobbering in Perl. I am not sure if that is what it is called.
I was modifying Perl code I had written to parse log files generated by MRTG to track traffic that comes into and goes out of an interface on a device being monitored. [...]

Skype’d

I am hooked to Skype. If you can figure out my Skype ID, you can have a talk with me. I will drop behind a simple hint: first name minus last name. Heh.

Sweet Serenity.

Sunday morning just drifted away into afternoon. We are having the most wonderful weather here in Karachi. It has been raining, on and off, since the wee hours of the morning, with cold winds making the bathing leaves dance in the air. Lovely.
Now, I only wish I had better eyes. I [...]

Named Groups, Regular Expressions, and the Python ‘re’ module.

Some people, when confronted with a problem, think “I know, I’ll use regular expressions.”
Now they have two problems.
−−Jamie Zawinski, in comp.emacs.xemacs
And it is true. Regular expressions, known as REs in short in Python, are a beast. They are powerful and difficult to handle, read, and maintain at the same time. It is tempting to use [...]

The 2x click Optical Mouse … and Slackware.

The other day I finally got a 4-port USB hub, a cheap headphone and microphone set, and a nice, hand-size optical mouse with that snazzy yet pretty useless (for me) 2x click button (it performs the double-click function so you don’t have to double click anymore). The hub as well as the headphone and microphone [...]

Your eyes are precious!

For those of us whose work involves staring at a flickering screen for hours at end, Web Worker Daily has an insightful post titled “Five Ways To Be Nice To Your Eyes’’ that is a must read.
I spend hours sitting in front of and staring at a screen on a daily basis, be it [...]