<?xml version="1.0"?>
<rss version="2.0">
  <channel>
    <title>Advogato blog for dwragg</title>
    <link>http://www.advogato.org/person/dwragg/</link>
    <description>Advogato blog for dwragg</description>
    <language>en-us</language>
    <generator>mod_virgule</generator>
    <pubDate>Thu, 23 May 2013 00:12:34 GMT</pubDate>
    <item>
      <pubDate>Fri, 7 Jan 2005 08:35:16 GMT</pubDate>
      <title>7 Jan 2005</title>
      <link>http://www.advogato.org/person/dwragg/diary.html?start=11</link>
      <guid>http://www.advogato.org/person/dwragg/diary.html?start=11</guid>
      <description>My weblog is now &lt;a href="http://david.wragg.org/blog/" &gt;here&lt;/a&gt;.</description>
    </item>
    <item>
      <pubDate>Tue, 14 Dec 2004 23:28:41 GMT</pubDate>
      <title>14 Dec 2004</title>
      <link>http://www.advogato.org/person/dwragg/diary.html?start=10</link>
      <guid>http://www.advogato.org/person/dwragg/diary.html?start=10</guid>
      <description>&lt;strong&gt;Random Lispings&lt;/strong&gt;

&lt;p&gt; IoC containers, Part 2 soon.  But in the meantime, some Lisp links.

&lt;p&gt; &lt;ul&gt;
&lt;li&gt; &lt;a href="http://home.comcast.net/~bc19191/blog/040521.html" &gt;A hack to add continuations to Common Lisp&lt;/a&gt;.  Adding support for the rest of Common Lisp is left as an exercise for the reader.

&lt;p&gt; &lt;li&gt; One way to do that would be &lt;a href="http://home.pipeline.com/~hbaker1/MetaCircular.html" &gt;to define various Common Lisp forms in terms of other forms&lt;/a&gt;.  It's a shame Common Lisp wasn't specified this way.  I have this suspicions that inside Common Lisp is a small elegant Lisp trying to get out, and further, that Lisp is in many ways preferable to Scheme.

&lt;p&gt; &lt;li&gt; &lt;a href="http://home.pipeline.com/~hbaker1/Prag-Parse.html" &gt;Pragmatic Parsing in Common Lisp&lt;/a&gt;.  When doing some parsing in CL a while ago, I got side-tracked thinking about regular expressions.  I wish I had read that article first.
&lt;/ul&gt;

&lt;p&gt; Whatever happened to &lt;a href="http://home.pipeline.com/~hbaker1/home.html" &gt;Henry Baker&lt;/a&gt;, I wonder.</description>
    </item>
    <item>
      <pubDate>Tue, 30 Nov 2004 18:58:58 GMT</pubDate>
      <title>30 Nov 2004</title>
      <link>http://www.advogato.org/person/dwragg/diary.html?start=9</link>
      <guid>http://www.advogato.org/person/dwragg/diary.html?start=9</guid>
      <description>&lt;strong&gt;IoC containers, Part 1&lt;/strong&gt;

&lt;p&gt; Mike Spille wrote &lt;a
href="http://www.pyrasun.com/mike/mt/archives/2004/11/06/15.46.14/index.html"&gt;an
interesting essay about Inversion of Control containers&lt;/a&gt;, (with a
&lt;a
href="http://www.pyrasun.com/mike/mt/archives/2004/11/07/12.58.49/index.html"&gt;followup
here&lt;/a&gt;).  He gives a checklist of desirable features in these
containers, and surveys &lt;a
href="http://jakarta.apache.org/hivemind/"&gt;HiveMind&lt;/a&gt;, &lt;a
href="http://www.springframework.org/"&gt;Spring&lt;/a&gt;, and &lt;a
href="http://www.picocontainer.org/"&gt;PicoContainer&lt;/a&gt;.  PicoContainer
comes out worst, partly because it lacks some of the features from his
checklist (and in fact, these omissions are deliberate on the part of
the creators of PicoContainer).

&lt;p&gt; I have a particular interest in IoC containers, because I developed
one at work, and continue to maintain it and enhance it today.  I call
it the init framework (colleagues often call it
&lt;tt&gt;components.xml&lt;/tt&gt;, because its per-module configuration files
have that name).  Here, I'll just call it TIF.

