<?xml version="1.0" encoding="utf-8"?>
<!-- 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153
-->
<?xml-stylesheet type="text/xsl" href="https://rollerweblogger.org/roller-ui/styles/rss.xsl" media="screen"?><rss version="2.0" 
  xmlns:dc="http://purl.org/dc/elements/1.1/"
  xmlns:atom="http://www.w3.org/2005/Atom" >
<channel>
  <title>Insert Pith Here</title>
  <link>https://rollerweblogger.org/lance/</link>
    <atom:link rel="self" type="application/rss+xml" href="https://rollerweblogger.org/lance/feed/entries/rss" />
  <description>&amp;quot;The essential or central part&amp;quot; according to  dictionary.com</description>
  <language>en-us</language>
  <copyright>Copyright 2009</copyright>
  <lastBuildDate>Sun, 11 Oct 2009 23:55:12 +0000</lastBuildDate>
  <generator>Apache Roller 6.1.5</generator>
  <item>
    <guid isPermaLink="true">https://rollerweblogger.org/lance/entry/tomacco</guid>
    <title>Tomacco</title>
    <dc:creator>lance</dc:creator>
    <link>https://rollerweblogger.org/lance/entry/tomacco</link>
    <pubDate>Tue, 10 Mar 2009 14:15:41 +0000</pubDate>
    <category>Java</category>
    <category>composition</category>
    <category>inheritance</category>
<description>I had another programmer come over and ask me a question that centered around inheritance.  Specifically, trying to understand how/why subclass Bletch could see property &amp;#39;bar&amp;#39; from superclass Foo:
&lt;pre&gt;
public class Foo {
   int bar;
   ...
}

public class Bletch extends Foo {
   public int count() {
      return bar++;
   }
   ...
}
&lt;/pre&gt;

I reminded him how inheritance works (he is new to OO), but we also discussed composition.  As an example I worked up to the &lt;a href=&quot;http://en.wikipedia.org/wiki/Tomacco#Tomacco&quot;&gt;Tomacco plant&lt;/a&gt;: it extends Tomato, but contains an instance of Tobacco so that it can respond to hasNicotine():
&lt;pre&gt;
public class Tomacco extends Tomato {
   Tobacco t = new Tobacco();

   public boolean hasNicotine() {
      return t.hasNicotine();
   }
   ...
}&lt;/pre&gt;</description>  </item>
  <item>
    <guid isPermaLink="true">https://rollerweblogger.org/lance/entry/re_blind_pilot_flies_from</guid>
    <title>Re: Blind pilot flies from London to Sydney</title>
    <dc:creator>lance</dc:creator>
    <link>https://rollerweblogger.org/lance/entry/re_blind_pilot_flies_from</link>
    <pubDate>Mon, 30 Apr 2007 10:51:19 +0000</pubDate>
    <category>General</category>
    <category>humor</category>
<description>But he was trying to get to Quebec!

Okay, &lt;a href=&quot;http://www.msnbc.msn.com/id/18391216/&quot;&gt;not really&lt;/a&gt;, but that was my first response to the headline.</description>  </item>
  <item>
    <guid isPermaLink="true">https://rollerweblogger.org/lance/entry/back_in_the_saddle</guid>
    <title>back in the saddle?</title>
    <dc:creator>lance</dc:creator>
    <link>https://rollerweblogger.org/lance/entry/back_in_the_saddle</link>
    <pubDate>Wed, 11 Apr 2007 14:17:17 +0000</pubDate>
    <category>General</category>
<description>From time-to-time I remind myself that I really should get brainopolis.com and Vanity Foul back on the air.  In our &amp;quot;new&amp;quot; home there are some infrastructure issues that I&amp;#39;ve just been loathe to tackle.

Not that anybody is paying attention to my second blog here (thanks Dave), but let me know if you&amp;#39;d like to hear from me more often.</description>  </item>
  <item>
    <guid isPermaLink="true">https://rollerweblogger.org/lance/entry/re_5_years_of_blogging</guid>
    <title>Re: 5 years of blogging</title>
    <dc:creator>lance</dc:creator>
    <link>https://rollerweblogger.org/lance/entry/re_5_years_of_blogging</link>
    <pubDate>Wed, 11 Apr 2007 14:13:28 +0000</pubDate>
    <category>General</category>
    <category>dave</category>
    <category>johnson</category>
<description>I&amp;#39;m going to make this a chain; from &lt;b&gt;&lt;a href=&quot;http://raibledesigns.com/rd/entry/5th_anniversary_of_blogging_roller&quot;&gt;RE: 5th anniversary of Blogging Roller&lt;/a&gt;&lt;/b&gt;

.quote {

    margin-left: 10%;

    text-align: justify;

    font-style: italic;

}

&lt;blockquote&gt;
&lt;p&gt;From the &lt;a href=&quot;http://rollerweblogger.org/roller&quot;&gt;Blogging Roller himself&lt;/a&gt;:
&lt;/p&gt;
&lt;p class=&quot;quote&quot; style=&quot;color:rgb(102, 102, 102);&quot;&gt;
Today is the fifth anniversary of this blog, which I started on &lt;a href=&quot;http://rollerweblogger.org/roller/date/20020411&quot;&gt;April 11, 2002&lt;/a&gt; to promote the Roller blog software that I had just finished writing. 
&lt;br&gt;...
&lt;br&gt;Now, five years later, Roller has graduated from the Apache Incubator to become &lt;a href=&quot;http://roller.apache.org/&quot;&gt;Apache Roller&lt;/a&gt;, blog-tech is my full-time job at Sun and I&amp;#39;m still Blogging Roller. Thanks to Roller users and contributors everywhere for helping to make this possible.&lt;br&gt;&lt;/p&gt;

