<?xml version="1.0" encoding="utf-8"?>
<?xml-stylesheet type="text/css" href="http://commons.oreilly.com/wiki/skins/common/feed.css?97"?>
<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/">
	<channel>
		<title>Only the Code Tells the Truth - Revision history</title>
		<link>http://commons.oreilly.com/wiki/index.php?title=Only_the_Code_Tells_the_Truth&amp;action=history</link>
		<description>Revision history for this page on the wiki</description>
		<language>en</language>
		<generator>MediaWiki 1.11.0</generator>
		<lastBuildDate>Sun, 19 May 2013 23:12:04 GMT</lastBuildDate>
		<item>
			<title>Kevlin at 15:34, 3 July 2009</title>
			<link>http://commons.oreilly.com/wiki/index.php?title=Only_the_Code_Tells_the_Truth&amp;diff=24581&amp;oldid=prev</link>
			<description>&lt;p&gt;&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 15:34, 3 July 2009&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The ultimate semantics of a program is given by the running code. If this is in binary form, it &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;might not &lt;/del&gt;be &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;easily &lt;/del&gt;read&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;. However, the &lt;/del&gt;source code should be available if it is your program. Looking at the source code the meaning of the program should be apparent, &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;since this is &lt;/del&gt;the &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;only relevant thing to look &lt;/del&gt;at. Even the most accurate requirements document does not tell the whole truth&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;, since it &lt;/del&gt;does not contain the detailed story of what the program is actually doing, only the high-level intentions of the requirements analyst. A design document may capture a planned design, but it will lack the necessary detail of the implementation &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;and &lt;/del&gt;may have lost &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;its link &lt;/del&gt;with the current implementation. &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Furthermore, these documents &lt;/del&gt;may &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;never &lt;/del&gt;have been written in the first place&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;, or may have been lost by the time the code needs to be changed in the future&lt;/del&gt;. The code may be the only thing left.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The ultimate semantics of a program is given by the running code. If this is in binary form &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;only&lt;/ins&gt;, it &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;will &lt;/ins&gt;be &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;a difficult &lt;/ins&gt;read&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;! The &lt;/ins&gt;source code should&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;, however, &lt;/ins&gt;be available if it is your program&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;, any typical commercial software development, an open source project, or code in a dynamically interpreted language&lt;/ins&gt;. Looking at the source code&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;, &lt;/ins&gt;the meaning of the program should be apparent&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;. To know what a program does&lt;/ins&gt;, the &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;source is ultimately all you can be sure of looking &lt;/ins&gt;at. Even the most accurate requirements document does not tell the whole truth&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;: It &lt;/ins&gt;does not contain the detailed story of what the program is actually doing, only the high-level intentions of the requirements analyst. A design document may capture a planned design, but it will lack the necessary detail of the implementation&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;. These documents &lt;/ins&gt;may have lost &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;their synchronization &lt;/ins&gt;with the current implementation.&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;.. or &lt;/ins&gt;may &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;simply &lt;/ins&gt;have been &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;lost. Or never &lt;/ins&gt;written in the first place. The &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;source &lt;/ins&gt;code may be the only thing left.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Ask yourself&lt;/del&gt;, how clearly is your code telling you or any other programmer what it is doing? &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;With this in mind&lt;/ins&gt;, &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;ask yourself &lt;/ins&gt;how clearly is your code telling you or any other programmer what it is doing? &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;You might say, &amp;quot;Oh, my comments will tell&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;quot;&lt;/del&gt;. But keep in mind that comments are not running code. They can be just as wrong as other forms of documentation. There has been a tradition saying comments are unconditionally a good thing, so some &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;naive &lt;/del&gt;programmers &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;started to &lt;/del&gt;write more and more comments, even explaining trivia &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;that is said by &lt;/del&gt;the code &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;to a professional programmer&lt;/del&gt;. &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;That &lt;/del&gt;is wrong. If your code needs comments, consider refactoring it so it doesn't. Lengthy comments can clutter screen space and might even be hidden automatically by your IDE. If you need to explain a change, do so in the version control system check-in message and not in the code.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;You might say, &amp;quot;Oh, my comments will tell &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;you everything you need to know&lt;/ins&gt;.&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;quot; &lt;/ins&gt;But keep in mind that comments are not running code. They can be just as wrong as other forms of documentation. There has been a tradition saying comments are unconditionally a good thing, so &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;unquestioningly &lt;/ins&gt;some programmers write more and more comments, even &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;restating and &lt;/ins&gt;explaining trivia &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;already obvious in &lt;/ins&gt;the code. &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;This &lt;/ins&gt;is &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;the &lt;/ins&gt;wrong &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;way to clarify your code&lt;/ins&gt;. If your code needs comments, consider refactoring it so it doesn't. Lengthy comments can clutter screen space and might even be hidden automatically by your IDE. If you need to explain a change, do so in the version control system check-in message and not in the code.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;What can you do to actually make your code tell the truth as clearly as possible? Strive for good &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;naming of program elements&lt;/del&gt;. Structure your code with respect to cohesive functionality, which also eases naming. Decouple your code to achieve orthogonality. Write automated tests explaining the intended behaviour and check the interfaces. Refactor mercilessly when you learn how to code a simpler, better solution. Make your code as simple as possible to read and understand.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;What can you do to actually make your code tell the truth as clearly as possible? Strive for good &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;names&lt;/ins&gt;. Structure your code with respect to cohesive functionality, which also eases naming. Decouple your code to achieve orthogonality. Write automated tests explaining the intended behaviour and check the interfaces. Refactor mercilessly when you learn how to code a simpler, better solution. Make your code as simple as possible to read and understand.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Treat your code like any other composition, such as a poem, an essay, a public blog, or an important email. &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Carefully craft your expression&lt;/del&gt;, so that it does what it should and communicates as directly as possible what it is doing, so that it still communicates your intention when you are no longer around. Remember that useful code is used much longer than ever intended. Maintenance programmers will thank you. And, if you are a maintenance programmer and the code you are working on does not tell the truth easily, apply the guidelines above in a proactive manner. Establish some sanity in the code and keep your own sanity.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Treat your code like any other composition, such as a poem, an essay, a public blog, or an important email. &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Craft what you express carefully&lt;/ins&gt;, so that it does what it should and communicates as directly as possible what it is doing, so that it still communicates your intention when you are no longer around. Remember that useful code is used much longer than ever intended. Maintenance programmers will thank you. And, if you are a maintenance programmer and the code you are working on does not tell the truth easily, apply the guidelines above in a proactive manner. Establish some sanity in the code and keep your own sanity.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key wikicontent:diff:version:1.11a:oldid:24577:newid:24581 --&gt;
