Jun 21st, 2008 | Etc, censorship, jinnah, lahore, march, museum, Pakistan, revolution, traffic, vip, zardari | 4 Comments
A couple of days ago, I had the misfortune of attempting to take my son to the Lahore Museum. The weather was pleasant, I was relatively free and had promised him this visit last month, but the one variable that completely skipped my mind was the schedule of our overlord, Mr. Asif Zardari - and I’m still cursing myself for this blunder.
The Lahore Museum is approximately a 25 minute drive from my home, but when we reached the Punjab Assembly building on the Mall, the road was completely blocked by the police, with the traffic being redirected to the right. On the second road that runs parallel to Mall Road, there was another block, and after the policeman asked me where we were going, he ‘recommended’ that we take some other road further ahead. After a very long and slow detour on crazily overloaded single lane roads that I would never enter in normal circumstances, sprinkled with a generous helping of muttered curses, we somehow reached the museum after more than one hour.
During the journey, my son kept asking me “Are we there yet?”. Since I did not want to trouble his tiny mind (he’ll have plenty of opportunities for such troubles in the future, without me adding to them) by trying to explain to him how the mere presence of a single pure bred homosapien in an area can create problems for a few thousand human beings when you live in Pakistan… so instead, I had to convince him to drop his idea of “burning the roadblocks and making the police let us pass” (no, he’s not a terrorist in the making, not yet - he just watches a lot of Ben10).
My estimate is that the Mall usually has traffic density to the tune of 1 car per second, now multiply it by a few thousand and you will get an idea of the magnitude of disruption, not to mention the loss of time (60 minutes for me) and fuel (atleast a couple of liters) that a single VIP visit / Provincial Assembly may cost to the Pakistani public.
In the museum, I saw an intriguing poster on display in the Freedom Movement section of the Lahore Museum. It said something along the lines of
When Quaid-e-Azam Muhammad Ali Jinnah Rehmatulah Aleyh was taking his last breaths, two words came out of his mouth - “Allah” and “Pakistan”.
I have been thinking about it, but still do not understand why this (not an antique) poster has to be displayed in our museum. Jinnah’s actions, vision and beliefs should be enough for anybody to respect the man, without the need of half a dozen prefixes and suffixes around his name to put him on a pedestal.
The drive back home, after three hours, was not much different. The Mall was blocked again, this time, near the Governor House, with traffic crawling at 5 Km/h.
The incident gave me a much better understanding of how terrorists are born. It also made me sort of agree with Zardari when he calls the long march a “mere carnival” - I would have given anything to see a tiny percentage of the long march attendees block the road upon Zardari’s arrival.
If you boil water in an open pan, it boils and evaporates. Watching water boil is boring stuff indeed. On the other hand, when you boil water in a closed container, steam starts building up, which could result in an explosion, or a steam engine. Either way, it is certainly much more interesting than watching water evaporate. I may be going senile, but I think that instead of long marches, what we actually need is more censorship, more injustice and more roadblocks for the government officials VIPs - roadblocks that make a few thousand people curse and think for a few minutes. After a few hundred such roadblocks, either the whole Pakistani nation will be trained into submission, or we will collect enough steam to purge the system for good. Either way, it will be a good change from our status quo of toad-dom.
May 14th, 2008 | Etc, Computers, DVORAK, HCI, interface, keyboard, kids, lifehack, qwerty, Rants, rsi | 7 Comments
After years and years of abuse, my pinkies can’t take it anymore and have hijacked my remaining fingers (and the thumbs) into writing this post.
So if you are a developer, a database designer, or just writes APIs or SDKs or programming languages or opensource code that other people will reuse, and if you love coding conventions, and if you like using the underscore ‘_’ as a separator, please STOP RIGHT NOW!. Think of all the little fingers that you will save!
If you are still not convinced, try typing Q_Q_Q_Q a few times. See?
camelCase is just as good for variables, and FirstLeretterCapitalization should be sufficient for functions names. It is bad enough that the curly braces {}, the Backspace and the Enter keys are so far away from the left little finger, and yet it has to cover all those keys - please don’t make it any worse by these horrible underscores!
The generation before us (the pioneers of computer science etc. etc.) probably started using computer keyboards in their middle ages, my generation (in Pakistan at least) started using computers in our teens, and if my son is a good representative sample, then TNG (The Next Generation) started using computers before they learned how to write. This means their poor little fingers will get an extra decade or so of keyboard exposure. The pioneer generation didn’t have a clue, but we do - most of us 30 somethings have aching fingers (or is it just me?) each day, after spending half the day in front of the computer. Let’s make the world a little more pleasant for our kids.
So the next time you get this urge to use the _ in your code, please reconsider. Thank you!
May 8th, 2008 | Brain, Brain, grammar, graph, Rants, thought, tree, words | 4 Comments
A phrase that has been really bothering me since I was a teenager is “Chain of Thought” or “Train of Thought” - it even has its own wiki page! As I have recently realized that one use of blogs are meant to be a personal ranting space, so let me do that.
A chain is a lot like a vector, so when I hear the phrase “Chain of Thought”, I see a thinker/brain jumping from link to link, much like an iterator, and most of the links are identical. I don’t think like that, and I’m sure most people don’t either.
When I try to visualize thinking, the picture that comes to my mind is that of a set of stacks, with thoughts popping out of some and being pushed into others.
At other times, thoughts remind me of a tree, with the brain traversing it, sometimes depth first, and sometimes breadth first, but more often, thought looks to me like a graph, with the brain hopping from node to node however the hell it pleases.
A tree is a graph, and a vector is a tree, so why do we have to chain our thoughts by making them look like they follow a linear pattern? They are seldom that linear! Ok, a “Graph of Thought” sounds modern, but trees have been around for much longer than chains!
To me, analogies and models are dangerous oversimplifications. Whenever we use a model to represent something, the thing that is being represented loses a certain part of its being. By sticking to a chain model, we are simplifying our thought process, and perhaps, becoming just a little bit more stupid in the process. I say, let us kill the phrase “Chain of Thought” and climb one teeny weeny step higher on the ladder of evolution.
After this post, I will take the nested brackets that I love (and I do love them (honestly (yes, this is a forced example))) as deep as I want to, without bothering about grammar.
Grammar needs a redesign.
May 7th, 2008 | Pakistan, Scifi, consumer, hack, lahore, lesco, Pakistan, power, security, sql, stupidity, wtf | 6 Comments
What would you do if your laundry-shop published your laundry bills online, along with your name, address and phone number, for the whole world to see?
A couple of months ago, while trying to understand Pakistan’s perpetual energy crisis situation, I entered the LESCO website hosted at http://www.lesco.info/. As soon as I clicked the Customer Service link, I was teleported to a consumer privacy and security hell. I closed my browser after going through a few pages, hoping that the website would disappear like a bad dream, and tried to forget about it. Two months later, the website is still online, so I think LESCO doesn’t have any plans to take it offline. Meanwhile, I have gone through the five stages of grief, laced with a few non-standard stages like ‘hilarity’ and ‘helplessness’ that Kubler-Ross probably hadn’t thought of, so now I can write about this joke without affecting my blood-pressure and general sanity.
When you enter the webite, you are rewarded with a pre-filled login form. You heard me right - the form is pre-filled with the username “Guest” and password “*******” (hehe) for your convenience. The links at the top are pointing to a certain firm called Clicksoft and are broken, but you can still visit the Clicksoft website to hear their amusing pitch:
ClickSoft is a groundbreaking software development organization providing high-end technical solutions. Our customers benefit from our vast experience of Enterprise Resource Planning (ERP) software solutions for demanding mission critical environments in, retail and wholesale, manufacturing, financial services.
I will not pass any judgement on their claims, but I do wish that their prospective clients do a little research on them before handing them any business.
After you “log on” to the LESCO /mc/ website homepage as a “Guest”, you are handed a search form, but not just any form - this one has the special power of letting you search the complete LESCO database!. You can search by any field, including customer name, their address and even their neighbor’s bill. By the way, from the search forms, it looks like many people are born with “through”, “Col” and “Officer” in their names.
I am a big proponent of transparency, but LESCO has taken it a bit too far! You can search in Applications and you can search for Consumers and even browse various LESCO locations. The real gem, though, is the Feedback Form. It allows you to “Change Password”! Yes, the same password that was embedded in the login page (*******)… A classic case of WTF!
If you think it ends here, you are wrong, LESCO has one more surprise for you. Visit the Reports section and you will come across URL masterpieceslike:http://www.lesco.info/mc/default.php?action=35&where=%20where%20c.app_date%3C=’2008-05-06′
%20%20and%20substring(c.loc_code,2,1)=’2′&circle=&desc=Demand%20Note%20Paid
All ten year old script kiddies and their pet parrots know the kind of malicious things that are possible with a little bit of SQL Injection, so I will not spell them out here, but apparently, the “Regional Training Centre LESCO”, who own the website, are still trying to figure out how to create websites. With employees like these, who needs corporate saboteurs?
So, coming back to the original question (”What would you do if your laundry-shop published your laundry bill, along with your name, address and phone number online, for the whole world to see?”), if your answer is “Nothing.”, I will understand. The rising oil and food prices have probably pushed things like data privacy towards the bottom of the list of things to worry about. Consider yourself lucky though, if a telemarketer discovers this treasure trove and a vaccum cleaner salesman comes aknocking at your door two days after you apply for an electricity connection. It would certainly be better than having your identity stolen. and a lot more entertaining if you are like me.
I did some research on consumer privacy and identify protection in Pakistan to see where the consumers (that’s you and me) stand, and discovered that Pakistan is yet to have a consumer rights protection law. Besides Babar Bhatti of telecompk, who writes about the topic frequently, and Dr. Awab, who urged me to write this post, I did not find any Pakistani bloggers who have shown serious concern about consumer data privacy in Pakistan on their blogs (though my google search session was brief). I did stumble upon websites for entities like Consumer Rights Commission of Pakistan and The Network, but have yet to read what they are all about.
On the bright side, incidents like this make one think that perhaps the lack of ecommerce in Pakistan is actually a blessing in disguise. What do you think?
PS. For those too busy to visit the actual website, I’ll try to upload some screenshots soon.
PPS. No bytes were harmed or abused in the writing of this post.
May 2nd, 2008 | 3D, kde, kubuntu, linux, plasmoid, Qt, review, shortcuts | 2 Comments
There are dozens of blogs and websites passionately ranting or raving about KDE (passion is one thing that the open-source community seldom lacks). As I have been using the latest Kubuntu Hardy Heron for almost a week, so I think I am ready to form an opinion about it. Here goes…
My second day with KDE4 was spent playing with plasmoids while installing the essential software in parallel. Plasmoids are to KDE4 what widgets are to the web (these days). Plasmoids are mostly eye-candy, but can also be full of fun features. After developing in Qt for last few years, I can safely say that plasmoid development is going to be a fun activity for the developers - and if KDE4 manages to get the escape velocity required to make it leave the linux environment and land on the MS desktops, a big development market will be built around it.
On day two, I searched Adept for all things plasma / plasmoid, and discovered extragear-plasma, which, as the name implies, has a few more plasmoids to play with. The comic strip plasmoid is fun, though you can only begin from the latest strip and go backwards in time from there (and so, requires more navigation features).
Then there’s KDEtwitter, but it eats up a lot of valuable pixels, and does not hyperlink the urls in tweets, so I had to stop using it after a few hours.
Learning to find my way around it wasn’t so hard. A few useful shortcuts and gotchas:
- Ctrl+F1 and Ctrl+F2 switch between desktops.
- Ctrl+F12 shows the desktop, and you can interact with the plasmoids before pressing Esc to go back to the normal view.
- You can use the plasmoid resize handle with Ctrl to freely scale it, or Shift to maintain the aspect-ratio.
- You can remove the panel (taskbar in Windows) quite easily by editing a text file. I think having a GUI based desktop editor should be a top priority for the KDE4 developers. Here’s how to completely remove the panel.
- I didn’t notice this behavior in the earlier versions, but, your Trash can resides in your home folder, so if you delete a huge folder from a removable drive, it is actually MOVED to your ~/ folder - I deleted a 34GB folder and saw my harddisk run out of space due to this behavior. Irritating!
- Shift+Del skips the Trash can and just deletes the files.
- Apt urls - like apt:gparted - work, and automatically install the linked package.
I also found a lot of interesting arguments about the evil or revolutionary KDE4, here are a few of them:
While the KDE4 attempt to redefine the desktop may not be evil, it requires getting rid of a LOT of old (but not necessarily bad) habits, and right now, I don’t think the retraining is really worth it. A few examples of what I mean:
- I can’t drag/drop
files plasmoids into one another. I was used to dropping a .txt file on my desktop to the kate shortcut to open it, a divx file to the vlc shortcut, and so on… but now, I can’t drag an html file plasmoid to the kate plasmoid to start editing it right away. Drag/drop into an open application (.txt to kate or .html to firefox) isn’t supported either.
- The context menu for plasmoids is very limited. I can not right click that same .html file to open it in any other software besides my browser (or atleast I haven’t discovered an easy way to this).
- I can’t right-click a folder on the desktop and add it to an archive so that I can mail it immediately! This is a feature I have been using for years now, but suddenly, KDE4 has taken it away from me. Now, I need to go to a konsole and zip it manually.
- There is no quicklaunch plasmoid. I have added a bunch of application shortcuts on my desktop, but I liked those tiny quicklaunch icons better.
So, KDE4 wants you to remember: “A plasmoid is not a file” and “A Desktop is not a folder”. While this new desktop may be semantically accurate, but practically, it has been very inefficient for me so far. Maybe I need to discover some magic tricks hidden inside KDE4 to be more productive… or maybe I am just an old dog who doesn’t want to learn new tricks. I will continue using it though, but mainly because reinstalling everything from scratch is too much effort, and because Yakuake, which is a “quake-style terminal” that I can open by an easy shortcut, is helping me do most of my work on the console.
Finally, if you ask for my recommendation, I will tell you to stick to the KDE3.5 version of HH, unless you are curious to see what the fuss is all about, or unless you intend to be an early-adaptor who wants to be an expert developer for KDE4 when it hits the mainstream.
Apr 30th, 2008 | Life, analog, clock, digital, information, story, time | No Comments

