Bug Vanquisher

2 October 2008

The Legacy of Javid Iqbal

Filed under: Things in life — Tanveer Badar @ 8:38 PM

I don’t know why this particular thought crossed my mind, perhaps when I came across this:

Does anyone even remember now the horrors convicted serial killer/pedophile Javid Iqbal unleashed during 1999-2001? Whole host of parents and families who are stranded from their beloved sons and daughters.

How no one was able to track him down for over an year and no one cared to find out what motives were behind all those killings? How he died a mysterious death in police custody?

What really amazes me is that there is no information available on internet about those brutal murders. Nothing at all. Except for this little piece on BBC’s website:
http://news.bbc.co.uk/2/hi/south_asia/549787.stm, which tells one very little about what happened in the, then, past and coming future.

Why didn’t we wonder then and question authorities how he died? What veiled hand was behind him which was protected from coming to light by his unexplained death? Why no one explored the possibility that he was never a sociopath? Why isn’t there any documented data in readily accessible way after 8 years? Why aren’t there any laws yet which establish strictest punishments for such felons?

Lots of questions which will remain unanswered till no one remembers the atrocity which was once roamed amongst us safe and free, the oddity which left his legacy for God knows how many to peruse.

24 May 2008

Flat Perspective

Filed under: Rant vs Vent, Things in life — Tanveer Badar @ 5:10 PM

Not mine, about some stupid movies.

As a rule of thumb if the thing you are watching (in other words, wasting time) does not have a flat perspective, something like spherical projection or, even more obtusely, oblong, then, its simply not worth the time.

There will be no story, just stupid flash backs (strong analogy to ‘Lost’). And it will end so suddenly, you’ll scratch your head longer than the time it took you to watch it figuring out what just happened.

7 March 2008

Facehooked! :(

Filed under: Things in life — Tanveer Badar @ 4:35 AM

My deepest apologies to the handful of readers who read this "falling apart" blog. Most unfortunately, I have been facehooked since the last month. Addicted to the most addictive online game ever. Warbook.

Now, this post is not a publicity stunt for either the game or the website. Instead, it is about my feeble attempt to revert to the code-monkey lifestyle I have always lived for the last 6 years or so.

Therefore, expect the activity to go up a bit in the next few days. :) Like it used to be in October/November last year.

18 October 2007

It also goes by ‘Wait’

Filed under: Computer Theory, Things in life — Tanveer Badar @ 4:34 PM


They all spell the same. They all mean the same. They mean try as you may, it will not let you for a whole host of reasons.

Get introduced to the second name of the wonderful machine, the marvelous invention ‘computer’.

For the last hour, I have been building the latest release of boost. Yet my computer won’t let me do anything else.


I wonder has our waiting for anything to be done has increased or not? Even with the ever faster computers and more and more computing power available at our finger tips, with the advent of multi-core processors, nearly every body can be seen waiting for something to finish, some download to complete, some compiler to stop whining about the dredged code or have his heart’s desire to spit all those informative message about how it thinks a variable may be truncated during assignment.

We wait for our word processors to save the documents, watch those LEDs blink as the computer boots,  wonder what’s taking it so long to shutdown, curse while those GBs of RAM get written to disk if hibernating or read back during resume operations. And don’t be astounded when visual studio takes forever to refactor code even when the changes are confined to a single function, go to any lengths to optimize (not improve) OLTP performance.

Even with broadband availability, our needs have expanded even more disproportionately.

Work expands to exhaust (and demand more) resources allocated to it.

Now, we seek even bigger downloads, Ajax based websites take forever to load on those dial-up connections. Ever tried facebook, with the plethora of pictures on every page, mounds of javascript at your service you better have had a broad band connection.

And a big factor in consumer oriented markets like desktop operating systems and application is to only improve the perceived speed of some operation yet never inspect code like this

Message message = …;//get from somewhere

// A paramter has only one value, missing break after substitute call
foreach( Parameter parameter in parameters )
    IList values = GetAllValues( );
    foreach( Value value in values )
        if( value.Id == parameter.ValueId )
            message.Substitute( parameter , value );

They will go overboard to recommend things like

· Consider adding un-managed splash screen to show before the WPF app start. This will present the user with some UI and improve perceived responsiveness. Check blog later for a sample that demonstrates how this can be done.

[Improving WPF applications startup time]

With the release of Visual Studio 2008, Microsoft build tools will finally have multiprocessor build support, with MSBuild having /maxcpucount:n and cl having /MP:n as the relevant options. Just as the added generics after MSDN filling pages about how dangerous templates are for everyone’s health during .net framework 1/1.1 timeframe. So, I may expect boost to build a little faster next time I try that labor intensive (ahem! actually, only waiting for the damn thing to finish) operation.

