"
color="<%= JiveGlobals.getJiveProperty("skin.default.textColor") %>">
<p>Today I had a 1:00 PM appointment with Elliotte Rusty Harold, author of many books on
Java and XML and the force behind the websites <a href="http://www.cafeaulait.org/">Cafe
au Lait</a> and <a href="http://www.cafeconleche.org/">Cafe con Leche</a>. Rusty told me
to meet him at the bookstore at the Software Developer (SD) conference. I showed up at the
San Jose Convention Center shortly before 1:00, inwardly admiring myself for being so
prompt and dependable. Unfortunately, SD was being held at the <i>Santa Clara</i> Convention
Center. Luckily, Rusty was still waiting for me at 1:15 when I finally arrived at the
correct convention center.
<p>After lunch, Rusty and I sat down for a 90 minute interview, which I'll publish on
Artima.com within the next few months. Rusty recently released
<a href="http://www.cafeconleche.org/XOM/">XOM</a>, which is to a great extent
<a href="http://www.jdom.org">JDOM</a> refactored. In the interview, Rusty and I
talked about API design in general, as well as particulars of XML processing APIs,
especially JDOM and XOM.
<h1>Social Programming</h1>
<p>The very first time I interviewed James Gosling back in 1999, I asked him how the rise
of the network would change software development:
<p><i> <b>James Gosling</b>: I think the biggest difference is that you can't just sit
alone in a room and build stuff, because the things you're building interact with
everything out there. You can't just sit alone and do whatever you want.
<p><b>Bill Venners</b>: And why is that?
<p><b>James Gosling</b>: Because you're trying to interact with other things, you have
to know what the other things do. If there are multiple people doing similar kinds
of things, they have to have some kind of an agreement on how these things should work.
If you're designing an electrical power delivery mechanism, for example, you have to design
a wall socket. And everybody has to use the same wall socket; otherwise those toasters
won't be able to plug in to you.
<p>It becomes an environment where people have to be much more socially involved. It
really is a community thing.</i>
<p>From: <a href=" http://www.artima.com/intv/gosling18.html">http://www.artima.com/intv/gosling18.html</a>
<p>For years I have assumed that "social programming" of the kind envisioned by James
Gosling would require strict adherence to contracts defined in thorough specifications.
Without strict adherence to contracts clearly delineated in specifications, how could a
distributed system being put together by lots of different parties ever work together?
<p>I imagined such systems would work like this: People define specifications of APIs, data
structures (such as XML schemas), and protocols. People use those specifications to guide
them in 1) creating software that provides the specified services or data structures, and
2) creating software that uses or consumes the APIs or data structures. People bring
providers and consumers together and everything works, because everyone adhered strictly
to the agreed upon specifications.
<h1>Attempting to Corner Rusty</h1>
<p>One thing I had heard XML enthusiasts, including Rusty Harold, highlight as an
advantage of XML is that because XML elements are individually tagged, invalid documents
can often still be processed. This attitude has long grated against my strict-contracts
personality. I figured this interview would be a good opportunity to try and convince
Rusty and, via the interview, other XML enthusiasts that invalid documents should be
rejected, not processed.
<p>But Rusty threw me off balance with his first example: RSS. He suggested that a huge
percentage of the documents that purport to adhere to one of the four RSS standards
actually don't. This threw me because I am planning to very soon write an application
that consumes RSS feeds. I realized that if 99% of the RSS feeds on the Internet turn
out in practice to be valid, then it makes sense for my application to reject invalid
RSS documents. But if only 50% of the RSS feeds are valid, then I should surely try and
handle the invalid documents as best I can. But then, anyone writing applications that
consume RSS feeds would make the same decision. For the most part, RSS consumers would
all deal with invalid RSS documents. And if that's the case, what is the incentive for
RSS producers to create valid documents?
<p>A good example of that kind of sloppy services/forgiving clients system is websites
and browsers, in which the point of agreement is the HTML specification. In practice, a
great percentage of web pages on the Internet have HTML errors in them. Because of that,
browsers try hard to figure out what the intent of the HTML author was. The browsers are
forgiving of those errors. As a result, websites don't really need to create valid HTML
documents. And they don't. In fact, I probably don't to a significant extent. The way I
verify the webpages here at Artima.com is not by running them through an HTML verifier,
but by looking at them in various browsers on various platforms.
<p>A good example from the other end of the strict adherence spectrum is the Java class
file. The JVM specification includes a chapter that formally and thoroughly specifies the
format of the Java class file. It also says that JVMs must reject malformed (invalid)
class files. JVMs are not forgiving of errors in class files. As a result, the producers
of Java class files are very careful to only produce valid well-formed Java class files.
<h1>Conclusion</h1>
<p>My intuition tells me that for social programming to work, specifications must b
strictly adhered to by both providers and consumers, like the Java class file. But then
I see some systems that seem to work in practice with loose adherence to specifications,
systems in which sloppy providers and forgiving consumers are the norm. Rusty and I
explored this topic at the end of our interview, but we didn't really nail it down. Here
are some questions I'd enjoy hearing your opinion on:
<p>1. What is it that makes some systems, like HTML and maybe RSS, become sloppy
provider / forgiving consumer kinds of systems? What allows other systems, such as the
Java class file format, to maintain strict adherence to the specification by all parties?
<p>2. How important is strict adherence to specifications in social programming systems?
In what kinds of situations is strict adherence important? When is strict adherence not so
important?
<p>3. To what extent is the level of adherence to specifications a manifestation of the
"culture" of each particular social programming system?
<dingbat>
<a name="resources">
<H1>Resources</H1>
</a>
<P>Cafe au Lait, Elliotte Rusty Harold's site about Java:<BR>
<a href="http://www.cafeaulait.org/">http://www.cafeaulait.org/</a>
<P>Cafe con Leche, Elliotte Rusty Harold's site about Java:<BR>
<a href="http://www.cafeconleche.org/">http://www.cafeconleche.org/</a>
<P>XOM, Elliotte Rusty Harold's new open source XML processing API for Java:<BR>
<a href="http://www.cafeconleche.org/XOM/">http://www.cafeconleche.org/XOM/</a>
<P>JDOM, the popular open source XML processing API, originally written by
Jason Hunter and Brett McLaughlin:<BR>
<a href="http://www.jdom.org">http://www.jdom.org</a>