<?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>Tue, 07 Feb 2012 12:30:29 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.2.1</generator>
	<item>
		<title>By: dr.vladyslav</title>
		<link>http://www.learncpp.com/general-programming/six-language-independent-ways-to-write-better-code/comment-page-1/#comment-95260</link>
		<dc:creator>dr.vladyslav</dc:creator>
		<pubDate>Wed, 16 Mar 2011 20:59:02 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/general-programming/six-language-independent-ways-to-write-better-code/#comment-95260</guid>
		<description>Excellent article. It opens eyes on programming prominent aspects. This article should be placed the first in programming books 

Thank you very much.</description>
		<content:encoded><![CDATA[<p>Excellent article. It opens eyes on programming prominent aspects. This article should be placed the first in programming books </p>
<p>Thank you very much.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: royboy007</title>
		<link>http://www.learncpp.com/general-programming/six-language-independent-ways-to-write-better-code/comment-page-1/#comment-95220</link>
		<dc:creator>royboy007</dc:creator>
		<pubDate>Mon, 28 Feb 2011 17:03:50 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/general-programming/six-language-independent-ways-to-write-better-code/#comment-95220</guid>
		<description>first how do i make a dicusion second can you teach how to make hacks and stuff like hacks for games p.m me thanks nice website</description>
		<content:encoded><![CDATA[<p>first how do i make a dicusion second can you teach how to make hacks and stuff like hacks for games p.m me thanks nice website</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: tobi</title>
		<link>http://www.learncpp.com/general-programming/six-language-independent-ways-to-write-better-code/comment-page-1/#comment-81024</link>
		<dc:creator>tobi</dc:creator>
		<pubDate>Sat, 20 Mar 2010 11:43:55 +0000</pubDate>
		<guid isPermaLink="false">http://www.learncpp.com/general-programming/six-language-independent-ways-to-write-better-code/#comment-81024</guid>
		<description>Write any program to solve the algorithm below:
ALGORITHM=  void bubble(int*3 in+n) int hold,j,passj int switched=TRUEj for(pass =oj pass&lt;n-1$$ switch= x(j+1) x(j=1)=holdj</description>
		<content:encoded><![CDATA[<p>Write any program to solve the algorithm below:<br />
ALGORITHM=  void bubble(int*3 in+n) int hold,j,passj int switched=TRUEj for(pass =oj pass&lt;n-1$$ switch= x(j+1) x(j=1)=holdj</p>
]]></content:encoded>
	</item>
	<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>
</channel>
</rss>

