Everytime when you are free, you start thinking of a framework.

Mostly we keep busy atleast during recession, because of any reason i don’t want ot discuss here. Good think is that when things starts improving or the recession starts fading away, employee morale recovers by himself with confidence. Now as we feel a sense of security inside our company, our innovative mind starts rolling. We feel leverage to devote time in research of improving the way we work and the way we did our work in the past. The main focus we usually give is to figure out a framework even though we already have one. There are two aspects of thinking into these areas : one is we need to learn/improve/innovate every day and the other one is, this can be a total waste of time as we already have lots of good frameworks. But anyway we have time so we can waste it :-).

The framework that we usually discuss could be,

1> An unit testing automation framework.

2> An API testing/SDK testing framework.

3> Functional testing framework.

4> etc.

There are some frameworks which are different than these but very useful, like

1> Mozilla Tinderbox.

2> Reporting graphs.

3> Dashboard.


I am impressed mostly by the Mozilla Tinderbox framework. Very simple steps but quite unique and meaningful.

1> Sync the code.

2> build the code

3> run the tests

4> send report

5> 24/7 keep repeating steps 1-4 .

Benefits :

1> Will see the issue before daily build.

2> Feel confident that the changes has almost no side effects.

3> Nearly zero regular build break situation.

4> Help you understand the most sensitive and the least sensitive areas of the product.

5> and lots more, you will realize once you start using it.


As You Sow, So Shall You Reap

Let me just put these in the form of discussion,

Mr X : Dev should have better knowledge than QE.
Me : Because your priority is, the code should look better. You hardly care about the quality of the product.

Mr X : QE have to come on weekends as well, to validate things etc.
Me : Because, QE hardly works on week days. 🙂

Mr X : QE have to run the complete cycle of the test after this change.
Me : Don’t you know the change or are you really scared?

Mr X : QE should verify this change on the recent build, because dev believe that some other changes might have fixed this issue.
Me : See, even a dev is not sure about this :-).

Mr X : Pay structure for dev should be better as compared to QE.
Me : No Comments.

and the last one,
Mr X : Dev’s are safe because they usually fire QE first then dev. Also, they will get QE any time they want but its very tough to get one good dev these days.
Me : Even the MBA finance guys, Pilots, etc are not safe these days :-). Who are you?

With these mindset, if we go for any product development, and will try to create a quality product…God knows, how is it possible.

The funny side is, if the product goes bad, people believe, QE do not have better understanding of the product. Or the knowledge of QE is low.

Actual reason is :
1. If you pay less, most of the people want to go for other company (low rank companies or start ups) as dev. Another option is MBA (seems like a rat race these days).

2. You believe a bad dev (don’t know coding)  is a good QE. But i must say, a bad dev is a worst candidate for QE. Most of the time,  he will be looking for the dev options available in the company. If he won’t get any, he will either change the company or will change the profession.

3. I never saw any product where number of QEs are greater than number of Devs. I don’t know why we stiil expect a better product.

If x numbers of devs introducing y bugs, how we can assume that, any number less than x will catch all those y bugs, in the same time (because unfortunately QE also have 24 hrs in a day just like dev).
Most of the company survive even with this logic because they have a strong system (or process) to control every thing. Just like, only few gun mans can safe guard the complete jail because the pillars/boundaries of that jail are very strong.
Otherwise controlling just one horse needs 3 to 4 men when the ground is open.

Google Chrome : One more browser.

Google announces its first browser google chrome (currently its at beta stage) few days back. It becomes a headline for the IT media. It seems like this is the worlds first browser. I will say this is just a google mania among people. As far as its  features are concerned,

1> Its a multiprocess architecture : So the crash of any TAB doesn’t mean whole application crash.

IE8 beta2 is also having this feature, at least for windows XP SP2.

2> Its really fast : It won’t have any addons. No menu…etc. So the reason is obvious. Here also, IE8 and FF 3.0 can be a good competitor.

3> Intelligent search : I like it most. Its intelligence is beyond the automatic completion feature.

4> It lets you stay incognito : IE8 have the similar feature. But unlike IE8, it behaves like a seperate application.

5> Most recent page on the home page : Opera already has this feature (i hardly remember the version).

6> Memory usage : Chrome sucks. Google has to do something about this in release version.

Conclusion :

If you are a new user to the internet browsing world.. Try this.

If you are an IE user,  stick to IE itself, there isn’t any amaging feature in google chrome that will force you to switch.

If you are a firefox user : You must be using a lot of addons like mouse geatures etc. which you won’t find in Chrome. Same is for opera…

Also, there is an option in firefox (with the help of addon) to open a page/link in google Chrome.

So, for first release, google chrome is good but it has a long way to go…

Smartness or Bug?