&lt;p&gt; In terms of generalities, TIF has a lot in common with the well-known
IoC containers.  It shares many ideas and some specific techniques,
and the basic benefits are similar.  But these similarities represent
a case of convergent evolution.  I began work on TIF a little over 2
years ago (the CVS logs say the first check-in was on 2002-07-01; the
first lines of code must have been written a few days earlier).  If
those other IoC containers existed at that time, I wasn't aware of
them.

&lt;p&gt; (From the public CVS repositories, it seems that HiveMind originates
in May 2003, PicoContainer from mid-2003, and Spring from August 2003,
but it is possible that those dates are misleading: the projects may
have been hosted elsewhere before moving to their current
repositories. In any case, some of these ideas may well have been
around earlier; I seem to remember being aware of &lt;a
href="http://avalon.apache.org/"&gt;Apache Avalon&lt;/a&gt;, though it was
certainly not something I had any desire to imitate.)

&lt;p&gt; So I find it interesting to compare TIF with the open source ones, and
to consider why I made the design choices I did and why the authers of
the other containers made similar or different choices.  Since Mike's
essay it perhaps the nearest thing I have seen to a survey of the IoC
"market", it provides useful context for these comparisons.

&lt;p&gt; In summary, here is how the comparison comes out:

&lt;p&gt; &lt;ul&gt;
&lt;li&gt;Like HiveMind, TIF has a strong emphasis on XML-based configuration.

&lt;p&gt; &lt;li&gt;Like HiveMind and Spring, TIF has strong support for resolving
dependencies both by name and by type.

&lt;p&gt; &lt;li&gt;Like PicoContainer, TIF supports only constructor-based injection,
not setter-based injection.  However, there is a twist, which I
believe achieves many of the benefits of setter-based injection
without raising the difficult questions of that approach.

&lt;p&gt; &lt;li&gt;Like PicoContainer, TIF des not support cyclic dependencies.  It
did support them at one point, but that support was removed, and I
have no inclination to put it back.
&lt;/ul&gt;

&lt;p&gt; These last two points stand out, because Mike's article, and the
subsequent discussion, criticized PicoContainer for missing precisely
these features.  Mike's position is that these are examples where the
creators of PicoContainer put their purist principles ahead of the
pragmatic needs of developers who might use their container.  I can't
speak for the creators of PicoContainer, but my decisions had very
pragmatic reasons behind them: If my container doesn't meet the needs
of the real-world projects I work on, my colleagues simply won't use
it!

&lt;p&gt; In subsequent posts, I will consider each of these features in turn,
and explain how TIF works the way it does.  Then I will write another
post to describe notable features of TIF not shared by other
containers.

&lt;p&gt; (These posts are partly a response to colleagues who have asked me why
I wrote TIF when there are similar open-souce projects around, and why
it doesn't support cyclical dependencies.  I expect someone will
eventually ask me why it doesn't support setter-based injection, and
I will be able to point them here.)
</description>
    </item>
    <item>
      <pubDate>Tue, 23 Nov 2004 10:08:54 GMT</pubDate>
      <title>23 Nov 2004</title>
      <link>http://www.advogato.org/person/dwragg/diary.html?start=8</link>
      <guid>http://www.advogato.org/person/dwragg/diary.html?start=8</guid>
      <description>&lt;a href="http://www.1060.org/" &gt;NetKernel&lt;/a&gt; looks like an interesting project.  But I don't think it helps itself by describing itself as a "microkernel", rather than what it is: a REST-oriented Java framework for implementing services (as &lt;a href="http://www.theserverside.com/articles/article.tss?l=NetKernel" &gt;this TheServerSide.com article&lt;/a&gt; makes clear).

&lt;p&gt; The term &lt;em&gt;microkernel&lt;/em&gt; has a specific meaning, from operating systems research, and that meaning does not seem to be relevant to NetKernel in any way.  Their use of the term &lt;em&gt;kernel&lt;/em&gt; also seems dubious, but at least that is a general term used in different ways in different parts of the software world, so they can more reasonably appropriate it to apply to their project. (Maybe all this would seem less silly if microkernels, in the true sense of the word, were more widely seen as a  good thing.)

