Posts

Showing posts from 2013

The Never Ending War of Software Constructors and Software Destructors

How many times we as developers curse about the fact that, the defect raised by a tester doesn’t have enough information to reproduce it in the local environment?! I guess, the answer is quite often. If we are dealing with a responsible tester, he/she will provide us with detailed steps, if they are also kind enough, we will in addition get some logs and screen shots, and there ends the matter. Then, we struggle to reproduce it most of the time and would sometimes retort with the most common statement, “Hey! It works in my environment.”, and reject the defect. Sometimes the ball endlessly moves to and fro between the 2 courts. Why are we still living in the era of our great grandfathers, when it comes to debugging defects? I know, most of us are aware of the tools like IntelliTrace that are available to deal with this exact problem. But, I rarely see even developers making use of this tool, to reduce their debugging effort locally, leave aside testers to provide it as par

The Ever Growing Myth of Passing Objects

Last month, one of my colleagues posed me an intriguing question on passing reference types by “ref”. I am writing this blog post, to share my explanation to a larger set of audience. I have coined the following analogy, to explain the concept of passing reference types. Think that, you are playing with a kite (object) attached to a thread (pointer), and one of your friends also wants to play with the same. Pass By Value You attach an additional thread to the same kite (object), hand it over to your friend and both of you are now playing with the same kite. After a while your friend got bored, detached his thread, and attached it to a new kite (a new object). But, you won’t get affected as your thread is still tied to the old kite. Pass By Reference You hand over one end of the same thread to your friend and both of you are now again playing with the same kite. Again, after a while your friend, got bored of the old kite, detached the thread, and attached it to a ne