Bug Vanquisher

24 October 2007

Who Does It Like Us?

Filed under: Bugz — Tanveer Badar @ 12:07 AM

We do!


This is a snap shot of performance monitor in Windows Vista. I wonder where those programmers learned their math. Last column is the total bytes sent/received, second last is bytes received and before that bytes sent.

20 October 2007

Switch Over

Filed under: Uncategorized — Tanveer Badar @ 11:48 AM

These posts are one of the last I’ll publish over dial-up connection. Within a week, I am switching over to DSL connection. 256K, 2GB download limit effective after three months of contract.

19 October 2007

Again, An Obscure Bit of Information

Filed under: Personal — Tanveer Badar @ 1:15 PM


These are the blog statistics of how many hits I got over a month, people who used RSS feeds, comments someone wrote or else clicked from the ping back links I left at various places.

What interests me most are the two peaks which show three times normal traffic for almost five days and I think I know what the reason is, apart from him, him, him and him.

Out of the Fire, into the Frying Pan 2

Filed under: Computer Theory, Personal — Tanveer Badar @ 12:53 PM

A few days ago, I posted about how I got 3.89 out of 5. That piece of information was not there, leading people to ask what the overall rating was.

While I have no objections to that 3.89, I do have a little to say about the procedure. At my company, a TL reviews each and every member of his/her team. After that review, the formalized review forms stream up the food chain (higher management).

Then, someone normalizes the results. By normalizing it means that rankings are pulled back a little if the TL is known to be lenient or added up a little if he/she is very strict. Then, things happen, all sorts of tantrums, shoutings, yelling hoarsely or walking out (just kidding, nothing of that sort ever happened).

If you are following the theme about one specific data structure I praise above all, you may have already spotted the trouble spot. It is the normalization process. What a TL does to his/her team is done again with his team by an even larger/bigger predator (no offense if anyone from my company reads it :) ). If a TL has a very dim view with the predators, his team is going to pay the price, if a very bright view kudos to all.

Major Changes in CPPCodeProvider

Filed under: C++ — Tanveer Badar @ 11:40 AM

So far, if you have noticed CPPCodeProvider did not have a concept of separate declaration/definition for the various objects it supported. Apart from that it was not possible to render UserDefinedType, mainly because I was being lazy all this time.

Of course, if you are wondering what the hell CPPCodeProvider is, here are some links which explain it in much more details: part 1, part 2, part 3, part 4, part 5 and part 6.

One day, I asked myself how to render a udt (user defined type). There are all sorts of issues with a udt. There is an ordering among the members of a type. All enumerations, unions, member types and typedefinitions must be (at least) declared before their first use, otherwise, compiler whines. But they cannot be defined at that point because of the dependencies they themselves have upon each other. In addition, unnamed enumeration and unions must be defined completely at that point because they have no name associated with them and a declaration can not be rendered.

This means rendering has to be done in two phases to be safe. First, all types are declared and then, functions, operators, constructors, destructors are declared if they are not inline functions. After that these declared items are defined out of band only if they are not inline. Member types have a similar requirement, unless they specify that they must be defined inline, their definition is always moved out of class.

Member variables are defined and declared inline unless they are static but not constant and do not have integral type.

A member type that inherits from containing type can never be defined inline, so there is a check to override inline specification for member types if one of their base types coincides with the container.

This coves one major change. The other one is the separation of declarations from definitions. For example, write in CodeObject is overloaded and the two declarations are:

void write( std::wostream& os , unsigned long tabs ) const;
void write( std::wostream& declos , std::wostream& defos , unsigned long decltabs , unsigned long deftabs ) const;

As always, these functions call their respective virtual counterpart overloads writetext. write with two arguments always renders anything inline while the other function separates declaration from definition.

This means, it is now possible to have a header containing all the function declarations and class definitions and have their definitions/implementations in a separate file. However, if a class/function is templated you will not be able to override correct behavior with either function and they will be defined instead of declared. Second overload of writetext will refer to the first one in that case passing only declos/decltabs for correct rendering.

One major feature I still miss is to properly support partial and complete specialization. Even during writetext implementation for udts I faced that challenge of how the user will be able to pass template parameter information to base classes and member variable declarations. Expect to see these issues fixed in a future update as someone does have to wait.

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.

باجی زندہ باد

Filed under: Fun — Tanveer Badar @ 4:27 PM

او باجی جی! تسی گریٹ ہو

تم چھٹی والے دن نہ آئیں اور آج سب کی چھٹی کروائی


میرے ووٹ تمہارے نام

Get Indulged 2

Filed under: Bugz, Rant vs Vent — Tanveer Badar @ 4:09 PM


This is the new theme for IE7, notice the smooth gradient and the wonderful color choice in contrast to that smooth transitions you normally see.


I sincerely hope someone from Microsoft reads my blog, apart from him as they say in Urdu:

گھر کی مرغی دال برابر

16 October 2007


Filed under: Tips — Tanveer Badar @ 2:32 AM

Never ever use vptcl to upload anything. It takes forever, runs < 4 KB, hampers download speed and you can get married and have two kids before anything decent in size will finish uploading.

14 October 2007

عیدالفطر مبارک!

Filed under: Personal — Tanveer Badar @ 11:16 PM
« Newer PostsOlder Posts »

Blog at WordPress.com.