&lt;p&gt; I'd like to dismiss this as the usual marketing stupidity, but the misuse of the term continues even in the &lt;a href="http://www.1060research-server-1.co.uk/docs/2.0.0/book/introduction/doc_intro_page1.html" &gt;technical documentation&lt;/a&gt;, which claims:
&lt;blockquote&gt;
We have deliberately omitted technical marketing documents which present business and/or technical analysis for choosing NetKernel. If you require technical marketing literature for NetKernel please visit the 1060research.com and 1060.org sites.
&lt;/blockquote&gt;

&lt;p&gt; You also need to dig through their web-sites and documentation to discover that, while the concept may not  be specific to Java, the current implementation certainly is .  But surely this is important informantion for any potential customers?  My guess is that they want to avoid the question of why they don't implement apparently-relevant standards from the Java world such as the Servlets API.  I hope that the answer is that they are doing innovative things that don't fit inside those standards.  It would be nice to see this explained properly.</description>
    </item>
    <item>
      <pubDate>Sun, 1 Aug 2004 22:25:18 GMT</pubDate>
      <title>1 Aug 2004</title>
      <link>http://www.advogato.org/person/dwragg/diary.html?start=7</link>
      <guid>http://www.advogato.org/person/dwragg/diary.html?start=7</guid>
      <description>A couple of years ago, I read John Taylor Gatto's essay &lt;a href="http://www.cantrip.org/gatto.html" &gt;The Six-Lesson Schoolteacher&lt;/a&gt; (which happens to be on &lt;a href="http://www.advogato.org/person/ncm/" &gt;ncm's&lt;/a&gt; site).  Now an entire book by the same author can be read online: &lt;a href="http://www.johntaylorgatto.com/chapters/index.htm" &gt;The Underground History of American Education&lt;/a&gt;.  Interesting reading.</description>
    </item>
    <item>
      <pubDate>Mon, 24 May 2004 13:13:52 GMT</pubDate>
      <title>24 May 2004</title>
      <link>http://www.advogato.org/person/dwragg/diary.html?start=6</link>
      <guid>http://www.advogato.org/person/dwragg/diary.html?start=6</guid>
      <description>Company develops &lt;a href="http://news.bbc.co.uk/1/hi/technology/3736893.stm" &gt;HTTP proxy that support persistent connections&lt;/a&gt;.

&lt;p&gt; At least that is what it reads like.  I haven't been able to find anything so silly on the actual &lt;a href="http://www.netscaler.com" &gt;NetScaler&lt;/a&gt; site, though there is not much technical detail there either.</description>
    </item>
    <item>
      <pubDate>Sun, 23 May 2004 22:24:46 GMT</pubDate>
      <title>23 May 2004</title>
      <link>http://www.advogato.org/person/dwragg/diary.html?start=5</link>
      <guid>http://www.advogato.org/person/dwragg/diary.html?start=5</guid>
      <description>&lt;a href="http://jroller.com/page/pyrasun/20040408" &gt;An interesting essay about unit testing.&lt;/a&gt;

&lt;p&gt; &lt;p&gt; &lt;p&gt; I rarely see much discussion of unit tests that acknowledges that they
may not be appropriate in some contexts.  But the cost/benefit
function for unit tests is by no means trivial:

&lt;p&gt; &lt;p&gt; &lt;p&gt; &lt;ul&gt;
&lt;li&gt; For many kinds of code, building worthwhile unit tests is
extremely difficult.  In my experience, the sophistication of the unit
test code matches the sophistication of the code it tests.  For code
with a simple synchronous interface, and where the outputs are a
simple deterministic function of the inputs, unit testing will be
easy.  When these conditions don't apply (that is, for code that is
hard to get right), unit testing can become much more difficult.

&lt;p&gt; &lt;p&gt; &lt;p&gt; Even for "hard" code, unit testing is still possible, but the design
must respect unit-testability.  This can greatly increase the amount
of work involved over the non-unit-tested case.  If this
level of difficulty is underestimated, the tests may end up ensuring
very little, or being fragile, or creating an obstacle to maintainance
and further development of the code covered by the tests.