&lt;/table&gt;</description>
			<pubDate>Fri, 03 Jul 2009 15:34:35 GMT</pubDate>			<dc:creator>Kevlin</dc:creator>			<comments>http://commons.oreilly.com/wiki/index.php/Talk:Only_the_Code_Tells_the_Truth</comments>		</item>
		<item>
			<title>Kevlin: Only the Code tells the Truth moved to Only the Code Tells the Truth</title>
			<link>http://commons.oreilly.com/wiki/index.php?title=Only_the_Code_Tells_the_Truth&amp;diff=24577&amp;oldid=prev</link>
			<description>&lt;p&gt;&lt;a href=&quot;/wiki/index.php/Only_the_Code_tells_the_Truth&quot; title=&quot;Only the Code tells the Truth&quot;&gt;Only the Code tells the Truth&lt;/a&gt; moved to &lt;a href=&quot;/wiki/index.php/Only_the_Code_Tells_the_Truth&quot; title=&quot;Only the Code Tells the Truth&quot;&gt;Only the Code Tells the Truth&lt;/a&gt;&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 15:13, 3 July 2009&lt;/td&gt;
			&lt;/tr&gt;
		&lt;/table&gt;</description>
			<pubDate>Fri, 03 Jul 2009 15:13:09 GMT</pubDate>			<dc:creator>Kevlin</dc:creator>			<comments>http://commons.oreilly.com/wiki/index.php/Talk:Only_the_Code_Tells_the_Truth</comments>		</item>
		<item>
			<title>PeterSommerlad at 13:11, 16 October 2008</title>
			<link>http://commons.oreilly.com/wiki/index.php?title=Only_the_Code_Tells_the_Truth&amp;diff=12688&amp;oldid=prev</link>
			<description>&lt;p&gt;&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 13:11, 16 October 2008&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The ultimate &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;meaning &lt;/del&gt;of a program is given by the running code. If this is in binary form, it might not be easily read. However, the source code should be available if it is your program. Looking at the source code the meaning of the program should be apparent, since this is the only relevant thing to look at. Even the most accurate requirements document does not tell the whole truth, since it does not contain the detailed story of what the program is actually doing, only the high-level intentions of the requirements analyst. A design document may capture a planned design, but it will lack the necessary detail of the implementation and may have lost its link with the current implementation. Furthermore, these documents may never have been written in the first place, or may have been lost by the time the code needs to be changed in the future. The code may be the only thing left.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The ultimate &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;semantics &lt;/ins&gt;of a program is given by the running code. If this is in binary form, it might not be easily read. However, the source code should be available if it is your program. Looking at the source code the meaning of the program should be apparent, since this is the only relevant thing to look at. Even the most accurate requirements document does not tell the whole truth, since it does not contain the detailed story of what the program is actually doing, only the high-level intentions of the requirements analyst. A design document may capture a planned design, but it will lack the necessary detail of the implementation and may have lost its link with the current implementation. Furthermore, these documents may never have been written in the first place, or may have been lost by the time the code needs to be changed in the future. The code may be the only thing left.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Ask yourself, how clearly is your code telling you or any other programmer what it is doing? &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Ask yourself, how clearly is your code telling you or any other programmer what it is doing? &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key wikicontent:diff:version:1.11a:oldid:12668:newid:12688 --&gt;
