<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress.com" -->
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>

<channel>
	<title>code-review &amp;laquo; WordPress.com Tag Feed</title>
	<link>http://wordpress.com/tag/code-review/</link>
	<description>Feed of posts on WordPress.com tagged "code-review"</description>
	<pubDate>Sat, 11 Oct 2008 19:51:42 +0000</pubDate>

	<generator>http://wordpress.com/tags/</generator>
	<language>en</language>

<item>
<title><![CDATA[Codifique direito!]]></title>
<link>http://foreachcode.wordpress.com/?p=12</link>
<pubDate>Mon, 06 Oct 2008 00:08:13 +0000</pubDate>
<dc:creator>alexvip</dc:creator>
<guid>http://foreachcode.pl.wordpress.com/2008/10/06/codifique-direito/</guid>
<description><![CDATA[ 
code review
]]></description>
<content:encoded><![CDATA[<p> </p>
[caption id="attachment_14" align="alignnone" width="300" caption="code review"]<a href="http://foreachcode.files.wordpress.com/2008/10/wtfm1.jpg"><img class="size-medium wp-image-14" title="Codifique direito" src="http://foreachcode.wordpress.com/files/2008/10/wtfm1.jpg?w=300" alt="code review" width="300" height="282" /></a>[/caption]
]]></content:encoded>
</item>
<item>
<title><![CDATA[SharePoint Code Acceptance Checklist ]]></title>
<link>http://hristopavlov.wordpress.com/?p=89</link>
<pubDate>Mon, 22 Sep 2008 01:24:15 +0000</pubDate>
<dc:creator>hristopavlov</dc:creator>
<guid>http://hristopavlov.pl.wordpress.com/2008/09/22/sharepoint-code-acceptance-checklist/</guid>
<description><![CDATA[Microsoft have released and recently updated the &#8216;Sample code acceptance checklist for IT orga]]></description>
<content:encoded><![CDATA[<p>Microsoft have released and recently updated the 'Sample code acceptance checklist for IT organizations'. This is a checklist with things to look for when doing a code review of SharePoint applications. It can be used as a best practices guide. The article also contains various links to other SharePoint related "Best Practices" documents so bookmark this link now:</p>
<p><a title="http://technet.microsoft.com/en-us/library/cc707802.aspx" href="http://technet.microsoft.com/en-us/library/cc707802.aspx" target="_blank">http://technet.microsoft.com/en-us/library/cc707802.aspx</a></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Effective Code review or How to execute a Succesful code review]]></title>
<link>http://shaunakpandit.wordpress.com/2008/09/17/effective-code-review-or-how-to-execute-a-succesful-code-review/</link>
<pubDate>Wed, 17 Sep 2008 18:12:36 +0000</pubDate>
<dc:creator>Shaunak Pandit</dc:creator>
<guid>http://shaunakpandit.pl.wordpress.com/2008/09/17/effective-code-review-or-how-to-execute-a-succesful-code-review/</guid>
<description><![CDATA[Code Review&#8230;. The dreaded words for a newbie ears ..or in most of the cases even for the exper]]></description>
<content:encoded><![CDATA[<p>Code Review.... The dreaded words for a newbie ears ..or in most of the cases even for the experienced developers!!!!</p>
<p>How to code review ?<br />
Over the years of being the code reviewer or me being the reviewee have noticed a few things which i feel are worth mentioning for an effective and pain free code review to happen.</p>
<p>What exactly is a code review i guess everybody knows that , ill try and point out some of the things which should be taken care of for a productive and pain free code review to happen.</p>
<ul>
<li><strong>Objective:</strong> Make sure the objective behind the code review is well known to the developers involved: Developers need to understand that the code is being reviewed and not the developers ability to code.</li>
</ul>
<ul>
<li> <strong>Coding Standard: </strong>Make sure you have a predefined set of coding standards circulated with the team before coding. Developers wont have any clue as to what you as a reviewer feel is the right coding standard unless they know what needs to be followed before they start coding.</li>
</ul>
<ul>
<li><strong>Dont Accuse:</strong>Code review shouldn't be used to accuse the coder, but to point out the improvement areas in the code.</li>
</ul>
<ul>
<li><strong>Ask / Discuss: </strong>Ask reasons for deviation that have happened than assuming: Its better to let the developers explain the reason for deviation rather than assuming.Lets face it many time there are some theoretically correct statements which cant be possible practically.Hence ask reasons for deviation, <span style="text-decoration:underline;">understand the developers thought process</span>.</li>
</ul>
<ul>
<li><strong>Listen:</strong> Remember the coding approach you use isn't like the ten commandments.Just because you feel reaching point C is better by going via point A not necessarily everybody will think the same.<span style="text-decoration:underline;">Let the developer explain</span> why he felt going via point X was better as per him.</li>
</ul>
<ul>
<li><strong>Understand:</strong> Remember the code review is about the coding style not about you.: Dont get offended if there are any improvement areas in your coding.Keep one thing in mind the person reviewing your code has also gone through the same phase as you currently.and till the time one understands the improvement areas we wont be able to improve and do coding expected by a seasoned developer.</li>
</ul>
<ul>
<li><strong>Contribute:</strong> The coding standards wont contain all the development situations we face under the sun Hence contribution from the developer is absolutely necessary.Just because the person reviewing your code is a TL or PL doesn't mean he is right all the time.<span style="text-decoration:underline;">Express your view, understand the reasons</span><strong> </strong>why there are improvement areas.Keep one thing in mind we do those things best in which we believe in!!! hence if you do not understand why we are doing certain thing in a certain expected way you will never do it correctly so discuss and understand.</li>
</ul>
<ul>
<li><strong>Appreciate:</strong> Code review isn't just about finding improvement areas. Utilize it also to appreciate someones coding style/Approach.</li>
</ul>
<ul> Lets face it whether we like it or not we have to go in for code reviews some because their leaders make it mandatory while some because they understand the importance of code review.As long as code review happens in the right manner and for the right reasons it is always healthy for the complete team.</p>
<p>Have seen or rather experienced developers who would argue over coding standard violation with pointless reasoning.reasoning that would be treated as childish excuses.Listen and explain to them anyways try and make them understand.Ofcourse in many cases you as a TL/PL need to put your foot down or do a little booting to make the developer sunderstand that crappy excuses wont be tolerated.</p>
<p>Also one good thing to do beyond the coding standards document of what to do is to create a coding standard checklist for developers to check against as when they are coding.</p>
<p>Copyright ©  Shounak Pandit</p>
<p>These are my views, my thoughts need not necassarily be the same as yours.....</ul>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Code Review / Peer review.....]]></title>
<link>http://shaunakpandit.wordpress.com/?p=94</link>
<pubDate>Thu, 11 Sep 2008 14:53:06 +0000</pubDate>
<dc:creator>Shaunak Pandit</dc:creator>
<guid>http://shaunakpandit.pl.wordpress.com/2008/09/11/code-review-peer-review/</guid>
<description><![CDATA[One wonders &#8230;.Why in the name of God would one want to spend (waste as some people say) time o]]></description>
<content:encoded><![CDATA[<p>One wonders ....Why in the name of God would one want to spend (waste as some people say) time on performing a code review on any piece of code which we/peers have written and seems to be working properly and providing the functionality</p>
<p>I remember back then when i was an intern and i was assigned to a project in which my PM was a guy working in our US branch...people having worked with US bosses might be knowing thr are 2 types of techies our there... one who have less knowledge than you and the other lot who has so much knowledge than you that they make you feel like you are learning the alphabets of development while they are shooting out complex phrases after phrases of sentences....</p>
<p>man how i hated that guy i can still recall his words "Shounak, Dont even show me the functionality i dont care about it, first make sure you have it as per the coding standards" and i used to think what kind of a weirdo have i got as my boss ..he doesn't even want to see if the requirement has been met but cares about some stupid code review.....and i used to laugh at his code review obsession...</p>
<p>but over the years as i grew into a techie...into what they call a seasoned developer ..i realised the importance of code review</p>
<blockquote><p>Code review isnt a tool to find mistakes in others code...its a tool by which one ensures the code is going to meet the standards expected of a seasoned developer.</p></blockquote>
<p style="text-align:left;">There are various technical ways of achieving our requirements...or rather let me put it this way there are abundant ways of screwing up the way you meet your requirement.and there are some ways in which you meet the requirement in one of the optimum ways...and code review is a tool that helps us walk on the optimum path or close to the optimum path...</p>
<p style="text-align:left;">
<p style="text-align:left;">for an example check my post on string builder usage vs string concat... at <a href="http://shaunakpandit.wordpress.com/2008/09/10/how-stringbuilder-string-concatenation-affects-performance-string-builder-vs-string-concatenation">String Builder Vs String concat</a>/</p>
<p style="text-align:left;">Code reviews are important for a developer to understand how to keep improving his coding style ..</p>
<p style="text-align:left;">there are various good tools used for having automated code checking one that i have used extensively in my development days is FxCop and one more that i can't recall the name of...these were tools which would use the assembly n metadata as source and parse the assembly for any coding style /optimization errors</p>
<p style="text-align:left;">will try and write up about one of them soon</p>
<p style="text-align:left;">
<p style="text-align:left;">Cheers</p>
<p style="text-align:left;">© Shounak Pandit</p>
<p style="text-align:left;">
<p style="text-align:left;">
]]></content:encoded>
</item>
<item>
<title><![CDATA[pointer to issues]]></title>
<link>http://ranjtheseeker.wordpress.com/?p=110</link>
<pubDate>Thu, 04 Sep 2008 02:35:14 +0000</pubDate>
<dc:creator>ranjtheseeker</dc:creator>
<guid>http://ranjtheseeker.pl.wordpress.com/2008/09/04/pointer-to-issues/</guid>
<description><![CDATA[Well,  I wanted to note down one of the most silliest bugs I have done in my coding. I started off ]]></description>
<content:encoded><![CDATA[<p>Well,  I wanted to note down one of the most silliest bugs I have done in my coding. I started off my code thinking that I will create a array of string pointers and allocate memory for each string dynamically. I did my coding initially with that assumption and everything was working fine. Now, as time passed I had forgotten that i had started off that way and started assuming that I had declared a char pointer of fixed length.</p>
<p>And the size was declared to be 355. So, basically this array could hold 355 strings. I did my entire code assuming that I am handling an array of string pointers but overlooked the basic declaration where I had declared it to hold 355 records. So, what happened was at one point of time the code had to handle more than 355 recs and my code was going for a toss. I didnt do the stress testing and this didnt come up in the Test Env. It came up once but I was looking for the issue elsewhere.</p>
<p>Then I had to come to the client place to Mexico to support the go-live and the code bombed. Imagine the client sitting on top of your head and you had to deliver and had none to reach out to. And not one issue but 'n' number of issues. I was thinking and working for about 30 hours without going anywhere near the solution. I had already sent a SOS to my manager at India and at Mexico and we were trying to reach out to different people. Then finally one of the client techie questioned me why I had declared it that way. And asked me to recheck. I did a quick recheck and changed the size of the constant and lo!! the code worked.</p>
<p>I cursed myself for this blunder. But sometimes this is how you learn. And I can never ever forget this in my life. It gave me a good teaching of all the loopholes that you should expect in a code. And the importance of quality reviewing. And good testing too!!! Finally one correct question saved the day for me and the client as well. The code is working fine now and I can do a lot of tweaking now to increase performance. But, the biggest of blunders at the least unexpected place, just because you forgot to look at the header file for the size. I am such a moron!!!!</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Code Reviews : Different Types]]></title>
<link>http://sharat.wordpress.com/2008/08/05/code-reviews-different-types/</link>
<pubDate>Tue, 05 Aug 2008 15:37:58 +0000</pubDate>
<dc:creator>sharat</dc:creator>
<guid>http://sharat.pl.wordpress.com/2008/08/05/code-reviews-different-types/</guid>
<description><![CDATA[Automated Reviews
Automate the review where possible. A review conducted by a computer has several b]]></description>
<content:encoded><![CDATA[<h4>Automated Reviews</h4>
<p>Automate the review where possible. A review conducted by a computer has several benefits:
<ul>
<li>Reduced manual cost of code reviews
<li>Fast, consistent, and repeatable
<li>Removes emotion from the reviews: pride, ego, and ownership need to be constantly recognized when conducting a review. When offering a critique you should take care to not to step on the author's feelings. Using an automated process abdicates this responsibility.
<li>In some cases you have tools that allow for real-time reviews, such as the Eclipse plug-in <a href="http://www.instantiations.com/codepro/index.html">CodePro Analytix</a>. These tools perform an examination of the code as it is being written. This is the holy grail of fixing broken windows. </li>
</ul>
<p>The benefits notwithstanding, it must be acknowledged that the scope of automated reviews is limited to rules and conventions and are hard to extend to study business logic. The latter have to be handled by manual (or peer) examination.<br />
<h4>Manual Reviews</h4>
<p>From the prior sections you have seen that interactive and build-time tools at your disposal, while a great boon to the review process, cannot substitute for manual review for a certain class of problems. You have to manually review for certain types of improper coding practices. Tools cannot highlight errors of omission as described in the earlier section. Given that, let's see how a manual review must be conducted.
<p><strong><em>Participants:</em></strong> The review must focus on different facets of code correctness. Therefore, the participants of a code review must be chosen to satisfy a diverse set of roles.
<ul>
<li>Technical lead: S/he plays the role of the facilitator and moderator
<li>The author(s)
<li>Quality Assurance: This role focuses on ensuring that the code under examination satisfies the set standards
<li>Functional expert: The person who is an expert in the business domain being reviewed </li>
</ul>
<p><strong><em>How to conduct:</em></strong> The technical lead will work with the authors to coordinate the review. This process includes:
<ul>
<li>Identifying the participants in the review
<li>Determining the amount of preview time
<li>Providing the participants the necessary information
<li>
<ul>
<li>Requirement/bug fix that was implemented
<li>CVS location of the files affected. The lines in the file that were affected by this change.
<li>Project reports with coverage and complexity details
<li>Review time duration </li>
</ul>
<li>Setting up a meeting to discuss the results of the preview
<li>
<ul>
<li>Moderate the meeting – During the actual review the authors will describe the intent of the code and provide an overview of the implementation before the code is examined
<li>Capture comments
<li>Repeat above steps if necessary </li>
</ul>
</li>
</ul>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Code Reviews : Purpose]]></title>
<link>http://sharat.wordpress.com/2008/08/05/code-reviews-purpose/</link>
<pubDate>Tue, 05 Aug 2008 15:36:34 +0000</pubDate>
<dc:creator>sharat</dc:creator>
<guid>http://sharat.pl.wordpress.com/2008/08/05/code-reviews-purpose/</guid>
<description><![CDATA[Adherence to coding standards Writing to standards has several benefits, such as a shared vocabulary]]></description>
<content:encoded><![CDATA[<p><strong>Adherence to coding standards</strong> Writing to standards has several benefits, such as a shared vocabulary, which makes the code easier to reuse and maintain. One of the primary focuses of a code review is to ensure abidance with these norms. As you'll see later, this benefit of a review is best derived in an automated manner. Such an approach has the dual benefit of a machine's thoroughness while circumventing the cost of a manual review.
<p><strong>Addressing the requirements</strong> One of the key goals of a code review is to ensure that the code under scrutiny is feature-complete. Beautiful code that fails to meet user requirements is useless. The review must ensure that the logic does what it is called upon to do.
<p><strong>Code correctness</strong> Ensure that the authors are following proper programming techniques as appropriate:
<ul>
<li><em>Object orientation</em>: Be on the lookout for monolithic, jack-of-all-trades methods.
<li><em>Code reuse</em>: Promote the use of tried and tested (and debugged) APIs and avoid code duplication by recommending the use of available APIs.
<li><em>Adequate and proper documentation</em>: Ensure that the code is amply commented. This is especially important when the logic is complex. Such inline documentation must explain <em>what</em> is being done and not <em>how</em> it is being done.
<li><em>Defensive coding practices</em>: See any number of online resources.
<li><em>Maintainability</em>: The ability to maintain the code is assessed from documentation and code organization. </li>
</ul>
<p><strong>Errors and omissions</strong> A well-written code fragment that abides by all the departmental norms, satisfies requirements, and otherwise "stays within the lines" could still be in error. It is the task of the reviewer to make sure that the code does not make incorrect business/usage assumptions and that all possible usage scenarios are taken into account. A business process expert helping with the review will be quick to spot logic that presupposes the state of the application while the logic is executed. For example, an application that allows guest users cannot be guaranteed to know the current user's identity.
<p><strong>Test for coverage.</strong> <a href="http://en.wikipedia.org/wiki/Code_coverage">Test coverage</a> is a measure of the quality of testing. Tools like <a href="http://maven.apache.org">Maven</a> and <a href="http://cruisecontrol.sf.net">CruiseControl</a> simplify the process of testing and auditing coverage reports. The reviewer must understand the significance of branch and path coverage.
<p><strong>Silo-busting pedagogical aid</strong> This tool exposes others in the team to the code. The reviewer gets to read, analyze, and discuss someone else's work. Such cross-pollination is an excellent way to raise the skill of the entire group. This approach has the added tangential benefit of busting silos of expertise that projects tend to unwittingly foster.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Code Reviews : How To]]></title>
<link>http://sharat.wordpress.com/2008/08/05/code-reviews-how-to/</link>
<pubDate>Tue, 05 Aug 2008 15:35:50 +0000</pubDate>
<dc:creator>sharat</dc:creator>
<guid>http://sharat.pl.wordpress.com/2008/08/05/code-reviews-how-to/</guid>
<description><![CDATA[
Ask questions rather than make statements. A statement is accusatory. &#8220;You didn&#8217;t follo]]></description>
<content:encoded><![CDATA[<ol>
<li><b>Ask questions rather than make statements.</b> A statement is accusatory. "You didn't follow the standard here" is an attack—whether intentional or not. The question, "What was the reasoning behind the approached you used?" is seeking more information. Obviously, that question can't be said with a sarcastic or condescending tone; but, done correctly, it can often open the developer up to stating their thinking and then asking if there was a better way.
<li><b>Avoid the "Why" questions.</b> Although extremely difficult at times, avoiding the"Why" questions can substantially improve the mood. Just as a statement is accusatory—so is a why question. Most "Why" questions can be reworded to a question that doesn't include the word "Why" and the results can be dramatic. For example, "Why didn't you follow the standards here..." versus "What was the reasoning behind the deviation from the standards here..."
<li><b>Remember to praise.</b> The purposes of code reviews are not focused at telling developers how they can improve, and not necessarily that they did a good job. Human nature is such that we want and need to be acknowledged for our successes, not just shown our faults. Because development is necessarily a creative work that developers pour their soul into, it often can be close to their hearts. This makes the need for praise even more critical.
<li><b>Make sure you have good coding standards to reference.</b> Code reviews find their foundation in the coding standards of the organization. Coding standards are supposed to be the shared agreement that the developers have with one another to produce quality, maintainable code. If you're discussing an item that isn't in your coding standards, you have some work to do to get the item in the coding standards. You should regularly ask yourself whether the item being discussed is in your coding standards.
<li><b>Make sure the discussion stays focused on the code and not the coder.</b> Staying focused on the code helps keep the process from becoming personal. You're not interested in saying the person is a bad person. Instead, you're looking to generate the best quality code possible.
<li><b>Remember that there is often more than one way to approach a solution.</b> Although the developer might have coded something differently from how you would have, it isn't necessarily wrong. The goal is quality, maintainable code. If it meets those goals and follows the coding standards, that's all you can ask for. </li>
</ol>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Software Engineering: Code Review Secrets; Free Book From SmartBear Software ]]></title>
<link>http://blackfalconsoftware.wordpress.com/?p=1038</link>
<pubDate>Sat, 05 Jul 2008 14:20:54 +0000</pubDate>
<dc:creator>Black Falcon</dc:creator>
<guid>http://tech-notes.info/2008/07/05/software-engineering-code-review-secrets-free-book-from-smartbear-software/</guid>
<description><![CDATA[
	
Best Kept Secrets of Peer Code Review
			
Peer code review is happening behind the scenes at your]]></description>
<content:encoded><![CDATA[<p><img src="http://blackfalconsoftware.files.wordpress.com/2008/07/070508-1420-softwareeng1.png">
	</p>
<p><span style="font-family:Arial;font-size:18pt;"><strong><em>Best Kept Secrets of Peer Code Review</em><br />
			</strong></span></p>
<p><span style="font-family:Arial;font-size:10pt;">Peer code review is happening behind the scenes at your competitor's shop. Are they wasting their time or gaining a competitive advantage? What type of review actually works?<br />
</span></p>
<div>
<table style="border-collapse:collapse;" border="0"><col><col><br />
<tbody valign="top">
<tr>
<td style="padding-right:32px;">
<p><img src="http://blackfalconsoftware.files.wordpress.com/2008/07/070508-1420-softwareeng2.png"></p>
</td>
<td>
<p><a href="http://smartbear.com/codecollab-code-review-book.php"><span style="color:blue;font-family:Arial;font-size:10pt;text-decoration:underline;"><strong>Order your <em>FREE</em> book with <em>FREE</em> shipping </strong></span></a><span style="font-family:Arial;font-size:10pt;"><br>or view <a href="http://smartbear.com/codecollab-code-review-book.php"><span style="color:blue;text-decoration:underline;">Table of Contents</span></a> with <a href="http://smartbear.com/codecollab-code-review-book.php"><span style="color:blue;text-decoration:underline;">sample chapters</span></a>.<br />
</span></p>
<p><span style="font-family:Arial;font-size:10pt;">We've compiled 10 practical essays from industry experts giving specific techniques for effective peer code review:<br />
</span></p>
<ul>
<li><span style="font-family:Arial;font-size:10pt;"><strong>Cisco: The largest-ever case study of peer code review</strong><br />
								</span></li>
<li><span style="font-family:Arial;font-size:10pt;">Modern experiments: results of the past 15 years<br />
</span></li>
<li><span style="font-family:Arial;font-size:10pt;">Five types of review: Pro's and Con's<br />
</span></li>
<li><span style="font-family:Arial;font-size:10pt;">Managing social aspects of peer review<br />
</span></li>
<li><span style="font-family:Arial;font-size:10pt;">Code review in the SEI/CMMI/PSP/TSP context<br />
</span></li>
<li><span style="font-family:Arial;font-size:10pt;">Why many developers don't embrace code review<br />
</span></li>
<li><span style="font-family:Arial;font-size:10pt;">Questions to ask when implementing a peer review process<br />
</span></li>
<li><span style="font-family:Arial;font-size:10pt;">Why haven't you heard more about code review?<br />
</span></li>
<li><span style="font-family:Arial;font-size:10pt;">Metrics and measurements<br />
</span></li>
<li><span style="font-family:Arial;font-size:10pt;">Code Collaborator: Software for efficient, remote peer review </span></li>
</ul>
</td>
</tr>
</tbody>
</table>
</div>
<p><span style="font-family:Arial;font-size:10pt;"><a href="http://smartbear.com/codecollab-code-review-book.php">Go here to get free book… and many additional whitepapers on this aspect of software engineering </a></span>
	</p>
<p><span style="font-family:Arial;font-size:10pt;font-style:italic;">(Yes, this is a "sell" for a product but what isn't these days?)</span></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Process for Software Development]]></title>
<link>http://qastation.wordpress.com/?p=59</link>
<pubDate>Fri, 23 May 2008 05:53:09 +0000</pubDate>
<dc:creator>qastation</dc:creator>
<guid>http://qastation.pl.wordpress.com/2008/05/23/process-for-software-development/</guid>
<description><![CDATA[Process for Software Development
 
Purpose:
 
To provide general guidelines to carryout coding pha]]></description>
<content:encoded><![CDATA[<p class="MsoNormal" style="margin:0;"><strong><span style="color:blue;"><span style="font-family:Times New Roman;"><span style="font-size:small;">Process for Software Development</span></span></span></strong></p>
<p class="MsoNormal" style="margin:0;"><strong><span style="color:blue;"><span style="font-family:Times New Roman;"><span style="font-size:small;"> </span></span></span></strong></p>
<p class="MsoNormal" style="margin:0;"><strong><span style="color:blue;"><span style="font-family:Times New Roman;"><span style="font-size:small;">Purpose:</span></span></span></strong></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:Times New Roman;"><span style="font-size:small;"> </span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;font-family:Times New Roman;">To provide general guidelines to carryout coding phase</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:Times New Roman;"><span style="font-size:small;"> </span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:Times New Roman;"><span style="font-size:small;"><strong><span style="color:blue;">Process Requirement</span></strong>:</span></span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:Times New Roman;"><span style="font-size:small;"> </span></span></p>
<p class="MsoNormal" style="margin:0;"><strong><span style="font-family:Times New Roman;"><span style="font-size:small;">1. Coding:</span></span></strong></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:Times New Roman;"><span style="font-size:small;"> </span></span></p>
<p class="MsoNormal" style="margin:0;"><em><span style="font-family:Times New Roman;"><span style="font-size:small;">Entry Criteria: </span></span></em></p>
<p class="MsoNormal" style="text-indent:-0.25in;margin:0 0 0 0.5in;"><span style="font-family:Wingdings;"><span style="font-size:small;">Ø</span><span style="font:7pt &#34;">      </span></span><span style="font-size:small;font-family:Times New Roman;">Approved Technical Design Documents</span></p>
<p class="MsoNormal" style="text-indent:-0.25in;margin:0 0 0 0.5in;"><span style="font-family:Wingdings;"><span style="font-size:small;">Ø</span><span style="font:7pt &#34;">      </span></span><span style="font-size:small;font-family:Times New Roman;">Approved Project Plan</span></p>
<p class="MsoNormal" style="text-indent:-0.25in;margin:0 0 0 0.5in;"><span style="font-family:Wingdings;"><span style="font-size:small;">Ø</span><span style="font:7pt &#34;">      </span></span><span style="font-size:small;font-family:Times New Roman;">Coding Standards</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:Times New Roman;"><span style="font-size:small;"> </span></span></p>
<p class="MsoNormal" style="margin:0;"><em><span style="font-family:Times New Roman;"><span style="font-size:small;">Activity:</span></span></em></p>
<p class="MsoNormal" style="text-indent:-0.25in;margin:0 0 0 0.5in;"><span style="font-family:Wingdings;"><span style="font-size:small;">Ø</span><span style="font:7pt &#34;">      </span></span><span style="font-size:small;font-family:Times New Roman;">Development process begins with the implementation of the Technical Design by the developer assigned.</span></p>
<p class="MsoNormal" style="text-indent:-0.25in;margin:0 0 0 0.5in;"><span style="font-family:Wingdings;"><span style="font-size:small;">Ø</span><span style="font:7pt &#34;">      </span></span><span style="font-size:small;font-family:Times New Roman;">Developers design and create source code following SDLC coding standards / guidelines provided by the Development Team Leader </span></p>
<p class="MsoNormal" style="text-indent:-0.25in;margin:0 0 0 0.5in;"><span style="font-family:Wingdings;"><span style="font-size:small;">Ø</span><span style="font:7pt &#34;">      </span></span><span style="font-size:small;font-family:Times New Roman;">Completed Code shall be compiled and the errors/ bugs shall be fixed.</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:Times New Roman;"><span style="font-size:small;"> </span></span></p>
<p class="MsoNormal" style="margin:0;"><em><span style="font-family:Times New Roman;"><span style="font-size:small;">Exit Criteria: </span></span></em></p>
<p class="MsoNormal" style="text-indent:-0.25in;margin:0 0 0 0.5in;"><span style="font-family:Wingdings;"><span style="font-size:small;">Ø</span><span style="font:7pt &#34;">      </span></span><span style="font-size:small;font-family:Times New Roman;">Compiled error free Code</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:Times New Roman;"><span style="font-size:small;"> </span></span></p>
<p class="MsoNormal" style="margin:0;"><strong><span style="font-family:Times New Roman;"><span style="font-size:small;">2. Code Review and Unit Testing</span></span></strong></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:Times New Roman;"><span style="font-size:small;"> </span></span></p>
<p class="MsoNormal" style="margin:0;"><em><span style="font-family:Times New Roman;"><span style="font-size:small;">Entry Criteria:</span></span></em></p>
<p class="MsoNormal" style="text-indent:-0.25in;margin:0 0 0 0.5in;"><span style="font-family:Wingdings;"><span style="font-size:small;">Ø</span><span style="font:7pt &#34;">      </span></span><span style="font-size:small;font-family:Times New Roman;">Compiled Error Free Code</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:Times New Roman;"><span style="font-size:small;"> </span></span></p>
<p class="MsoNormal" style="margin:0;"><em><span style="font-family:Times New Roman;"><span style="font-size:small;">Activity: </span></span></em></p>
<p class="MsoNormal" style="text-indent:-0.25in;margin:0 0 0 0.5in;"><span style="font-family:Wingdings;"><span style="font-size:small;">Ø</span><span style="font:7pt &#34;">      </span></span><span style="font-size:small;font-family:Times New Roman;">Developer Team Leader Conducts walkthrough on code at formal or informal agenda based upon the review process.</span></p>
<p class="MsoNormal" style="text-indent:-0.25in;margin:0 0 0 0.5in;"><span style="font-family:Wingdings;"><span style="font-size:small;">Ø</span><span style="font:7pt &#34;">      </span></span><span style="font-size:small;font-family:Times New Roman;">Verifies with the checklist and RTM against the working product/code.</span></p>
<p class="MsoNormal" style="text-indent:-0.25in;margin:0 0 0 0.5in;"><span style="font-family:Wingdings;"><span style="font-size:small;">Ø</span><span style="font:7pt &#34;">      </span></span><span style="font-size:small;font-family:Times New Roman;">Unit Testing will be done and if any issues are identified then it as to get closed before release to the system or integration test</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:Times New Roman;"><span style="font-size:small;"> </span></span></p>
<p class="MsoNormal" style="margin:0;"><em><span style="font-family:Times New Roman;"><span style="font-size:small;">Records Retention:</span></span></em></p>
<p class="MsoNormal" style="text-indent:-0.25in;margin:0 0 0 0.5in;"><span style="font-family:Wingdings;"><span style="font-size:small;">Ø</span><span style="font:7pt &#34;">      </span></span><span style="font-size:small;font-family:Times New Roman;">Code Review</span></p>
<p class="MsoNormal" style="text-indent:-0.25in;margin:0 0 0 0.5in;"><span style="font-family:Wingdings;"><span style="font-size:small;">Ø</span><span style="font:7pt &#34;">      </span></span><span style="font-size:small;font-family:Times New Roman;">Unit testing issue report</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-family:Times New Roman;"><span style="font-size:small;"> </span></span></p>
<p class="MsoNormal" style="margin:0;"><em><span style="font-family:Times New Roman;"><span style="font-size:small;">Exit Criteria:</span></span></em></p>
<p class="MsoNormal" style="text-indent:-0.25in;margin:0 0 0 0.5in;"><span style="font-family:Wingdings;"><span style="font-size:small;">Ø</span><span style="font:7pt &#34;">      </span></span><span style="font-size:small;font-family:Times New Roman;">Updated baseline code (SCM Plan)</span></p>
<p class="MsoNormal" style="margin:0;"><span style="font-size:small;"><span style="font-family:Times New Roman;"> </span></span></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Invitation to Python Developers from Guido]]></title>
<link>http://dorai.wordpress.com/?p=860</link>
<pubDate>Sat, 03 May 2008 05:44:57 +0000</pubDate>
<dc:creator>dorai</dc:creator>
<guid>http://dorai.pl.wordpress.com/2008/05/03/invitation-to-python-developers-from-guido/</guid>
<description><![CDATA[Thanks to  @reddit here is the invitiation (dated May 1, 2008)

I'm inviting the Python developer co]]></description>
<content:encoded><![CDATA[<p>Thanks to  @reddit here <a href="http://mail.python.org/pipermail/python-3000/2008-May/013408.html">is the invitiation (dated May 1, 2008)</a></p>
<blockquote>
<pre>I'm inviting the Python developer community to try out the tool on the
web for code reviews. I've added a few code reviews already, but I'm
hoping that more developers will upload at least one patch for review
and invite a reviewer to try it out.

To try it out, go here:

    <a href="http://codereview.appspot.com/">http://codereview.appspot.com</a></pre>
</blockquote>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Performance tuning guidelines]]></title>
<link>http://mohitvalecha.wordpress.com/?p=39</link>
<pubDate>Tue, 29 Apr 2008 09:37:54 +0000</pubDate>
<dc:creator>mohitvalecha</dc:creator>
<guid>http://mohitvalecha.pl.wordpress.com/2008/04/29/performance-tuning-guidelines/</guid>
<description><![CDATA[Performance tuning guidelines:
The following guidelines should help you develop an overall approach ]]></description>
<content:encoded><![CDATA[<p><strong>Performance tuning guidelines:</strong></p>
<p>The following guidelines should help you develop an overall approach to performance tuning.</p>
<p><strong>Remember the law of diminishing returns</strong>: Your greatest performance benefits usually come from your initial efforts. Further changes generally produce smaller and smaller benefits and require more and more effort.</p>
<p><strong>Do not tune just for the sake of tuning</strong>: Tune to relieve identified constraints. If you tune resources that are not the primary cause of performance problems, this has little or no effect on response time until you have relieved the major constraints, and it can actually make subsequent tuning work more difficult. If there is any significant improvement potential, it lies in improving the performance of the resources that are major factors in the response time.</p>
<p><strong>Consider the whole system</strong>: You can never tune one parameter or system in isolation. Before you make any adjustments, consider how it will affect the system as a whole.</p>
<p><strong>Change one parameter at a time</strong>: Do not change more than one performance tuning parameter at a time. Even if you are sure that all the changes will be beneficial, you will have no way of evaluating how much each change contributed. You also cannot effectively judge the trade-off you have made by changing more than one parameter at a time. Every time you adjust a parameter to improve one area, you almost always affect at least one other area that you may not have considered. By changing only one at a time, this allows you to have a benchmark to evaluate whether the change does what you want.</p>
<p><strong>Measure and reconfigure by levels</strong>: For the same reasons that you should only change one parameter at a time, tune one level of your system at a time. You can use the following list of levels within a system as a guide:</p>
<p>Hardware<br />
Operating System<br />
Application Server and Requester<br />
Database Manager<br />
SQL Statements<br />
Application Programs</p>
<p><strong>Check for hardware as well as software problems</strong>: Some performance problems may be corrected by applying service either to your hardware, or to your software, or to both. Do not spend excessive time monitoring and tuning your system when simply applying service may make it unnecessary.</p>
<p><strong>Understand the problem before you upgrade your hardware</strong>: Even if it seems that additional storage or processor power could immediately improve performance, take the time to understand where your bottlenecks are. You may spend money on additional disk storage only to find that you do not have the processing power or the channels to exploit it.</p>
<p><strong>Put fall-back procedures in place before you start tuning</strong>: As noted earlier, some tuning can cause unexpected performance results. If this leads to poorer performance, it should be reversed and alternative tuning tried. If the former setup is saved in such a manner that it can be simply recalled, the backing out of the incorrect information becomes much simpler.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Code Reviews]]></title>
<link>http://bobdotnet.wordpress.com/?p=6</link>
<pubDate>Sat, 12 Apr 2008 03:57:45 +0000</pubDate>
<dc:creator>pdxbob</dc:creator>
<guid>http://bobdotnet.pl.wordpress.com/2008/04/12/code-reviews/</guid>
<description><![CDATA[There was a time when I cringed at the idea of having a formal code review of my code. Well, I]]></description>
<content:encoded><![CDATA[<p>There was a time when I cringed at the idea of having a formal code review of my code. Well, I've been programming for over twenty years and my first five years in the business was for a company that was transitioning from startup to sustained business mode, and there was just no time for good process. Since then I've been fortunate to work with people who care about the quality of their code as well as the business objectives. I worked on a team that was broken up last year by shifting corporate priorities due to acquisitions. We practiced scrum, some TDD, some pairing, and most importantly, we developed a code-review practice that was comfortable for everyone. Every other Friday afternoon at 3 we meet in a common area in the company cafe building where one person would walk through code. It was usually something they wrote, but we also wanted to select code others had written because we all picked up whatever task was at the top of the backlog, leading to a more well-rounded team. We reviewed comments, design, coding guidelines, all within the scope of the particular piece of code being reviewed. It worked reasonably well. And the late Friday time had the effect of relaxing everyone.</p>
<p>That team was special because we built a product from scratch and we developed a lot of trust in each other. Today was the last day at work for Philippe, a guy who wasn't on that team but who worked on the security products development group at my company.  As I had developed an interest in building secure software, I had some interaction with him during the security code review process that he and his team conducted on our product. I took the recommendations that they made and designed and implemented a plan for handling as much of it as was possible in our impossible schedule .  When I said goodbye today, Philippe told me that he really enjoyed working with me back then because I took seriously the engineering of security into the product.</p>
<p>As I was flipping through my aggregator (Google Reader) tonight, I came across <a href="http://www.bluebytesoftware.com/blog/default.aspx" target="_blank">Joe Duffy</a>'s blog post on multi-threaded code review. Joe is one of the key members of the Microsoft team building the <a href="http://msdn2.microsoft.com/en-us/concurrency/default.aspx" target="_blank">Parallel Extensions to the .NET Framework</a>, and is currently writing a <a href="http://www.bluebytesoftware.com/books/winconc/winconc_book_resources.html" target="_blank">book </a>on concurrency development for Addison-Wesley. His blog post is fairly long but then, writing concurrency code is difficult and making sure that it is validated is of critical importance. There is too much to re-state here. Even listing highlights doesn't give it enough justice. If you're writing multi-threaded code, go read this blog <a href="http://www.bluebytesoftware.com/blog/2008/03/28/ConcurrencyorientedCodeReviews.aspx" target="_blank">entry</a>.</p>
<p>Back on security, related to code review I thought I'd point out that the Microsoft Patterns &#38; Practices group has come up with <a href="http://www.codeplex.com/WCFSecurity" target="_blank">security guidelines for WCF</a> that includes a lot of <a href="http://www.codeplex.com/WCFSecurity/Wiki/View.aspx?title=How%20Tos&#38;referringTitle=Home" target="_blank">how-to</a> and <a href="http://www.codeplex.com/WCFSecurity/Wiki/View.aspx?title=Application%20Scenarios&#38;referringTitle=Home" target="_blank">application scenario</a> documentation as well as <a href="http://www.codeplex.com/WCFSecurity/Wiki/View.aspx?title=Video%20Index&#38;referringTitle=Home" target="_blank">videos</a>. It is crucial to be aware of the common security traps such as buffer overflows and cross-site scripting attacks.  With WCF, however, there is a whole boatload of additional concerns because of the C: Communication.  A WCF service may need to impersonate the caller in order for a component on the receiving end can authorize them for some activity. The P&#38;P team has nicely written docs for explaining how to do this. Or you can watch the video if you're so inclined. This is great material for identifying questions and concerns for use in a security code review.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Calitatea codului scris de programatori]]></title>
<link>http://andreir.wordpress.com/2008/03/24/calitatea-codului-scris-de-programatori/</link>
<pubDate>Mon, 24 Mar 2008 14:39:49 +0000</pubDate>
<dc:creator>Andrei Rinea</dc:creator>
<guid>http://andreir.pl.wordpress.com/2008/03/24/calitatea-codului-scris-de-programatori/</guid>
<description><![CDATA[&#8230; este greu de masurat. Din fericire am dat intamplator pe net peste o metrica destul de dragu]]></description>
<content:encoded><![CDATA[<p>... este greu de masurat. Din fericire am dat intamplator pe net peste o metrica destul de draguta :)</p>
<p><img ALT="wtfm.gif" SRC="http://andreir.wordpress.com/files/2008/03/wtfm.gif" /></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Read Before Running]]></title>
<link>http://talkaboutquality.wordpress.com/?p=58</link>
<pubDate>Tue, 26 Feb 2008 21:04:19 +0000</pubDate>
<dc:creator>Tom Harris</dc:creator>
<guid>http://talkaboutquality.pl.wordpress.com/2008/02/27/read-before-running/</guid>
<description><![CDATA[Debugging: How to Start (commonly accepted method)

Search for &#8220;debugging&#8221; on the intern]]></description>
<content:encoded><![CDATA[<p><b>Debugging: How to Start (commonly accepted method)<br />
</b></p>
<p>Search for "debugging" on the internet and most entries will tell you the first step is to reproduce the problem (properly called "the software failure") and the second step is to create the simplest configuration that also reproduces the problem.</p>
<p>I agree that it is essential to reproduce the problem, because you need to know you're working on the <i>right </i>problem.</p>
<p><b>Fun to Run, or "the thrill of the chase"</b></p>
<p>But programmers, myself included, like to <i>run</i> things—to let the computer do the work—so there's a great temptation to reproduce the problem, change something, run the software, add some "debugging statements", and run it again. And there goes an hour of valuable time.</p>
<p><b>Does <i>readability</i> fit in here somewhere?</b></p>
<p>If the code is written clearly, and by that I mean that it's readable, with <a href="http://talkaboutquality.wordpress.com/2006/07/09/very-short-coding-standard/">meaningful variable names</a> and the proper levels of abstraction, then the second step might be to actually <i>read through the code</i>.</p>
<p><b>A short debugging story</b></p>
<p>Today, I showed myself both the wrong way, and the right way, to respond to a "bug report".</p>
<p>Where I work, I've turned out to be the owner of a small set of text-parsing scripts, written in awk. We use them to pull out compiler warning messages from the long build logs, so that developers can see them and address them. These parsing scripts are short—half a page of code including comments—and are tested only with the few build logs that I've had time to try. Given limited time (it is not my main job to write parsing scripts!), I have to hope that all the build logs for a given compiler are pretty similar, so whatever pattern I've identified will be followed in other build logs. It isn't always so.</p>
<p>A developer noticed (first by eye, confirmed with a simple "grep") that there were more compiler warnings in his build log than in the parsed csv (comma-separated-value) output file. Not good. I set about debugging!</p>
<p>It took about 5 minutes to reproduce the problem. Really just gathering the sample input and bad output files, and setting up a copy of the relevant scripts. One run (takes about 2 seconds) showed that, indeed, some warnings were missing.</p>
<p>My next step, by the standard debugging technique, was to start printing all the partial results, run the script over and over again, and look to see where it was failing. Then some more time to adjust the failing script and retest.</p>
<p><b>Haven't I seen this somewhere before?</b></p>
<p>After the first 5 minutes (reproducing the problem), I already had a pretty good idea of which script was failing. A sed one-liner that adds newlines after each compilation command line, and before the first warning message, so that the awk script would be able to separate the first warning message as a record and select it. What was odd was that when I opened that script (just one executable line—the rest is comments including change history), the last modification comment was about how <i>I had fixed exactly the same problem before</i>. Briefly I wondered about that, but rushed onward to more than half an hour of running parts of the script pipeline to prove to myself exactly what was failing and why.</p>
<p>I could have saved myself the time.</p>
<p><b>Debugging: How to Start (the code-reading method)</b></p>
<p>After reproducing the initial problem (again, just 5 minutes), and arriving at the suspect script with the worrisome comment, <i>I should have stopped running the code, and started reading it</i>. After all, if my last modification was to fix this same problem, then apparently <i>that</i> modification was either wrong, or insufficient.</p>
<p>It turned out, and this was visible by comparing the one-line script and the new build log on which it failed, that it was insufficient. The new build log had some extra spaces at the end of the compilation command line, and the sed one-liner, designed to identify such lines, was unprepared for the extra spaces.</p>
<p>It did take me another 15 minutes to verify that most new build logs had a random number of extra spaces, and thus to pick the right <i>two-character</i> adjustment to the regular expression. Regression testing took another half hour.</p>
<p>But I could have saved myself almost an hour in the middle of "debugging-by-running" if I had applied a few minutes of "debugging by reading the code".</p>
<p>Even better would have been reading it out loud, or reading and explaining it to someone else.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Code Review Analyzed 1 book to 1 page]]></title>
<link>http://pragmatig.wordpress.com/?p=11</link>
<pubDate>Wed, 20 Feb 2008 09:53:08 +0000</pubDate>
<dc:creator>pragmatig</dc:creator>
<guid>http://pragmatig.pl.wordpress.com/2008/02/20/code-review-analyzed-1-book-to-1-page/</guid>
<description><![CDATA[Short summary of a cisco case study (pdf):
&#8220;The largest case study ever done on lightweight
co]]></description>
<content:encoded><![CDATA[<p>Short summary of a <a href="http://www.google.com/url?sa=t&#38;ct=res&#38;cd=1&#38;url=http%3A%2F%2Fsmartbear.com%2Fdocs%2Fbook%2Fcode-review-cisco-case-study.pdf&#38;ei=SpvJR4DdMqjW-AL0ueC7Bw&#38;usg=AFQjCNExzuMEOpwr5eRaWWChb_PYwut7cA&#38;sig2=EmxFZwMAUNq7YfzHObqLoQ" target="_blank">cisco case study (pdf)</a>:</p>
<p>"The largest case study ever done on lightweight<br />
code review process; data and lessons"</p>
<p>We believe our results allow us to conclude the following:</p>
<ul>
<li><b>LOC under</b> review should be under <b>200</b>, not to exceed 400. Anything larger overwhelms reviewers and defects are not uncovered.</li>
<li>Inspection rates <b>less than 300 LOC/hour</b> result in best defect detection. Rates under 500 are still good; expect to miss significant percentage of defects if faster than that.</li>
<li>Authors who <b>prepare the review with annotations and explanations</b> have far fewer defects than those that do not. We presume the cause to be that authors are forced to self-review the code.</li>
<li><b>Total</b> review time should be <b>less than 60 minutes</b>, not exceed 90. Defect detection rates plummet after that time.</li>
<li><b>Expect defect rates around 15 per hour</b>. Can be higher only with less than 175 LOC under review.</li>
<li>Left to their own devices, reviewers’ inspection rate will vary widely, even with similar authors, reviewers, files, and size of the review.</li>
</ul>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Code Review With Eclipse]]></title>
<link>http://pragmatig.wordpress.com/?p=7</link>
<pubDate>Wed, 20 Feb 2008 09:37:57 +0000</pubDate>
<dc:creator>pragmatig</dc:creator>
<guid>http://pragmatig.pl.wordpress.com/2008/02/20/code-review-with-eclipse/</guid>
<description><![CDATA[The only free and usable plugin: Jupiter
Update-Site: http://csdl.ics.hawaii.edu/Tools/Jupiter/Downl]]></description>
<content:encoded><![CDATA[<p>The only free and usable plugin: <a href="http://www.devx.com/enterprise/Article/31658">Jupiter</a><br />
<b>Update-Site</b>: http://csdl.ics.hawaii.edu/Tools/Jupiter/Download<br />
Works good, adds marks/comments in the editor.</p>
<p>Drawback:<br />
Comments are saved as XML in a folder, which must be shared with all other developers (SVN(each comment = new Revision) /Samba)</p>
<p><b>Conclusion</b>:<br />
Make 1 review on 1 checked out source and commit OR create a samba server and link it to the review-data-folder, so reviews can be shared without commits.</p>
<p><a href="http://pragmatig.wordpress.com/files/2008/02/in-editor.jpg" title="In the editor"><img src="http://pragmatig.wordpress.com/files/2008/02/in-editor.jpg" alt="In the editor" /></a></p>
<p><a href="http://pragmatig.wordpress.com/files/2008/02/entering-review.jpg" title="Entering a review"><img src="http://pragmatig.wordpress.com/files/2008/02/entering-review.jpg" alt="Entering a review" /></a></p>
<p><a href="http://pragmatig.wordpress.com/files/2008/02/show-review.jpg" title="Show a review"><img src="http://pragmatig.wordpress.com/files/2008/02/show-review.jpg" alt="Show a review" /></a></p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Static Code Analysis is just tip of the Iceberg!]]></title>
<link>http://vikashazrati.wordpress.com/2007/12/09/static-code-analysis-is-just-tip-of-the-iceberg/</link>
<pubDate>Sun, 09 Dec 2007 18:09:25 +0000</pubDate>
<dc:creator>vikashazrati</dc:creator>
<guid>http://vikashazrati.pl.wordpress.com/2007/12/09/static-code-analysis-is-just-tip-of-the-iceberg/</guid>
<description><![CDATA[This post is also present on the blog site of my current employer and has also been discussed on Inf]]></description>
<content:encoded><![CDATA[<p style="margin-bottom:0;"><em>This post is also present on the <u><a href="http://blog.xebia.com/2007/12/09/static-code-analysis-is-just-tip-of-the-iceberg/" target="_blank">blog site</a></u> of my current employer and has also been discussed on <u><a href="http://www.infoq.com/news/2007/12/static-code-analysis-finds-flaws" target="_blank">InfoQ</a>.</u></em></p>
<p style="margin-bottom:0;">&#160;</p>
<p style="margin-bottom:0;">Most of the times we are content that our code is of the right quality, if somehow, we manage to get the Static Code Analysis (SCA) tools like <a href="http://checkstyle.sourceforge.net/index.html">Checkstyle,</a> <a href="http://pmd.sourceforge.net/">PMD</a> etc. report less number of severe violations. As an example if we see that the class is big in size then we conveniently split it into two or more classes to get rid of the violation. The tool is happy and so are we and most of the times that is the end of the story.</p>
<p style="margin-bottom:0;">&#160;</p>
<p style="margin-bottom:0;">However more frequently than not getting an SCA violation is the start of the story. If you start associating the question “Why’ with every SCA violation found then the real reasons start unfolding.</p>
<p style="margin-bottom:0;">&#160;</p>
<p style="margin-bottom:0;">This is similar to the way we resolve impediments on an Scrum project. The impediments rarely represent the isolated incidences of inefficiency. Rather, most of the times they are a part of a larger problem. The way to work out an impediment is fix it so that the team can work effectively and then to look at the root cause which caused the impediment so that the main cause can be fixed. This is called “Bottom-up process re-engineering.”</p>
<p style="margin-bottom:0;">&#160;</p>
<p style="margin-bottom:0;">Similarly the way to work out an SCA violation is to remove it so that the code looks clean and good and then to hunt for the real cause.</p>
<p style="margin-bottom:0;"><!--more--></p>
<p style="margin-bottom:0;">&#160;</p>
<p style="margin-bottom:0;">I got first hand insight into this when I was doing an audit for a large system which is being used online by millions of people. While doing the analysis my co-auditor suggested that let us look for hot spots which are highlighted by the SCA tools. Then, let us dive into the code at those places to find out bigger issues. At that time I was skeptical if that approach would work however now I am a firm believer of his philosophy.</p>
<p style="margin-bottom:0;">&#160;</p>
<p style="margin-bottom:0;">The SCA tools do a great job of pointing out the hot spots. You can either patch the hot spots to make the SCA tool happy or you could look at the bigger issues so that the root cause of the problem is eliminated.</p>
<p style="margin-bottom:0;">&#160;</p>
<p style="margin-bottom:0;">I would take some examples from my audit to make it more clear. <strong>Let me warn you that these problems look too simple for any deeper analysis but believe me once you do the analysis you do manage to uncover some unexpected thought provoking findings</strong>. And of course these are just a few examples for illustration, you could apply this to ideally every violation that you get.</p>
<p style="margin-bottom:0;">&#160;</p>
<p style="margin-bottom:0;">&#160;</p>
<ol>
<li>
<p style="margin-bottom:0;"><u><strong>Size violation:</strong></u> We found that there were servlets in the application which were more than 3000 lines, having methods more than 800 lines each. A quick fix to this might have been to reduce the method size by splitting the methods and moving some methods out of the class to a helper class so that the class size and method size violations are taken care of.</p>
<p style="margin-bottom:0;">However, when we looked deeper to answer the question  <em>“Why do the servlets have so much 	lines and such big methods?”</em> we realized that all of the business logic was         present in the 	servlets. There was a bigger violation of <a href="http://www.objectmentor.com/resources/articles/srp.pdf">Single Responsibility Principle</a> where all the logic was present in the single class. The presentation logic, business logic and data access logic were all clubbed together thus leading to fragile design which is hard to change without breaking. There was no layering and no separation of concerns.</p>
<p style="margin-bottom:0;"> The design of the system was a culprit here and probably none of the developers or the architect on the project felt so.</p>
</li>
<li><u><strong>Methods with large number of 	parameters:</strong></u> A quick way to solve this and make the SCA tool happy would be to introduce an object and populate the object with the required parameters.
<p style="margin-bottom:0;">However, when we took a deep dive we realized that the system did not have any abstraction. There were no domain objects in the system either. When data had to be passed between method calls, all of that would be passed as primitive data, mostly strings. There was no focus on domain driven design. The methods were overloaded with every extra parameter that would be required in a different situation which suggested that the system was open for modification and closed for extension. For any small change a new method had to be written. This violated the <a href="http://www.objectmentor.com/resources/articles/ocp.pdf">Open Close Principle.</a></p>
<p style="margin-bottom:0;">        Again design was the culprit here.</p>
</li>
<li><u><strong>Large Cyclomatic complexity 	and NPath:</strong></u> We were baffled to see CC numbers &#62; 50 for 	some methods and NPath figures of &#62; 1.7 million.</li>
<p style="margin-bottom:0;">When we dived deep we found that the methods in question had a lot of nested if..else logic. So far so good, but what is the reason for the nested logic? We found that the method contained all the dispatch logic for the request. If the request has these attributes do this else do that and so on. This also explained why the system had low code coverage by unit tests. A unit test to test 1.7 million possible paths would take weeks if not months to write.</p>
<p style="margin-bottom:0;"> Clearly nobody had thought about introducing one of the many readily available MVC frameworks. When we questioned the team on why they did not use a MVC framework we were told that they did not feel the need in the beginning because the system was too small. Once it started growing they never had the time to refactor and introduce a framework.</p>
<p style="margin-bottom:0;"> This could have several causes ranging from lack of communication between the client and the vendor about realistic time lines, refactoring not being a part of the standard development process, lack of interest of the team in project, lack of interest in achieving the right quality and focusing on just getting the work done.</p>
<li>
<p style="margin-bottom:0;"><u><strong>Missing braces and wrong 	variable naming:</strong></u> This is probably one of those violations 	which is immediately reported by a SCA tool and is easy to correct.</p>
<p style="margin-bottom:0;"> However, when we started looking at it deeply we found that certain modules of the application reported huge violations as compared to others. When we compared two modules with highest number of violations we found that both of them were using very different naming strategies. Further investigation revealed that there were no coding standards which were used on the project. Every module and each developer was free to use a nomenclature which went well with his taste. There was no conceptual integrity and no uniformity in which the entire software was built.</p>
<p style="margin-bottom:0;"> Improper software development process along with lack of coordinated communication between the teams were the obvious culprits in this case.</p>
</li>
<li>
<p style="margin-bottom:0;"><u><strong>Large number of unused 	imports, variables and methods:</strong></u> This is again something 	which is readily reported and is easy to fix.</p>
<p style="margin-bottom:0;"> However, when we questioned the developers about the reason to have unused code, we were told that they never removed the unused code lest they should need it some day. It would save them time in the future.</p>
<p style="margin-bottom:0;"> Obviously nobody was thinking about the time lost when we had to scroll through tons of unused code and probably they were never educated on the principle of <a href="http://c2.com/xp/YouArentGonnaNeedIt.html">            YAGNI</a>.</p>
<p style="margin-bottom:0;">        Again improper development process and lack of developer education were the culprits here.</p>
</li>
</ol>
<p style="margin-bottom:0;">&#160;</p>
<p style="margin-bottom:0;"> You would concur with me that all these violations were very small and could have easily been fixed without resolving to deeper analysis. However, if you try to dig deeper then most of them would point to bigger issues which need a more focussed approach to fix. <strong>We saw that relatively small problems reported by the SCA tools could be attributed to bigger issues like improper design, sub standard development process, lack of communication and lack of proper education towards effective software development for the development team.</strong></p>
<p style="margin-bottom:0;">&#160;</p>
<p style="margin-bottom:0;">Hence though doing a root cause analysis for small violations might sound like an overkill but a lot of times the small violation is just the tip of the iceberg!</p>
<p style="margin-bottom:0;">&#160;</p>
<p style="margin-bottom:0;"><em><strong>Next time when you are resolving the SCA tool reported violation just pause for a moment and ask “Why do I have this violation in the first place?”</strong></em></p>
<p style="margin-bottom:0;">&#160;</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Revisiones de código]]></title>
<link>http://penyaskitodice.wordpress.com/2007/11/22/revisiones-de-codigo/</link>
<pubDate>Thu, 22 Nov 2007 21:57:30 +0000</pubDate>
<dc:creator>Christian López Espínola</dc:creator>
<guid>http://penyaskitodice.pl.wordpress.com/2007/11/22/revisiones-de-codigo/</guid>
<description><![CDATA[Una de las cosas que siempre me han gustado es leer código de otros. Se aprende mucho, y es diverti]]></description>
<content:encoded><![CDATA[<p>Una de las cosas que siempre me han gustado es leer código de otros. Se aprende mucho, y es divertido intentar buscar optimizaciones, o <i>bugs</i>. <a href="http://penyaskitodice.wordpress.com/2007/10/08/findbugs/">En ArgoUML he estado haciendo esto alguna vez con FindBugs</a>, y leo con calma todos los <i>diffs</i> enviados a la lista de commits. </p>
<p>Hoy Rodrigo Corral hacía un llamamiento en su blog, preguntándose cómo se podrían <a href="http://geeks.ms/blogs/rcorral/archive/2007/11/22/191-de-verdad-no-tiene-esto-el-framework.aspx">calcular las horas que han pasado desde principio de año hasta una fecha dada</a>.</p>
<p>También habló <a href="http://phobeo.com/wordpress/?p=94">Ricardo sobre revisiones de código en Subversion</a> hace algún tiempo, y aún espero con ilusión que algún caminante deje un comentario a ese post sobre alguna herramienta que yo desconozca.</p>
<p>Hoy alguien ha mandado unas simples <a href="http://lists.ximian.com/pipermail/mono-devel-list/2007-November/025718.html">optimizaciones para la clase Int32 a la lista de desarrollo de Mono</a>, un proyecto muy maduro, por lo que me sorprende que esta optimización no se haya realizado hace tiempo.</p>
<p>Por lo que se me ocurre una pregunta... ¿Cuántos ojos ven tu código?<br />
Da igual la licencia que tenga, que el código esté disponible no significa que alguien lo lea.<br />
¿Qué soluciones usas para las revisiones de código? ¿Es el <i>Pair Programming</i> algo realmente factible para un negocio?</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Code review – narzędzie (prawie) doskonałe]]></title>
<link>http://dynamicworld.wordpress.com/2007/07/22/code-review-%e2%80%93-narzedzie-prawie-doskonale/</link>
<pubDate>Sun, 22 Jul 2007 13:28:44 +0000</pubDate>
<dc:creator>Developer</dc:creator>
<guid>http://dynamicworld.pl.wordpress.com/2007/07/22/code-review-narzedzie-prawie-doskonale/</guid>
<description><![CDATA[
Od pewnego czasu pracuję z grupą pięciu developerów nad aplikacją webową pisaną w Pythonie o]]></description>
<content:encoded><![CDATA[<p style="float:right;margin:0 0 5px 10px;"><img src='http://dynamicworld.wordpress.com/files/2007/07/46a9357c61668.png' alt='code review' /></p>
<p style="text-align:justify;">Od pewnego czasu pracuję z grupą pięciu developerów nad aplikacją webową pisaną w Pythonie oraz Rubim (powód takiej mieszanki to temat na zupełnie inny post). Większość naszego zespołu to początkujący programiści tych technologii, wiec kod który produkują wymaga szczególnej uwagi i kontroli. Ponieważ nie jestem wstanie przydzielić każdemu juniorowi - seniora konieczne stało się wdrożenie narzędzia do recenzji kodu (ang. code review).</p>
<p><!--more--></p>
<p style="text-align:justify;">Pierwszym pomysłem jaki przyszedł mi do głowy było wykorzystanie rozszerzenia do Eclipsa o nazwie <a href="http://csdl.ics.hawaii.edu/Tools/Jupiter/" title="Jupiter">Jupiter</a>. Niestety, nie wszyscy członkowie zespołu podzielają moją miłość do tego IDE, a że programistów nie można zmuszać do wyboru narzędzi pracy, to wdrożenie zakończyło się fiaskiem a my problem tymczasowo rozwiązaliśmy poprzez mailowanie plików różnicowych. Dość bolesna i czasochłonna metoda.</p>
<p style="text-align:justify;">Poszukując innego rozwiązania znalazłem video o <a href="http://video.google.com/videoplay?docid=-8502904076440714866" title="Google’s Mondrian">Google’s Mondrian</a>. Po jego oglądnięciu od razu wiedziałem iż jest to rozwiązanie mojego problemu, dodatkowo zostały w nim wymienione inne problemy z narzędziami standalone o których wcześniej nie myślałem. Niestety Mondrian jest projektem wewnętrznym Googla i jak wynika z prezentacji dość mocno zintegrowanym z całą infrastrukturą tej firmy więc szanse na to iż pewnego dnia zostanie on udostępniony szerszej publiczności są raczej nikłe, choć można przeczytać w kilku miejscach iż takie plany istnieją. Jednym z dostępnych przeglądarkowych rozwiązań jest <a href="http://codestriker.sourceforge.net/" title="CodeStriker">CodeStriker</a>.</p>
<p style="text-align:justify;">CodeStriker to napisane w perlu narzędzie, które nie zachwyca interfejsem i możliwościami - nie posiada opcji recenzji kodu który nie znajduje się jeszcze w repozytorium. Aplikacja ta jest darmowa, co odróżnia ja od <a href="http://www.cenqua.com/crucible/" title="Crucible">Crucible</a>, narzędzia twórców FishEye'a, rekomendacje tego produktu można było usłyszeć choćby w jednym z odcinków <a href="http://www.javaposse.com/" title="JavaPosse">Podcasta JavaPosse</a>.</p>
<p style="text-align:justify;">Crucible oferuje bardzo przyjazny interfejs i dość rozbudowane opcje jeśli chodzi o reviewu kodu. Narzędzie to jest ściśle zintegrowane ze wspomnianym już FishEyem. Jako ze nie miałem właściwie innej alternatywy poza CodeStrikerem, którego interfejs mnie naprawdę odstraszał, zaczęliśmy używać Crucible. Nielicząc kilku przypadków, kiedy to przestał on chwilowo odpowiadać i wymagany był restart serwera aplikacji, całość działała dość szybko i sprawdzała się w naszym zespole mimo iż nie możliwa była recenzja kodu jeszcze nie w repozytorium (problem ten został rozwiązany poprzez stworzenie oddzielnej gałęzi dla każdego z programistów).</p>
<p style="text-align:justify;">Kiedy skończył się darmowy okres i mieliśmy już wykupić licencję na rok dość przypadkowo natknąłem się na  <a href="http://code.google.com/p/reviewboard/" title="ReviewBoard">ReviewBoard</a>.</p>
<p style="text-align:justify;">Reviewboard to darmowa aplikacja stworzona przez kilku programistów z firmy <a href="http://www.vmware.com/" title="WMware">VMware</a> napisana w Pythonie z wykorzystaniem frameworka <a href="http://www.djangoproject.com" title="Django">Django</a>. Autorzy na pewno zanim przystąpili do prac widzieli wspomniane wcześniej video o Mondrianie, jak również spotkali się z wymienionymi tutaj projektami. Z ich blogów wynika również iż poprzednio przechodzili przez takie męki jak nasza firma, zaczynając od przesyłania plików różnicowych, a kończąc na szukaniu gotowego rozwiązania. Projekt ten jest w dość wczesnej fazie,  ale jak widać z poniższych ekranów charakteryzuje go dbałość o detale i przyjazny interfejs:</p>
<p>
<a href="http://flickr.com/photo_zoom.gne?id=525300318&#38;context=set-72157600297790516&#38;size=o"><img src="http://farm1.static.flickr.com/252/525300318_4d71c7c6e1.jpg?v=0"></a>
</p>
<p style="text-align:justify;">ReviewBoard oferuje dwie możliwości tworzenia recenzji - z pliku różnicowego i na podstawie zmian w repozytorium. Ponieważ bardzo zależało mi na posiadaniu opcji automatycznej weryfikacji kodu jeszcze nie dodanego do repozytorium to  w niespełna 5 godzin zmodyfikowaliśmy  ten projekt tak aby pobierał on zmiany z  serwera developerskiego (siła open source oraz Pythona). W efekcie czego  otrzymaliśmy produkt zbliżony do Mondriana. ReviewBoard posiada dodatkowo "integrację" z  <a href="http://trac.edgewall.org/" title="Trac">Traciem</a>, który jest przez nas wykorzystywany do zarządzania zadaniami więc na dzień dzisiejszy posiadamy stabilne i szybkie rozwiązanie które możemy łatwo rozbudować.</p>
<p style="text-align:justify;">Swoja drogą od dłuższego już czasu chodzi mi po głowie napisanie narzędzia podobnego do wspomnianego Mondriana całkowicie w Rubim. Idealny dla mnie produkt generował by pliki różnicowe raz dziennie z katalogów roboczych programistów oraz repozytorium kodu, a następnie na podstawie ustawień projektu przypisywał by zmiany do odpowiedniego recenzenta. Ciekawą opcją mogła by być również integracja z <a href="http://gears.google.com/" title="Google Gears">Google Gears</a> - pozwalało by to na recenzje offline.</p>
]]></content:encoded>
</item>
<item>
<title><![CDATA[Process + Craft = Quality]]></title>
<link>http://talkaboutquality.wordpress.com/2007/06/27/process-craft-quality/</link>
<pubDate>Tue, 26 Jun 2007 21:59:28 +0000</pubDate>
<dc:creator>Tom Harris</dc:creator>
<guid>http://talkaboutquality.pl.wordpress.com/2007/06/27/process-craft-quality/</guid>
<description><![CDATA[This week, I moved from a general process improvement group to a software development department, to]]></description>
<content:encoded><![CDATA[<p>This week, I moved from a general process improvement group to a software development department, to specifically focus on code quality. The most mature tool and process I left behind was a defect tracking system. Of course, in our development department, we use that defect tracking system. In case anyone asks me what it's for, here's my answer.</p>
<p><strong>Prevent Errors, Fix Defects, Describe Failures</strong></p>
<p>There are many definitions of those terms, but since when we fix problematic code we close "defects" in the "defect tracking system", I started with that word in the middle. Leads to these definitions:</p>
<blockquote><p><strong>Error</strong>: The mistake someone made. (The <em>root cause</em> is the earliest error in the chain.)</p>
<p><strong>Defect</strong>: The wrong code (missing, extra, or incorrect).</p>
<p><strong>Failure</strong>: The unacceptable behavior of the code when running.</p></blockquote>
<p><strong>Detect each as early as possible</strong></p>
<p>Each can be detected with appropriate tools. Detect earlier to minimize cost and annoyance.</p>
<p><strong>Meanwhile, do it right</strong></p>
<p>How?</p>
<p>With tools, learning, and discussion for writing good code.</p>
]]></content:encoded>
</item>

</channel>
</rss>
