<?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>Code Layout Matters - Revision history</title>
		<link>http://commons.oreilly.com/wiki/index.php?title=Code_Layout_Matters&amp;action=history</link>
		<description>Revision history for this page on the wiki</description>
		<language>en</language>
		<generator>MediaWiki 1.11.0</generator>
		<lastBuildDate>Wed, 19 Jun 2013 18:00:54 GMT</lastBuildDate>
		<item>
			<title>Sf105 at 10:23, 16 August 2009</title>
			<link>http://commons.oreilly.com/wiki/index.php?title=Code_Layout_Matters&amp;diff=25294&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 10:23, 16 August 2009&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 9:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 9:&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;* ''Compact format''. The more I can get on a screen, the more I can see without breaking context by scrolling or switching files, which means I can keep less state in my head. Long procedure comments and lots of whitespace made sense for 8 character names and line printers, but now I live in an IDE that does syntax colouring and cross linking. Pixels are my limiting factor so I want every one to contribute towards my understanding of the code. I want the layout to help me understand the code, but no more than that.&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;* ''Compact format''. The more I can get on a screen, the more I can see without breaking context by scrolling or switching files, which means I can keep less state in my head. Long procedure comments and lots of whitespace made sense for 8 character names and line printers, but now I live in an IDE that does syntax colouring and cross linking. Pixels are my limiting factor so I want every one to contribute towards my understanding of the code. I want the layout to help me understand the code, but no more than that.&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;A non-programmer friend once remarked that code looks like poetry. I get that feeling from really good code, that everything in the text has a purpose and that it's there to help me understand the idea. Unfortunately, writing code &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;isn't perceived as &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;A non-programmer friend once remarked that code looks like poetry. I get that feeling from really good code, that everything in the text has a purpose and that it's there to help me understand the idea. Unfortunately, writing code doesn't have the same romantic image as writing poetry.&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: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;&amp;#160;&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;/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: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;doesn't have the same romantic image as writing poetry.&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;/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;By [[Steve Freeman]]&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;By [[Steve Freeman]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key wikicontent:diff:version:1.11a:oldid:25293:newid:25294 --&gt;
&lt;/table&gt;</description>
			<pubDate>Sun, 16 Aug 2009 10:23:30 GMT</pubDate>			<dc:creator>Sf105</dc:creator>			<comments>http://commons.oreilly.com/wiki/index.php/Talk:Code_Layout_Matters</comments>		</item>
		<item>
			<title>Sf105 at 10:23, 16 August 2009</title>
			<link>http://commons.oreilly.com/wiki/index.php?title=Code_Layout_Matters&amp;diff=25293&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 10:23, 16 August 2009&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 9:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 9:&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;* ''Compact format''. The more I can get on a screen, the more I can see without breaking context by scrolling or switching files, which means I can keep less state in my head. Long procedure comments and lots of whitespace made sense for 8 character names and line printers, but now I live in an IDE that does syntax colouring and cross linking. Pixels are my limiting factor so I want every one to contribute towards my understanding of the code. I want the layout to help me understand the code, but no more than that.&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;* ''Compact format''. The more I can get on a screen, the more I can see without breaking context by scrolling or switching files, which means I can keep less state in my head. Long procedure comments and lots of whitespace made sense for 8 character names and line printers, but now I live in an IDE that does syntax colouring and cross linking. Pixels are my limiting factor so I want every one to contribute towards my understanding of the code. I want the layout to help me understand the code, but no more than that.&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;A non-programmer friend once remarked that code looks like poetry. I get that feeling from really good code, that everything in the text has a purpose and that it's there to help me understand the idea. Unfortunately, writing code doesn't have the same romantic image as writing poetry.&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;A non-programmer friend once remarked that code looks like poetry. I get that feeling from really good code, that everything in the text has a purpose and that it's there to help me understand the idea. Unfortunately, writing code &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;isn't perceived as &lt;/ins&gt;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&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;&amp;#160;&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&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;doesn't have the same romantic image as writing poetry.&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;By [[Steve Freeman]]&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;By [[Steve Freeman]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key wikicontent:diff:version:1.11a:oldid:25292:newid:25293 --&gt;
