Ubuntu 9.10 (Karmic Koala) provides version 0.18 of Pylint by default. Unfortunately, this version of Pylint cannot be used to scan code that includes any module from PyQt4. The problem is described in this post and has been fixed in the latest version of Pylint (0.19.0). The next release of Ubuntu (10.04 Lucid Lynx) will include Pylint 0.19.x but I have not found any backport of this package to Ubuntu 9.10. However, it is pretty easy to install it in your local home directory using the script listed below:
#! /bin/bash
#
# Do all our work in a temporary directory.
#
ORIGDIR=$PWD
TMPDIR=`/bin/mktemp -d`
if [ ! -d "$TMPDIR" ]
then
exit 0
fi
cd $TMPDIR || exit 0
#
# Get the three packages that are needed to install PyLint locally.
#
wget http://ftp.logilab.org/pub/pylint/pylint-0.19.0.tar.gz || exit 0
wget http://ftp.logilab.org/pub/astng/logilab-astng-0.19.3.tar.gz || exit 0
wget http://ftp.logilab.org/pub/common/logilab-common-0.48.0.tar.gz || exit 0
#
# Install each package individually in the user's local installation
# folder.
#
for i in *.tar.gz
do
PKGDIR=${i%.tar.gz}
tar xvf $i
(cd $PKGDIR && python setup.py install --user)
yes | /bin/rm -r $PKGDIR
/bin/rm $i
done
#
# Remove the temporary directory.
#
cd $ORIGDIR || exit 0
/bin/rm -r $TMPDIR
The KDE folks recently released KDE Software Compilation 4.4 to the public and it totally rocks. I have been using it for the past week and it is the best KDE release so far. The Plasma Desktop Workspace has finally reached a level of maturity and stability that makes it a real pleasure to use; not to mention that you feel a lot more efficient and productive while using the powerful features provided by this environment. The core applications have also been integrated into the Plasma workspace and work well together. The KDE developers are doing a great job improving KDE4 in every release. There are still several places where KDE4 needs improvement but it will surely happen over time. Meanwhile, I will continue using KDE as my primary desktop environment.
![]()
I love Python as a programming language. For a sophisticated language it has very few gotchas and is mostly very intuitive. One confusing feature is that default argument values for functions or class methods are only evaluated once during the execution of a Python script. It is best to show this using an example:
>>> def my_function(arg1, arg2=[]):
... arg2.append(arg1)
... return arg2
...
>>> my_function(10)
[10]
>>> my_function(2)
[10, 2]
>>>
Note that during the second call to my_function() we get a list containing the argument from the previous call. This is not intuitive but is the expected behavior under Python. Python evaluates the default argument arg2 only once. On subsequent calls to the function it keeps using the previously evaluated default value even if it is modified. The lesson learned here is to never use mutable objects are default arguments to functions.. A better way to code the same function is:
>>> def my_function(arg1, arg2=None):
... if arg2 is None:
... arg2 = []
... arg2.append(arg1)
... return arg2
...
>>> my_function(10)
[10]
>>> my_function(2)
[2]
Much better.
I have not used a Fedora distribution since Fedora 10 because I was dissatisfied with it (for some reason I can no longer recall) and switched to dpkg-based Ubuntu instead. Last week, I decided to check if Fedora 12 is any better. I was deeply disappointed due to several choices made by the Fedora developers and will be going back to Ubuntu soon. Here are some of the choices that I find disappointing:
Lately, I have been watching this podcast about using GIMP for post processing digital photographs. The author, Rolf Steinort, records his computer screen as he demonstrates various GIMP-techniques and does an excellent job at narrating along the way. It helps that he is a teacher by profession. One of the reasons I like this podcast is that Rolf does not edit a lot of the mistakes he makes along the way. You feel like someone is demonstrating these techniques to you live with all the mishaps thrown in just like it may happen to you.
Of course, the techniques covered by this podcast are very informative and helpful for any amateur photographer.
I am going use Windows 7 for the next two weeks as my primary operating system to give it a chance and to be fair. I will post my likes and dislikes in two weeks. Who knows, I might turn into a Microsoft fanboy in two weeks. Yeah. Fat chance.
TiddlyWiki is a great way to organize information such as notes, links, figures, etc. in a portable and editable manner without requiring full blown office software or a web server. The entire wiki is contained in a single file and all you need to view or edit it is a web browser. This is a great way to carry your notes around with you. I have a copy of TiddlyWiki on my phone, for example.
This is too cute:

A lot of information about a personal computer is stored as part of the BIOS and can be retrieved using data structures defined in the SMBIOS specification. On Linux operating systems, this information can be easily viewed using the dmidecode utility. This allows one to look up information such as system manufacturer, model name, serial number, BIOS version, asset tag, etc. Here is some sample output of this command running on a Lenovo ThinkPad:
The dmidecode package includes some other handy utilities such as biosdecode, ownership, and vpddecode. No need to turn the laptop upside down just to look up the serial number or model number.