<?xml version="1.0" encoding="UTF-8"?><!-- generator="wordpress/2.1-alpha2" -->
<rss version="2.0" 
	xmlns:content="http://purl.org/rss/1.0/modules/content/">
<channel>
	<title>Comments on: Lazy Object Orientation</title>
	<link>http://www.stuffonfire.com/2006/12/24/lazy-object-orientation/</link>
	<description>don't you worry about blank, let me worry about blank</description>
	<pubDate>Tue, 13 May 2008 08:08:49 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.1-alpha2</generator>

	<item>
		<title>by: Joe</title>
		<link>http://www.stuffonfire.com/2006/12/24/lazy-object-orientation/#comment-26269</link>
		<pubDate>Thu, 07 Feb 2008 19:04:58 +0000</pubDate>
		<guid>http://www.stuffonfire.com/2006/12/24/lazy-object-orientation/#comment-26269</guid>
					<description>This so called &quot;Lazy Object Orientation&quot; is correct programming practice.  The programmers who make a class for every object type in their program, even when said objecti s nothing more than a container for some data-- are the mediocre programmers.  It seems that somewhere in their development, they became so in love wiht subclassing that everything is a subclass.

If off the shelf classes have the functionality that is needed, then subclassing them is very poor programming practice-- it lets you guys think you're brilliant but gets in the way of understandability. 