&lt;/table&gt;</description>
			<pubDate>Sun, 16 Aug 2009 10:23:09 GMT</pubDate>			<dc:creator>Sf105</dc:creator>			<comments>http://commons.oreilly.com/wiki/index.php/Talk:Code_Layout_Matters</comments>		</item>
		<item>
			<title>Sf105 at 09:50, 16 August 2009</title>
			<link>http://commons.oreilly.com/wiki/index.php?title=Code_Layout_Matters&amp;diff=25292&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:50, 16 August 2009&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 9:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 9:&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;* ''Compact format''. The more I can get on a screen, the more I can see without breaking context by scrolling or switching files, which means I can keep less state in my head. Long procedure comments and lots of whitespace made sense for 8 character names and line printers, but now I live in an IDE that does syntax colouring and cross linking. Pixels are my limiting factor so I want every one to contribute towards my understanding of the code. I want the layout to help me understand the code, but no more than that.&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;* ''Compact format''. The more I can get on a screen, the more I can see without breaking context by scrolling or switching files, which means I can keep less state in my head. Long procedure comments and lots of whitespace made sense for 8 character names and line printers, but now I live in an IDE that does syntax colouring and cross linking. Pixels are my limiting factor so I want every one to contribute towards my understanding of the code. I want the layout to help me understand the code, but no more than that.&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;A non-programmer friend once remarked that code looks like poetry. I get that feeling from really good code, that everything in the text has a purpose and that it's there to help me understand the idea. &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Sadly&lt;/del&gt;, code doesn't &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;seem to be as effective &lt;/del&gt;as poetry &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;at attracting partners&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;A non-programmer friend once remarked that code looks like poetry. I get that feeling from really good code, that everything in the text has a purpose and that it's there to help me understand the idea. &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Unfortunately&lt;/ins&gt;, &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;writing &lt;/ins&gt;code doesn't &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;have the same romantic image &lt;/ins&gt;as &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;writing &lt;/ins&gt;poetry.&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;By [[Steve Freeman]]&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;By [[Steve Freeman]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key wikicontent:diff:version:1.11a:oldid:25291:newid:25292 --&gt;
&lt;/table&gt;</description>
			<pubDate>Sun, 16 Aug 2009 09:50:35 GMT</pubDate>			<dc:creator>Sf105</dc:creator>			<comments>http://commons.oreilly.com/wiki/index.php/Talk:Code_Layout_Matters</comments>		</item>
		<item>
			<title>Sf105 at 09:48, 16 August 2009</title>
			<link>http://commons.oreilly.com/wiki/index.php?title=Code_Layout_Matters&amp;diff=25291&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:48, 16 August 2009&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 5:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 5:&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;* ''Easy to scan''. People are really good at visual pattern matching (a leftover from the time when we had to spot lions on the Savannah), so I can help myself by making everything  that isn't directly relevant to the domain, all the &amp;amp;ldquo;accidental complexity&amp;amp;rdquo; that comes with most commercial languages, fade into the background by standardising it. If code that behaves the same looks the same, then my perceptual system will help me pick out the differences. That's why I also observe conventions about how to layout the parts of a class within a compilation unit: constants, fields, public methods, private methods. &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;* ''Easy to scan''. People are really good at visual pattern matching (a leftover from the time when we had to spot lions on the Savannah), so I can help myself by making everything  that isn't directly relevant to the domain, all the &amp;amp;ldquo;accidental complexity&amp;amp;rdquo; that comes with most commercial languages, fade into the background by standardising it. If code that behaves the same looks the same, then my perceptual system will help me pick out the differences. That's why I also observe conventions about how to layout the parts of a class within a compilation unit: constants, fields, public methods, private methods. &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;* ''Expressive layout''. We've all learned to take the time to find the right names so that our code expresses as clearly as possible what it does, rather than just listing the steps&amp;amp;mdash;right? The code's layout is part of this expressiveness too. A first cut is to have the team agree on an automatic formatter for the basics, then I might make adjustments by hand while I'm coding. Unless there's active dissension, a team will quickly converge on a common &amp;quot;hand-finished&amp;quot; style. A formatter cannot understand my intentions (I should know, I once wrote one), and it's more important to me that the line breaks and groupings reflect the intention of the code, not just the syntax of the language.&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;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;* ''Expressive layout''. We've all learned to take the time to find the right names so that our code expresses as clearly as possible what it does, rather than just listing the steps&amp;amp;mdash;right? The code's layout is part of this expressiveness too. A first cut is to have the team agree on an automatic formatter for the basics, then I might make adjustments by hand while I'm coding. Unless there's active dissension, a team will quickly converge on a common &amp;quot;hand-finished&amp;quot; style. A formatter cannot understand my intentions (I should know, I once wrote one), and it's more important to me that the line breaks and groupings reflect the intention of the code, not just the syntax of the language. &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;(Kevin McGuire freed my from my bondage to automatic code formatters).&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;* ''Compact format''. The more I can get on a screen, the more I can see without breaking context by scrolling or switching files, which means I can keep less state in my head. Long procedure comments and lots of whitespace made sense for 8 character names and line printers, but now I live in an IDE that does syntax colouring and cross linking. Pixels are my limiting factor so I want every one to contribute towards my understanding of the code. I want the layout to help me understand the code, but no more than that.&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;* ''Compact format''. The more I can get on a screen, the more I can see without breaking context by scrolling or switching files, which means I can keep less state in my head. Long procedure comments and lots of whitespace made sense for 8 character names and line printers, but now I live in an IDE that does syntax colouring and cross linking. Pixels are my limiting factor so I want every one to contribute towards my understanding of the code. I want the layout to help me understand the code, but no more than that.&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;A non-programmer friend once remarked that code looks like poetry. I get that feeling from really good code, that everything in the text has a purpose and that it's there to help me understand the idea. Sadly, code doesn't seem to be as effective as poetry at attracting partners.&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;A non-programmer friend once remarked that code looks like poetry. I get that feeling from really good code, that everything in the text has a purpose and that it's there to help me understand the idea. Sadly, code doesn't seem to be as effective as poetry at attracting partners.&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: #ffa; color:black; font-size: smaller;&quot;&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&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;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&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;1) Kevin McGuire taught me to break free from the automated code formatter&lt;/div&gt;&lt;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&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;/td&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&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;By [[Steve Freeman]]&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;By [[Steve Freeman]]&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key wikicontent:diff:version:1.11a:oldid:25290:newid:25291 --&gt;