Yesterday, at my friends flat, we had a nice discussion. Sorry, it was not related with girls :-). Actually we were discussing about a strange behavior of mobile phones in one particular scenario.
Scenario is:
Lets assume i have a number 98186abcde stored in my contact list with name “XYZ”.
When we dial this number, the name XYZ appear on my screen…This is a correct behavior.

The strange thing is, even if we dial, 98351abcde (keeping last 5 digit from right same), it displays same name “XYZ”. We tried the same scenarios with different permutation and combination.
Apologies, if somebody got a missed call by mistake (Although we did it very smartly).

We were laughing on NOKIA phone on which we tried this. Later we found that Samsung phone also has same behavior. (It may not occur, if it is fixed in newer sets).

The reason we found is “probably the reproducibility of this scenario in real life is very less and this make the search faster, which is significant when the contact list is too long”

Challenges in Test driven development process

I always long to write here frequently, but still unsuccessful and without excuse. So, here is the next entry.

We already discussed the topic “Test Driven Development” : Writing and executing test case before adding/modifying the existing functionality.

To understand it better, Let us think of a scenario where a product “P” version 1.0 need some enhancement in the existing functionality (say an image editing software supporting .bmp and .jpg format, requires an enhancement as .png format support). Test cases to verify the functionality for product “P 1.0” are written.

In the process of adding any new functionality, some existing functionalities breaks (say in the above example, jpg support not working).

These question starts popping in our mind. What went wrong ? How to proceed? What can be done as a safeguard for next time ? blah blah blah…

1> If this is a new functionality issue : “Pop your collar”. Test Harness is fine. So, according to the “Test Driven development cycle”. write code for this new behavior, so that this will pass.

2> If this is an old functionality issue : Proceed in this sequence,

a> Code coverage :

2.a.1 : statement coverage : find the statement which is not covered by the test cases.

2.a.1 : branch coverage : find the branch in code which is not covered by the test cases.

2.a.1 : path coverage : find the path in code which is not covered by the test cases.

if you find anything here, write test cases for these and try to catch the issue by executing it. else goto next step,

b> Memory leak.

We already have lots of utilities available to find out memory leak in a program.

If you do not want to use them, i suggest write your own memory tracker…believe me its not so tough, if you have complete access of code and you can compile and run it easily.

how ?

Steps are :

1> Add your own memory allocation counter at location “new or malloc function implementation”.

2> Similarly, decrement your counter at delete() or free() implementation.

Find out the atomic blocks. : I define atomic block as,

Lets “S1” be the current state of the memory, and “S2” is the state of memory after executing a piece of code “X”, such that S1=S2 then, X is an atomic block.

So, find out different atomic blocks of the product. for example, i added one item and deleted the same item, in most cases , this whole code of addition + deletion , can be treated as atomic block.

One these atomic blocks are decided, execute it one by one and put the alert by validating the counter.

Performance : Performance can always be major hurdle in product development. Here also these atomic blocks would help you better. Execute these atomic blocks both in previous version and current version of the product and draw an acceptability graph.

Here i stop hope you permit. Will elaborate more on these above points individually as separate posts.

Writing Sum() is not always easy.

Suppose you have to write the implementation of sum(). The quickest answer is,

int sum(int a, int b)




One argument can be, what happens when either “a” or “b” or both are negative.

Answer : The implementation is generic. i.e when say a = 6 and b = -3, then a + b should be 3 because 6 + (-3) = 3. Perfect explanation.

As a white box engineer, suppose you have to break this code.

Answer : This function will fail for all (a,b) values whose sum is greater than equal to

2 power (NumberOfBitsRequiredToRepresentInt – 1).

i.e when NumberOfBitsRequiredToRepresentInt = 16 (2 Bytes)

Equivalence class for a or b could be -32768 to +32767.

and if a = 1, b = 32767, then a+b should be 32768 but it will return -32768.

if a = 2, b = 32767, then a+b should be 32769 but it will return -32767.

and so on…

Reason : The sizeof return type should be greater than equal to sum of sizes of input data types.

Test driven development

Testing is a way of ensuring quality. Mostly testing is done after the development phase is over or possibly may start just before development ends. Any issue reported while testing increases development of issue fixing cycles. Also, fixing issue at later stage is always costlier than fixing the same issue earlier in SDLC.
So, the question arises, Can we do testing before or during development cycle?
Ans : Yes.

More questions :-
1> What type of testing it is ?
2> Can’t it be a repetitive task ?
3> Who will do it ?
4> How this can be possible ?
5> What could be the success rate of this ?
6> Can it be useful for all type of Application ?
7> Is there any utility available to do this ?
8> What should be the cost of this ?

Answers : http://en.wikipedia.org/wiki/Test_driven_development

is a vast reservoir of untapped power waiting to be used.