The Underscore is over-rated

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!

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.

How I Got PTCL to Upgrade my Bandwidth

I, the good cop, mailed a long rant to the PTCL Broadband manager, Mr. Ali Raza Baloch, last week, after getting his email from the helpline.

He forwarded my complaint to a couple of relevant people, asking them to help me out, but that didn't happen.

Meanwhile, a friend, the bad cop, sent a written complaint to PTA - the PTA people wrote a letter to PTCL, and PTCL called my friend, and promised they will upgrade 'tomorrow' - which happened to be a local holiday, so 'tomorrow' never came.

Today, my friend went in person to the Broadband office, spent two hours there, met Ali Raza face-to-face and explained the situation to him. Ali Raza contacted his team, found out that my friend's upgrade was stuck in Islamabad somehow, and got the wheels in motion for him. My friend did manage to get my connection upgraded in the process though - so when I woke up today, I found my modem connected at 510kbps.

So, for anyone who is desperate to get the promised upgrade, you can be proactive and follow the same route instead of waiting for something that PTCL owes you but is reluctant to provide. I'm getting about an 80% throughput - 410kbps or so, which is good enough for jerk-free Youtube, and the upload speed of 300kbps is helping me save a lot of time as well. 20$ for 512kbps is still about 6 times more expensive than the 50$ for 6mbps that my American friends enjoy, but I hope we will get there eventually. Thank god for competition.

Iraqi Children are Dying - Confidently

Iraqi Children

The American government is intent on justifying America's war against children terror by any possible means, but this 'research' funded by the US Military is a sad joke. It claims that the invasion boosted the self-esteem of Iraqi teenagers. Ofcourse, they are still dying, but at least they are dying honorably. As we have been American allies for all these years, so perhaps the US Army can come and raise our self-esteem too, we need it and our overlords owe us that much! 'Redacted', by the way, was a thought-provoking movie that should be required watching for all American allies.

How to Bring Peace to Pakistan

The Pakistani Flag is Unislamic!

Before I can explain why, I must mention that our Government of Pakistan thinks that the flag was designed by Jinnah, while other sources say it was Syed Amir-uddin Kedwaii. We need to get our facts right so that we can blame whoever designed it.

According to Wikipedia:

In the centre is a white crescent moon, representing progress, and a white five-pointed star, representing light and knowledge. The flag symbolizes Pakistan’s commitment to Islam, the Islamic world and the rights of religious minorities.

But, it looks like the flag of our “Islamic Republic of Pakistan” is not really Islamic! The star and crescent symbols that are normally associated with Islam are really the remnants of sun/moon/sky worshippers, as this about.com page explains (and I completely agree with it). They say:

The crescent moon and star symbol actually pre-dates Islam by several thousand years. Information on the origins of the symbol are difficult to ascertain, but most sources agree that these ancient celestial symbols were in use by the peoples of Central Asia and Siberia in their worship of sun, moon, and sky gods. There are also reports that the crescent moon and star were used to represent the Carthaginian goddess Tanit or the Greek goddess Diana.

So even though a lot of Muslims worshipped Diana too (and a couple of them wanted to create demi-gods with her), that is no excuse to adopt this symbol to represent Islam. So how did it begin? The page explains:

It wasn’t until the Ottoman Empire that the crescent moon and star became affiliated with the Muslim world. When the Turks conquered Constantinople (Istanbul) in 1453, they adopted the city’s existing flag and symbol. Legend holds that the founder of the Ottoman Empire, Osman, had a dream in which the crescent moon stretched from one end of the earth to the other. Taking this as a good omen, he chose to keep the crescent and make it the symbol of his dynasty.

So not only are we using unislamic symbols that used to represent false gods, we adopted this symbol on the whim of an emperor who took a dream as a good omen. I think our flag was copied from Turkey too, and even though the Turks are ‘recovering’ from Islam and are embracing ‘enlightenment’ in the form of skirts, bars and other hedonistic pursuits, we are still stuck with the legacy of the Ottoman Empire. Its time we changed that. In fact, a lot of Muslims reject this pagan icon on this very basis. I never knew that!

Based on this history, many Muslims reject using the crescent moon as a symbol of Islam. The faith of Islam has historically had no symbol, and many refuse to accept what is essentially an ancient pagan icon. It is certainly not in uniform use among Muslims.

So what can we do about it? Let us go back to basics like the true ‘fundamentalists’ we really are. Here’s the Sunnah:

The early Muslim community did not really have a symbol. During the time of the Prophet Muhammad (peace be upon him), Islamic armies and caravans flew simple solid-colored flags (generally black, green, or white) for identification purposes. In later generations, the Muslim leaders continued to use a simple black, white, or green flag with no markings, writing, or symbolism on it.

So before we use this new-found knowledge to fix a few flags, here is the link to the original page that I have stolen the quotes from [link].

Redesigning the Flag of Pakistan

We all know that the “progress, light and knowledge” talk is BS, so, let us attempt to fix the blunder made by our ancestors, and see what our flag should have looked like. Here is the flag as we have right now:

pakistan

Let us remove these pagan symbols from the flag first of all:

pakistan-flag-redesign

This already looks much better. Now if we decide to go one step further, we can also try to see if separating religion from state can really bring peace. Green is universally though of as the color of Islam. Since we don’t really follow Islam as we should (or at least, I don’t), so like our hearts, let us remove that symbol from our flag too. This is what we end up with:

pakistan-flag-re-redesign

Instant peace!!

This is not just the universally accepted flag of peace, it is also one of the original flags of the Prophet. Islam, as we know, is supposed to be the religion of peace, so the white flag (derived above) is a better option for Pakistan on more than one levels.

In the next section, we will help out our other Muslim brothers.

Removing Pagan Icons

Here are a few ‘before and after’ flags of the Muslim(ish) nations - namely Algeria, Azerbaijan, Comoros, Malaysia, Maldives, Mauritania, Pakistan (already done), Tunisia, Turkey, Turkemenistan and Uzbekistan, minus the star and crescent:

redesigned-flags

A few countries end up with identical flags, and will probably need to redesign them, but that is somebody else’s problem, not mine.

Credits: About.com for this invaluable information, and my neighbor’s wireless signal that allowed me to spend “the dark hour” on this ‘research’.