&lt;/table&gt;</description>
			<pubDate>Sun, 16 Aug 2009 09:48:59 GMT</pubDate>			<dc:creator>Sf105</dc:creator>			<comments>http://commons.oreilly.com/wiki/index.php/Talk:Code_Layout_Matters</comments>		</item>
		<item>
			<title>Sf105 at 09:48, 16 August 2009</title>
			<link>http://commons.oreilly.com/wiki/index.php?title=Code_Layout_Matters&amp;diff=25290&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:48, 16 August 2009&lt;/td&gt;
			&lt;/tr&gt;
		&lt;tr&gt;&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 5:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 5:&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;* ''Easy to scan''. People are really good at visual pattern matching (a leftover from the time when we had to spot lions on the Savannah), so I can help myself by making everything  that isn't directly relevant to the domain, all the &amp;amp;ldquo;accidental complexity&amp;amp;rdquo; that comes with most commercial languages, fade into the background by standardising it. If code that behaves the same looks the same, then my perceptual system will help me pick out the differences. That's why I also observe conventions about how to layout the parts of a class within a compilation unit: constants, fields, public methods, private methods. &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;* ''Easy to scan''. People are really good at visual pattern matching (a leftover from the time when we had to spot lions on the Savannah), so I can help myself by making everything  that isn't directly relevant to the domain, all the &amp;amp;ldquo;accidental complexity&amp;amp;rdquo; that comes with most commercial languages, fade into the background by standardising it. If code that behaves the same looks the same, then my perceptual system will help me pick out the differences. That's why I also observe conventions about how to layout the parts of a class within a compilation unit: constants, fields, public methods, private methods. &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;* ''Expressive layout''. We've all learned to take the time to find the right names so that our code expresses as clearly as possible what it does, rather than just listing the steps&amp;amp;mdash;right? The code's layout is part of this expressiveness too. A first cut is to have the team agree on an automatic formatter for the basics, then I &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;sometimes &lt;/del&gt;make adjustments by hand while I'm coding. Unless there's active dissension, a team will quickly converge on a common &amp;quot;hand-finished&amp;quot; style. A formatter cannot understand my intentions (I should know, I once wrote one), and it's more important to me that the line breaks and groupings reflect the intention of the code, not just the syntax of the language.&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;* ''Expressive layout''. We've all learned to take the time to find the right names so that our code expresses as clearly as possible what it does, rather than just listing the steps&amp;amp;mdash;right? The code's layout is part of this expressiveness too. A first cut is to have the team agree on an automatic formatter for the basics, then I &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;might &lt;/ins&gt;make adjustments by hand while I'm coding. Unless there's active dissension, a team will quickly converge on a common &amp;quot;hand-finished&amp;quot; style. A formatter cannot understand my intentions (I should know, I once wrote one), and it's more important to me that the line breaks and groupings reflect the intention of the code, not just the syntax of the language.&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;lt;sup&amp;gt;1&amp;lt;/sup&amp;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: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;* ''Compact format''. The more I can get on a screen, the more I can see without breaking context by scrolling or switching files, which means I can keep less state in my head. Long procedure comments and lots of whitespace made sense for 8 character names and line printers, but now I live in an IDE that does syntax colouring and cross linking. Pixels are my limiting factor so I want every one to contribute towards my understanding of the code. I want the layout to help me understand the code, but no more than that.&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;* ''Compact format''. The more I can get on a screen, the more I can see without breaking context by scrolling or switching files, which means I can keep less state in my head. Long procedure comments and lots of whitespace made sense for 8 character names and line printers, but now I live in an IDE that does syntax colouring and cross linking. Pixels are my limiting factor so I want every one to contribute towards my understanding of the code. I want the layout to help me understand the code, but no more than that.&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 11:&lt;/td&gt;
