<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/1.5.2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Standards, Quality, And Two Party Tricks</title>
	<link>http://blog.qualityaspect.com/2006/10/15/standards-quality-and-two-party-tricks/</link>
	<description>Lidor Wyssocky's Blog on Optimizing Software Development</description>
	<pubDate>Wed, 19 Nov 2008 03:59:59 +0000</pubDate>
	<generator>http://wordpress.org/?v=1.5.2</generator>

	<item>
 		<title>Comment on Standards, Quality, And Two Party Tricks by: 山本梓</title>
		<link>http://blog.qualityaspect.com/2006/10/15/standards-quality-and-two-party-tricks/#comment-51473</link>
		<pubDate>Sat, 12 Jul 2008 00:53:33 +0000</pubDate>
		<guid>http://blog.qualityaspect.com/2006/10/15/standards-quality-and-two-party-tricks/#comment-51473</guid>
					<description>&lt;a href=&quot;http://a-raim.com/yamamoto/&quot; rel=&quot;nofollow&quot;&gt;山本梓&lt;/a&gt;</description>
		<content:encoded><![CDATA[	<p><a href="http://a-raim.com/yamamoto/" rel="nofollow">山本梓</a>
</p>
]]></content:encoded>
				</item>
	<item>
 		<title>Comment on Standards, Quality, And Two Party Tricks by: Chris Nash</title>
		<link>http://blog.qualityaspect.com/2006/10/15/standards-quality-and-two-party-tricks/#comment-50091</link>
		<pubDate>Thu, 12 Jun 2008 23:40:08 +0000</pubDate>
		<guid>http://blog.qualityaspect.com/2006/10/15/standards-quality-and-two-party-tricks/#comment-50091</guid>
					<description>I used to agree, 100%. Nowadays I find myself sitting on the fence.

Years ago when the coding standards book first appeared at the place I was working at the time, along with the obligatory corporate comment that this was indeed the &quot;magic bullet&quot; to fix all our problems, I couldn't bear the pain of a &quot;code review&quot; that ended up turning into a &quot;coding standards review&quot;. A one-hour meeting rapidly turned into a 55-minute discussion over the position of a semicolon and perhaps 5 minutes, if you were lucky, actually looking at what the code did. The reviewee usually considered any coding standard observation as a personal affront. The upshot of it all was usually the review had a negative effect on motivation and morale.

I've changed my mind lately, since we now have effective, virtually zero-cost mechanisms to follow the coding standards (such as better formatting in the IDE, and automatable tools such as Checkstyle to produce the reports). People don't take offense if their 'violations' are reported by a machine, and code review time is never taken up with style issues if you can just take it offline and go view the reports in your own time. I've found that if the quick view of the reports identifies a 'sloppy' area, then usually that area contains correspondingly more 'technical' problems at well. I am not sure if there has been any recent study to prove this correlation, but it's a gut feeling that's grown stronger lately - strong enough that I would happily recommend to a beginning coder to use the automated tools and reports to identify those areas needing attention. The tools allow the coder to focus on more important things; the results seem to indicate where the coder didn't focus at all.</description>
		<content:encoded><![CDATA[	<p>I used to agree, 100%. Nowadays I find myself sitting on the fence.</p>
	<p>Years ago when the coding standards book first appeared at the place I was working at the time, along with the obligatory corporate comment that this was indeed the &#8220;magic bullet&#8221; to fix all our problems, I couldn&#8217;t bear the pain of a &#8220;code review&#8221; that ended up turning into a &#8220;coding standards review&#8221;. A one-hour meeting rapidly turned into a 55-minute discussion over the position of a semicolon and perhaps 5 minutes, if you were lucky, actually looking at what the code did. The reviewee usually considered any coding standard observation as a personal affront. The upshot of it all was usually the review had a negative effect on motivation and morale.</p>
	<p>I&#8217;ve changed my mind lately, since we now have effective, virtually zero-cost mechanisms to follow the coding standards (such as better formatting in the IDE, and automatable tools such as Checkstyle to produce the reports). People don&#8217;t take offense if their &#8216;violations&#8217; are reported by a machine, and code review time is never taken up with style issues if you can just take it offline and go view the reports in your own time. I&#8217;ve found that if the quick view of the reports identifies a &#8217;sloppy&#8217; area, then usually that area contains correspondingly more &#8216;technical&#8217; problems at well. I am not sure if there has been any recent study to prove this correlation, but it&#8217;s a gut feeling that&#8217;s grown stronger lately - strong enough that I would happily recommend to a beginning coder to use the automated tools and reports to identify those areas needing attention. The tools allow the coder to focus on more important things; the results seem to indicate where the coder didn&#8217;t focus at all.
</p>
]]></content:encoded>
				</item>
	<item>
 		<title>Comment on Standards, Quality, And Two Party Tricks by: mikeyk</title>
		<link>http://blog.qualityaspect.com/2006/10/15/standards-quality-and-two-party-tricks/#comment-3129</link>
		<pubDate>Sat, 21 Oct 2006 14:41:19 +0000</pubDate>
		<guid>http://blog.qualityaspect.com/2006/10/15/standards-quality-and-two-party-tricks/#comment-3129</guid>
					<description>Kharos: Code formatting is probably most petty and most irrelevant component of coding standards. Does it change the functionality? No. Does it improve productivity? No. Firstly most developers don't have to reformat code in your head - any fool can see that if (...) return; and if ( ... ) { return ; } does exactly the same thing. Secondly it doesn't same time on reformatting either - you might save a bit of time when you go in and edit someone else's code, but that's peanuts compared with the time wasted by making all the other developers format their code in a way they don't enjoy. And even if you have abolished &quot;code ownership&quot; (which is a sensible move), you will still find that developers end up spending most of the time working on 'their areas' simply because they know it best.

