Hari's Corner

Humour, comics, tech, law, software, reviews, essays, articles and HOWTOs intermingled with random philosophy now and then

Mahatma Gandhi

Filed under: Artwork/Portraits/Caricatures by Hari
Posted on Tue, Jan 30, 2007 at 10:51 IST (last updated: Thu, May 7, 2009 @ 21:02 IST)

Here's a special edition of Cartoon Corner! I've tried to portray Mahatma Gandhi in this picture. This one took the longest among all the cartoons I've drawn so far. Had to draw quite a few times since I didn't get the shape right the first couple of times. (and yes, like all my toons so far, this was also drawn entirely using the mouse). Hope you like it! :)

Mahatma Gandhi
Comments (6)   Leave a comment

Wordpress Upgrade again

Filed under: Site management by Hari
Posted on Tue, Jan 30, 2007 at 09:34 IST (last updated: Thu, Jul 17, 2008 @ 10:47 IST)

WordPress 2.1 has been released recently. I upgraded today and as always, it was a more or less a painless procedure. Merely overwrite your existing WordPress files with the new package and then run the wp-admin/upgrade.php script. It's as simple as that. Even if you use a few plugins you needn't be too worried. I guess most plugins that work in 2.0.x will work in 2.1.

Traditionally WordPress upgrades have never been radical. Most changes and enhancements to this extremely popular and stable blogging platform come in slow, incremental steps and this upgrade is no different. If you've been using the 2.0.x version, you'd not notice too many external changes. However, since there are more than 500 bug fixes, it would probably be a good thing to upgrade anyway. :)
Comments (4)   Leave a comment

My favourite RTS game

Filed under: Software and Technology by Hari
Posted on Sat, Jan 27, 2007 at 10:01 IST (last updated: Wed, Jul 16, 2008 @ 21:29 IST)

Have you ever heard of Seven Kingdoms? Chances are, you haven't. It's not a particularly popular game and I guess most mainstream Real Time Strategy gaming fans wouldn't have heard of it. It's a fairly old game and its graphics aren't really flash, but till date I've not found a single RTS game that matches Seven Kingdoms in terms of sheer depth and playability. It's truly a unique game in this genre. Here are some of the reasons why I keep coming back to Seven Kingdoms ahead of so many other more recent RTS games with flashier graphics.

Seven Kingdoms is a rare gem in an otherwise formulaic RTS gaming scenario. If you are tired of the modern RTS genre with its primitive economic system, lack of dynamic alliances and trading/diplomacy, do pick up this game. You're sure to get it fairly cheap somewhere.
Comments (4)   Leave a comment

Season's greetings to all my readers

Filed under: Life and Leisure by Hari
Posted on Tue, Dec 26, 2006 at 11:31 IST (last updated: Wed, Sep 26, 2007 @ 15:21 IST)

Well Merry Christmas, Happy New Year or whatever festival you celebrate at this time of the year. It's usually the time when most of us are in a festive mood (no matter what our religions) so enjoy your time off from work (or study). :)

I have been writing a lot of reviews of late (on harishankar.org) and so, if you have a bit of time, feel free to send me your feedback either here or discuss them at literaryforums.org.
Comments (5)   Leave a comment

My reviews site redesigned

Filed under: Site management by Hari
Posted on Wed, Dec 20, 2006 at 13:24 IST (last updated: Wed, Sep 26, 2007 @ 15:21 IST)

I have redesigned the look and feel of my reviews site using a different approach - minimal styling and a fixed width font. I personally think this new style looks quite good.

I have also added a very simple "changelog" in the main page to help regular visitors find any new reviews posted on the site etc. etc. Please do leave your feedback on the reviews site content as well as the design. In particular I'd like to know how the fixed width font works for you.
Comments (14)   Leave a comment

Basic tips for Linux programming

Filed under: Tutorials and HOWTOs by Hari
Posted on Mon, Dec 11, 2006 at 10:56 IST (last updated: Wed, Oct 29, 2008 @ 22:00 IST)

