Graph of Thought

chainA 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.

Your Privacy is an Illusion

WhitehatWhat 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.

Kubuntu 8.04 with KDE4 – the Final Verdict

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.

Analog Big Clocks, Digital Encyclopedias

Image

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?

My First Day with KDE4 on Ubuntu Hardy Heron

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 repository from https://help.ubuntu.com/community/Medibuntu , which also had some upgraded plugins and codecs.
  • ktorrent – since the next Battlestar Galactica episode was going to be available the next day 😀
  • Instead of having a local subdomain based php website structure like before ( site1.localhost , site2.localhost ), I used the clean install opportunity to create some virtual local servers, so now I have http://site1/ , http://site2/ and so on. This page shows how.
  • virtualbox – Since I spend more time on linux than on Windows, and since I still need to do some development on VS.NET and MSSQL, so I installed virtualbox. If I manage to set everything up properly, I will be able to get rid of the windows partition altogether, or atleast abandon it to gather digital dust.
  • msttcorefonts – They make a few software look nicer.
  • Java JDK and JRE – JRE for eclipse and JRE just in case…

And this is how I spent my first day with Hardy Heron before sleepiness made me … go to sleep. Day two was spent exploring and getting used to KDE4, plasmoids and plasma. In the next post, I will try to write about my first impressions of KDE4, plasma and plasmoids, and how and why it wants to change the desktop experience (for better or worse).