<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	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/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	>

<channel>
	<title>The Bruised Edge &#187; Programming</title>
	<atom:link href="http://weblog.kevinclarke.info/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://weblog.kevinclarke.info</link>
	<description>Digital Libraries, Repositories, Programming, Technology, Librarianship, etc.</description>
	<lastBuildDate>Wed, 28 Jul 2010 03:19:41 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.0</generator>
		<item>
		<title>Brevity As a Virtue</title>
		<link>http://weblog.kevinclarke.info/2005/08/17/brevity-as-a-virtue/</link>
		<comments>http://weblog.kevinclarke.info/2005/08/17/brevity-as-a-virtue/#comments</comments>
		<pubDate>Thu, 18 Aug 2005 00:03:28 +0000</pubDate>
		<dc:creator>ksclarke</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://kevinclarke.info/weblog/?p=215</guid>
		<description><![CDATA[I remember that when I was in school learning C++ (as the default language they taught at the time) I had a strong aversion to Java. I even got into a debate or two about C’s virtues when compared to Java’s. This is funny to me now because I’ve been doing professional Java programming for [...]]]></description>
			<content:encoded><![CDATA[<p class="contenttext">I remember that when I was in school learning C++ (as the default language they taught at the time) I had a strong aversion to Java. I even got into a debate or two about C’s virtues when compared to Java’s. This is funny to me now because I’ve been doing professional Java programming for five years and probably couldn’t write a decent C program if I tried (not that I could then probably).</p>
<p>One of the things I noticed when I finally switched from C to Java was that a simple network socket program that took a page of code in C could be done in a couple of lines in Java. Neat. It wasn’t why I switched (that had to do with my interest in metadata and Java’s clear dominance in that domain), but I can’t say I minded the convenience either.</p>
<p>Lately, I’ve been seeing a lot of people comparing Python’s brevity to Java’s verbosity. At the conference today, I chatted with a fellow (who will be presenting a paper on SVG and music notation tomorrow) who works in Python. The first thing he said to me when I mentioned that I work in Java was “how verbose Java is.”</p>
<p>Not that this isn’t true.  Java is more verbose than Python.  It’s ironic, though, because I always see the <a href="http://cavlec.yarinareth.net/archives/2005/08/11/stupid-programming-language-tricks/">same example</a> illustrating this point (which Dorothea Salo, whose blog I love, just reproduced in her blog (so I’ll pick on her as the latest example of this, well, example)).</p>
<p>The ironic thing is that there is a way to do the same thing in the current version of Java just as concisely:</p>
<blockquote><pre>for (String string : list) System.out.println(string);</pre>
</blockquote>
<p>That will work with a list:</p>
<blockquote><pre>List &lt;String&gt; = Arrays.asList(new String[] {"a","b"});</pre>
</blockquote>
<p>or an array:</p>
<blockquote><pre>String[] list = new String[] {"a", "a"};</pre>
</blockquote>
<p>&lt;teasing&gt;So, what is it? Aren’t there better examples out there? Why do we keep seeing the same one?&lt;/teasing&gt;</p>
<p>I have nothing against Python, mind you. It is the language I’m (very) slowly learning on the side (when I have time or a quick need for something). I also have no interest in getting into a language war. Those are rather pointless because they tend to devolve into techeological discussions (I’m proud I was able to work that word into a post, albeit in its negative sense).</p>
<p>I guess, though, what I’m getting at (I had to think for a second to remember where I was going with all this) is that brevity is not really going to convince me to change from one language to another. There are many more factors that, well, factor into my choice (for instance a good IDE and available resources (3rd party libraries)). After all, come on, think about it… aren’t you still reading this post? Couldn’t I have said what I wanted to say already (in much fewer words)?</p>
<p>Let’s face it… I like to write. Sometimes I regret what I write. Sometimes I feel uneasy about what I have written (thinking it makes me look like a fool (and sometimes it does)), but I’m not afraid of putting pen to paper (so to speak)… well, okay, sometimes I am afraid (but saying that doesn’t convey as much bravado — which is what I was going for there).</p>
<p>So anyway, for me, brevity != productivity. The equation isn’t that simple. This isn’t to say that I don’t (on occasion) want to work in Python (how’s that for a double negative?). I do… but it’s not because it’s concise… come on&#8230; (though, I admit, convenience is sometimes nice!)</p>
]]></content:encoded>
			<wfw:commentRss>http://weblog.kevinclarke.info/2005/08/17/brevity-as-a-virtue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Funny Quote</title>
		<link>http://weblog.kevinclarke.info/2005/06/01/funny-quote/</link>
		<comments>http://weblog.kevinclarke.info/2005/06/01/funny-quote/#comments</comments>
		<pubDate>Wed, 01 Jun 2005 23:04:04 +0000</pubDate>
		<dc:creator>ksclarke</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://kevinclarke.info/weblog/?p=229</guid>
		<description><![CDATA[Very funny quote on object-oriented design… Imagine if the Perl cafe and Javahut were across the street from each other. You walk into Javahut, and ask to sit down. “I’m sorry,” says the person at the door. I’m not actually the hostess, I’m a Factory class that can give you a hostess if you tell [...]]]></description>
			<content:encoded><![CDATA[<p>Very funny quote on object-oriented design…</p>
<blockquote><p>Imagine if the Perl cafe and Javahut were across the street from each other.</p>
<p>You walk into Javahut, and ask to sit down. “I’m sorry,” says the person at the door. I’m not actually the hostess, I’m a Factory class that can give you a hostess if you tell me what type of seat you want.”</p>
<p>You say you want a non-smoking seat, and the person calls over a NonSmokingSeatHostess. The hostess takes you to your seat, and asks if you’ll want breakfast, lunch, or dinner. You say lunch, and she beckons a LunchWaitress.</p>
<p>The LunchWaitress takes your order, brings over your food, but there’s no plates to put it on because you forgot to get a CutleryFactory and invoke getPlates, so the Waitress throws a null pointer exception and you get thrown out of the place.</p>
<p>–James Turner</p></blockquote>
<p>I found this, along with many other great quotes, on <a href="http://fawcett.medialab.uwindsor.ca/">fawcett’s main page</a>. I can tell already I will be borrowing many of the quotes from this page for my personal weblog’s quote plugin. Most of them are just plain hilarious.</p>
<p>For the Perl fans out there… I assume the remaining part of the quote talked about how great Perl is (since the Perl cafe was mentioned as an alternative)…</p>
<p>What it doesn’t tell you, though, is that all these specific Java classes would be invisible to the person visiting the Javahut because they would all be just implementations of generic interfaces (IHostess, IWaitress, etc). So, yes, the above happens, but you would never know all these details. Still, very funny.</p>
<p>So, does object-orientation model the real world?  I think the Olive Garden uses this very same toolkit.</p>
]]></content:encoded>
			<wfw:commentRss>http://weblog.kevinclarke.info/2005/06/01/funny-quote/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Details, Details, Details</title>
		<link>http://weblog.kevinclarke.info/2005/03/27/details-details-details/</link>
		<comments>http://weblog.kevinclarke.info/2005/03/27/details-details-details/#comments</comments>
		<pubDate>Sun, 27 Mar 2005 18:23:45 +0000</pubDate>
		<dc:creator>ksclarke</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://kevinclarke.info/weblog/?p=233</guid>
		<description><![CDATA[Note to proprietary software developers: if you throw an exception put some details in there about the values of the variables involved with the exception. Telling me something doesn&#8217;t compare but not telling me what was being compared is not much use. Reason number 433 that I like open source software&#8230; I could just put [...]]]></description>
			<content:encoded><![CDATA[<p>Note to proprietary software developers: if you throw an exception put some details in there about the values of the variables involved with the exception. Telling me something doesn&#8217;t compare but not telling me what was being compared is not much use. Reason number 433 that I like open source software&#8230; I could just put in a more detailed exception message myself. The alternative leaves me having to cycle through many iterations of changing variables to see which one is the significant one. Sigh.</p>
<p><b>UPDATE:</b> The lesson from this experience is that, when you are stuck in this cycle, you should minimize the number of processes involved with the iteration. For instance, debug in the proprietary vendor&#8217;s client-side XQuery client rather than in the web application (with full Tomcat restart cycles). It seems obvious, I know&#8230; It requires that code be modularized, but that&#8217;s always a Good Thing&reg;.</p>
]]></content:encoded>
			<wfw:commentRss>http://weblog.kevinclarke.info/2005/03/27/details-details-details/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>OML: A Blast from the Past</title>
		<link>http://weblog.kevinclarke.info/2004/07/01/oml-a-blast-from-the-past/</link>
		<comments>http://weblog.kevinclarke.info/2004/07/01/oml-a-blast-from-the-past/#comments</comments>
		<pubDate>Thu, 01 Jul 2004 06:24:14 +0000</pubDate>
		<dc:creator>ksclarke</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://kevinclarke.info/weblog/?p=241</guid>
		<description><![CDATA[Wow, Catalogablog just ran a story on OML (the OCLC Macro Language). Since Stanford/Lane is an RLIN school/library (and doesn&#8217;t use OCLC) I had no idea this was still around &#8212; I think I just took OML off my resume recently (figuring it was a dead language). I can remember about five and a half [...]]]></description>
			<content:encoded><![CDATA[<p>Wow, <a href="http://catalogablog.blogspot.com/">Catalogablog</a> just ran <a href="http://catalogablog.blogspot.com/2004_06_27_catalogablog_archive.html#108844655295912157">a story</a> on OML (the OCLC Macro Language). Since Stanford/Lane is an RLIN school/library (and doesn&#8217;t use OCLC) I had no idea this was still around &#8212; I think I just took OML off my resume recently (figuring it was a dead language). I can remember about five and a half years ago (at least) writing OML scripts to assist with my cataloging.</p>
<p>What a trip! It is great to see that it is still around. I thought I heard rumours back then that OCLC was going to discontinue OML (it was/is a Visual Basic variant). I guess that never happened. Strange days indeed!</p>
]]></content:encoded>
			<wfw:commentRss>http://weblog.kevinclarke.info/2004/07/01/oml-a-blast-from-the-past/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>