&lt;td colspan=&quot;2&quot; class=&quot;diff-lineno&quot;&gt;Line 11:&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;A non-programmer friend once remarked that code looks like poetry. I get that feeling from really good code, that everything in the text has a purpose and that it's there to help me understand the idea. Sadly, code doesn't seem to be as effective as poetry at attracting partners.&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;A non-programmer friend once remarked that code looks like poetry. I get that feeling from really good code, that everything in the text has a purpose and that it's there to help me understand the idea. Sadly, code doesn't seem to be as effective as poetry at attracting partners.&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 colspan=&quot;2&quot;&gt;&amp;nbsp;&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;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;tr&gt;&lt;td colspan=&quot;2&quot;&gt;&amp;nbsp;&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;1) Kevin McGuire taught me to break free from the automated code formatter&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:25289:newid:25290 --&gt;
&lt;/table&gt;</description>
			<pubDate>Sun, 16 Aug 2009 09:48:15 GMT</pubDate>			<dc:creator>Sf105</dc:creator>			<comments>http://commons.oreilly.com/wiki/index.php/Talk:Code_Layout_Matters</comments>		</item>
		<item>
			<title>Sf105 at 09:45, 16 August 2009</title>
			<link>http://commons.oreilly.com/wiki/index.php?title=Code_Layout_Matters&amp;diff=25289&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:45, 16 August 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;An infeasible number of years ago I worked on a Cobol system where staff weren't allowed to change the indentation unless they already had a reason to change the code because someone once broke something by letting a line slip into one of the special columns at the beginning of a line. This applied even if the layout was misleading, which it sometimes was, so we had to read the code very carefully because we couldn't trust it. The policy must have cost a fortune in programmer drag.&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;An infeasible number of years ago I worked on a Cobol system where staff weren't allowed to change the indentation unless they already had a reason to change the code&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;, &lt;/ins&gt;because someone once broke something by letting a line slip into one of the special columns at the beginning of a line. This applied even if the layout was misleading, which it sometimes was, so we had to read the code very carefully because we couldn't trust it. The policy must have cost a fortune in programmer drag.&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;There's research to show the we all spend much more of our programming time navigating and reading code&amp;amp;mdash;finding ''where'' to make the change&amp;amp;mdash;than actually typing, so that's what we want to optimise for.&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;There's research to show the we all spend much more of our programming time navigating and reading code&amp;amp;mdash;finding ''where'' to make the change&amp;amp;mdash;than actually typing, so that's what we want to optimise for.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key wikicontent:diff:version:1.11a:oldid:24966:newid:25289 --&gt;