&lt;/table&gt;</description>
			<pubDate>Thu, 16 Oct 2008 13:11:17 GMT</pubDate>			<dc:creator>PeterSommerlad</dc:creator>			<comments>http://commons.oreilly.com/wiki/index.php/Talk:Only_the_Code_Tells_the_Truth</comments>		</item>
		<item>
			<title>Kevlin at 15:33, 15 October 2008</title>
			<link>http://commons.oreilly.com/wiki/index.php?title=Only_the_Code_Tells_the_Truth&amp;diff=12668&amp;oldid=prev</link>
			<description>&lt;p&gt;&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 15:33, 15 October 2008&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The ultimate meaning of a program is given by the running code. If this is in binary form, it might not be easily read. However, the source code should be available if it is your program. Looking at the source code the meaning of the program &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;is told&lt;/del&gt;, since this is the only relevant thing to look at. Even the most accurate requirements document does not tell the whole truth, since it does not contain the detailed story of what the program is actually doing, only the high-level intentions of the requirements analyst. A design document may capture &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;the &lt;/del&gt;planned design, but it will lack the necessary detail of the implementation and may have lost its link with the current implementation. Furthermore, these documents may never have been written in the first place, or may &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;be &lt;/del&gt;lost &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;when your &lt;/del&gt;code needs to be changed in the future. The code may be the only thing left.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The ultimate meaning of a program is given by the running code. If this is in binary form, it might not be easily read. However, the source code should be available if it is your program. Looking at the source code the meaning of the program &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;should be apparent&lt;/ins&gt;, since this is the only relevant thing to look at. Even the most accurate requirements document does not tell the whole truth, since it does not contain the detailed story of what the program is actually doing, only the high-level intentions of the requirements analyst. A design document may capture &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;a &lt;/ins&gt;planned design, but it will lack the necessary detail of the implementation and may have lost its link with the current implementation. Furthermore, these documents may never have been written in the first place, or may &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;have been &lt;/ins&gt;lost &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;by the time the &lt;/ins&gt;code needs to be changed in the future. The code may be the only thing left.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Ask yourself, how clearly is your code telling you or any other programmer what it is doing? &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Ask yourself, how clearly is your code telling you or any other programmer what it is doing? &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 7:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 7:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;What can you do to actually make your code tell the truth as clearly as possible? Strive for good naming of program elements. Structure your code with respect to cohesive functionality, which also eases naming. Decouple your code to achieve orthogonality. Write automated tests explaining the intended behaviour and check the interfaces. Refactor mercilessly when you learn how to code a simpler, better solution. Make your code as simple as possible to read and understand.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;What can you do to actually make your code tell the truth as clearly as possible? Strive for good naming of program elements. Structure your code with respect to cohesive functionality, which also eases naming. Decouple your code to achieve orthogonality. Write automated tests explaining the intended behaviour and check the interfaces. Refactor mercilessly when you learn how to code a simpler, better solution. Make your code as simple as possible to read and understand.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Treat your code like a poem &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;or &lt;/del&gt;an essay, &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;or, like &lt;/del&gt;a public blog or an important email. Carefully craft your expression, so that it does what it should and communicates as directly as possible what it is doing, so that it still communicates your intention when you are no longer around. Remember that useful code is used much longer than ever intended. Maintenance programmers will thank you. And, if you are a maintenance programmer and the code you are working on does not tell the truth easily, apply the guidelines above in a proactive manner. Establish some sanity in the code and keep your own sanity.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Treat your code like &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;any other composition, such as &lt;/ins&gt;a poem&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;, &lt;/ins&gt;an essay, a public blog&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;, &lt;/ins&gt;or an important email. Carefully craft your expression, so that it does what it should and communicates as directly as possible what it is doing, so that it still communicates your intention when you are no longer around. Remember that useful code is used much longer than ever intended. Maintenance programmers will thank you. And, if you are a maintenance programmer and the code you are working on does not tell the truth easily, apply the guidelines above in a proactive manner. Establish some sanity in the code and keep your own sanity.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key wikicontent:diff:version:1.11a:oldid:12667:newid:12668 --&gt;
