<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
		>
<channel>
	<title>Comments on: Less Code is More</title>
	<atom:link href="http://www.codelord.net/2010/02/13/less-is-more/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.codelord.net/2010/02/13/less-is-more/</link>
	<description>A place a coder rants at...</description>
	<lastBuildDate>Sat, 21 Aug 2010 12:13:46 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0.1</generator>
	<item>
		<title>By: leeand00</title>
		<link>http://www.codelord.net/2010/02/13/less-is-more/comment-page-1/#comment-3983</link>
		<dc:creator>leeand00</dc:creator>
		<pubDate>Tue, 16 Feb 2010 15:07:28 +0000</pubDate>
		<guid isPermaLink="false">http://www.codelord.net/?p=118#comment-3983</guid>
		<description>Agreed. Indeed.

See this: 

http://stackoverflow.com/questions/1674915/how-to-teach-someone-that-less-is-more</description>
		<content:encoded><![CDATA[<p>Agreed. Indeed.</p>
<p>See this: </p>
<p><a href="http://stackoverflow.com/questions/1674915/how-to-teach-someone-that-less-is-more" rel="nofollow">http://stackoverflow.com/questions/1674915/how-to-teach-someone-that-less-is-more</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: abyx</title>
		<link>http://www.codelord.net/2010/02/13/less-is-more/comment-page-1/#comment-3948</link>
		<dc:creator>abyx</dc:creator>
		<pubDate>Sun, 14 Feb 2010 20:38:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.codelord.net/?p=118#comment-3948</guid>
		<description>I think that&#039;s pushing it too far. For me, code generation is only acceptable if I never, ever ever ever, have to look/change/think about the generated code. Creating a skeleton from generated is just so ugly, and will create such contorted messes, I&#039;d rather roll it by myself. But hey, whatever floats your boat! :)

TDD can also help you with &quot;getting the dang thing to work&quot;. I try my hardest too keep my feature-envy at bay, and not add code that isn&#039;t going to be used, or that&#039;s not pulling it&#039;s own weight, which usually makes me get to working code faster.</description>
		<content:encoded><![CDATA[<p>I think that&#8217;s pushing it too far. For me, code generation is only acceptable if I never, ever ever ever, have to look/change/think about the generated code. Creating a skeleton from generated is just so ugly, and will create such contorted messes, I&#8217;d rather roll it by myself. But hey, whatever floats your boat! <img src='http://www.codelord.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>TDD can also help you with &#8220;getting the dang thing to work&#8221;. I try my hardest too keep my feature-envy at bay, and not add code that isn&#8217;t going to be used, or that&#8217;s not pulling it&#8217;s own weight, which usually makes me get to working code faster.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Juho Vepsäläinen</title>
		<link>http://www.codelord.net/2010/02/13/less-is-more/comment-page-1/#comment-3946</link>
		<dc:creator>Juho Vepsäläinen</dc:creator>
		<pubDate>Sun, 14 Feb 2010 19:38:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.codelord.net/?p=118#comment-3946</guid>
		<description>abyx:
I agree that TDD helps you to enforce the API. It gives you scaffolding. It guarantees only specific kind of interface, not more. Specific internal details are better handled using assertions. Possibly other approaches (DbC comes to mind) work adequately as well.

In the end it comes down to personal style. For me it&#039;s all about making the dang thing work given specific set of constraints. :) Finding these constraints is usually the tough part.

This line of thought easily leads to ideas that have been encapsulated in the fifth generation programming languages. By definition these languages should be able to generate a solution based on a given set of constraints as it happens. This works well for certain AI problems (CSP and such). It does not appear to be a workable solution for any &quot;real&quot; problems, however.

Related to this problem I have been pondering about code generation based on tests. It&#039;s probably easy enough to come up with simple tools to generate classes and simple methods with right return values but the whole thing breaks down at one specific point: tests can cover only a limited set of the functionality desired. To paraphrase &quot;Absence of proof is not proof of absence.&quot;.

Still, even in a limited form, some sort of interactive code generation/validation system might be a fun thing to play around with.  At least it should give some boilerplate code that can be then expanded to a proper solution. :)</description>
		<content:encoded><![CDATA[<p>abyx:<br />
I agree that TDD helps you to enforce the API. It gives you scaffolding. It guarantees only specific kind of interface, not more. Specific internal details are better handled using assertions. Possibly other approaches (DbC comes to mind) work adequately as well.</p>
<p>In the end it comes down to personal style. For me it&#8217;s all about making the dang thing work given specific set of constraints. <img src='http://www.codelord.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  Finding these constraints is usually the tough part.</p>
<p>This line of thought easily leads to ideas that have been encapsulated in the fifth generation programming languages. By definition these languages should be able to generate a solution based on a given set of constraints as it happens. This works well for certain AI problems (CSP and such). It does not appear to be a workable solution for any &#8220;real&#8221; problems, however.</p>
<p>Related to this problem I have been pondering about code generation based on tests. It&#8217;s probably easy enough to come up with simple tools to generate classes and simple methods with right return values but the whole thing breaks down at one specific point: tests can cover only a limited set of the functionality desired. To paraphrase &#8220;Absence of proof is not proof of absence.&#8221;.</p>
<p>Still, even in a limited form, some sort of interactive code generation/validation system might be a fun thing to play around with.  At least it should give some boilerplate code that can be then expanded to a proper solution. <img src='http://www.codelord.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: abyx</title>
		<link>http://www.codelord.net/2010/02/13/less-is-more/comment-page-1/#comment-3943</link>
		<dc:creator>abyx</dc:creator>
		<pubDate>Sun, 14 Feb 2010 18:21:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.codelord.net/?p=118#comment-3943</guid>
		<description>Juho, I agree with most of what you wrote. Indeed, good design sometimes requires more LOC, which is why I wrote the disclaimer in the last paragraph.

Regardless, I do think that the right layering can make the difference between a ball-of-mud architecture, and something well designed. But, I also think that TDD really has a lot to do with designing. Just as DSLs allow you to write your code in the domain of the problem, TDD allows you to write tests that use the code as you&#039;d like it to be, instead of letting it transform to whatever it feels like. That&#039;s a major part of design - knowing how you want your interfaces and classes to behave, and then making sure they do so.</description>
		<content:encoded><![CDATA[<p>Juho, I agree with most of what you wrote. Indeed, good design sometimes requires more LOC, which is why I wrote the disclaimer in the last paragraph.</p>
<p>Regardless, I do think that the right layering can make the difference between a ball-of-mud architecture, and something well designed. But, I also think that TDD really has a lot to do with designing. Just as DSLs allow you to write your code in the domain of the problem, TDD allows you to write tests that use the code as you&#8217;d like it to be, instead of letting it transform to whatever it feels like. That&#8217;s a major part of design &#8211; knowing how you want your interfaces and classes to behave, and then making sure they do so.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Juho Vepsäläinen</title>
		<link>http://www.codelord.net/2010/02/13/less-is-more/comment-page-1/#comment-3941</link>
		<dc:creator>Juho Vepsäläinen</dc:creator>
		<pubDate>Sun, 14 Feb 2010 16:43:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.codelord.net/?p=118#comment-3941</guid>
		<description>Programming is recursive. Decisions made on higher levels cascade to lower. It is essential to come up with a reasonable vocabulary to use in solving the problems given. In OOP, designing a proper class(ifying) hierarchy does this by default.

If you are dealing with inadequate &quot;grammar&quot; it becomes ankward to solve problems on lower level. Sometimes the programming language chosen constrains this. There might not be an easy way to bypass the limitations set by the language.

DSLs try to solve this in their own way. Essentially the idea is that instead of modeling the problem using classes, you come up with a language using constructs pertinent to the domain. I haven&#039;t played around with DSLs but there&#039;s something very intriguing about the idea.

TDD is not a design methodology by definition. Extensions such as BDD and ATDD take it closer to the user but I don&#039;t think even those solve the problem of design. They do help you to keep track of quantitative constraints. I consider this a very important thing.

Design is something you should sort out separate of actual implementation while keeping given constraints in mind. I suppose the YAGNI principle should help in this. A proper design should be as lean as possible on the very highest level. You should be able to build the complexity on the lower levels.

I know it&#039;s hard, sometimes impossible, to come up with a good design at first. Prototyping and tracer bullet type approaches may provide a good starting point in this case.

So just to summarize I think your very point is correct. In my view the way to &quot;less code&quot; consists of proper design (software as an onion :) ) and a disciplined implementation that states the constrains set on it and conforms them. In terms of LOC a nice design might actually cause you to have more code than a &quot;flat&quot; one. That&#039;s not the point, however. On the very high level you code should be extremely simple and straightforward. Let the lower levels hide the complexity.</description>
		<content:encoded><![CDATA[<p>Programming is recursive. Decisions made on higher levels cascade to lower. It is essential to come up with a reasonable vocabulary to use in solving the problems given. In OOP, designing a proper class(ifying) hierarchy does this by default.</p>
<p>If you are dealing with inadequate &#8220;grammar&#8221; it becomes ankward to solve problems on lower level. Sometimes the programming language chosen constrains this. There might not be an easy way to bypass the limitations set by the language.</p>
<p>DSLs try to solve this in their own way. Essentially the idea is that instead of modeling the problem using classes, you come up with a language using constructs pertinent to the domain. I haven&#8217;t played around with DSLs but there&#8217;s something very intriguing about the idea.</p>
<p>TDD is not a design methodology by definition. Extensions such as BDD and ATDD take it closer to the user but I don&#8217;t think even those solve the problem of design. They do help you to keep track of quantitative constraints. I consider this a very important thing.</p>
<p>Design is something you should sort out separate of actual implementation while keeping given constraints in mind. I suppose the YAGNI principle should help in this. A proper design should be as lean as possible on the very highest level. You should be able to build the complexity on the lower levels.</p>
<p>I know it&#8217;s hard, sometimes impossible, to come up with a good design at first. Prototyping and tracer bullet type approaches may provide a good starting point in this case.</p>
<p>So just to summarize I think your very point is correct. In my view the way to &#8220;less code&#8221; consists of proper design (software as an onion <img src='http://www.codelord.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  ) and a disciplined implementation that states the constrains set on it and conforms them. In terms of LOC a nice design might actually cause you to have more code than a &#8220;flat&#8221; one. That&#8217;s not the point, however. On the very high level you code should be extremely simple and straightforward. Let the lower levels hide the complexity.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: abyx</title>
		<link>http://www.codelord.net/2010/02/13/less-is-more/comment-page-1/#comment-3940</link>
		<dc:creator>abyx</dc:creator>
		<pubDate>Sun, 14 Feb 2010 14:00:08 +0000</pubDate>
		<guid isPermaLink="false">http://www.codelord.net/?p=118#comment-3940</guid>
		<description>Wise words Mike!
That&#039;s a combination of both not inventing the wheel, and using the right tool for the job. Well played :)</description>
		<content:encoded><![CDATA[<p>Wise words Mike!<br />
That&#8217;s a combination of both not inventing the wheel, and using the right tool for the job. Well played <img src='http://www.codelord.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Mike Lewis</title>
		<link>http://www.codelord.net/2010/02/13/less-is-more/comment-page-1/#comment-3939</link>
		<dc:creator>Mike Lewis</dc:creator>
		<pubDate>Sun, 14 Feb 2010 13:50:15 +0000</pubDate>
		<guid isPermaLink="false">http://www.codelord.net/?p=118#comment-3939</guid>
		<description>Reuse and not reinventing the wheel can be important too.  I once rewrote 2,650 lines of C as a seven line shell script.  The previous programming team had written a data transfer program with their own implementation of ftp.  I just used the one that was already on the computer.</description>
		<content:encoded><![CDATA[<p>Reuse and not reinventing the wheel can be important too.  I once rewrote 2,650 lines of C as a seven line shell script.  The previous programming team had written a data transfer program with their own implementation of ftp.  I just used the one that was already on the computer.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
