<?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: Six language-independent ways to write better code</title>
	<atom:link href="http://www.learncpp.com/general-programming/six-language-independent-ways-to-write-better-code/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.learncpp.com/general-programming/six-language-independent-ways-to-write-better-code/</link>
	<description></description>
	<lastBuildDate>Thu, 11 Mar 2010 11:18:10 -0800</lastBuildDate>
	<generator>http://wordpress.org/?v=2.8.5</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: programuotojo savait? #1 &#124; kran.lt</title>
		<link>http://www.learncpp.com/general-programming/six-language-independent-ways-to-write-better-code/comment-page-1/#comment-68964</link>
		<dc:creator>programuotojo savait? #1 &#124; kran.lt</dc:creator>
		<pubDate>Thu, 24 Sep 2009 17:30:46 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/general-programming/six-language-independent-ways-to-write-better-code/#comment-68964</guid>
		<description>[...] 6 universal?s patarimai tam, kad pagerinti kodavimo stili?. Patarimai elementar?s, bet ver?iantys susim?styti; [...]</description>
		<content:encoded><![CDATA[<p>[...] 6 universal?s patarimai tam, kad pagerinti kodavimo stili?. Patarimai elementar?s, bet ver?iantys susim?styti; [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: galanga</title>
		<link>http://www.learncpp.com/general-programming/six-language-independent-ways-to-write-better-code/comment-page-1/#comment-25837</link>
		<dc:creator>galanga</dc:creator>
		<pubDate>Mon, 01 Sep 2008 20:44:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/general-programming/six-language-independent-ways-to-write-better-code/#comment-25837</guid>
		<description>Very good post, I wish that all the programmers in the world will one day try to respect those guidelines. The conclusion is really a must.

I only have one comment : the title &quot;Don’t use magic numbers&quot; and the use of the expression &quot;magic numbers&quot;, because for me a &quot;magic number&quot; is a specific number (as 0xAB12CD89) used to check a structure of data in memory (for example a hard drive partition structures start) to prevent as much as possible to interpret corrupted data (which often leads to coredump due to overflow, when using length fields in the corrupted data).

As the first sentence says in your paragraph, what you are talking about, for me, is called &quot;hard-coded numbers/values&quot; (in French, as I am, &quot;valeurs en dur dans le code&quot;).</description>
		<content:encoded><![CDATA[<p>Very good post, I wish that all the programmers in the world will one day try to respect those guidelines. The conclusion is really a must.</p>
<p>I only have one comment : the title &#8220;Don’t use magic numbers&#8221; and the use of the expression &#8220;magic numbers&#8221;, because for me a &#8220;magic number&#8221; is a specific number (as 0xAB12CD89) used to check a structure of data in memory (for example a hard drive partition structures start) to prevent as much as possible to interpret corrupted data (which often leads to coredump due to overflow, when using length fields in the corrupted data).</p>
<p>As the first sentence says in your paragraph, what you are talking about, for me, is called &#8220;hard-coded numbers/values&#8221; (in French, as I am, &#8220;valeurs en dur dans le code&#8221;).</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: language independent ways to write better code &#171; Try your best, man</title>
		<link>http://www.learncpp.com/general-programming/six-language-independent-ways-to-write-better-code/comment-page-1/#comment-113</link>
		<dc:creator>language independent ways to write better code &#171; Try your best, man</dc:creator>
		<pubDate>Wed, 18 Jul 2007 14:47:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/general-programming/six-language-independent-ways-to-write-better-code/#comment-113</guid>
		<description>[...] 18th, 2007 by hanxiaogang    On his site learncpp.com, alex gives a post on six ways to write better [...]</description>
		<content:encoded><![CDATA[<p>[...] 18th, 2007 by hanxiaogang    On his site learncpp.com, alex gives a post on six ways to write better [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Gwyn Fisher, CTO Klocwork</title>
		<link>http://www.learncpp.com/general-programming/six-language-independent-ways-to-write-better-code/comment-page-1/#comment-73</link>
		<dc:creator>Gwyn Fisher, CTO Klocwork</dc:creator>
		<pubDate>Tue, 03 Jul 2007 14:47:42 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/general-programming/six-language-independent-ways-to-write-better-code/#comment-73</guid>
		<description>Great summary. Most, if not all, of the issues that you bring up are handled by prevalent static analysis tools (disclaimer: such as the one my company sells). Static analysis in this context can be thought of as taking off where the compiler stops, i.e. evaluating the function of the code, not just its syntactical (and surface semantic) correctness. I encourage you and your readers to check out the various tools available in the space -- search wikipedia for static analysis and you&#039;ll find links to the most popular ones (of course, I&#039;d love it if you checked out Klocwork first! ;p).

In summary, C++ continues to be a complex language to master, but there are tools out there that can act as the &quot;guy looking over your shoulder&quot; pointing out what you&#039;re missing, or when you&#039;re applying a potentially damaging semantic or side-effect.</description>
		<content:encoded><![CDATA[<p>Great summary. Most, if not all, of the issues that you bring up are handled by prevalent static analysis tools (disclaimer: such as the one my company sells). Static analysis in this context can be thought of as taking off where the compiler stops, i.e. evaluating the function of the code, not just its syntactical (and surface semantic) correctness. I encourage you and your readers to check out the various tools available in the space &#8212; search wikipedia for static analysis and you&#8217;ll find links to the most popular ones (of course, I&#8217;d love it if you checked out Klocwork first! ;p).</p>
<p>In summary, C++ continues to be a complex language to master, but there are tools out there that can act as the &#8220;guy looking over your shoulder&#8221; pointing out what you&#8217;re missing, or when you&#8217;re applying a potentially damaging semantic or side-effect.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Learn C++ - A tutorial and blog on C++, object-oriented design, and related topics &#187; Eight C++ programming mistakes the compiler won't catch</title>
		<link>http://www.learncpp.com/general-programming/six-language-independent-ways-to-write-better-code/comment-page-1/#comment-71</link>
		<dc:creator>Learn C++ - A tutorial and blog on C++, object-oriented design, and related topics &#187; Eight C++ programming mistakes the compiler won't catch</dc:creator>
		<pubDate>Mon, 02 Jul 2007 17:29:13 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/general-programming/six-language-independent-ways-to-write-better-code/#comment-71</guid>
		<description>[...] Six language-independent ways to write better code [...]</description>
		<content:encoded><![CDATA[<p>[...] Six language-independent ways to write better code [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 6 language-independent ways to write better code : n ways to</title>
		<link>http://www.learncpp.com/general-programming/six-language-independent-ways-to-write-better-code/comment-page-1/#comment-67</link>
		<dc:creator>6 language-independent ways to write better code : n ways to</dc:creator>
		<pubDate>Fri, 29 Jun 2007 09:15:30 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/general-programming/six-language-independent-ways-to-write-better-code/#comment-67</guid>
		<description>[...] via [...]</description>
		<content:encoded><![CDATA[<p>[...] via [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: C</title>
		<link>http://www.learncpp.com/general-programming/six-language-independent-ways-to-write-better-code/comment-page-1/#comment-63</link>
		<dc:creator>C</dc:creator>
		<pubDate>Thu, 28 Jun 2007 12:23:03 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/general-programming/six-language-independent-ways-to-write-better-code/#comment-63</guid>
		<description>I agree with most of your point 1. Especially &quot;code generically&quot; is a sound advice. The C++ templates offer superb support for generic coding. Even though the syntax is obscure (and often compiler errors too), templates can really help in writing generic, reusable code. They even help *thinking* generically.

Still, if you have a specific, one-off problem, making the solution a reusable library is a waste of time, or maybe even a source for a maintenance nightmare. Writing a good reusable library is difficult, and often it takes a couple of rewrites and revisions, plus more understanding of the problem domain than might be initially available, to make it truly usable.

Now, if your fingers start itching to make a Copy/Paste of the original one-off, it obviously isn&#039;t a one-off any more, but a candidate for a reusable library. At that time it might be best to start from scratch and design the library properly, then maybe replace the original code. Not the other way round.

The subnote on item #2 is funny. I&#039;d say iii (or one of the classic alternatives i, j, k and m) is a perfect name for a loop variable. It is sensible to give better names to other variables, of course.</description>
		<content:encoded><![CDATA[<p>I agree with most of your point 1. Especially &#8220;code generically&#8221; is a sound advice. The C++ templates offer superb support for generic coding. Even though the syntax is obscure (and often compiler errors too), templates can really help in writing generic, reusable code. They even help *thinking* generically.</p>
<p>Still, if you have a specific, one-off problem, making the solution a reusable library is a waste of time, or maybe even a source for a maintenance nightmare. Writing a good reusable library is difficult, and often it takes a couple of rewrites and revisions, plus more understanding of the problem domain than might be initially available, to make it truly usable.</p>
<p>Now, if your fingers start itching to make a Copy/Paste of the original one-off, it obviously isn&#8217;t a one-off any more, but a candidate for a reusable library. At that time it might be best to start from scratch and design the library properly, then maybe replace the original code. Not the other way round.</p>
<p>The subnote on item #2 is funny. I&#8217;d say iii (or one of the classic alternatives i, j, k and m) is a perfect name for a loop variable. It is sensible to give better names to other variables, of course.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Razorwit</title>
		<link>http://www.learncpp.com/general-programming/six-language-independent-ways-to-write-better-code/comment-page-1/#comment-60</link>
		<dc:creator>Razorwit</dc:creator>
		<pubDate>Wed, 27 Jun 2007 19:56:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/general-programming/six-language-independent-ways-to-write-better-code/#comment-60</guid>
		<description>[...] Here&#8217;s the article: Six Language-independent Ways to Write Better Code [...]</description>
		<content:encoded><![CDATA[<p>[...] Here&#8217;s the article: Six Language-independent Ways to Write Better Code [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: 6 ???????? ?????? ????? ?????? ???&#8230; &#171; ???? ?????? ???????</title>
		<link>http://www.learncpp.com/general-programming/six-language-independent-ways-to-write-better-code/comment-page-1/#comment-59</link>
		<dc:creator>6 ???????? ?????? ????? ?????? ???&#8230; &#171; ???? ?????? ???????</dc:creator>
		<pubDate>Wed, 27 Jun 2007 13:04:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/general-programming/six-language-independent-ways-to-write-better-code/#comment-59</guid>
		<description>[...] 6 ???????? ?????? ????? ??????&#160;???&#8230; June 27th, 2007   ???????? - http://www.learncpp.com/general-programming/six-language-independent-ways-to-write-better-code/ [...]</description>
		<content:encoded><![CDATA[<p>[...] 6 ???????? ?????? ????? ??????&nbsp;???&#8230; June 27th, 2007   ???????? &#8211; <a href="http://www.learncpp.com/general-programming/six-language-independent-ways-to-write-better-code/" rel="nofollow">http://www.learncpp.com/general-programming/six-language-independent-ways-to-write-better-code/</a> [...]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mnemetica &#187; Blog Archive &#187; links for 2007-06-26</title>
		<link>http://www.learncpp.com/general-programming/six-language-independent-ways-to-write-better-code/comment-page-1/#comment-57</link>
		<dc:creator>mnemetica &#187; Blog Archive &#187; links for 2007-06-26</dc:creator>
		<pubDate>Tue, 26 Jun 2007 19:17:41 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/general-programming/six-language-independent-ways-to-write-better-code/#comment-57</guid>
		<description>[...] Learn C++ - A tutorial and blog on C++, object-oriented design, and related topics Â» Six language-i... (tags: coding design development documentation optimization process programming software tips toread) [...]</description>
		<content:encoded><![CDATA[<p>[...] Learn C++ &#8211; A tutorial and blog on C++, object-oriented design, and related topics Â» Six language-i&#8230; (tags: coding design development documentation optimization process programming software tips toread) [...]</p>
]]></content:encoded>
	</item>
</channel>
</rss>