&lt;/table&gt;</description>
			<pubDate>Wed, 15 Oct 2008 15:33:25 GMT</pubDate>			<dc:creator>Kevlin</dc:creator>			<comments>http://commons.oreilly.com/wiki/index.php/Talk:Only_the_Code_Tells_the_Truth</comments>		</item>
		<item>
			<title>PeterSommerlad at 14:47, 15 October 2008</title>
			<link>http://commons.oreilly.com/wiki/index.php?title=Only_the_Code_Tells_the_Truth&amp;diff=12667&amp;oldid=prev</link>
			<description>&lt;p&gt;&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 14:47, 15 October 2008&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The ultimate meaning of a program is given by the running code. If this is in binary form, it might not be easily read. However, the source code should be available if it is your program. Looking at the source code the meaning of the program is told, since this is the only relevant thing to look at. Even the &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;best &lt;/del&gt;requirements document does not tell the whole truth, since it does not contain the detailed story of what the program is actually doing, only the high-level intentions of the requirements analyst. A design document may capture the planned design, but it will lack the necessary detail of the implementation and may have lost its link with the current implementation. Furthermore, these documents may never have been written in the first place, or may be lost when your code needs to be changed in the future. The code may be the only thing left.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The ultimate meaning of a program is given by the running code. If this is in binary form, it might not be easily read. However, the source code should be available if it is your program. Looking at the source code the meaning of the program is told, since this is the only relevant thing to look at. Even the &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;most accurate &lt;/ins&gt;requirements document does not tell the whole truth, since it does not contain the detailed story of what the program is actually doing, only the high-level intentions of the requirements analyst. A design document may capture the planned design, but it will lack the necessary detail of the implementation and may have lost its link with the current implementation. Furthermore, these documents may never have been written in the first place, or may be lost when your code needs to be changed in the future. The code may be the only thing left.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Ask yourself, how clearly is your code telling you or any other programmer what it is doing? &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Ask yourself, how clearly is your code telling you or any other programmer what it is doing? &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key wikicontent:diff:version:1.11a:oldid:12666:newid:12667 --&gt;
&lt;/table&gt;</description>
			<pubDate>Wed, 15 Oct 2008 14:47:24 GMT</pubDate>			<dc:creator>PeterSommerlad</dc:creator>			<comments>http://commons.oreilly.com/wiki/index.php/Talk:Only_the_Code_Tells_the_Truth</comments>		</item>
		<item>
			<title>PeterSommerlad at 14:46, 15 October 2008</title>
			<link>http://commons.oreilly.com/wiki/index.php?title=Only_the_Code_Tells_the_Truth&amp;diff=12666&amp;oldid=prev</link>
			<description>&lt;p&gt;&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 14:46, 15 October 2008&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Ask yourself, how clearly is your code telling you or any other programmer what it is doing? &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Ask yourself, how clearly is your code telling you or any other programmer what it is doing? &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;You might say, &amp;quot;Oh, my comments will tell&amp;quot;. But keep in mind that comments are not running code. They can be just as wrong as other forms of documentation. There has been a tradition saying comments are unconditionally a good thing, so some naive programmers started to write more and more comments, even explaining trivia that is said by the code to a professional programmer. That is wrong. If your code needs comments, consider refactoring it so it doesn't. Lengthy comments can clutter screen space and might even be hidden automatically by your IDE.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;You might say, &amp;quot;Oh, my comments will tell&amp;quot;. But keep in mind that comments are not running code. They can be just as wrong as other forms of documentation. There has been a tradition saying comments are unconditionally a good thing, so some naive programmers started to write more and more comments, even explaining trivia that is said by the code to a professional programmer. That is wrong. If your code needs comments, consider refactoring it so it doesn't. Lengthy comments can clutter screen space and might even be hidden automatically by your IDE&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;. If you need to explain a change, do so in the version control system check-in message and not in the code&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;What can you do to actually make your code tell the truth as clearly as possible? Strive for good naming of program elements. Structure your code with respect to cohesive functionality, which also eases naming. Decouple your code to achieve orthogonality. Write automated tests explaining the intended behaviour and check the interfaces. Refactor mercilessly when you learn how to code a simpler, better solution. Make your code as simple as possible to read and understand.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;What can you do to actually make your code tell the truth as clearly as possible? Strive for good naming of program elements. Structure your code with respect to cohesive functionality, which also eases naming. Decouple your code to achieve orthogonality. Write automated tests explaining the intended behaviour and check the interfaces. Refactor mercilessly when you learn how to code a simpler, better solution. Make your code as simple as possible to read and understand.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key wikicontent:diff:version:1.11a:oldid:12665:newid:12666 --&gt;