This is even more the case in objective-c where you can add methods without subclassing.</description>
		<content:encoded><![CDATA[<p>This so called &#8220;Lazy Object Orientation&#8221; is correct programming practice.  The programmers who make a class for every object type in their program, even when said objecti s nothing more than a container for some data&#8211; are the mediocre programmers.  It seems that somewhere in their development, they became so in love wiht subclassing that everything is a subclass.</p>
<p>If off the shelf classes have the functionality that is needed, then subclassing them is very poor programming practice&#8211; it lets you guys think you&#8217;re brilliant but gets in the way of understandability. </p>
<p>This is even more the case in objective-c where you can add methods without subclassing.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: VirtualRabbit</title>
		<link>http://www.stuffonfire.com/2006/12/24/lazy-object-orientation/#comment-8612</link>
		<pubDate>Wed, 11 Apr 2007 14:11:50 +0000</pubDate>
		<guid>http://www.stuffonfire.com/2006/12/24/lazy-object-orientation/#comment-8612</guid>
					<description>I like this so-called &quot;Lazy Object Orientation&quot; - I find myself using it more and more in Cocoa and Java.  I find it offers a lot of advantages over proper structures.  You get serialization and easy debugging output (NSLog(@&quot;Object: %@&quot;, ob) for free, it's easy for other processes to examine your objects, and they are useful for initialization structures or returning tubles.</description>
		<content:encoded><![CDATA[<p>I like this so-called &#8220;Lazy Object Orientation&#8221; - I find myself using it more and more in Cocoa and Java.  I find it offers a lot of advantages over proper structures.  You get serialization and easy debugging output (NSLog(@&#8221;Object: %@&#8221;, ob) for free, it&#8217;s easy for other processes to examine your objects, and they are useful for initialization structures or returning tubles.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: guanhua</title>
		<link>http://www.stuffonfire.com/2006/12/24/lazy-object-orientation/#comment-8203</link>
		<pubDate>Thu, 05 Apr 2007 14:43:18 +0000</pubDate>
		<guid>http://www.stuffonfire.com/2006/12/24/lazy-object-orientation/#comment-8203</guid>
					<description>On personal opinion, I find this very helpful. 
Guys, I have also posted some more relevant info further on this, not sure if you find it useful: http://www.bidmaxhost.com/forum/</description>
		<content:encoded><![CDATA[<p>On personal opinion, I find this very helpful.<br />
Guys, I have also posted some more relevant info further on this, not sure if you find it useful: <a href='http://www.bidmaxhost.com/forum/' rel='nofollow'>http://www.bidmaxhost.com/forum/</a>
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: drew</title>
		<link>http://www.stuffonfire.com/2006/12/24/lazy-object-orientation/#comment-6772</link>
		<pubDate>Fri, 23 Feb 2007 15:28:35 +0000</pubDate>
		<guid>http://www.stuffonfire.com/2006/12/24/lazy-object-orientation/#comment-6772</guid>
					<description>&lt;blockquote&gt;The point remains, however, that developing for the desktop platform is fundamentally different than developing for a web platform and thus different paradigms tend to surface.&lt;/blockquote&gt;

The only fundamental difference between the two is the stateless nature of the web, and even that can be cobbled over to some extent.  (APS.NET tried to do it with WebForms, and while I generally despise the implementation, some of the ideas aren't behind it aren't so bad.)

The truth is, there are &lt;strike&gt;poor&lt;/strike&gt; undisciplined web developers just as there are undisciplined desktop application developers.  If you take a solid OO programmer from one environment from one environment and drop them in the other, they will probably do just fine(*).  If you take a mediocre programmer from one environment and drop them in the other, then, your results are going to be, well, mediocre...

(*) Although I have found that web programmers coming from a Java / C# / etc. background do seem to spend an awful lot of time trying to make inheritance in JavaScript look like they think it should.</description>
		<content:encoded><![CDATA[<blockquote><p>The point remains, however, that developing for the desktop platform is fundamentally different than developing for a web platform and thus different paradigms tend to surface.</p></blockquote>
<p>The only fundamental difference between the two is the stateless nature of the web, and even that can be cobbled over to some extent.  (APS.NET tried to do it with WebForms, and while I generally despise the implementation, some of the ideas aren&#8217;t behind it aren&#8217;t so bad.)</p>
<p>The truth is, there are <strike>poor</strike> undisciplined web developers just as there are undisciplined desktop application developers.  If you take a solid OO programmer from one environment from one environment and drop them in the other, they will probably do just fine(*).  If you take a mediocre programmer from one environment and drop them in the other, then, your results are going to be, well, mediocre&#8230;</p>
<p>(*) Although I have found that web programmers coming from a Java / C# / etc. background do seem to spend an awful lot of time trying to make inheritance in JavaScript look like they think it should.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Carl</title>
		<link>http://www.stuffonfire.com/2006/12/24/lazy-object-orientation/#comment-4105</link>
		<pubDate>Fri, 05 Jan 2007 13:14:23 +0000</pubDate>
		<guid>http://www.stuffonfire.com/2006/12/24/lazy-object-orientation/#comment-4105</guid>
					<description>&lt;strong&gt;&lt;em&gt;ndimiduk&lt;/em&gt;&lt;/strong&gt; I think you're overlooking the benefit of the refactoring tools.

Imagine you want to rename a method (from 'name' to 'description') in a project with, I don't know, let's say 2000 classes.  Your process would be to rename the method and then (recursively) grep or search and replace the old for the new ... with many compile iterations each time to check where there are still some you missed.

However, what would you do if there are 10 or 15 classes with the same method name?  Now you're in trouble because you're searching and replacing what?

[obj name] for [obj description] ... ahh, but that's going to pick up the other 15 classes that also have a &quot;name&quot; method.

Okay, so you change your search/replace to:

[objectNameThatIGenerallyUseForThisClass name] for [objectNameThatIGenerallyUseForThisClass description] ... but you've forgotten that there were a number of places where you had to use a different name ... oops!

It's not until you've tried to do this in a large project that you realise that it's &lt;em&gt;not&lt;/em&gt; the answer!  Doing something like this can take days!

So you use the other approach, rename the method and then write a new method, with the old name, that delegates to the newly renamed method.  Cool!  Now you've got two methods for the price of one! ;o)

You then spend the rest of the project's life tracking down callers that are still using the old method.

Refactoring tools allow you to do simple things like rename a method by, well, just renaming it.  It's able to rename the method on all callers for you at the same time.

Now, personally I wouldn't trust that refactor to a human!

Cheers,
-Carl</description>
		<content:encoded><![CDATA[<p><strong><em>ndimiduk</em></strong> I think you&#8217;re overlooking the benefit of the refactoring tools.</p>
<p>Imagine you want to rename a method (from &#8216;name&#8217; to &#8216;description&#8217;) in a project with, I don&#8217;t know, let&#8217;s say 2000 classes.  Your process would be to rename the method and then (recursively) grep or search and replace the old for the new &#8230; with many compile iterations each time to check where there are still some you missed.</p>
<p>However, what would you do if there are 10 or 15 classes with the same method name?  Now you&#8217;re in trouble because you&#8217;re searching and replacing what?</p>
<p>[obj name] for [obj description] &#8230; ahh, but that&#8217;s going to pick up the other 15 classes that also have a &#8220;name&#8221; method.</p>
<p>Okay, so you change your search/replace to:</p>
<p>[objectNameThatIGenerallyUseForThisClass name] for [objectNameThatIGenerallyUseForThisClass description] &#8230; but you&#8217;ve forgotten that there were a number of places where you had to use a different name &#8230; oops!</p>
<p>It&#8217;s not until you&#8217;ve tried to do this in a large project that you realise that it&#8217;s <em>not</em> the answer!  Doing something like this can take days!</p>
<p>So you use the other approach, rename the method and then write a new method, with the old name, that delegates to the newly renamed method.  Cool!  Now you&#8217;ve got two methods for the price of one! ;o)</p>
<p>You then spend the rest of the project&#8217;s life tracking down callers that are still using the old method.</p>
<p>Refactoring tools allow you to do simple things like rename a method by, well, just renaming it.  It&#8217;s able to rename the method on all callers for you at the same time.</p>
<p>Now, personally I wouldn&#8217;t trust that refactor to a human!</p>
<p>Cheers,<br />
-Carl
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: ndimiduk</title>
		<link>http://www.stuffonfire.com/2006/12/24/lazy-object-orientation/#comment-4057</link>
		<pubDate>Thu, 04 Jan 2007 15:31:07 +0000</pubDate>
		<guid>http://www.stuffonfire.com/2006/12/24/lazy-object-orientation/#comment-4057</guid>
					<description>Refactoring tools?  What's so hard about regex search-and-replace?  Sure, use your IDE-d'jour for making tedious things easy, but use a &lt;strike&gt;real&lt;/strike&gt; programmable editor for your surgical coding needs.

There's nothing specifically wrong with using container objects to hold your data.  The trouble comes up when you need to grow your project beyond the basic data types.  Object Orientation starts to shine when you can hide you &lt;code&gt;NSArray&lt;/code&gt; of &lt;code&gt;Goober&lt;/code&gt;s from your &lt;code&gt;GooberConsumer&lt;/code&gt;.  If the array is hidden by an object and accessor methods, you can later change from a &lt;code&gt;NSArray&lt;/code&gt; to your shinny new &lt;code&gt;SuperCoolGooberCollection&lt;/code&gt; and the only thing &lt;code&gt;GooberConsumer&lt;/code&gt; will notice is a net increase in speed (well, maybe a decrease in speed if it's not as super-cool as you had hoped -- &lt;a href=&quot;http://ridiculousfish.com/blog/archives/2005/12/23/array/&quot; rel=&quot;nofollow&quot;&gt;NSArray is rather super-cool&lt;/a&gt;).

The point remains, however, that developing for the desktop platform is fundamentally different than developing for a web platform and thus different paradigms tend to surface.  Oh, and IDEs are a tool, just like emacs, vi, and sed, and awk; don't treat them like crutches.  There's no way I'd trust an IDE to &quot;refactor&quot; my personal project, any more than my employer would trust an IDE &quot;refactor&quot; any of our code.  Code is poetry, you JUST DON'T DO THAT to your lovingly-pruned bonsai.</description>
		<content:encoded><![CDATA[<p>Refactoring tools?  What&#8217;s so hard about regex search-and-replace?  Sure, use your IDE-d&#8217;jour for making tedious things easy, but use a <strike>real</strike> programmable editor for your surgical coding needs.</p>
<p>There&#8217;s nothing specifically wrong with using container objects to hold your data.  The trouble comes up when you need to grow your project beyond the basic data types.  Object Orientation starts to shine when you can hide you <code>NSArray</code> of <code>Goober</code>s from your <code>GooberConsumer</code>.  If the array is hidden by an object and accessor methods, you can later change from a <code>NSArray</code> to your shinny new <code>SuperCoolGooberCollection</code> and the only thing <code>GooberConsumer</code> will notice is a net increase in speed (well, maybe a decrease in speed if it&#8217;s not as super-cool as you had hoped &#8212; <a href="http://ridiculousfish.com/blog/archives/2005/12/23/array/" rel="nofollow">NSArray is rather super-cool</a>).</p>
<p>The point remains, however, that developing for the desktop platform is fundamentally different than developing for a web platform and thus different paradigms tend to surface.  Oh, and IDEs are a tool, just like emacs, vi, and sed, and awk; don&#8217;t treat them like crutches.  There&#8217;s no way I&#8217;d trust an IDE to &#8220;refactor&#8221; my personal project, any more than my employer would trust an IDE &#8220;refactor&#8221; any of our code.  Code is poetry, you JUST DON&#8217;T DO THAT to your lovingly-pruned bonsai.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Scott Stevenson</title>
		<link>http://www.stuffonfire.com/2006/12/24/lazy-object-orientation/#comment-3529</link>
		<pubDate>Sun, 24 Dec 2006 13:16:39 +0000</pubDate>
		<guid>http://www.stuffonfire.com/2006/12/24/lazy-object-orientation/#comment-3529</guid>
					<description>For what it's worth, I don't think blasting away basic software practices saves you time overall. It may temporarily give you the illusion of saving time, but as soon as you need to change something, a bit of abstraction can really help.</description>
		<content:encoded><![CDATA[<p>For what it&#8217;s worth, I don&#8217;t think blasting away basic software practices saves you time overall. It may temporarily give you the illusion of saving time, but as soon as you need to change something, a bit of abstraction can really help.
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: daver</title>
		<link>http://www.stuffonfire.com/2006/12/24/lazy-object-orientation/#comment-3522</link>
		<pubDate>Sun, 24 Dec 2006 10:19:34 +0000</pubDate>
		<guid>http://www.stuffonfire.com/2006/12/24/lazy-object-orientation/#comment-3522</guid>
					<description>I'm aware of the Java-based tools. Notice that I never mentioned Java in my original post. :)</description>
		<content:encoded><![CDATA[<p>I&#8217;m aware of the Java-based tools. Notice that I never mentioned Java in my original post. <img src='http://www.stuffonfire.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />
</p>
]]></content:encoded>
				</item>
	<item>
		<title>by: Nikita Zhuk</title>
		<link>http://www.stuffonfire.com/2006/12/24/lazy-object-orientation/#comment-3521</link>
		<pubDate>Sun, 24 Dec 2006 10:15:45 +0000</pubDate>
		<guid>http://www.stuffonfire.com/2006/12/24/lazy-object-orientation/#comment-3521</guid>
					<description>&lt;blockquote&gt;And, outside Mac OS X, the tools just aren’t as good for writing well-factored code both easily and quickly.&lt;/blockquote&gt;

Actually, weak tools are the biggest reason for me to (sometimes) use lazy object orientation in Cocoa/Objective-C code. Currently XCode doesn't offer any tools for refactoring - even renaming an ivar or a class is manual and error-prone job. That's why there's always a bit of hesitation before creating a new class in XCode - you know that managing it later will be a bigger burden than it needs to be. This is especially the case when the problem domain of your application cannot be completely specified in advance and you know that you will need to change some parts of your data model later. Although XCode 3.0 will offer some degree of refactoring support it'll be still light years behind such Java IDEs like IntelliJ IDEA or Eclipse.</description>
		<content:encoded><![CDATA[<blockquote><p>And, outside Mac OS X, the tools just aren’t as good for writing well-factored code both easily and quickly.</p></blockquote>
<p>Actually, weak tools are the biggest reason for me to (sometimes) use lazy object orientation in Cocoa/Objective-C code. Currently XCode doesn&#8217;t offer any tools for refactoring - even renaming an ivar or a class is manual and error-prone job. That&#8217;s why there&#8217;s always a bit of hesitation before creating a new class in XCode - you know that managing it later will be a bigger burden than it needs to be. This is especially the case when the problem domain of your application cannot be completely specified in advance and you know that you will need to change some parts of your data model later. Although XCode 3.0 will offer some degree of refactoring support it&#8217;ll be still light years behind such Java IDEs like IntelliJ IDEA or Eclipse.
</p>
]]></content:encoded>
				</item>
</channel>
</rss>
