<?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: Uncle Jens&#8217;s Coding Tips</title>
	<atom:link href="http://jens.mooseyard.com/2007/05/uncle-jenss-coding-tips/feed/" rel="self" type="application/rss+xml" />
	<link>http://jens.mooseyard.com/2007/05/uncle-jenss-coding-tips/</link>
	<description>Little boxes made of words, by Jens Alfke</description>
	<lastBuildDate>Sat, 04 Feb 2012 05:05:18 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
	<item>
		<title>By: anon</title>
		<link>http://jens.mooseyard.com/2007/05/uncle-jenss-coding-tips/comment-page-3/#comment-1926</link>
		<dc:creator>anon</dc:creator>
		<pubDate>Fri, 09 Jan 2009 19:44:08 +0000</pubDate>
		<guid isPermaLink="false">http://mooseyard.com/Jens/2007/05/uncle-jenss-coding-tips/#comment-1926</guid>
		<description>on the subject of never use tabs
i have no option to either dis/agree
and many people don&#039;t seem to realize this
but the TABS that are mostly argued against
are bad, no, i don&#039;t support spaces they are just as
bad as these TABS as they force your preference onto others
personally i like tabs 4 spaces wide
but my tabs are soft-tabs

they are handled by the editor and if yo set your soft0tabs to 8, i&#039;ll
always see them in 4 spaces..