&lt;p&gt; &lt;p&gt; &lt;p&gt; &lt;li&gt; In a large OO program, much of the behaviour arises from the
interactions between objects.  Unit testing strives to test
individual classes, and so does not help to find problems in these
interactions.  At best, it can ensure that the objects implement their
sides of the relevant contracts correctly.  But that may not mean very
much in a design where groups of objects achieve more than the sum of
there parts.
&lt;/ul&gt;

&lt;p&gt; &lt;p&gt; &lt;p&gt; Because of issues such as these, unit testing might best be understood
as a way of catching some bugs earlier, rather than as a way to reduce
overall defect rates.  Thus it can make the development process more
predictable.

&lt;p&gt; &lt;p&gt; &lt;p&gt; But comprehensive unit testing has high costs, and other forms of
testing may be more appropriate for some projects, or some parts of
some projects.  It would be nice if there was less cheerleading of
unit testing, and more analyis of the pros and the cons.

</description>
    </item>
    <item>
      <pubDate>Fri, 23 Apr 2004 09:44:35 GMT</pubDate>
      <title>23 Apr 2004</title>
      <link>http://www.advogato.org/person/dwragg/diary.html?start=4</link>
      <guid>http://www.advogato.org/person/dwragg/diary.html?start=4</guid>
      <description>I'm trying to work out if there is anything interesting in SOA.  I'm
hopeful that there is, but I haven't found anything written about SOA
that captures it, despite the fact that a lot of clever people are
writing about SOA.  Of course, much of this verbiage is due to &lt;a
href="http://www.25hoursaday.com/weblog/PermaLink.aspx?guid=88d79765-0ba6-42eb-a84f-dd2c67de7f8a"&gt;to
the SOA hype machine&lt;/a&gt;.  But once you discard the hype, what is
left?

&lt;p&gt; &lt;p&gt; &lt;p&gt; If there is any merit to Web Services, it must be in SOA, since it is
certainly not in the concrete realization of SOA as XML Web Services.
Each layer is flawed in various ways.  XML may be a nice document
interchange format, but it is a strange choice as a message
serialization format for communications protocols (even if you focus
on document/literal style web services).  &lt;a
href="http://www.w3.org/2002/ws/"&gt;SOAP&lt;/a&gt;, &lt;a
href="http://www.w3.org/XML/Schema"&gt;XML Schema&lt;/a&gt; and &lt;a
href="http://www.w3.org/TR/wsdl"&gt;WSDL&lt;/a&gt; all have reasonable ideas at
their cores, and can all be made to work, but none of them fit their
niches perfectly, and none of them are a model of simplicity and
elegance.

&lt;p&gt; &lt;p&gt; &lt;p&gt; So where is the merit in SOA?

&lt;p&gt; &lt;p&gt; &lt;p&gt; The most frequently cited statement of the essence of SOA seems to
be &lt;a href="http://www.gotdotnet.com/team/dbox/" &gt;Don Box's&lt;/a&gt; &lt;a
href="http://msdn.microsoft.com/longhorn/understanding/pillars/indigo/default.aspx?pull=/msdnmag/issues/04/01/Indigo/default.aspx"&gt;four
tenets&lt;/a&gt;:

&lt;p&gt; &lt;p&gt; &lt;p&gt; &lt;ol&gt;
&lt;li&gt; Boundaries are explicit.
&lt;li&gt; Services are autonomous.
&lt;li&gt; Services share schema and contract, not class.
&lt;li&gt; Service compatibility is determined based on policy.
&lt;/ol&gt;

&lt;p&gt; &lt;p&gt; &lt;p&gt; The first two tenets seem to me to be a matter of emphasis, rather
than innovations.  These principles can be used to advantage in
conjunction with CORBA or COM; conversely, there is nothing about Web
Services that requires these principles to be observed (though some
Web Services toolkits make boundaries explicit simply by having an
excessively clunky programming model).