&lt;p&gt;
Congrats Dave - 5 years is 20 years in Internet Time isn&amp;#39;t it?!
&lt;/p&gt;&lt;/blockquote&gt;
Add my congrats.  I&amp;#39;ve taken a nearly two year mostly-hiatus from blogging, but I&amp;#39;m still around.  My 5 year anniversary comes up in Aug.</description>  </item>
  <item>
    <guid isPermaLink="true">https://rollerweblogger.org/lance/entry/why_television_is_bad_for</guid>
    <title>Why television is bad for democracy</title>
    <dc:creator>lance</dc:creator>
    <link>https://rollerweblogger.org/lance/entry/why_television_is_bad_for</link>
    <pubDate>Fri, 7 Jul 2006 11:07:45 +0000</pubDate>
    <category>Politics</category>
    <category>Politics</category>
<description>Okay, I overstated it a bit with that title, but this quote really struck me.
&lt;blockquote&gt;
... he says that image media bypass reason and go straight to the emotions. The image media are a metaphor for not thinking logically. Images disable thinking, so unless people read and use their reason democracy is disabled as well.  [&lt;i&gt;&lt;a href=&quot;http://citmedia.org/blog/2006/07/03/guest-posting-is-media-performance-democracys-critical-issue/&quot;&gt;Is Media Performance Democracyâ&#128;&#153;s Critical Issue?&lt;/a&gt;&lt;/i&gt;]
&lt;/blockquote&gt;</description>  </item>
  <item>
    <guid isPermaLink="true">https://rollerweblogger.org/lance/entry/beautiful_girl</guid>
    <title>Beautiful Girl</title>
    <dc:creator>lance</dc:creator>
    <link>https://rollerweblogger.org/lance/entry/beautiful_girl</link>
    <pubDate>Mon, 12 Jun 2006 08:34:02 +0000</pubDate>
    <category>General</category>
    <category>General</category>
<description>Since I&amp;#39;m too lazy to hunt up his email address I just had to post a note saying Tim Bray has got &lt;a href=&quot;http://www.tbray.org/ongoing/When/200x/2006/06/11/Now-We-Are-Four&quot;&gt;a beautiful girl&lt;/a&gt;!</description>  </item>
  <item>
    <guid isPermaLink="true">https://rollerweblogger.org/lance/entry/oil_companies_exploiting_gas_crisis</guid>
    <title>Oil Companies Exploiting Gas Crisis?</title>
    <dc:creator>lance</dc:creator>
    <link>https://rollerweblogger.org/lance/entry/oil_companies_exploiting_gas_crisis</link>
    <pubDate>Thu, 20 Apr 2006 10:48:35 +0000</pubDate>
    <category>General</category>
    <category>General</category>
<description>Who could believe &lt;a href=&quot;http://www.consumerist.com/consumer/gas/oil-companies-exploiting-gas-crisis-168500.php&quot;&gt;it&lt;/a&gt;?

Of course, our President says he&amp;#39;ll be on the lookout for price gouging, so I feel much better about it.</description>  </item>
  <item>
    <guid isPermaLink="true">https://rollerweblogger.org/lance/entry/i_m_learning_to_hate</guid>
    <title>I&amp;#39;m learning to hate constructors</title>
    <dc:creator>lance</dc:creator>
    <link>https://rollerweblogger.org/lance/entry/i_m_learning_to_hate</link>
    <pubDate>Wed, 19 Apr 2006 15:26:10 +0000</pubDate>
    <category>General</category>
    <category>General</category>
<description>&lt;p&gt;Of course, that&amp;#39;s partially to do with the way &amp;quot;things are done&amp;quot; here.  We&amp;#39;ve got a base class (we&amp;#39;ll call A) that takes the form of Constructor(int id) where the constructor then loads values from the database after doing a lookup on id, among other things.&lt;/p&gt;

&lt;p&gt;I&amp;#39;ve been working on a set of classes that need to work on a second database (something the original set of data objects didn&amp;#39;t need to do), so I created an abstract class (we&amp;#39;ll call B) which subclasses A and does some common work (common to this second set).  And I&amp;#39;ve got subclass C of B.&lt;/p&gt;

&lt;p&gt;Now, B is abstract, so it doesn&amp;#39;t need constructors, but C has to be compatible with A (for use in a Factory) so it does have to have C(int id).  But to avoid compilation errors in C(int id) { super(id); } I do have to specify B(id) { super(id) }.  &lt;/p&gt;

&lt;p&gt;So, my abstract class does have to have a Constructor.  Or I can copy-paste the work A(id) does into C(id).&lt;/p&gt;

&lt;p&gt;Have I mentioned that there is no way to enforce this Constructor(int id) contract, except by discovering that the Factory cannot instantiate your C?  I could fix the Factory such that it doesn&amp;#39;t build an object by calling a constructor, add a FactoryInterface with an initialize(id) method, and have the Factory use that instead.  Now c.initialize() can override a.initialize() with no need for b.intialize(); and I only have to get this approved by the rest of the development staff.  And roll this change into the 20+ classes that inherit from A.&lt;/p&gt;</description>  </item>
</channel>
</rss>