summary: for me
hard-tabs and spaces =(
soft-tans =)</description>
		<content:encoded><![CDATA[<p>on the subject of never use tabs<br />
i have no option to either dis/agree<br />
and many people don&#8217;t seem to realize this<br />
but the TABS that are mostly argued against<br />
are bad, no, i don&#8217;t support spaces they are just as<br />
bad as these TABS as they force your preference onto others<br />
personally i like tabs 4 spaces wide<br />
but my tabs are soft-tabs</p>
<p>they are handled by the editor and if yo set your soft0tabs to 8, i&#8217;ll<br />
always see them in 4 spaces..</p>
<p>summary: for me<br />
hard-tabs and spaces =(<br />
soft-tans =)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Dmitry Chestnykh</title>
		<link>http://jens.mooseyard.com/2007/05/uncle-jenss-coding-tips/comment-page-3/#comment-1888</link>
		<dc:creator>Dmitry Chestnykh</dc:creator>
		<pubDate>Wed, 09 May 2007 20:04:04 +0000</pubDate>
		<guid isPermaLink="false">http://mooseyard.com/Jens/2007/05/uncle-jenss-coding-tips/#comment-1888</guid>
		<description>One more thing about instance variables -- it seems Xcode 3 will color-code them: http://developer.apple.com/leopard/overview/tools.html</description>
		<content:encoded><![CDATA[<p>One more thing about instance variables &#8212; it seems Xcode 3 will color-code them: <a href="http://developer.apple.com/leopard/overview/tools.html" rel="nofollow">http://developer.apple.com/leopard/overview/tools.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Trygve Isaacson</title>
		<link>http://jens.mooseyard.com/2007/05/uncle-jenss-coding-tips/comment-page-2/#comment-1925</link>
		<dc:creator>Trygve Isaacson</dc:creator>
		<pubDate>Tue, 08 May 2007 18:16:49 +0000</pubDate>
		<guid isPermaLink="false">http://mooseyard.com/Jens/2007/05/uncle-jenss-coding-tips/#comment-1925</guid>
		<description>Good suggestions, Jens. Some IDEs (like IntelliJ) actually look for &quot;todo&quot; etc. markers and give you a to-do list from them. There are logging packages modeled after log4j out there that I think are generally a better choice than writing your own logging macros. The key is that you should leave your logging statements in the code (formed in a way that avoids overhead of messages that aren&#039;t being logged), and be able to change the logging level without recompiling, ideally while the app is running, but at the very least by simply changing a config file and restarting the app. It definitely should not require installing a new build.

I have more detailed &lt;a href=&quot;http://www.bombaydigital.com/arenared/2007/5/7/1&quot; rel=&quot;nofollow&quot;&gt;thoughts in response here&lt;/a&gt;.</description>
		<content:encoded><![CDATA[<p>Good suggestions, Jens. Some IDEs (like IntelliJ) actually look for &#8220;todo&#8221; etc. markers and give you a to-do list from them. There are logging packages modeled after log4j out there that I think are generally a better choice than writing your own logging macros. The key is that you should leave your logging statements in the code (formed in a way that avoids overhead of messages that aren&#8217;t being logged), and be able to change the logging level without recompiling, ideally while the app is running, but at the very least by simply changing a config file and restarting the app. It definitely should not require installing a new build.</p>
<p>I have more detailed <a href="http://www.bombaydigital.com/arenared/2007/5/7/1" rel="nofollow">thoughts in response here</a>.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: /dev/random :: links for 2007-05-07</title>
		<link>http://jens.mooseyard.com/2007/05/uncle-jenss-coding-tips/comment-page-2/#comment-1924</link>
		<dc:creator>/dev/random :: links for 2007-05-07</dc:creator>
		<pubDate>Mon, 07 May 2007 23:20:21 +0000</pubDate>
		<guid isPermaLink="false">http://mooseyard.com/Jens/2007/05/uncle-jenss-coding-tips/#comment-1924</guid>
		<description>[...] Uncle Jens’s Coding Tips the main person you’re writing comments for is yourself, six months in the future (tags: programming tips) [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] Uncle Jens’s Coding Tips the main person you’re writing comments for is yourself, six months in the future (tags: programming tips) [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Yotam Gingold</title>
		<link>http://jens.mooseyard.com/2007/05/uncle-jenss-coding-tips/comment-page-2/#comment-1923</link>
		<dc:creator>Yotam Gingold</dc:creator>
		<pubDate>Mon, 07 May 2007 21:16:52 +0000</pubDate>
		<guid isPermaLink="false">http://mooseyard.com/Jens/2007/05/uncle-jenss-coding-tips/#comment-1923</guid>
		<description>Some commentary:
	- A Warn() function is useful apart from assert().  Assert is useful when things *must* be true or the code will definitely die.  But something like Warn() (I call it expect()) is useful when you have a hunch about how something will work but it&#039;s not necessarily catastrophic if it&#039;s otherwise.  The thought is something like: &quot;I expect that points will always lie between this and that, but I&#039;m not positive.  If they don&#039;t, I&#039;m curious to know if this code will still work.&quot;

	- A friend one switched me on to a macro he called PAINT().  In every code branch (function, if statement, else statement, etc), he would put a PAINT() there.  PAINT() was basically an empty macro, but it was something he could put a breakpoint on (or print out line, file for you non-debugger types).  Then, when running the program, remove all the PAINT()&#039;s you hit.  The purpose of this is to mark those code-paths you&#039;ve never actually run, which becomes *very* useful when looking for bugs or figuring out why some function that always worked is producing weird results---look for any PAINT statements hiding inside it in some conditional.
	A poor-man&#039;s variation of PAINT() I&#039;m in the habit of doing now is putting a comment &quot;untested&quot; or &quot;tested&quot; at the top of a function.  When I write the function, I add the &quot;untested&quot; comment.  If I poke at the function and run some test cases, I change it to &quot;tested,&quot; but I don&#039;t change it unless I deliberately and specifically test it with various input.  That is, writing some random method, sticking it in the code somewhere, and running the entire program doesn&#039;t merit a &quot;tested.&quot;

	- Finally, I would add a word about comment blocks.  I&#039;m in the habit now of adding a good description comment for every function I write.  Something like: &quot;Takes as parameter a contour &#039;contour&#039; (list of 2d points) and a list of distances &#039;distances&#039; (a float for each point).  Returns a contour offset from &#039;contour&#039; by &#039;distances&#039; at each point in the form of a tuple of 2 lists: ( left offset points, right offset points ).&quot;  This has been really helpful for &quot;research&quot; because I&#039;m often trying things that don&#039;t work and need to re-use code.  How quickly I forget what a function with a tasty-looking name took as parameters and returned!</description>
		<content:encoded><![CDATA[<p>Some commentary:<br />
	- A Warn() function is useful apart from assert().  Assert is useful when things *must* be true or the code will definitely die.  But something like Warn() (I call it expect()) is useful when you have a hunch about how something will work but it&#8217;s not necessarily catastrophic if it&#8217;s otherwise.  The thought is something like: &#8220;I expect that points will always lie between this and that, but I&#8217;m not positive.  If they don&#8217;t, I&#8217;m curious to know if this code will still work.&#8221;</p>
<p>	- A friend one switched me on to a macro he called PAINT().  In every code branch (function, if statement, else statement, etc), he would put a PAINT() there.  PAINT() was basically an empty macro, but it was something he could put a breakpoint on (or print out line, file for you non-debugger types).  Then, when running the program, remove all the PAINT()&#8217;s you hit.  The purpose of this is to mark those code-paths you&#8217;ve never actually run, which becomes *very* useful when looking for bugs or figuring out why some function that always worked is producing weird results&#8212;-look for any PAINT statements hiding inside it in some conditional.<br />
	A poor-man&#8217;s variation of PAINT() I&#8217;m in the habit of doing now is putting a comment &#8220;untested&#8221; or &#8220;tested&#8221; at the top of a function.  When I write the function, I add the &#8220;untested&#8221; comment.  If I poke at the function and run some test cases, I change it to &#8220;tested,&#8221; but I don&#8217;t change it unless I deliberately and specifically test it with various input.  That is, writing some random method, sticking it in the code somewhere, and running the entire program doesn&#8217;t merit a &#8220;tested.&#8221;</p>
<p>	- Finally, I would add a word about comment blocks.  I&#8217;m in the habit now of adding a good description comment for every function I write.  Something like: &#8220;Takes as parameter a contour &#8216;contour&#8217; (list of 2d points) and a list of distances &#8216;distances&#8217; (a float for each point).  Returns a contour offset from &#8216;contour&#8217; by &#8216;distances&#8217; at each point in the form of a tuple of 2 lists: ( left offset points, right offset points ).&#8221;  This has been really helpful for &#8220;research&#8221; because I&#8217;m often trying things that don&#8217;t work and need to re-use code.  How quickly I forget what a function with a tasty-looking name took as parameters and returned!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Hybrid simulation working group &#38;#187; Blog Archive &#38;#187; Code tools and tips</title>
		<link>http://jens.mooseyard.com/2007/05/uncle-jenss-coding-tips/comment-page-2/#comment-1922</link>
		<dc:creator>Hybrid simulation working group &#38;#187; Blog Archive &#38;#187; Code tools and tips</dc:creator>
		<pubDate>Mon, 07 May 2007 18:27:57 +0000</pubDate>
		<guid isPermaLink="false">http://mooseyard.com/Jens/2007/05/uncle-jenss-coding-tips/#comment-1922</guid>
		<description>[...] Via RSS, an excellent article on code, tools, debugging and Xcode tricks. [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] Via RSS, an excellent article on code, tools, debugging and Xcode tricks. [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Michael Bishop</title>
		<link>http://jens.mooseyard.com/2007/05/uncle-jenss-coding-tips/comment-page-2/#comment-1921</link>
		<dc:creator>Michael Bishop</dc:creator>
		<pubDate>Mon, 07 May 2007 18:18:06 +0000</pubDate>
		<guid isPermaLink="false">http://mooseyard.com/Jens/2007/05/uncle-jenss-coding-tips/#comment-1921</guid>
		<description>For those of you using doxygen to document your code, it has a specific TODO comment which will output all it finds in a nice list for your documentation...

  http://www.stack.nl/~dimitri/doxygen/commands.html#cmdtodo</description>
		<content:encoded><![CDATA[<p>For those of you using doxygen to document your code, it has a specific TODO comment which will output all it finds in a nice list for your documentation&#8230;</p>
<p>  <a href="http://www.stack.nl/~dimitri/doxygen/commands.html#cmdtodo" rel="nofollow">http://www.stack.nl/~dimitri/doxygen/commands.html#cmdtodo</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: WNAS</title>
		<link>http://jens.mooseyard.com/2007/05/uncle-jenss-coding-tips/comment-page-2/#comment-1920</link>
		<dc:creator>WNAS</dc:creator>
		<pubDate>Mon, 07 May 2007 18:12:39 +0000</pubDate>
		<guid isPermaLink="false">http://mooseyard.com/Jens/2007/05/uncle-jenss-coding-tips/#comment-1920</guid>
		<description>&lt;strong&gt;programming tip&#8217;s (also for frontend?)...&lt;/strong&gt;

I just read an interesting article by &#8216;uncle jen&#8217; on (best) coding practices. It focuses more on C and cocoa apps, but I think that these tips will work for javascript and css just as well. Here is one:

“the main person you’re writing ...</description>
		<content:encoded><![CDATA[<p><strong>programming tip&#38;#8217;s (also for frontend?)&#8230;</strong></p>
<p>I just read an interesting article by &#38;#8216;uncle jen&#38;#8217; on (best) coding practices. It focuses more on C and cocoa apps, but I think that these tips will work for javascript and css just as well. Here is one:</p>
<p>“the main person you’re writing &#8230;</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: links for 2007-05-07</title>
		<link>http://jens.mooseyard.com/2007/05/uncle-jenss-coding-tips/comment-page-2/#comment-1919</link>
		<dc:creator>links for 2007-05-07</dc:creator>
		<pubDate>Mon, 07 May 2007 17:19:25 +0000</pubDate>
		<guid isPermaLink="false">http://mooseyard.com/Jens/2007/05/uncle-jenss-coding-tips/#comment-1919</guid>
		<description>[...] Uncle Jens’s Coding Tips — Thought Palace (tags: programming software_development tips) [...]</description>
		<content:encoded><![CDATA[<p>[&#8230;] Uncle Jens’s Coding Tips — Thought Palace (tags: programming software_development tips) [&#8230;]</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Tom_E</title>
		<link>http://jens.mooseyard.com/2007/05/uncle-jenss-coding-tips/comment-page-2/#comment-1918</link>
		<dc:creator>Tom_E</dc:creator>
		<pubDate>Mon, 07 May 2007 16:30:19 +0000</pubDate>
		<guid isPermaLink="false">http://mooseyard.com/Jens/2007/05/uncle-jenss-coding-tips/#comment-1918</guid>
		<description>Add me to the &quot;don&#039;t use _ as prefix&quot; fraction. As Dennis already stated, that renders code using that particular class non-standard-conformant as soon as the Objective-C++ compiler includes the declaration. Of course gcc will probably never moan, but that doesn&#039;t make the code better.  IMO it&#039;s a pity NSObjects &quot;automatic&quot; KVC code only allows _ as an prefix but not as an suffix.

For the -wall part, it&#039;s rather annoying one cannot use it without hacks in Quicktime-heavy code. Especially as Objective-C errors typically are reported as warnings, and 548 deprecation warnings hide pretty much any interesting.

Last !least, the // Todo and // fixme comments pop up as a smart search in IDE&#039;s on &quot;other platforms&quot;, making them much more useful (no need to fire up a project search to track them)</description>
		<content:encoded><![CDATA[<p>Add me to the &#8220;don&#8217;t use _ as prefix&#8221; fraction. As Dennis already stated, that renders code using that particular class non-standard-conformant as soon as the Objective-C++ compiler includes the declaration. Of course gcc will probably never moan, but that doesn&#8217;t make the code better.  IMO it&#8217;s a pity NSObjects &#8220;automatic&#8221; KVC code only allows _ as an prefix but not as an suffix.</p>
<p>For the -wall part, it&#8217;s rather annoying one cannot use it without hacks in Quicktime-heavy code. Especially as Objective-C errors typically are reported as warnings, and 548 deprecation warnings hide pretty much any interesting.</p>
<p>Last !least, the // Todo and // fixme comments pop up as a smart search in IDE&#8217;s on &#8220;other platforms&#8221;, making them much more useful (no need to fire up a project search to track them)</p>
]]></content:encoded>
	</item>
</channel>
</rss>