Sorry about the “Big” in the title, yes, it is out of place, but I thought ABCDE would look pretty.
Thanks to KDE and its plasmoids, I have rediscovered analog clocks this week - the last time I checked (pun intended), I was using a digital clock all the time (pun not intended - seriously), but all that changed after I used the analog clock in KDE4 (featured in the picture here) this week. It’s not that the clock is pretty (which it is) but that I have realized that a digital clock only shows you an instance in time, where as an analog clock has a lot more information packed into it.
Right now, it is 12:51AM in the digital clock (since I’m on windows), but those numbers themselves don’t tell me much, besides the fact that it is 12:51AM. An analog clock, on the other hand (uh, sorry) not only tells me that it is 12:51AM, which is almost 11/12th of an hour after midnight, it also makes me think remember the recent past, the dinner I had at 10PM, the ex-student that I met after 6 years at 7PM while coming back home from a meeting at 5PM, all the way back to 8AM, when I woke up (I’m still proud about waking up at 8AM after many many months). It also shows me the time I can allow myself to write this post (10 minutes) before I must go to sleep (for 7 hours) so that I can wake up at 8AM again. I don’t know about you, but with a digital clock, I had to consciously think about all of this after looking at the time - but looking at the analog clock triggers these thoughts in the back my mind. A digital clock never did that!
So… no more digital clocks for me, I’m installing a windows widget for an analog clock (a digital analog clock would be an oxymoron) when I wake up (at 8AM).
In another related incident, tonight, my son’s bedtime (Barney) story featured Mrs. Goldfinch, who looked up the name of a multi-colored egg in books (it was a “dream-maker” egg), and my son’s immediate query was, “Why didn’t she look it up on Google?”.
We need a new set of books, and it is a good time to enter the children’s book market. Any takers?
Apr 27th, 2008 | Etc, 9400, amarok, gui, HCI, heron, kde4, kubuntu, laptop, linux, nvidia, software | 6 Comments
Back in the 90s, I used to install and reinstall Windows 95 over and over again due to one reason or another (and I am sure it was the same for any Windows user). The last time I did a clean install, though, was 2 years ago, when I bought this laptop and killed the default Dell partitions to make it dual-boot. Installing the shiny new Kubuntu Hardy Heron on the day of its release gave me a geeky high I never knew I missed. Yesterday was my first actual day with Kubuntu 8.04. This post started as text notes for personal reference in the future, but I decided to put it up online instead of letting all that typing go to waste just in case it is useful to somebody. So here it is, my first day with Hardy Heron, full of installations, documented.
NVIDIA Drivers
Installing NVIDIA drivers took a bit longer than Gutsy, as Envy is not compatible with Hardy Heron as of now. There were two choices: go with the 92.something drivers available in Synaptic or download the latest drivers from the NVIDIA website. I (unfortunately for me) chose the second option, and ended up having to download build-essentials, rebuild the driver kernel, and fix /etc/X11/xorg.conf multiple times before my drivers took pity on me and started working.
Network
Both Wireless and Wired network drivers worked out-of-the-box without any special configuration necessary. It seems that the days of madwifi are gone for good.
Firefox
You have two options: firefox-2 and the firefox-3 beta. I lost my mind and decided to go with firefox-3. After the installation, I logged in to various websites that I use the most, to save my username/passwords, but when I started installing the extensions I can’t live without, not even 10% were enabled with the new version - there’s almost no backwards compatibility in firefox-3 as far as extensions are concerned. At the end, I had to uninstall firefox-3 and reinstall firefox-2, but not before I tried running them both in parallel without success. Maybe it is possible to make them work that way, but I had better things to do.
Firefox extensions
As a result of my previous firefox-3 blunder, the extension installations stopped working. I got an unexpected 203 error whenever I tried to install an extension. Thankfully, the errors went away after I deleted the extensions.rdf file in my ~/.mozilla/firefox folder, and I was able to install everything I needed.
Flash installation from source went without issues.
AMP
Nothing has changed for Apache, MySQL and PHP, so AMP installation went smoothly. I did the standard sudo apt-get install blah blah, Addtype in apache.conf, a2enmod to enable mode_rewrite, installed phpmyadmin and was able to restored everything from my USB harddisk.
Amarok
My Dell Inspiron 9400 has an extra “subwoofer” - in Gutsy, I had to compile ALSA from source in order to make it work, but I didn’t have to do it with Hardy. So I installed amarok and was expecting that the mp3 playback will start after amarok prompts to install mp3 support, but it began with a klauncher error. This thread helped me fix the error using kdeinit, and amarok started properly, though mp3s were still not working. After an hour of installing dozens of gstreamer good, bad and ugly codecs and xine plugins, mp3 playback and shoutcast streaming were still broken. During my tinkering, I enabled ALSA from amarok configuration manually, and everything started working! It took one more hour to build a mySQL playlist database from my 210GB mp3 folder, but that’s not such a bad performance.
Essential Software
With the music working, I had enough energy left in me to install all the essential applications that I could think of (and this post will serve as a reminder the next time I have to install from scratch). They were:
- Skype - Instead of downloading the .deb package, I added it to the 3rd party repository from the repository manager using deb http://download.skype.com/linux/repos/debian/ stable non-free .
- Quanta Development Environment - I like its PHP syntax highlighting, fish and ftp support, and the built-in SVN integration.
- Eclipse - for C++ / cdt
- The remaining firefox addons and toolbars, google/stumbleupon fireftp etc.
- VLC Player - For vlc, I added the mediabuntu re