&lt;/table&gt;</description>
			<pubDate>Wed, 15 Oct 2008 14:46:51 GMT</pubDate>			<dc:creator>PeterSommerlad</dc:creator>			<comments>http://commons.oreilly.com/wiki/index.php/Talk:Only_the_Code_Tells_the_Truth</comments>		</item>
		<item>
			<title>PeterSommerlad at 14:44, 15 October 2008</title>
			<link>http://commons.oreilly.com/wiki/index.php?title=Only_the_Code_Tells_the_Truth&amp;diff=12665&amp;oldid=prev</link>
			<description>&lt;p&gt;&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 14:44, 15 October 2008&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The ultimate meaning of a program is given by the running code. If this is in binary form, it might not be easily read. However, the source code should be available if it is your program. Looking at the source code the meaning of the program is told, since this is the only relevant thing to look at. Even the best requirements document does not tell the whole truth, since it does not contain the detailed story of what the program is actually doing, only the high-level intentions of the requirements analyst. A design document may capture the planned design, but it will lack the necessary detail of the implementation and may have lost its link with the current implementation. Furthermore, these documents may never have been written in the first place, or may &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;have &lt;/del&gt;lost when your code needs to be changed in the future. The code may be the only thing left.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The ultimate meaning of a program is given by the running code. If this is in binary form, it might not be easily read. However, the source code should be available if it is your program. Looking at the source code the meaning of the program is told, since this is the only relevant thing to look at. Even the best requirements document does not tell the whole truth, since it does not contain the detailed story of what the program is actually doing, only the high-level intentions of the requirements analyst. A design document may capture the planned design, but it will lack the necessary detail of the implementation and may have lost its link with the current implementation. Furthermore, these documents may never have been written in the first place, or may &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;be &lt;/ins&gt;lost when your code needs to be changed in the future. The code may be the only thing left.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Ask yourself, how clearly is your code telling you or any other programmer what it is doing? &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Ask yourself, how clearly is your code telling you or any other programmer what it is doing? &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 7:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 7:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;What can you do to actually make your code tell the truth as clearly as possible? Strive for good naming of program elements. Structure your code with respect to cohesive functionality, which also eases naming. Decouple your code to achieve orthogonality. Write automated tests explaining the intended behaviour and check the interfaces. Refactor mercilessly when you learn how to code a simpler, better solution. Make your code as simple as possible to read and understand.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;What can you do to actually make your code tell the truth as clearly as possible? Strive for good naming of program elements. Structure your code with respect to cohesive functionality, which also eases naming. Decouple your code to achieve orthogonality. Write automated tests explaining the intended behaviour and check the interfaces. Refactor mercilessly when you learn how to code a simpler, better solution. Make your code as simple as possible to read and understand.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Treat your code like a poem or an essay. Carefully craft your expression, so that it does what it should and communicates as directly as possible what it is doing, so that it still communicates your intention when you are no longer around. Remember that useful code is used much longer than ever intended. Maintenance programmers will thank you. And, if you are a maintenance programmer and the code you are working on does not tell the truth easily, apply the guidelines above in a proactive manner. Establish some sanity in the code and keep your own sanity.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Treat your code like a poem or an essay&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;, or, like a public blog or an important email&lt;/ins&gt;. Carefully craft your expression, so that it does what it should and communicates as directly as possible what it is doing, so that it still communicates your intention when you are no longer around. Remember that useful code is used much longer than ever intended. Maintenance programmers will thank you. And, if you are a maintenance programmer and the code you are working on does not tell the truth easily, apply the guidelines above in a proactive manner. Establish some sanity in the code and keep your own sanity.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key wikicontent:diff:version:1.11a:oldid:12656:newid:12665 --&gt;
