<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Spot-welding Code: Tips for Maintaining Consistency</title>
	<atom:link href="http://blog.slickedit.com/2007/08/spot-welding-code-for-maintaining-consistency/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.slickedit.com/2007/08/spot-welding-code-for-maintaining-consistency/</link>
	<description>&#34;Hello World&#34; - The SlickEdit Developer Blog</description>
	<lastBuildDate>Fri, 03 Sep 2010 02:00:13 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: GEORGE</title>
		<link>http://blog.slickedit.com/2007/08/spot-welding-code-for-maintaining-consistency/comment-page-1/#comment-474</link>
		<dc:creator>GEORGE</dc:creator>
		<pubDate>Tue, 03 Jun 2008 04:10:22 +0000</pubDate>
		<guid isPermaLink="false">http://blog.slickedit.com/?p=99#comment-474</guid>
		<description>Is a welding procedure qualfication required as per any international codes, if yes then which code/standard is this..its an offshore job</description>
		<content:encoded><![CDATA[<p>Is a welding procedure qualfication required as per any international codes, if yes then which code/standard is this..its an offshore job</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: J.T. Wenting</title>
		<link>http://blog.slickedit.com/2007/08/spot-welding-code-for-maintaining-consistency/comment-page-1/#comment-94</link>
		<dc:creator>J.T. Wenting</dc:creator>
		<pubDate>Mon, 06 Aug 2007 06:34:38 +0000</pubDate>
		<guid isPermaLink="false">http://blog.slickedit.com/?p=99#comment-94</guid>
		<description>Code littered with comments about who changed what and where (often accompanied by commented out lines of code to show what was there before if things were removed or changed rather than added) make code harder to read.
Not so bad when it&#039;s a few spot changes here and there but over time such changes tend to pile up to the point where every single line has been changed multiple times, leading to maybe a dozen lines of change comments for each line of code.
I&#039;ve seen it happen, the situation had become unworkable.
We agreed to cut out ALL those change comments, but someone higher up decided that wasn&#039;t good. We were instead to leave the change comments related to the last 2 major releases in place.
So now we had less comments but a lot more bookkeeping as we had to constantly check when encountering a change comment (did I tell you this had to be done for the entire file whenever we changed a file?) whether it should be deleted or not.
How old was it? What version did that correspond to? Was that more than 2 major versions ago or not?

Better to rely on version control for such things (everything was also in version control, with mandatory change history also in the header of each file as well as version control checkin comments).
You can always leave a little remark stating what something does if it appears weird but is a necessary construct to make something work.</description>
		<content:encoded><![CDATA[<p>Code littered with comments about who changed what and where (often accompanied by commented out lines of code to show what was there before if things were removed or changed rather than added) make code harder to read.<br />
Not so bad when it&#8217;s a few spot changes here and there but over time such changes tend to pile up to the point where every single line has been changed multiple times, leading to maybe a dozen lines of change comments for each line of code.<br />
I&#8217;ve seen it happen, the situation had become unworkable.<br />
We agreed to cut out ALL those change comments, but someone higher up decided that wasn&#8217;t good. We were instead to leave the change comments related to the last 2 major releases in place.<br />
So now we had less comments but a lot more bookkeeping as we had to constantly check when encountering a change comment (did I tell you this had to be done for the entire file whenever we changed a file?) whether it should be deleted or not.<br />
How old was it? What version did that correspond to? Was that more than 2 major versions ago or not?</p>
<p>Better to rely on version control for such things (everything was also in version control, with mandatory change history also in the header of each file as well as version control checkin comments).<br />
You can always leave a little remark stating what something does if it appears weird but is a necessary construct to make something work.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dennis B</title>
		<link>http://blog.slickedit.com/2007/08/spot-welding-code-for-maintaining-consistency/comment-page-1/#comment-93</link>
		<dc:creator>Dennis B</dc:creator>
		<pubDate>Fri, 03 Aug 2007 14:29:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.slickedit.com/?p=99#comment-93</guid>
		<description>I agree that version control systems have improved, and everyone should be using them.  And yes, to an extent, they can supplant leaving &quot;kilroy was here&quot; notes behind.  That is provided developers actually enter useful checkin comments.

However, when I am reading source code and I see a change note, I have no need to look any further.  I find that very convenient.  In my opinion, the locality of reference outweighs the inconvenience of cluttering the code.

The second issue is with branching and version control.  To my knowledge, there is still only one VC system that tracks branch merge points (Clearcase).  The most popular open source VC systems, CVS and Subversion, while they have good branching capabilities, do not track merge points.

Why is this a problem?  Because when I use version control (the annotate command) to track down a line of code to a revision number, 75% of the time, it points to a checkin containing the comment &quot;merge branch XXX to trunk&quot;.  Then I have to try again to find the *real* change on that branch (usually a bug-fixing branch) and see who is responsible.

Also, most annotate commands do not help you find deleted code at all.  You have to do a binary search diffing previous versions of the code until you can figure out when those critical lines disappeared.  And unless you are extremely familiar with the code, how do you know those lines ever were there in the first place?  All you know is that it doesn&#039;t do something that it used to do.

Now, if a development group wants the best of both worlds, they should use SlickEdit 2007&#039;s code annotation tools.  With it, you can leave sticky notes all over the place without cluttering the code.  It would be great if version control systems integrated this concept, so you could annotate individual changes with checkin comments, maintaining locality of reference, and making the annotations persistent with your source base.  Until then, keep looking for my little notes 

// DJB - 08-02-2007 
// broke something that worked before</description>
		<content:encoded><![CDATA[<p>I agree that version control systems have improved, and everyone should be using them.  And yes, to an extent, they can supplant leaving &#8220;kilroy was here&#8221; notes behind.  That is provided developers actually enter useful checkin comments.</p>
<p>However, when I am reading source code and I see a change note, I have no need to look any further.  I find that very convenient.  In my opinion, the locality of reference outweighs the inconvenience of cluttering the code.</p>
<p>The second issue is with branching and version control.  To my knowledge, there is still only one VC system that tracks branch merge points (Clearcase).  The most popular open source VC systems, CVS and Subversion, while they have good branching capabilities, do not track merge points.</p>
<p>Why is this a problem?  Because when I use version control (the annotate command) to track down a line of code to a revision number, 75% of the time, it points to a checkin containing the comment &#8220;merge branch XXX to trunk&#8221;.  Then I have to try again to find the *real* change on that branch (usually a bug-fixing branch) and see who is responsible.</p>
<p>Also, most annotate commands do not help you find deleted code at all.  You have to do a binary search diffing previous versions of the code until you can figure out when those critical lines disappeared.  And unless you are extremely familiar with the code, how do you know those lines ever were there in the first place?  All you know is that it doesn&#8217;t do something that it used to do.</p>
<p>Now, if a development group wants the best of both worlds, they should use SlickEdit 2007&#8217;s code annotation tools.  With it, you can leave sticky notes all over the place without cluttering the code.  It would be great if version control systems integrated this concept, so you could annotate individual changes with checkin comments, maintaining locality of reference, and making the annotations persistent with your source base.  Until then, keep looking for my little notes </p>
<p>// DJB &#8211; 08-02-2007<br />
// broke something that worked before</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: John Hurst</title>
		<link>http://blog.slickedit.com/2007/08/spot-welding-code-for-maintaining-consistency/comment-page-1/#comment-92</link>
		<dc:creator>John Hurst</dc:creator>
		<pubDate>Thu, 02 Aug 2007 21:37:02 +0000</pubDate>
		<guid isPermaLink="false">http://blog.slickedit.com/?p=99#comment-92</guid>
		<description>Good post.

I agree with the comment above about notes.  We&#039;ve got good version control practices now, and it allows us to be very aggressive with keeping code clean when it undergoes change.  We don&#039;t comment out code we&#039;re getting rid of -- we delete it.  Someone can find it in VCS if he needs it.  I put notes in for things that still need to be done (i.e. TODOs), not for things that have been done.

With regard to your comment about beautification: If I do make changes to &quot;beautify&quot; a file, or any similar non-functional change, I make sure I commit it in a separate change set from functional changes.  For the reason you give -- otherwise it&#039;s too hard to see the functional changes amongst all the formatting changes.

Regards

John Hurst</description>
		<content:encoded><![CDATA[<p>Good post.</p>
<p>I agree with the comment above about notes.  We&#8217;ve got good version control practices now, and it allows us to be very aggressive with keeping code clean when it undergoes change.  We don&#8217;t comment out code we&#8217;re getting rid of &#8212; we delete it.  Someone can find it in VCS if he needs it.  I put notes in for things that still need to be done (i.e. TODOs), not for things that have been done.</p>
<p>With regard to your comment about beautification: If I do make changes to &#8220;beautify&#8221; a file, or any similar non-functional change, I make sure I commit it in a separate change set from functional changes.  For the reason you give &#8212; otherwise it&#8217;s too hard to see the functional changes amongst all the formatting changes.</p>
<p>Regards</p>
<p>John Hurst</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Alan Shutko</title>
		<link>http://blog.slickedit.com/2007/08/spot-welding-code-for-maintaining-consistency/comment-page-1/#comment-91</link>
		<dc:creator>Alan Shutko</dc:creator>
		<pubDate>Thu, 02 Aug 2007 18:29:52 +0000</pubDate>
		<guid isPermaLink="false">http://blog.slickedit.com/?p=99#comment-91</guid>
		<description>I agree with most of this, but I disagree with your last suggestion.  Don&#039;t leave a note.  If you do, the code will eventually be overshadowed by notes and it&#039;ll be impossible to figure out which notes are still valid and which are historical.

Your version control system will be able to keep track of historical information.  Use it.  If you aren&#039;t using one yet, start NOW.</description>
		<content:encoded><![CDATA[<p>I agree with most of this, but I disagree with your last suggestion.  Don&#8217;t leave a note.  If you do, the code will eventually be overshadowed by notes and it&#8217;ll be impossible to figure out which notes are still valid and which are historical.</p>
<p>Your version control system will be able to keep track of historical information.  Use it.  If you aren&#8217;t using one yet, start NOW.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