&lt;/table&gt;</description>
			<pubDate>Sun, 16 Aug 2009 09:45:06 GMT</pubDate>			<dc:creator>Sf105</dc:creator>			<comments>http://commons.oreilly.com/wiki/index.php/Talk:Code_Layout_Matters</comments>		</item>
		<item>
			<title>Kevlin: Code layout matters moved to Code Layout Matters</title>
			<link>http://commons.oreilly.com/wiki/index.php?title=Code_Layout_Matters&amp;diff=24966&amp;oldid=prev</link>
			<description>&lt;p&gt;&lt;a href=&quot;/wiki/index.php/Code_layout_matters&quot; title=&quot;Code layout matters&quot;&gt;Code layout matters&lt;/a&gt; moved to &lt;a href=&quot;/wiki/index.php/Code_Layout_Matters&quot; title=&quot;Code Layout Matters&quot;&gt;Code Layout Matters&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 23:53, 19 July 2009&lt;/td&gt;
			&lt;/tr&gt;
		&lt;/table&gt;</description>
			<pubDate>Sun, 19 Jul 2009 23:53:55 GMT</pubDate>			<dc:creator>Kevlin</dc:creator>			<comments>http://commons.oreilly.com/wiki/index.php/Talk:Code_Layout_Matters</comments>		</item>
		<item>
			<title>Kevlin at 16:26, 26 November 2008</title>
			<link>http://commons.oreilly.com/wiki/index.php?title=Code_Layout_Matters&amp;diff=21787&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 16:26, 26 November 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: #eee; color:black; font-size: smaller;&quot;&gt;&lt;div&gt;An infeasible number of years ago I worked on a Cobol system where staff weren't allowed to change the indentation unless they already had a reason to change the code because someone once broke something by letting a line slip into one of the special columns at the beginning of a line. This applied even if the layout was misleading, which it sometimes was, so we had to read the code very carefully because we couldn't trust it. The policy must have cost a fortune in programmer drag.&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;An infeasible number of years ago I worked on a Cobol system where staff weren't allowed to change the indentation unless they already had a reason to change the code because someone once broke something by letting a line slip into one of the special columns at the beginning of a line. This applied even if the layout was misleading, which it sometimes was, so we had to read the code very carefully because we couldn't trust it. The policy must have cost a fortune in programmer drag.&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;There's research to show the we all spend much more of our programming time navigating and reading code&amp;amp;mdash;finding ''where'' to make the change&amp;amp;mdash;than actually typing, so that's what we want to optimise for. &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;There's research to show the we all spend much more of our programming time navigating and reading code&amp;amp;mdash;finding ''where'' to make the change&amp;amp;mdash;than actually typing, so that's what we want to optimise for.&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;''Easy to scan''. People are really good at visual pattern matching (a leftover from the time when we had to spot lions on the Savannah), so I can help myself by making everything  that isn't directly relevant to the domain, all the &amp;amp;ldquo;accidental complexity&amp;amp;rdquo; that comes with most commercial languages, fade into the background by standardising it. If code that behaves the same looks the same, then my perceptual system will help me pick out the differences. That's why I also observe conventions about how to layout the parts of a class within a compilation unit: constants, fields, public methods, private methods. &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;* &lt;/ins&gt;''Easy to scan''. People are really good at visual pattern matching (a leftover from the time when we had to spot lions on the Savannah), so I can help myself by making everything  that isn't directly relevant to the domain, all the &amp;amp;ldquo;accidental complexity&amp;amp;rdquo; that comes with most commercial languages, fade into the background by standardising it. If code that behaves the same looks the same, then my perceptual system will help me pick out the differences. That's why I also observe conventions about how to layout the parts of a class within a compilation unit: constants, fields, public methods, private methods. &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;''Expressive layout''. We've all learned to take the time to find the right names so that our code expresses as clearly as possible what it does, rather than just listing the steps&amp;amp;mdash;right? The code's layout is part of this expressiveness too. A first cut is to have the team agree on an automatic formatter for the basics, then I sometimes make adjustments by hand while I'm coding. Unless there's active dissension, a team will quickly converge on a common &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;ldquo;&lt;/del&gt;hand-finished&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;rdquo; &lt;/del&gt;style. A formatter cannot understand my intentions (I should know, I once wrote one), and it's more important to me that the line breaks and groupings reflect the intention of the code, not just the syntax of the language.&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;* &lt;/ins&gt;''Expressive layout''. We've all learned to take the time to find the right names so that our code expresses as clearly as possible what it does, rather than just listing the steps&amp;amp;mdash;right? The code's layout is part of this expressiveness too. A first cut is to have the team agree on an automatic formatter for the basics, then I sometimes make adjustments by hand while I'm coding. Unless there's active dissension, a team will quickly converge on a common &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;quot;&lt;/ins&gt;hand-finished&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;quot; &lt;/ins&gt;style. A formatter cannot understand my intentions (I should know, I once wrote one), and it's more important to me that the line breaks and groupings reflect the intention of the code, not just the syntax of the language.&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;''Compact format''. The more I can get on a screen, the more I can see without breaking context by scrolling or switching files, which means I can keep less state in my head. Long procedure comments and lots of whitespace made sense for 8 character names and line printers, but now I live in an IDE that does syntax colouring and cross linking. Pixels are my limiting factor so I want every one to contribute towards my understanding of the code. I want the layout to help me understand the code, but no more than that.&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;* &lt;/ins&gt;''Compact format''. The more I can get on a screen, the more I can see without breaking context by scrolling or switching files, which means I can keep less state in my head. Long procedure comments and lots of whitespace made sense for 8 character names and line printers, but now I live in an IDE that does syntax colouring and cross linking. Pixels are my limiting factor so I want every one to contribute towards my understanding of the code. I want the layout to help me understand the code, but no more than that.&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;A non-programmer friend once remarked that code looks like poetry. I get that feeling from really good code, that everything in the text has a purpose and that it's there to help me understand the idea. Sadly, code doesn't seem to be as effective as poetry at attracting partners.&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;A non-programmer friend once remarked that code looks like poetry. I get that feeling from really good code, that everything in the text has a purpose and that it's there to help me understand the idea. Sadly, code doesn't seem to be as effective as poetry at attracting partners.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key wikicontent:diff:version:1.11a:oldid:21746:newid:21787 --&gt;