&lt;p&gt; &lt;p&gt; &lt;p&gt; The third tenet seems like the weakest of the four.  CORBA and COM
do not share programming language classes; they share contracts
defined in their IDLs.  The relevant implementations map contracts
specified using those IDLs onto machine-centric bindings and
representations, rather than the textual XML representations used by
Web Services.  But there is little in those IDLs that mandates such a
particular mapping.  In any case, the debate does not seem to hinge on
the superiority of XML as a data format compared to more
machine-centric formats (perhaps becuase the XML generated by
web-services toolkits is often little more human-readable than
machine-centric representations). So my guess is that this tenet has
its origin as a reaction to something else:

&lt;p&gt; &lt;p&gt; &lt;ul&gt;
&lt;li&gt; Java RMI, where the Java programming language also serves as the IDL, and objects can be passed across remote interfaces with few restrictions.

&lt;p&gt; &lt;p&gt; &lt;p&gt; &lt;li&gt; COM, which was often seen as simply a mechanism for
inter-programming-languange calls.  This has left it somewhat tainted
as a distributed programming technology, despite the existence of
DCOM.
&lt;/ul&gt;

&lt;p&gt; &lt;p&gt; &lt;p&gt; My conclusion is that if the first three tenets were all there is to SOA, then CORBA and
DCOM would be perefectly adequate technologies for implementing SOA.

&lt;p&gt; &lt;p&gt; &lt;p&gt; Which leaves "Service compatibility is determined based on policy".  I
have not yet come to any conclusion about how strong this tenet is.  I
suspect that there is something there, but the examples offered by &lt;a
href="http://msdn.microsoft.com/ws/2002/12/Policy/"&gt;WS-Policy&lt;/a&gt; and
the related specifications are not very convincing.
</description>
    </item>
    <item>
      <pubDate>Wed, 14 Apr 2004 11:46:51 GMT</pubDate>
      <title>14 Apr 2004</title>
      <link>http://www.advogato.org/person/dwragg/diary.html?start=3</link>
      <guid>http://www.advogato.org/person/dwragg/diary.html?start=3</guid>
      <description>&lt;a href="http://www.martinfowler.com/bliki/PublishedInterface.html" &gt;Martin Fowler writes about published interfaces.&lt;/a&gt;

&lt;p&gt; &lt;p&gt; This struck a chord.  In my day job, I maintain a large Java code
base, which is used from several other projects.  Mostly those other
projects use the "published" interfaces, but sometimes they try to use
classes and interfaces that I regard as internal (although they are
declared as public, since they are internal but widely used within my
code base).  Eventually I will have to document the list of published
classes and interfaces.  I will start by making a list of classes that
are already used externally.  A while ago, I wrote a Perl script that analyzes dependencies between .class files, and it shouldn't be too hard to adapt it for this purpose.
</description>
    </item>
    <item>
      <pubDate>Sat, 3 Jan 2004 21:32:04 GMT</pubDate>
      <title>3 Jan 2004</title>
      <link>http://www.advogato.org/person/dwragg/diary.html?start=2</link>
      <guid>http://www.advogato.org/person/dwragg/diary.html?start=2</guid>
      <description>
When I wrote the first entry to this diary, I planned to follow it up
reasonably regularly.  I didn't, but that is partly because I spent
most of December on vacation.  The new year seems like a good time to
try again.

&lt;p&gt; So to begin with, a few impressions gathered during that vacation.

&lt;p&gt; &lt;ul&gt;

&lt;p&gt; &lt;li&gt; For two weeks, I played at being a tourist in London and England,
the city and country I lived in for most my life, doing all the
tourist highlights.  England really is an expensive place to be a
tourist, but overall seemed decent value for money.

&lt;p&gt; &lt;li&gt; I drove a lot.  I hadn't driven for almost 2 years, and wondered
how I would find it.  It was fun.  The roads were clear, the weather
was good, and I was driving through some pleasant places, which
probably had a lot to do with it being fun.

&lt;p&gt; &lt;li&gt; I spent Christmas with my parents in London.  I wasn't there last
year, and missed it greatly.  There is something strangely magical
about watching TV with a full stomach and a decorated piece of tree in
the room.

&lt;p&gt; &lt;li&gt; I returned to Moscow, where I now live, shortly before the new
year.  Three weeks away was enough to restore the sense of
foreignness I felt when I first came here, the feeling was short lived.

&lt;p&gt; &lt;/ul&gt;
</description>
    </item>
  </channel>
</rss>