&lt;/table&gt;</description>
			<pubDate>Wed, 15 Oct 2008 14:44:23 GMT</pubDate>			<dc:creator>PeterSommerlad</dc:creator>			<comments>http://commons.oreilly.com/wiki/index.php/Talk:Only_the_Code_Tells_the_Truth</comments>		</item>
		<item>
			<title>Kevlin at 09:52, 15 October 2008</title>
			<link>http://commons.oreilly.com/wiki/index.php?title=Only_the_Code_Tells_the_Truth&amp;diff=12656&amp;oldid=prev</link>
			<description>&lt;p&gt;&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 09:52, 15 October 2008&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 1:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The ultimate meaning of a program is given by the running code. If this is in binary form, it might not be easily read. However, the source code should be available if it is your program. Looking at the source code the meaning of the program is told, since this is the only relevant thing to look at. &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;The nicest &lt;/del&gt;requirements document &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;is always lying&lt;/del&gt;, since it does not contain the &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;true &lt;/del&gt;story of what the program is actually doing, only the intentions of the requirements analyst. A design document &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;can &lt;/del&gt;capture the planned design, but &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;might &lt;/del&gt;have lost its link with the current implementation. &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;All &lt;/del&gt;these documents &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;might &lt;/del&gt;never have been written, or &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;are &lt;/del&gt;lost when your code needs to be changed in the future. The only thing left &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;actually might be only the code&lt;/del&gt;.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;The ultimate meaning of a program is given by the running code. If this is in binary form, it might not be easily read. However, the source code should be available if it is your program. Looking at the source code the meaning of the program is told, since this is the only relevant thing to look at. &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Even the best &lt;/ins&gt;requirements document &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;does not tell the whole truth&lt;/ins&gt;, since it does not contain the &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;detailed &lt;/ins&gt;story of what the program is actually doing, only the &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;high-level &lt;/ins&gt;intentions of the requirements analyst. A design document &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;may &lt;/ins&gt;capture the planned design, but &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;it will lack the necessary detail of the implementation and may &lt;/ins&gt;have lost its link with the current implementation. &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Furthermore, &lt;/ins&gt;these documents &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;may &lt;/ins&gt;never have been written &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;in the first place&lt;/ins&gt;, or &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;may have &lt;/ins&gt;lost when your code needs to be changed in the future. The &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;code may be the &lt;/ins&gt;only thing left.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Ask yourself, is your code telling you or any other programmer what it is doing? &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Ask yourself, &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;how clearly &lt;/ins&gt;is your code telling you or any other programmer what it is doing? &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;You might say, &amp;quot;Oh my comments will tell&amp;quot;. &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Please consider, &lt;/del&gt;comments are not running code. They can be as wrong as &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;the &lt;/del&gt;other &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;documents&lt;/del&gt;. There has been a tradition saying comments are good, so some naive programmers started to write more and more comments, even explaining trivia that is said by the code to a professional programmer. That is wrong. If your code needs comments, consider refactoring it so it doesn't. Lengthy comments can clutter screen space and might even be hidden automatically by your IDE.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;You might say, &amp;quot;Oh&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;, &lt;/ins&gt;my comments will tell&amp;quot;. &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;But keep in mind that &lt;/ins&gt;comments are not running code. They can be &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;just &lt;/ins&gt;as wrong as other &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;forms of documentation&lt;/ins&gt;. There has been a tradition saying comments are &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;unconditionally a &lt;/ins&gt;good &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;thing&lt;/ins&gt;, so some naive programmers started to write more and more comments, even explaining trivia that is said by the code to a professional programmer. That is wrong. If your code needs comments, consider refactoring it so it doesn't. Lengthy comments can clutter screen space and might even be hidden automatically by your IDE.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;What can you do to actually make your code tell the truth? Strive for good naming of program elements&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;! &lt;/del&gt;Structure your code with respect to cohesive functionality, which also eases naming&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;! De-couple &lt;/del&gt;your code to achieve orthogonality&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;! &lt;/del&gt;Write automated tests explaining the intended behaviour and check the interfaces&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;! &lt;/del&gt;Refactor mercilessly when you learn how to code a simpler, better solution&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;! &lt;/del&gt;Make your code as simple as possible to read and understand&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;!&lt;/del&gt;&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;What can you do to actually make your code tell the truth &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;as clearly as possible&lt;/ins&gt;? Strive for good naming of program elements&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;. &lt;/ins&gt;Structure your code with respect to cohesive functionality, which also eases naming&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;. Decouple &lt;/ins&gt;your code to achieve orthogonality&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;. &lt;/ins&gt;Write automated tests explaining the intended behaviour and check the interfaces&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;. &lt;/ins&gt;Refactor mercilessly when you learn how to code a simpler, better solution&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;. &lt;/ins&gt;Make your code as simple as possible to read and understand&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;.&lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Treat your code like a poem or an essay. Carefully craft your expression, so that it does what it should and &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;actually tells a professional developer like you &lt;/del&gt;what it is doing, &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;even &lt;/del&gt;when you are &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;not or &lt;/del&gt;no longer around. Remember&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;, &lt;/del&gt;useful code is used much longer than ever intended. &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Your maintenance &lt;/del&gt;programmers will thank you. &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Don't forget&lt;/del&gt;, if you are &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;the &lt;/del&gt;maintenance programmer and the code you&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;'ve got is &lt;/del&gt;not &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;easily telling &lt;/del&gt;the truth, apply the guidelines above in a &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;pro-active &lt;/del&gt;manner&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;, to establish &lt;/del&gt;sanity &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;of &lt;/del&gt;the code and keep your own sanity.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Treat your code like a poem or an essay. Carefully craft your expression, so that it does what it should and &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;communicates as directly as possible &lt;/ins&gt;what it is doing, &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;so that it still communicates your intention &lt;/ins&gt;when you are no longer around. Remember &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;that &lt;/ins&gt;useful code is used much longer than ever intended. &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Maintenance &lt;/ins&gt;programmers will thank you. &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;And&lt;/ins&gt;, if you are &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;a &lt;/ins&gt;maintenance programmer and the code you &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;are working on does &lt;/ins&gt;not &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;tell &lt;/ins&gt;the truth &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;easily&lt;/ins&gt;, apply the guidelines above in a &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;proactive &lt;/ins&gt;manner&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;. Establish some &lt;/ins&gt;sanity &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;in &lt;/ins&gt;the code and keep your own sanity.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key wikicontent:diff:version:1.11a:oldid:12629:newid:12656 --&gt;