If you're new to Linux programming, then you might be interested in considering these aspects before you start your wonderful journey. Especially if you've programmed in Windows, you might want to change some of your ideas, so that you minimize the "culture" shock you experience when you encounter completely different ideas and ways of thinking.

Here are some of my tips, based on common questions asked in forums about Linux programming especially from experienced Windows programmers.

Evaluate every available alternative

Unlike the unified Windows API which provides the Windows programmer with a single method of achieving a certain objective, Linux provides a variety of ways to achieve the same objective. For instance there are a variety of GUI abstraction toolkits, the major ones being QT and GTK to write GUI programs. Again, you need not necessarily choose C or C++. There are many choices for programming including basic shell scripting, Perl, Python and PHP. So do not always have a fixed idea that you need to learn the "hard" way. In fact, you might be surprised to discover the power and elegance of scripting.

Do not be overwhelmed by choices. Just be aware of all of them and pick the tools and techniques that you're most comfortable with.

IDEs are not necessarily more productive

Programmers who've used Microsoft Visual Studio extensively to do their development might find it uncomfortable to adapt to Linux's way of doing things. While there are some pretty decent IDEs in Linux including Kdevelop, anjuta and Eclipse, you might actually find that using a text editor and creating a make file to be a better idea in the long run. Particularly when you are developing Free Software applications, you might not want to tie down development to a particular platform or IDE considering that your code will be shared and other programmers might also be contributing to your project. While IDEs are not always bad, you might find developing smaller projects using a simple text editor and a makefile a better idea.

Do not look for distribution-specific features

It might surprise many Windows programmers to know that you can practically make no assumptions about a default Linux configuration on the end user's machine. Different distros use different configuration file locations and settings. Unless you're writing a system configuration utility for a particular distro, try and avoid distro-specific assumptions. Also never force users to run as "root" unless your application's sole purpose is to modify system specific settings.

Do NOT modify or attempt to modify system files

Apart from being bad programming etiquette,
  1. You cannot assume that a certain system file exists on the end user's machine (because of distribution-specific differences).
  2. You simply cannot modify system files as a "normal" user and you cannot expect a normal productivity app to be run as "root."
In most cases, you will find you hardly have any good reason to touch system specific files.

Be consistent visually

GUI programmers, especially GTK and QT programmers, need to understand that these libraries are heavily themeable (meaning that the end-user can modify the visual appearance of GUIs in almost any way possible - including fonts, colours and the widget appearance). Therefore, avoid using specific fonts or colours in your GUIs. You don't need them. Do not force your end users to install any particular font on their system. Leave your application's visual rendering entirely to the GUI library that you use. Unless you're writing a word processor you might hardly ever need to directly handle fonts in your application's code.

Be prepared to do some research

Linux does not come with an MSDN-like tool to provide you documentation for every single programming tool or API available out there. It's simply not practical because Linux is not developed by a single company. In most cases if you're using third-party libraries, you will be able to find documentation (either downloadable or online) on the official website of that particular library's maintainer. Also be aware that quite a few libraries come with incomplete documentation or none at all.

You might have to look for sample code or even at header files to learn more about a particular library. Fortunately you might not encounter this situation in the case of most popular third-party libraries, but it's better to be prepared nevertheless.

Do not package dependencies

When you're creating a "distributable package" do not include dependencies along with your tarball. Just include the source and provide compiling instructions (the more generic, the better). Also mention the required dependencies in your README or INSTALL files and in your website. Since most Linux distributions have their own package management systems (and if you're application is good enough, it might even be included in the official package repository), you should leave the dependency handling either to the end user who compiles your program manually or to the distribution package maintainer who ships your application as part of his package. Since every Linux distribution has a different way to manage dependencies, do not interfere with it by creating an "installation" routine that tries to be smart and installs other libraries.

Apart from creating versioning problems, it's simply tedious and cumbersome to include dependencies with the program. Also try and keep the dependencies to a minimum, particularly if your program tends to use exotic third-party libraries.

Even if you're not releasing your program as Free Software, try and keep the packaging to a minimum and provide instructions to the user on dependencies.

I hope this has been of use to you as a newbie to Linux programming. Happy programming!
Comments (37)   Leave a comment