It has been ages since multi-core processors came out. Hyper threading is a fact of history we take for granted these days. Multiple processors in one form or another are a norm rather than exception, yet it is hard to find properly written programs which can take advantage of even the most basic form of concurrency available. Having two processors in the bare minimum you can have but programs in the wild (and by wild I mean currently in heavy usage, not just written by your average Joe) blissfully ignore and have only one thread.

Herb Sutter rightfully said about these issue we will face increasingly in the future, with our processor clocks going no where.

We are shifting more and more towards ease. Ease of development, ease of use, ease of deployment, ease of availability, any ease you can fit in. Gone are the days when a redirector had only 128 byte foot print in low memory. Gone is the time when Windows ran happily in 4 MB of RAM.

So, I’ll see you around when you will be waiting for my next post because I will be waiting for something else to finish.

6 August 2007

Talking about Weather

Filed under: Things in life — Tanveer Badar @ 10:22 AM

Eric Lippert nicely puts cloud formation and proceeds to explain thunderstorms.

25 June 2007

The game ends!

Filed under: Things in life — Tanveer Badar @ 12:27 PM

It ends on 21st July, 2007 of what started on 30th June, 1997.

I am talking about Harry Potter. The magnificent seven part series of spell binding (no pun!) literature. It has been foretold that Harry will die at the end of last chapter of his life ‘to prevent others from building on the popularity’. Though, it was already very hard to deal with Dumbledore dying at the end of ‘The half blood prince’. I am eagerly waiting to get my hands on this last book.

10 June 2007

Don’t use this cure. It worsens the symptoms!

Filed under: Things in life — Tanveer Badar @ 12:14 PM

Tired of load shedding? Constantly interrupted with power failure in the middle of that important chat? Finally, you convinced dad to install a UPS to fight all those chance of assignment not being completed on time? Wishing you had a laptop or owned KESC? You are that victim of constant power failure who couldn’t prepare for that DIFFICULT paper next morning? It is time to ride the band wagon to load shedding free summers in Karachi. You have three options, curse KESC all the time and do nothing else, not likely. Get a generator to fulfill your deepest desires. Buy a handy UPS for all you home, you are that generous person, you are. And in the meantime, get a small UPS for your computer too so that it does not suffer from jerks (electric and human included. It would be better if you could keep your hands off it for a moment.).

UPS come in all sizes in rating. They are for things as big as an entire office. They can provide power to an entire home if need be. Or they can be for things like computer we mortals have come to love. My office has a UPS that supports all machines in it and has a battery life of 15 minutes. The one at my home has a battery life of 6 hours and can power almost everything at once. Thankfully, they are designed such that battery life and load bearing capabilities are independent of each other. You can have as much battery life as you want if you add enough batteries. Load bearing can be as high as you want (well up to a certain point) by using power electronics and devices.

These preliminaries aside, have you ever given thought to what happens when power goes out, UPS begins its life as a power source and when power comes around, recharges itself for next cycle? For the illustration take my home as an example. Here is a typical day, 24 hour power consumption cycle for my home.


Initial surge starting at 6 AM is due to everyone waking up. Things cool down a little from 9 AM to 12 PM. Then, those who don’t have a full day job return and the consumption surge begins. We have highest demand from 4 PM to 10 PM. Finally, one by one, we starting getting to bad, our share of electricity now served to someone else and a new cycle begins. 

Add UPS to the mix and see what happens.


The baseline power consumption for constant recharging and losses accounts for a couple of watt every day. This adds a certain amount to electricity bill each month. This is one part of the cost we pay for having power all day round. 

Overall, power consumption is increased by this base line UPS power consumption above what would be otherwise.


Each day, we are consuming 24x/1000 units of electricity with no obvious gain. It is just like insurance, if the loss you have anticipated does not happen, you do not get all your money back, there is some amount taken. The operating charges and risk factor in case that catastrophe had happened.

From the last picture, can you guess what would happen when power fails?

power failure

UPS lost external power somewhere around 12:50 PM – 1:00 PM. This power out period lasts for about two hours. During this time, UPS’ internal power consumption has reduced to a bare minimum, sort of only for housekeeping jobs. So has total power consumption. It is very near what would be baseline power consumption in the absence of UPS. When power finally comes back around 3:00 PM, a sudden increase in power consumption happens. Difference of area under total power consumption from 1:00 PM to 3:00 PM in the last two pictures must be less than increased power consumption. What is the reason? UPS begins charging back itself and it is common knowledge that the energy it handed out during the last two hours must be more than compensated in the next few hours. UPS power consumption jumps to about double its baseline level. Similarly total power consumption stays at a high level for some hours. When UPS charging rate finally starts to come down, the solid curve assumes its normal profile. 

Now, do you see what the problem is? As more and more people install UPS in their homes, offices power consumption may be low for a part of the city while it is experiencing load shedding, but after that period is over, the amount that was conserved will be more than compensated by recharging devices. At the end, load shedding has not helped anyone conserve power but caused disruption for some and increased load on the system in the ensuing hours.

Create a free website or blog at WordPress.com.