&lt;/table&gt;</description>
			<pubDate>Wed, 26 Nov 2008 16:26:58 GMT</pubDate>			<dc:creator>Kevlin</dc:creator>			<comments>http://commons.oreilly.com/wiki/index.php/Talk:Code_Layout_Matters</comments>		</item>
		<item>
			<title>Sf105 at 15:56, 25 November 2008</title>
			<link>http://commons.oreilly.com/wiki/index.php?title=Code_Layout_Matters&amp;diff=21746&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:56, 25 November 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;There's research to show the we all spend much more of our programming time navigating and reading code&amp;amp;mdash;finding ''where'' to make the change&amp;amp;mdash;than actually typing, so that's what we want to optimise for. &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;There's research to show the we all spend much more of our programming time navigating and reading code&amp;amp;mdash;finding ''where'' to make the change&amp;amp;mdash;than actually typing, so that's what we want to optimise for. &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;Easy to scan. People are really good at visual pattern matching (a leftover from the time when we had to spot lions on the Savannah), so I can help myself by making everything  that isn't directly relevant to the domain, all the &amp;amp;ldquo;accidental complexity&amp;amp;rdquo; that comes with most commercial languages, fade into the background by standardising it. If code that &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;is structurally &lt;/del&gt;the same looks the same, then my perceptual system will help me pick out the differences. That's why I also observe conventions about how to layout the parts of a class within a compilation unit: constants, fields, public methods, private methods. &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;''&lt;/ins&gt;Easy to scan&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;. People are really good at visual pattern matching (a leftover from the time when we had to spot lions on the Savannah), so I can help myself by making everything  that isn't directly relevant to the domain, all the &amp;amp;ldquo;accidental complexity&amp;amp;rdquo; that comes with most commercial languages, fade into the background by standardising it. If code that &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;behaves &lt;/ins&gt;the same looks the same, then my perceptual system will help me pick out the differences. That's why I also observe conventions about how to layout the parts of a class within a compilation unit: constants, fields, public methods, private methods. &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;Expressive layout. We've all learned to take the time to find the right names so that our code expresses as clearly as possible what it does, rather than just listing the steps&amp;amp;mdash;right? The code's layout is part of this expressiveness too. A first cut is to have the team agree on an automatic formatter for the &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;basic layout&lt;/del&gt;, then I &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;tend to &lt;/del&gt;make adjustments by hand while I'm coding. Unless there's active dissension, a team will quickly converge on a common &amp;amp;ldquo;hand-finished&amp;amp;rdquo; style. A formatter cannot understand my intentions (I should know, I once wrote one), and it's more important to me that the line breaks and groupings reflect the intention of the code, not just the syntax of the language.&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;''&lt;/ins&gt;Expressive layout&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;. We've all learned to take the time to find the right names so that our code expresses as clearly as possible what it does, rather than just listing the steps&amp;amp;mdash;right? The code's layout is part of this expressiveness too. A first cut is to have the team agree on an automatic formatter for the &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;basics&lt;/ins&gt;, then I &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;sometimes &lt;/ins&gt;make adjustments by hand while I'm coding. Unless there's active dissension, a team will quickly converge on a common &amp;amp;ldquo;hand-finished&amp;amp;rdquo; style. A formatter cannot understand my intentions (I should know, I once wrote one), and it's more important to me that the line breaks and groupings reflect the intention of the code, not just the syntax of the language.&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;Compact format. The more I can get on a screen, the more I can see without breaking context by scrolling or switching files, which means I can keep less state in my head. Long procedure comments and lots of whitespace made sense for 8 character names and line printers, but now I live in an IDE that does syntax colouring and cross linking. Pixels are &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;now &lt;/del&gt;my limiting factor so I want every one to contribute towards my understanding of 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;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;Compact format&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;''&lt;/ins&gt;. The more I can get on a screen, the more I can see without breaking context by scrolling or switching files, which means I can keep less state in my head. Long procedure comments and lots of whitespace made sense for 8 character names and line printers, but now I live in an IDE that does syntax colouring and cross linking. Pixels are my limiting factor so I want every one to contribute towards my understanding of the code&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;. I want the layout to help me understand the code, but no more than that&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;A non-programmer friend once remarked that code looks like poetry. I get that feeling from really good code, that everything in the text has a purpose and that it's there to help me understand the idea. Sadly, code doesn't seem to be as effective as poetry at attracting partners.&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;A non-programmer friend once remarked that code looks like poetry. I get that feeling from really good code, that everything in the text has a purpose and that it's there to help me understand the idea. Sadly, code doesn't seem to be as effective as poetry at attracting partners.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;!-- diff cache key wikicontent:diff:version:1.11a:oldid:21745:newid:21746 --&gt;
