LESCO Please Give Me My Life Back

Dear LESCO,

You knew about the (then) impending power crisis of 2007 way back in 2004 and I was glad you didn’t do a thing about it, besides blaming rains, coal shortages and the crumbling infrastructure in the four years that followed. Not many people see the wisdom in that , but I am not one of those people. I realize very clearly that the 5 hours without power daily were just the training we Pakistani needed to evolve to a higher level – a person who can survive without electricity and gas for that much time can do pretty much anything, and feel superior when his (weak) American friends ask “How can you live like that?!” in awe and inspiration. Those load-shedding spells were just the thing I needed to learn get my work done in the 4 hours of continuous internet that you gave me, thereby increasing my productivity, and giving me the time to read a few hundred pages of a book daily by laptop-light, thereby increasing my quality of life. The one hour discharge and recharges increased my laptop’s battery life by 50%, and forced my RSI-prone wrists to get the much-needed rest that I would have ignored otherwise. We didn’t really need running steel mills either, all they give us is global warming and pollution, so I was happy when they were shut down. Your tag-teaming with the Gas company also allowed me to eat out every other day due to lack of any other options. Life was wonderful, I was constantly looking at the bright side of life in the daily darkness spells, and had become a fan of your greater wisdom.

Why, then, did you have to promise an end to load shedding by February 2008, and actually deliver on that promise?! I have been waiting for a power outage for two days straight now, please give me back my 5 hours of load-shedding per day. I miss them. 🙁

Out of the frying pan

youtube logolI live near the Lahore Airport, and in the last 5-6 years, I NEVER lost any time due to deliberate traffic blocks on the Sarfaraz Raffiqui Road (the entrance to my neighborhood). Yes, there used to be blocks and “naakas” for checking, and there were blocks due to diverted traffic, but there were no “OMG-MR-XYZ-IS-COMING-BLOCK-ALL-ROADS-LOOK-SHARP-STOP-THE-TRAFFIC-SIGNALS” kind of blocks during “the dictatorship”, (at least in Lahore) – until last week that is… my first night out in a democratic Pakistan.

I was coming back home with my family from Defence at night, and was almost at the end of a long and tiresome drive, when I saw a policeman starting to put up a barricade in the middle of the road a few meters ahead of me. The car in front of me tried to avoid and pass him as the barricade was still not set up, but the policeman got in front of the car, stopped it and told the driver (who was with his wife and kids as well) very rudely to reverse and get back behind the barricade, and this is how I ended up being in the 2nd car in what grew up to be about a 50 car long roadblock on each side. We waited for at least 20 minutes (mentally cursing, there were kids in the car), and eventually, a motorcade with a couple of police bikes followed by 4 or 5 black-windowed cars, a fire-engine (?!) and a trailing set of bikes passed the old airport road. Just as we were getting ready to move, the policemen stopped everyone, apparently there was going to be a repeat performance. Another 5 minutes of waiting, another (smaller) motorcade, and we were finally ready to leave. Luckily, as I was in the front of the block and was able to drive away quickly, but I could see that the misaligned traffic got into another mini-jam behind me as everyone tried to overtake everyone else.

I don’t know who (or what) was in that car, but it cost more than 200 people 25 minutes of their lives each to save 5 minutes of that someone ‘important’. Can I have the dictatorship back please? This is not the kind of democracy I voted for. Hold on… I didn’t vote… Nevermind.

My son demands 5-10 minutes of youtube.com everyday when he wakes up – I’m expecting to have a hard time today as youtube is blocked in Pakistan… so while I am bitterly whining, congratulations to the new government on blocking youtube.com in Pakistan. I’m sure all the 2000 or so Pakistani youtube.com watchers are devout muslims who pray five times a day and would have started a riot after watching whatever blasphemous videos that are being blocked this time. And of course, the rest of us are too lazy or too dumb to find open proxies to watch more important stuff, like election rigging videos, or to use the mobile youtube URL when it works. I can’t wait to see what they have in store for us next.

Election Commission of Pakistan “Hacker Free” Website