&lt;/table&gt;</description>
			<pubDate>Wed, 15 Oct 2008 09:52:03 GMT</pubDate>			<dc:creator>Kevlin</dc:creator>			<comments>http://commons.oreilly.com/wiki/index.php/Talk:Only_the_Code_Tells_the_Truth</comments>		</item>
		<item>
			<title>PeterSommerlad at 09:03, 13 October 2008</title>
			<link>http://commons.oreilly.com/wiki/index.php?title=Only_the_Code_Tells_the_Truth&amp;diff=12629&amp;oldid=prev</link>
			<description>&lt;p&gt;&lt;/p&gt;

			&lt;table style=&quot;background-color: white; color:black;&quot;&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;col class='diff-marker' /&gt;
			&lt;col class='diff-content' /&gt;
			&lt;tr&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;←Older revision&lt;/td&gt;
				&lt;td colspan='2' style=&quot;background-color: white; color:black;&quot;&gt;Revision as of 09:03, 13 October 2008&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 3:&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Ask yourself, is your code telling you or any other programmer what it is doing? &lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Ask yourself, is your code telling you or any other programmer what it is doing? &lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;You might say, &amp;quot;Oh my comments will tell&amp;quot;. Please consider, comments are not running code. They can be as wrong as the other documents. There has been a tradition saying comments are good, so some naive programmers started to write more and more comments, even explaining trivia that is said by the code to a professional programmer. That is wrong.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;You might say, &amp;quot;Oh my comments will tell&amp;quot;. Please consider, comments are not running code. They can be as wrong as the other documents. There has been a tradition saying comments are good, so some naive programmers started to write more and more comments, even explaining trivia that is said by the code to a professional programmer. That is wrong&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;. If your code needs comments, consider refactoring it so it doesn't. Lengthy comments can clutter screen space and might even be hidden automatically by your IDE&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;What can you do to actually make your code tell the truth? Strive for good naming of program elements! Structure your code with respect to cohesive functionality, which also eases naming! De-couple your code to achieve orthogonality! Write automated tests explaining the intended behaviour and check the interfaces! Refactor mercilessly when you learn how to code a simpler, better solution! Make your code as simple as possible to read and understand!&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;What can you do to actually make your code tell the truth? Strive for good naming of program elements! Structure your code with respect to cohesive functionality, which also eases naming! De-couple your code to achieve orthogonality! Write automated tests explaining the intended behaviour and check the interfaces! Refactor mercilessly when you learn how to code a simpler, better solution! Make your code as simple as possible to read and understand!&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt;-&lt;/td&gt;&lt;td style=&quot;background: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Treat your code like a poem or an essay. Carefully craft your expression, so that it does what it should and actually tells a professional developer like you what it is doing, even when you are not or no longer around. Remember, useful code is used much longer than ever intended.&lt;/div&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt;+&lt;/td&gt;&lt;td style=&quot;background: #cfc; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;Treat your code like a poem or an essay. Carefully craft your expression, so that it does what it should and actually tells a professional developer like you what it is doing, even when you are not or no longer around. Remember, useful code is used much longer than ever intended&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;. Your maintenance programmers will thank you. Don't forget, if you are the maintenance programmer and the code you've got is not easily telling the truth, apply the guidelines above in a pro-active manner, to establish sanity of the code and keep your own sanity&lt;/ins&gt;.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td class='diff-marker'&gt; &lt;/td&gt;&lt;td style=&quot;background: #eee; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key wikicontent:diff:version:1.11a:oldid:12628:newid:12629 --&gt;
