<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://msmvps.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Bugs, developers and testers</title><link>http://msmvps.com/blogs/rakeshrajan/archive/2005/07/28/59838.aspx</link><description>Developers usually develop applications with the objective of getting the functionality up and running as quick as possible. After the functionality is complete, they would proceed to test their code. Unfortunately, many developers are neither inclined</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP2 (Build: 40407.4157)</generator><item><title>re: Bugs, developers and testers</title><link>http://msmvps.com/blogs/rakeshrajan/archive/2005/07/28/59838.aspx#61260</link><pubDate>Wed, 03 Aug 2005 15:08:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:61260</guid><dc:creator>rakeshrajan</dc:creator><description>Hi BTX,&lt;br&gt;&lt;br&gt;That's interesting - and again, it's yet another exception handling mechanism. I will be writing on the different styles I have gathered shortly. Thanks a lot for sharing!&lt;br&gt;&lt;br&gt;Warm regards,&lt;br&gt;Rakesh Rajan&lt;br&gt;&lt;br&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=61260" width="1" height="1"&gt;</description></item><item><title>re: Bugs, developers and testers</title><link>http://msmvps.com/blogs/rakeshrajan/archive/2005/07/28/59838.aspx#59910</link><pubDate>Sat, 30 Jul 2005 11:00:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:59910</guid><dc:creator>rakeshrajan</dc:creator><description>&amp;quot;what generally is your approach to handling exceptions? Different people have different approaches to handling exceptions and I was just curious. &amp;quot;&lt;br&gt;my approach is quite simple, but very effective:&lt;br&gt;&lt;br&gt;everytime I start a new method, the first thing in there is:&lt;br&gt;&lt;br&gt;try try&lt;br&gt;except&lt;br&gt;  on E:Exception do&lt;br&gt;    raise Exception.Create('Error in method X:'+E.Message)&lt;br&gt;end finally&lt;br&gt;  //release any resources&lt;br&gt;end&lt;br&gt;&lt;br&gt;of course, this is a very generic example, and the code is written in Delphi, but that's the idea, in addition to that of course you want to check for specific exceptions depending on what your code is doing instead of just E:Exception&lt;br&gt;the other thing to do is when there is code that can potentially create an exception, I always surround that in a try..except&lt;br&gt;&lt;br&gt;try try&lt;br&gt;  try&lt;br&gt;    //process something that may raise an exception&lt;br&gt;  except&lt;br&gt;    on E:Exception do&lt;br&gt;       raise Exception.Create('Error processing X:'+E.Message)&lt;br&gt;  end;&lt;br&gt;  // some more code here...&lt;br&gt;except&lt;br&gt;  on E:Exception do&lt;br&gt;    raise Exception.Create('Error in method X:'+E.Message)&lt;br&gt;end finally&lt;br&gt;  //release any resources&lt;br&gt;end&lt;br&gt;&lt;br&gt;again, the code is generic. Many people might think that this is way too much exception handling code, but it actually saves you TONS of time, both debugging and finding any errors or bugs because you are actually writing the cases for when the code fails&lt;br&gt;&lt;br&gt;and so, with this code, if there's something unexpected, I get something like:&lt;br&gt;Error in method X:Error processing X: (error description here)&lt;br&gt;&lt;br&gt;that's very complete information to tell you where to actually go and fix the problem, of course there are always third party tools to give you all this information, but this is simple and works almost just as good&lt;br&gt;&lt;br&gt;the last things to do with the exceptions are, &lt;br&gt;- trap the exception at the highest level, before it hits the user&lt;br&gt;- always log the exceptions &lt;br&gt;- and what to do with the exception depends on the type of application&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=59910" width="1" height="1"&gt;</description></item><item><title>re: Bugs, developers and testers</title><link>http://msmvps.com/blogs/rakeshrajan/archive/2005/07/28/59838.aspx#59892</link><pubDate>Sat, 30 Jul 2005 02:04:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:59892</guid><dc:creator>rakeshrajan</dc:creator><description>Hi Andrei,&lt;br&gt;&lt;br&gt;Hmm...that is a very different genre.  &lt;br&gt;&lt;br&gt;IMHO developers are the people who should write unit test code, because it's just another sort of coding! Moreover, code in nunit is tightly coupled with the actual code, which could undergo frequent updates in the future as it matures.  &lt;br&gt;In short, testers won't fit the bill. Sadly, this means that in addition to hoping our developers will write good code, we would also have to trust our developers to write good testing code too!&lt;br&gt;&lt;br&gt;Unfortunately, this is slightly risky for many reasons:&lt;br&gt;1. More code to write for developers = more effort = more time&lt;br&gt;2. As soon as actual code changes, test code will also have to be changed&lt;br&gt;3. Same old reason - can't trust all developers to test well&lt;br&gt;4. Bugs in actual code is natural...but bugs in testing code - that's too much! (Who will test the code that is supposed to test code?)&lt;br&gt;&lt;br&gt;Once again, having a tech lead to shoulder the responsiblity of writing nunit code might solve this problem to an extent.&lt;br&gt;&lt;br&gt;Hmm...it's tough to create good software &lt;a title="" href="." &gt;&lt;img src="http://msmvps.com/images/msmvps_com/rakeshrajan/1260/o_smile.gif" border=0 /&gt;&lt;/a&gt;&lt;br&gt;&lt;br&gt;- Rakesh Rajan&lt;br&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=59892" width="1" height="1"&gt;</description></item><item><title>re: Bugs, developers and testers</title><link>http://msmvps.com/blogs/rakeshrajan/archive/2005/07/28/59838.aspx#59887</link><pubDate>Sat, 30 Jul 2005 01:08:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:59887</guid><dc:creator>rakeshrajan</dc:creator><description>Hi BTX,&lt;br&gt;&lt;br&gt;&amp;gt;  &amp;quot;These are things routine...&lt;br&gt;Hmm…it is sad that even if the intention of tools is it to make programming easier and increase productivity, negative effects also exists.  Too many people just use tools blindly without finding out what it does.  In fact, ASP.NET postback itself is a great example – I have seen many people who fail to realize that the postback is simply a form action (available for a long long time) set to post to itself – and that it’s nothing magic to ASP.NET.  This is especially true for developers who are starting out on a new version of an existing technology – they wouldn’t know how things were before with the old version and what updates the new version has over them.&lt;br&gt;&lt;br&gt;&amp;gt;if you ask me, most of the times when there...&lt;br&gt;One quick question on exceptions - what generally is your approach to handling exceptions? Different people have different approaches to handling exceptions and I was just curious.&lt;br&gt;&lt;br&gt;- Rakesh Rajan&lt;br&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=59887" width="1" height="1"&gt;</description></item><item><title>re: Bugs, developers and testers</title><link>http://msmvps.com/blogs/rakeshrajan/archive/2005/07/28/59838.aspx#59878</link><pubDate>Fri, 29 Jul 2005 20:47:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:59878</guid><dc:creator>rakeshrajan</dc:creator><description>What about automatic testing (like nunit, nunitasp)?&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=59878" width="1" height="1"&gt;</description></item><item><title>re: Bugs, developers and testers</title><link>http://msmvps.com/blogs/rakeshrajan/archive/2005/07/28/59838.aspx#59843</link><pubDate>Fri, 29 Jul 2005 04:16:00 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:59843</guid><dc:creator>rakeshrajan</dc:creator><description>&amp;quot;These are things routine developers wouldn't think about.&amp;quot;&lt;br&gt;that's the major problem, &amp;quot;routine developers&amp;quot; that just want to get stuff to &amp;quot;work&amp;quot;, developers that don't use exceptions, developers that don't stress out facts (if something should be this way, what to do if is not?) developers that assume way too many things and when the bugs arise they have to spend so many hours just to find out where the problem is, unfortunately a lot of the good new things that come out, just make programmers even lazier than ever and they can't learn how to write good robust code, and on top of everything they just blame it on MS, Windows, SQL, whatever but their code&lt;br&gt;&lt;br&gt;if you ask me, most of the times when there is an error in a program I wrote (properly catched in an exception), I know almost exactly what line of code is causing the problem, that's what good exception handling gives you, that and the fact that I always stress out facts, whenever they give me a condition that something should always be in a particular way, I always reply, so what do you want the program to do if is not that way?&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=59843" width="1" height="1"&gt;</description></item></channel></rss>