flag(Sorry about the waving flag, couldn't resist the temptation). With nothing better to do, I just visited the Election Commission of Pakistan Election Results website (yes, that's the sequel (no pun intended) to the ecp.gov.pk state-of-the-art live voter database website that I wrote about here , the one that can't find me, thereby making me a dead voter)… and was refreshing the results page every couple of minutes, when I finally managed to come across the crash that my brother had mentioned a few minutes earlier. He had also mentioned that the site is extremely slow (he is sitting in Cambridge right now) but since our mehndi.com CEO promised us servers and bandwidth not found anywhere else on the planet, so I'm pretty sure it must be the UK ISPs that are too slow for the site.

Anyway, I digress… so here are the screenshots for your forehead slapping pleasure:

It seems that an Index was out of range… take a closer look… yep, the site is still running in debug mode, and the path to the files on the server are visible. ecp-dotnet-crash

And here's another screen-shot, a 'Parser Error' this time… Oops!

ecp-dotnet-crash2

The vsite in the url probably means they have multiple applications hosted on virtual servers. If you compare the Election Results website with this asp.net website, you will probably come to the conclusion that the talented developers (read interns @ 10,000 per month or less) weren't exactly familiar with either web design or the way ASP.NET membership/roles framework works, but were rescued by Google and were able to "borrow" and copy/paste from the example to save the day.

I wouldn't be too surprised if there are a half dozen SQL injection possibilities in there, or if the website has an /admin/ folder somewhere in the URL schema (as an 'admin' section is found in 90% of websites developed by our Pakistani programmers), or if there is some left-over code from the examples that will allow anyone to register and mess with the website.

10 years ago, one message on any Pakistani IRC channel would have been enough to take this website down, but at this point in time, I can only pray that the website stays online for the next couple of days so that the mehndi.com guys get their 10 hours of crash-free fame (I think they've already had their fortune delivered to them in Canada). I also hope that they find and fix the flaws before the site gets hit by hackers, and only because I don't want the rest of the world to have one more chance to laugh at us, we can do that job ourselves.

Freelancers and Consultants Must Read This

FreelanceSwitch.com is a blog full of insights and resources for the freelancers and consultants of the world (For those wondering about what's the difference between the two, this link provides a good explanation). They conducted a survey last year, and published the results of the survey today. You can download the survey results here

A few statistics in the 50+ page report that I found very interesting are:

  •  32.6% of freelancers earn less than they can from full-time employment.
  • 80% freelancers would prefer more money.
  • Only 22% of the freelancers work less and earn more compared to their prior job-oriented careers… and yet
  • 88.9% of the freelancer are happier now that they are freelancing.

Some more interesting statistics, particularly for the Pakistani Freelancers

  • Referrals account for 89% of new work (so keep your clients happy)
  • 15% work comes through blogs (start a blog duh)
  • The hourly average rate for softwre developers is around 73$ (stop charging 13$ per hour Pakis, its the lowest rate in the world (besides Bulgaria and Indonesia) in the survey.
  • UK freelance programmers charge the highest rate (158$)
  • Of the industries categorized in the survey, software designers and programmers earn the most.

Let me know if you find anything else of interest in the survey pdf.

Oh, and do join the Pakistani Freelancers group on Facebook if you are one. 

Memory Hungry PHP Applications on Shared Hosting

If you run your WordPress on a shared hosting server like hostmonster.com / bluehost.com (which have excellent service by the way), and have several memory-hungry php applications or WordPress plugins installed, you must have run into an "Allowed memory size exhausted" fatal error a few times. For me it happened yesterday while uploading a mere 12MB of images (1MB per image) and trying to ask the NextGen Gallery plugin to discover them and generate thumbnails. WordPress ran out of memory after 32MB and died with the above exception.  Though one can't ask a lot from a 6$ per month hosting provider, and since 32MB ought to be enough for everyone (hehe), I decided to spend some valuable time in trying to find a workaround to the limitation, before deciding to dump the NextGen plugin. Here's what I found out: Read more “Memory Hungry PHP Applications on Shared Hosting”