&lt;/table&gt;</description>
			<pubDate>Mon, 13 Oct 2008 09:03:43 GMT</pubDate>			<dc:creator>PeterSommerlad</dc:creator>			<comments>http://commons.oreilly.com/wiki/index.php/Talk:Only_the_Code_Tells_the_Truth</comments>		</item>
		<item>
			<title>PeterSommerlad: New page: The ultimate meaning of a program is given by the running code. If this is in binary form, it might not be easily read. However, the source code should be available if it is your program. ...</title>
			<link>http://commons.oreilly.com/wiki/index.php?title=Only_the_Code_Tells_the_Truth&amp;diff=12628&amp;oldid=prev</link>
			<description>&lt;p&gt;New page: The ultimate meaning of a program is given by the running code. If this is in binary form, it might not be easily read. However, the source code should be available if it is your program. ...&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;The ultimate meaning of a program is given by the running code. If this is in binary form, it might not be easily read. However, the source code should be available if it is your program. Looking at the source code the meaning of the program is told, since this is the only relevant thing to look at. The nicest requirements document is always lying, since it does not contain the true story of what the program is actually doing, only the intentions of the requirements analyst. A design document can capture the planned design, but might have lost its link with the current implementation. All these documents might never have been written, or are lost when your code needs to be changed in the future. The only thing left actually might be only the code.&lt;br /&gt;
&lt;br /&gt;
Ask yourself, is your code telling you or any other programmer what it is doing? &lt;br /&gt;
&lt;br /&gt;
You might say, &amp;quot;Oh my comments will tell&amp;quot;. Please consider, comments are not running code. They can be as wrong as the other documents. There has been a tradition saying comments are good, so some naive programmers started to write more and more comments, even explaining trivia that is said by the code to a professional programmer. That is wrong.&lt;br /&gt;
&lt;br /&gt;
What can you do to actually make your code tell the truth? Strive for good naming of program elements! Structure your code with respect to cohesive functionality, which also eases naming! De-couple your code to achieve orthogonality! Write automated tests explaining the intended behaviour and check the interfaces! Refactor mercilessly when you learn how to code a simpler, better solution! Make your code as simple as possible to read and understand!&lt;br /&gt;
&lt;br /&gt;
Treat your code like a poem or an essay. Carefully craft your expression, so that it does what it should and actually tells a professional developer like you what it is doing, even when you are not or no longer around. Remember, useful code is used much longer than ever intended.&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
by [[Peter Sommerlad]]&lt;br /&gt;
&lt;br /&gt;
This work is licensed under a&lt;br /&gt;
[http://creativecommons.org/licenses/by/3.0/us/ Creative Commons Attribution 3] &lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
Back to [[97 Things Every Programmer Should Know]] home page&lt;/div&gt;</description>
			<pubDate>Mon, 13 Oct 2008 08:46:31 GMT</pubDate>			<dc:creator>PeterSommerlad</dc:creator>			<comments>http://commons.oreilly.com/wiki/index.php/Talk:Only_the_Code_Tells_the_Truth</comments>		</item>
	</channel>
</rss>