If coding standards have to exist, they should be called coding guidelines and should be represent the acquired wisdom of the group. This is the type of thing you might want to write guidelines on:
* Aviod global variables if at all possible. Exceptions may be made for configuration constants which should always be kept together at the top of the file in one block.
* Try to keep the length of a function to within less than 50 lines. If it's more than this, refactor into subroutines.
* If you're writing in a language which doesn't enforce private methods (like perl) prefix the internal method names with an underscode. That way it'll be obvious if you're calling an internal method from another class when you shouldn't be.
These are just some examples I've used before. And the fewer rules you have, the more effective each one is.</description>
		<content:encoded><![CDATA[	<p>Kharos: Code formatting is probably most petty and most irrelevant component of coding standards. Does it change the functionality? No. Does it improve productivity? No. Firstly most developers don&#8217;t have to reformat code in your head - any fool can see that if (&#8230;) return; and if ( &#8230; ) { return ; } does exactly the same thing. Secondly it doesn&#8217;t same time on reformatting either - you might save a bit of time when you go in and edit someone else&#8217;s code, but that&#8217;s peanuts compared with the time wasted by making all the other developers format their code in a way they don&#8217;t enjoy. And even if you have abolished &#8220;code ownership&#8221; (which is a sensible move), you will still find that developers end up spending most of the time working on &#8216;their areas&#8217; simply because they know it best.</p>
	<p>If coding standards have to exist, they should be called coding guidelines and should be represent the acquired wisdom of the group. This is the type of thing you might want to write guidelines on:<br />
* Aviod global variables if at all possible. Exceptions may be made for configuration constants which should always be kept together at the top of the file in one block.<br />
* Try to keep the length of a function to within less than 50 lines. If it&#8217;s more than this, refactor into subroutines.<br />
* If you&#8217;re writing in a language which doesn&#8217;t enforce private methods (like perl) prefix the internal method names with an underscode. That way it&#8217;ll be obvious if you&#8217;re calling an internal method from another class when you shouldn&#8217;t be.<br />
These are just some examples I&#8217;ve used before. And the fewer rules you have, the more effective each one is.
</p>
]]></content:encoded>
				</item>
	<item>
 		<title>Comment on Standards, Quality, And Two Party Tricks by: Kharos</title>
		<link>http://blog.qualityaspect.com/2006/10/15/standards-quality-and-two-party-tricks/#comment-3125</link>
		<pubDate>Sat, 21 Oct 2006 09:53:55 +0000</pubDate>
		<guid>http://blog.qualityaspect.com/2006/10/15/standards-quality-and-two-party-tricks/#comment-3125</guid>
					<description>&quot;Most coding standards are being used as a replacement to professional common sense. They are perceived as a recipe for writing good code.&quot;

How do you format your code? Do you put the &quot;{&quot; on the same line as the &quot;if (...)&quot; or on the next line? Do you write &quot;x=3;&quot; or &quot;x = 3;&quot;? Do you write &quot;if (...) return;&quot; or &quot;if (...) { return; }&quot;? Do you write &quot;this.value&quot; when you access an instance variable or just &quot;value&quot;?

All these things belong in a coding standard. Not because they help writing good code, but to have a common style in team team. This is important if you don't believe in &quot;code ownership&quot;, but have a team where the code of every module should be known and perhaps even worked on by more than one person, and where people sometimes have to fix bugs in modules they did not write themselves.

A common style helps me to read code that I have not written myself more easy. I can focus on understanding the code instead of &quot;re-formatting&quot; it inside my mind. I am glad we do have a coding standard.</description>
		<content:encoded><![CDATA[	<p>&#8220;Most coding standards are being used as a replacement to professional common sense. They are perceived as a recipe for writing good code.&#8221;</p>
	<p>How do you format your code? Do you put the &#8220;{&#8221; on the same line as the &#8220;if (&#8230;)&#8221; or on the next line? Do you write &#8220;x=3;&#8221; or &#8220;x = 3;&#8221;? Do you write &#8220;if (&#8230;) return;&#8221; or &#8220;if (&#8230;) { return; }&#8221;? Do you write &#8220;this.value&#8221; when you access an instance variable or just &#8220;value&#8221;?</p>
	<p>All these things belong in a coding standard. Not because they help writing good code, but to have a common style in team team. This is important if you don&#8217;t believe in &#8220;code ownership&#8221;, but have a team where the code of every module should be known and perhaps even worked on by more than one person, and where people sometimes have to fix bugs in modules they did not write themselves.</p>
	<p>A common style helps me to read code that I have not written myself more easy. I can focus on understanding the code instead of &#8220;re-formatting&#8221; it inside my mind. I am glad we do have a coding standard.
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
