<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-618368706818295177</id><updated>2011-11-27T17:02:21.955-08:00</updated><title type='text'>Software Development</title><subtitle type='html'></subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://ngpanwei.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/618368706818295177/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://ngpanwei.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Pan-Wei Ng</name><uri>http://www.blogger.com/profile/06871639859247413246</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_YIVmjak7Ixk/SWnxJKjmmeI/AAAAAAAAAAM/9SohInr1wek/S220/panwei-manga.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>4</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-618368706818295177.post-730800287626921077</id><published>2010-09-24T23:18:00.000-07:00</published><updated>2010-09-24T23:19:27.126-07:00</updated><title type='text'>Condition Checking Inside Code</title><content type='html'>Many code blocks has condition checks during execution. If the check is nested deep inside some class structure, it is not easy to determine which containing class the check belongs to. Consider the possibility of shifting the checking outside execution, such as a pre-condition check during system initialization, or so on.&lt;br /&gt;&lt;br /&gt;Consider the following.&lt;pre&gt;&lt;code&gt;&lt;br /&gt;bool Controller::execute(char* data_) {&lt;br /&gt;    if(data_==NULL) {&lt;br /&gt;        return false ;&lt;br /&gt;    }&lt;br /&gt;    if(_manager==NULL) {&lt;br /&gt;        return false ;&lt;br /&gt;    }&lt;br /&gt;    Object* obj = _manager-&gt;getObject(data_) ;&lt;br /&gt;    obj-&gt;process(data_) ;&lt;br /&gt;    return true ;&lt;br /&gt;}&lt;br /&gt;&lt;/code&gt;&lt;/pre&gt;There are two checks. The check &lt;code&gt;if(_manager==NULL)&lt;/code&gt; can be placed outside the method since &lt;code&gt;_manager&lt;/code&gt; is independent of the execution and should be set beforehand anyway.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/618368706818295177-730800287626921077?l=ngpanwei.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ngpanwei.blogspot.com/feeds/730800287626921077/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ngpanwei.blogspot.com/2010/09/condition-checking-inside-code.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/618368706818295177/posts/default/730800287626921077'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/618368706818295177/posts/default/730800287626921077'/><link rel='alternate' type='text/html' href='http://ngpanwei.blogspot.com/2010/09/condition-checking-inside-code.html' title='Condition Checking Inside Code'/><author><name>Pan-Wei Ng</name><uri>http://www.blogger.com/profile/06871639859247413246</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_YIVmjak7Ixk/SWnxJKjmmeI/AAAAAAAAAAM/9SohInr1wek/S220/panwei-manga.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-618368706818295177.post-2471169421973763222</id><published>2010-09-22T09:46:00.000-07:00</published><updated>2010-09-22T09:46:18.822-07:00</updated><title type='text'>Test Visualization</title><content type='html'>A typical system has a huge (I mean huge) number of test cases. How do we know if the test cases sufficiently span our system? We need to have a way to visualize tests. One&amp;nbsp;simple way is to start with a domain model of the system and start to identify the objects and variables and relationships.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/618368706818295177-2471169421973763222?l=ngpanwei.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ngpanwei.blogspot.com/feeds/2471169421973763222/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ngpanwei.blogspot.com/2010/09/test-visualization.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/618368706818295177/posts/default/2471169421973763222'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/618368706818295177/posts/default/2471169421973763222'/><link rel='alternate' type='text/html' href='http://ngpanwei.blogspot.com/2010/09/test-visualization.html' title='Test Visualization'/><author><name>Pan-Wei Ng</name><uri>http://www.blogger.com/profile/06871639859247413246</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_YIVmjak7Ixk/SWnxJKjmmeI/AAAAAAAAAAM/9SohInr1wek/S220/panwei-manga.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-618368706818295177.post-2075019679400265756</id><published>2010-09-22T09:30:00.000-07:00</published><updated>2010-09-22T09:36:12.044-07:00</updated><title type='text'>The better the tester, the more unlikely developers will test</title><content type='html'>I have been working with an organization, which does very little or no-code level unit testing. All test automation are conducted using blackbox tools by testers. They even build custom tools to do these. But as these test tools and test scripts get mature, the developers have lesser impetous to do their own testing. The most cited reason is that it duplicates blackbox testing.&lt;br /&gt;&lt;br /&gt;Of course, everyone knows that white box (code-level) tests execute faster and can execute within a debugger and hence easier to isolate faults. They have also the potential of greater coverage.&lt;br /&gt;&lt;br /&gt;Unfortunately, there is a barrier to get started, and the the starting point usuallyseem so similar to duplicating black-box tests even though it isn't.&lt;br /&gt;&lt;br /&gt;Then it dawn upon me - that the developers ar just spoilt. Since someone else is doing the testing, why duplicate it? Worse still the blackbox test scripts are in a different language than code. This splits the role between developers and testers even further.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/618368706818295177-2075019679400265756?l=ngpanwei.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ngpanwei.blogspot.com/feeds/2075019679400265756/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ngpanwei.blogspot.com/2010/09/better-tester-more-unlikely-developers.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/618368706818295177/posts/default/2075019679400265756'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/618368706818295177/posts/default/2075019679400265756'/><link rel='alternate' type='text/html' href='http://ngpanwei.blogspot.com/2010/09/better-tester-more-unlikely-developers.html' title='The better the tester, the more unlikely developers will test'/><author><name>Pan-Wei Ng</name><uri>http://www.blogger.com/profile/06871639859247413246</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_YIVmjak7Ixk/SWnxJKjmmeI/AAAAAAAAAAM/9SohInr1wek/S220/panwei-manga.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-618368706818295177.post-3303925887800370421</id><published>2010-09-22T09:29:00.000-07:00</published><updated>2010-09-22T09:30:21.534-07:00</updated><title type='text'>Moving Again</title><content type='html'>I am moving my blog again.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/618368706818295177-3303925887800370421?l=ngpanwei.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://ngpanwei.blogspot.com/feeds/3303925887800370421/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://ngpanwei.blogspot.com/2010/09/moving-again.html#comment-form' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/618368706818295177/posts/default/3303925887800370421'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/618368706818295177/posts/default/3303925887800370421'/><link rel='alternate' type='text/html' href='http://ngpanwei.blogspot.com/2010/09/moving-again.html' title='Moving Again'/><author><name>Pan-Wei Ng</name><uri>http://www.blogger.com/profile/06871639859247413246</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='32' height='32' src='http://2.bp.blogspot.com/_YIVmjak7Ixk/SWnxJKjmmeI/AAAAAAAAAAM/9SohInr1wek/S220/panwei-manga.jpg'/></author><thr:total>0</thr:total></entry></feed>