&lt;/table&gt;</description>
			<pubDate>Tue, 25 Nov 2008 15:56:09 GMT</pubDate>			<dc:creator>Sf105</dc:creator>			<comments>http://commons.oreilly.com/wiki/index.php/Talk:Code_Layout_Matters</comments>		</item>
		<item>
			<title>Sf105 at 15:49, 25 November 2008</title>
			<link>http://commons.oreilly.com/wiki/index.php?title=Code_Layout_Matters&amp;diff=21745&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:49, 25 November 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;An infeasible number of years ago I worked on a Cobol system where staff weren't allowed to change the indentation unless they already had a &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;functional &lt;/del&gt;reason to change the code&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;. Presumably, this was &lt;/del&gt;because someone once broke something by letting a line slip into the special columns at the beginning of &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;the &lt;/del&gt;line. &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Unfortunately, this &lt;/del&gt;applied even if the layout was misleading, which it sometimes was, so we had to read the code very carefully because we couldn't trust it. The policy must have cost a fortune in programmer drag &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;and is a nice example of why code layout matters&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;An infeasible number of years ago I worked on a Cobol system where staff weren't allowed to change the indentation unless they already had a reason to change the code because someone once broke something by letting a line slip into &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;one of &lt;/ins&gt;the special columns at the beginning of &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;a &lt;/ins&gt;line. &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;This &lt;/ins&gt;applied even if the layout was misleading, which it sometimes was, so we had to read the code very carefully because we couldn't trust it. The policy must have cost a fortune in programmer drag.&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;There's research to show the we all spend much more of our programming time navigating and reading code&amp;amp;mdash;finding ''where'' to make the change&amp;amp;mdash;than actually typing, so that's what we want to optimise for. &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;There's research to show the we all spend much more of our programming time navigating and reading code&amp;amp;mdash;finding ''where'' to make the change&amp;amp;mdash;than actually typing, so that's what we want to optimise for. &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;I want &lt;/del&gt;to &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;make scanning code as easy as possible&lt;/del&gt;. People are really good at visual pattern matching (&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;probably &lt;/del&gt;a leftover from the time when we had to spot lions on the Savannah), so I can help myself by making everything  that isn't directly relevant to the domain, all the &amp;amp;ldquo;accidental complexity&amp;amp;rdquo; that comes with &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;the &lt;/del&gt;languages &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;most of us get to use&lt;/del&gt;, fade into the background by standardising it. If code that is structurally the same looks the same, then my perceptual system will help me pick out the differences. I also observe conventions about how to layout the parts of a class within a compilation unit: constants, fields, public methods, private methods. &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;Easy &lt;/ins&gt;to &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;scan&lt;/ins&gt;. People are really good at visual pattern matching (a leftover from the time when we had to spot lions on the Savannah), so I can help myself by making everything  that isn't directly relevant to the domain, all the &amp;amp;ldquo;accidental complexity&amp;amp;rdquo; that comes with &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;most commercial &lt;/ins&gt;languages, fade into the background by standardising it. If code that is structurally the same looks the same, then my perceptual system will help me pick out the differences. &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;That's why &lt;/ins&gt;I also observe conventions about how to layout the parts of a class within a compilation unit: constants, fields, public methods, private methods. &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;I want my code &lt;/del&gt;layout &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;to be as expressive as its content&lt;/del&gt;. We've all learned &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;nowadays &lt;/del&gt;to take the time to find the right names so that our code expresses as clearly as possible what it does, rather than just listing the steps&lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;. Right&lt;/del&gt;? The code's layout is part of this expressiveness too. A first cut is to have the team agree on an automatic formatter for the basic layout, then I tend to make adjustments by hand while I'm coding. Unless there's active dissension, a team will quickly converge on a common &amp;amp;ldquo;hand-finished&amp;amp;rdquo; style. A formatter cannot understand &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;your &lt;/del&gt;intentions (I should know, I once wrote one), and it's more important to me that the line breaks and groupings reflect the intention of the code, not just the syntax of the language.&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;Expressive &lt;/ins&gt;layout. We've all learned to take the time to find the right names so that our code expresses as clearly as possible what it does, rather than just listing the steps&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;&amp;amp;mdash;right&lt;/ins&gt;? The code's layout is part of this expressiveness too. A first cut is to have the team agree on an automatic formatter for the basic layout, then I tend to make adjustments by hand while I'm coding. Unless there's active dissension, a team will quickly converge on a common &amp;amp;ldquo;hand-finished&amp;amp;rdquo; style. A formatter cannot understand &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;my &lt;/ins&gt;intentions (I should know, I once wrote one), and it's more important to me that the line breaks and groupings reflect the intention of the code, not just the syntax of the language.&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;I want a compact &lt;/del&gt;format &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;so that &lt;/del&gt;I can &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;navigate &lt;/del&gt;more &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;quickly&lt;/del&gt;. &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;There was a time when many software shops insisted that every &lt;/del&gt;procedure and &lt;del style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;module had a long header &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;&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Compact &lt;/ins&gt;format&lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;. The more &lt;/ins&gt;I can &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;get on a screen, the &lt;/ins&gt;more &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;I can see without breaking context by scrolling or switching files, which means I can keep less state in my head&lt;/ins&gt;. &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;Long &lt;/ins&gt;procedure &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;comments &lt;/ins&gt;and &lt;ins style=&quot;color: red; font-weight: bold; text-decoration: none;&quot;&gt;lots of whitespace made sense for 8 character names and line printers, but now I live in an IDE that does syntax colouring and cross linking. Pixels are now my limiting factor so I want every one to contribute towards my understanding of 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;A non-programmer friend once remarked that code looks like poetry. I get that feeling from really good code, that everything in the text has a purpose and that it's there to help me understand the idea. Sadly, code doesn't seem to be as effective as poetry at attracting partners.&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;A non-programmer friend once remarked that code looks like poetry. I get that feeling from really good code, that everything in the text has a purpose and that it's there to help me understand the idea. Sadly, code doesn't seem to be as effective as poetry at attracting partners.&lt;/div&gt;&lt;/td&gt;&lt;/tr&gt;
&lt;/table&gt;</description>
			<pubDate>Tue, 25 Nov 2008 15:49:38 GMT</pubDate>			<dc:creator>Sf105</dc:creator>			<comments>http://commons.oreilly.com/wiki/index.php/Talk:Code_Layout_Matters</comments>		</item>
	</channel>
</rss>