<?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: Response: Don&#8217;t Forget The &#8216;C&#8217; in Objective-C!</title>
	<atom:link href="http://www.friday.com/bbum/2007/04/08/response-dont-forget-the-c-in-objective-c/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.friday.com/bbum/2007/04/08/response-dont-forget-the-c-in-objective-c/</link>
	<description>...so google can index my head.</description>
	<lastBuildDate>Mon, 26 Jul 2010 19:42:06 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
	<item>
		<title>By: Rich</title>
		<link>http://www.friday.com/bbum/2007/04/08/response-dont-forget-the-c-in-objective-c/comment-page-1/#comment-100868</link>
		<dc:creator>Rich</dc:creator>
		<pubDate>Fri, 13 Apr 2007 12:32:47 +0000</pubDate>
		<guid isPermaLink="false">http://www.friday.com/bbum/2007/04/08/response-dont-forget-the-c-in-objective-c/#comment-100868</guid>
		<description>Premature optimizaiton is the root of all evil...

--Donald Knuth</description>
		<content:encoded><![CDATA[<p>Premature optimizaiton is the root of all evil&#8230;</p>
<p>&#8211;Donald Knuth</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jon Hendry</title>
		<link>http://www.friday.com/bbum/2007/04/08/response-dont-forget-the-c-in-objective-c/comment-page-1/#comment-99040</link>
		<dc:creator>Jon Hendry</dc:creator>
		<pubDate>Mon, 09 Apr 2007 19:00:07 +0000</pubDate>
		<guid isPermaLink="false">http://www.friday.com/bbum/2007/04/08/response-dont-forget-the-c-in-objective-c/#comment-99040</guid>
		<description>To give the author credit, he does note that the code in his example doesn&#039;t really need the change, and notes that such an optimization would make more sense in code that operates on non-Unicode strings in a tight loop.

I think it can be marked up to the challenge of finding appropriately simple example code for the length and venue of the article. Ideally, it would have been example code that is in fact a tight loop. But that might have obscured things or required too much explanation.

A better, longer article could probably be written which gives examples of falling back from Cocoa to all the various other apis: Carbon, Core Foundation, Quartz, Mach, BSD, etc in various contexts.

But I don&#039;t know if that would be appropriate for The Reg.</description>
		<content:encoded><![CDATA[<p>To give the author credit, he does note that the code in his example doesn&#8217;t really need the change, and notes that such an optimization would make more sense in code that operates on non-Unicode strings in a tight loop.</p>
<p>I think it can be marked up to the challenge of finding appropriately simple example code for the length and venue of the article. Ideally, it would have been example code that is in fact a tight loop. But that might have obscured things or required too much explanation.</p>
<p>A better, longer article could probably be written which gives examples of falling back from Cocoa to all the various other apis: Carbon, Core Foundation, Quartz, Mach, BSD, etc in various contexts.</p>
<p>But I don&#8217;t know if that would be appropriate for The Reg.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Jesse Tayler</title>
		<link>http://www.friday.com/bbum/2007/04/08/response-dont-forget-the-c-in-objective-c/comment-page-1/#comment-98987</link>
		<dc:creator>Jesse Tayler</dc:creator>
		<pubDate>Mon, 09 Apr 2007 16:52:24 +0000</pubDate>
		<guid isPermaLink="false">http://www.friday.com/bbum/2007/04/08/response-dont-forget-the-c-in-objective-c/#comment-98987</guid>
		<description>Bill has a really IMPORTANT point here, regardless of the example used, or the original article. I see programmers all over the place pronounce that &quot;Oracle handles a tiny-int better than an unsigned int&quot; or that &quot;NSString is slow compared to some lines of assembly or lower level C. However, that fact is really not important if you see a whole project as something that must be maintained and delivered on time. Rarely are these &quot;truths&quot; about performance really behind performance problems in the real world use of a large scale project or system. Again, if you are not taking measures, you are not really focusing on where performance troubles lie and it is just that simple. Many engineers I&#039;ve met do not like to be the &quot;Scientist&quot; part of a Computer Scientist, but without measures, tests and proof these &quot;facts&quot; about low level code elements are just tiny factoids that are not truly relevant to a project as a whole. I get the sense people like to show off their knowledge of these factoids, but do not like to set up Scientific measures and tests that concern the entire project. When you use Scientific measures, you basically never find out that it was the way you handled a string somewhere but rather you&#039;ve found that a far larger paradigm or whole approach must be rethought and redesigned specifically.</description>
		<content:encoded><![CDATA[<p>Bill has a really IMPORTANT point here, regardless of the example used, or the original article. I see programmers all over the place pronounce that &#8220;Oracle handles a tiny-int better than an unsigned int&#8221; or that &#8220;NSString is slow compared to some lines of assembly or lower level C. However, that fact is really not important if you see a whole project as something that must be maintained and delivered on time. Rarely are these &#8220;truths&#8221; about performance really behind performance problems in the real world use of a large scale project or system. Again, if you are not taking measures, you are not really focusing on where performance troubles lie and it is just that simple. Many engineers I&#8217;ve met do not like to be the &#8220;Scientist&#8221; part of a Computer Scientist, but without measures, tests and proof these &#8220;facts&#8221; about low level code elements are just tiny factoids that are not truly relevant to a project as a whole. I get the sense people like to show off their knowledge of these factoids, but do not like to set up Scientific measures and tests that concern the entire project. When you use Scientific measures, you basically never find out that it was the way you handled a string somewhere but rather you&#8217;ve found that a far larger paradigm or whole approach must be rethought and redesigned specifically.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Corey O'Connor</title>
		<link>http://www.friday.com/bbum/2007/04/08/response-dont-forget-the-c-in-objective-c/comment-page-1/#comment-98982</link>
		<dc:creator>Corey O'Connor</dc:creator>
		<pubDate>Mon, 09 Apr 2007 16:45:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.friday.com/bbum/2007/04/08/response-dont-forget-the-c-in-objective-c/#comment-98982</guid>
		<description>&quot;Measure the damned performance before applying error prone optimizations!&quot;
Indeed! Even designing for simplicity and clarity before optimizing can fail unless quantitative measurements are used to prove the optimizations. I now tell people to follow this, slightly ammended, philosophy:
Rules of optimization:
1. Don&#039;t do it.
2. Experts only: Don&#039;t do it yet, and only if quantitative measurements exist to back up any claims.</description>
		<content:encoded><![CDATA[<p>&#8220;Measure the damned performance before applying error prone optimizations!&#8221;<br />
Indeed! Even designing for simplicity and clarity before optimizing can fail unless quantitative measurements are used to prove the optimizations. I now tell people to follow this, slightly ammended, philosophy:<br />
Rules of optimization:<br />
1. Don&#8217;t do it.<br />
2. Experts only: Don&#8217;t do it yet, and only if quantitative measurements exist to back up any claims.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mikeash</title>
		<link>http://www.friday.com/bbum/2007/04/08/response-dont-forget-the-c-in-objective-c/comment-page-1/#comment-98970</link>
		<dc:creator>mikeash</dc:creator>
		<pubDate>Mon, 09 Apr 2007 16:17:32 +0000</pubDate>
		<guid isPermaLink="false">http://www.friday.com/bbum/2007/04/08/response-dont-forget-the-c-in-objective-c/#comment-98970</guid>
		<description>The original article &quot;optimized&quot; something that wasn&#039;t a bottleneck down to broken code. The proper C equivalent to the NSString code is going to be at least as complicated, but we didn&#039;t get to see it, because the article&#039;s author was more concerned with speed than correctness. The original article was useless at best, dangerous at worst.</description>
		<content:encoded><![CDATA[<p>The original article &#8220;optimized&#8221; something that wasn&#8217;t a bottleneck down to broken code. The proper C equivalent to the NSString code is going to be at least as complicated, but we didn&#8217;t get to see it, because the article&#8217;s author was more concerned with speed than correctness. The original article was useless at best, dangerous at worst.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Vinpo</title>
		<link>http://www.friday.com/bbum/2007/04/08/response-dont-forget-the-c-in-objective-c/comment-page-1/#comment-98917</link>
		<dc:creator>Vinpo</dc:creator>
		<pubDate>Mon, 09 Apr 2007 12:54:17 +0000</pubDate>
		<guid isPermaLink="false">http://www.friday.com/bbum/2007/04/08/response-dont-forget-the-c-in-objective-c/#comment-98917</guid>
		<description>This whole argument is nice and all as long as nobody uses it as an excuse to justify any lack of knowledge or skill. I&#039;m not sure if anyone is doing this or not, but if you don&#039;t know your TLB then study instead of making up excuses. Sometimes I wonder about the average education level of application programmers, I hope this is largely unjustified. A PhD doesn&#039;t mean you must stop learning more things, ok?</description>
		<content:encoded><![CDATA[<p>This whole argument is nice and all as long as nobody uses it as an excuse to justify any lack of knowledge or skill. I&#8217;m not sure if anyone is doing this or not, but if you don&#8217;t know your TLB then study instead of making up excuses. Sometimes I wonder about the average education level of application programmers, I hope this is largely unjustified. A PhD doesn&#8217;t mean you must stop learning more things, ok?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zz</title>
		<link>http://www.friday.com/bbum/2007/04/08/response-dont-forget-the-c-in-objective-c/comment-page-1/#comment-98886</link>
		<dc:creator>zz</dc:creator>
		<pubDate>Mon, 09 Apr 2007 11:21:05 +0000</pubDate>
		<guid isPermaLink="false">http://www.friday.com/bbum/2007/04/08/response-dont-forget-the-c-in-objective-c/#comment-98886</guid>
		<description>&lt;i&gt;All things equal, less code is more readable and less bug-prone.&lt;/i&gt;

In this case, the strstr version *had* a bug as detailed in the comments. I also think it makes code a lot less readable if you mix C-style string api and NSString api in the same project. (especially when the C string api has method names such as &quot;strstr&quot; instead of &quot;rangeOfString&quot; like you have in nsstring).

So the original longer version was more readable and less bug-prone IMO. Personally I would just check the OpenGL api for an existing &#039;check for certain opengl extension&quot; method.</description>
		<content:encoded><![CDATA[<p><i>All things equal, less code is more readable and less bug-prone.</i></p>
<p>In this case, the strstr version *had* a bug as detailed in the comments. I also think it makes code a lot less readable if you mix C-style string api and NSString api in the same project. (especially when the C string api has method names such as &#8220;strstr&#8221; instead of &#8220;rangeOfString&#8221; like you have in nsstring).</p>
<p>So the original longer version was more readable and less bug-prone IMO. Personally I would just check the OpenGL api for an existing &#8216;check for certain opengl extension&#8221; method.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bbum</title>
		<link>http://www.friday.com/bbum/2007/04/08/response-dont-forget-the-c-in-objective-c/comment-page-1/#comment-98809</link>
		<dc:creator>bbum</dc:creator>
		<pubDate>Mon, 09 Apr 2007 06:52:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.friday.com/bbum/2007/04/08/response-dont-forget-the-c-in-objective-c/#comment-98809</guid>
		<description>Fair enough -- I&#039;ll certainly attest to the fact that people commonly use a hammer to drive a screw and avoiding that was one key subtext to the article.

Still, optimization without analyzation is largely pointless.   In that context, a simple &quot;components separated by string&quot; combined with &quot;containsObject&quot; is pretty damned simple/readable.</description>
		<content:encoded><![CDATA[<p>Fair enough &#8212; I&#8217;ll certainly attest to the fact that people commonly use a hammer to drive a screw and avoiding that was one key subtext to the article.</p>
<p>Still, optimization without analyzation is largely pointless.   In that context, a simple &#8220;components separated by string&#8221; combined with &#8220;containsObject&#8221; is pretty damned simple/readable.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: zachrahan</title>
		<link>http://www.friday.com/bbum/2007/04/08/response-dont-forget-the-c-in-objective-c/comment-page-1/#comment-98803</link>
		<dc:creator>zachrahan</dc:creator>
		<pubDate>Mon, 09 Apr 2007 06:31:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.friday.com/bbum/2007/04/08/response-dont-forget-the-c-in-objective-c/#comment-98803</guid>
		<description>Speed isn&#039;t even an issue here. The article pointed to a four or five line stanza of code that could be replaced with a single function call. Ignore claims of speed, etc. (which the article didn&#039;t really press), and what you have is a change whereby a relatively large amount of code in a &quot;high level&quot; API can be replaced by a lot less code in the &quot;lower level API&quot; because the impedances match (e.g. C string functions for C strings).

All things equal, less code is more readable and less bug-prone. Now, not always are things equal, especially with regard to bug density (say the guy was talking about using strcpy instead of higher-level APIs)... But to read (and discard) this article as one about optimization is, I think, a mischaracterization.</description>
		<content:encoded><![CDATA[<p>Speed isn&#8217;t even an issue here. The article pointed to a four or five line stanza of code that could be replaced with a single function call. Ignore claims of speed, etc. (which the article didn&#8217;t really press), and what you have is a change whereby a relatively large amount of code in a &#8220;high level&#8221; API can be replaced by a lot less code in the &#8220;lower level API&#8221; because the impedances match (e.g. C string functions for C strings).</p>
<p>All things equal, less code is more readable and less bug-prone. Now, not always are things equal, especially with regard to bug density (say the guy was talking about using strcpy instead of higher-level APIs)&#8230; But to read (and discard) this article as one about optimization is, I think, a mischaracterization.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bbum</title>
		<link>http://www.friday.com/bbum/2007/04/08/response-dont-forget-the-c-in-objective-c/comment-page-1/#comment-98794</link>
		<dc:creator>bbum</dc:creator>
		<pubDate>Mon, 09 Apr 2007 06:12:37 +0000</pubDate>
		<guid isPermaLink="false">http://www.friday.com/bbum/2007/04/08/response-dont-forget-the-c-in-objective-c/#comment-98794</guid>
		<description>I stand firm by the opinion that any article claiming that a particular API or optimization should be applied without quite explicitly calling out the need to actually analyze said code in context of execution is misguided and, likely, incorrect.

Barring that particularly huge flaw in the article, in this particular case -- and as Rosyna also calls out -- the higher level string handling APIs, be they NS or CF, aren&#039;t really that slow and are often damned fast for particular cases while also avoiding the need to roll your own encoding handling code.

The article is mediocre, at best.</description>
		<content:encoded><![CDATA[<p>I stand firm by the opinion that any article claiming that a particular API or optimization should be applied without quite explicitly calling out the need to actually analyze said code in context of execution is misguided and, likely, incorrect.</p>
<p>Barring that particularly huge flaw in the article, in this particular case &#8212; and as Rosyna also calls out &#8212; the higher level string handling APIs, be they NS or CF, aren&#8217;t really that slow and are often damned fast for particular cases while also avoiding the need to roll your own encoding handling code.</p>
<p>The article is mediocre, at best.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
