<?xml version="1.0" encoding="utf-8"?>
<feed version="0.3" xmlns="http://purl.org/atom/ns#" xmlns:dc="http://purl.org/dc/elements/1.1/" xml:lang="en">
<title>David Rupp&apos;s Blog</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/davidrupp/" />
<modified>2007-03-20T18:46:04Z</modified>
<tagline></tagline>
<id>tag:weblogs.java.net,2008:/blog/davidrupp/171</id>
<generator url="http://www.movabletype.org/" version="3.01D">Movable Type</generator>
<copyright>Copyright (c) 2007, davidrupp</copyright>
<entry>
<title>JRuby and NetBeans</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/davidrupp/archive/2007/03/jruby_and_netbe.html" />
<modified>2007-03-20T18:46:04Z</modified>
<issued>2007-03-20T18:45:59Z</issued>
<id>tag:weblogs.java.net,2007:/blog/davidrupp/171.6866</id>
<created>2007-03-20T18:45:59Z</created>
<summary type="text/plain">Two great tastes? Or one sticky mess?</summary>
<author>
<name>davidrupp</name>

<email>david@ruppconsulting.com</email>
</author>
<dc:subject>Community: Java Tools</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/davidrupp/">
<![CDATA[<p>
I've been following <a href=http://weblogs.java.net/blog/bleonard>Brian Leonard</a>'s recent entries on JRuby/Ruby/Rails integration in the latest NetBeans milestone release. In my own tinkering to solidify what I've learned from Brian, I've found that there are a couple of showstoppers that will prevent me from using this suite for serious Rails development, for now at least.
</p>
<p>
You see, Brian's JRuby example was ported directly from the original how-to screencast created by David Heinemeier Hansson, the creator of Rails. The techniques in the screencast were state-of-the-art back then, but a lot has changed in the two-plus years since it first hit the internet. 
</p>
<p>
One of the major changes is that Rails now prefers Mongrel as its application server. The script that starts the server (script/server) looks for an installation of Mongrel first, then for LigHTTPD to serve a Rails app. If neither of those is available on your system, Rails will fall back to using WEBrick, which comes bundled with Ruby. WEBrick works great for local development and testing, but it's not suitable for use in production. So using WEBrick for development can lead to one of two problems:
</p>
<ul>
<li>
You decide to deploy in production using WEBrick anyway, because it's what you're used to.
</li>
<li>
You deploy in production to Mongrel, but you don't understand it because you're used to developing on WEBrick.
</li>
</ul>
<p>
So ideally I would like to be able to make NetBeans aware of Mongrel, since it doesn't come as one of the bundled gems in the Ruby Feature. And that's where the fun starts.
</p>
<p>
NetBeans thoughtfully provides an interface for managing my Ruby Gems (at Tools/Ruby Gem Manager). Once there I click on "Install New...", wait for the "Available Gems:" area to populate, scroll down to the entry for mongrel, select it, and click Install. On the "Gem Installation Settings" screen I accept the defaults (install the latest version of the gem and include dependencies) and click OK. Which brings me to:
</p>
<p>
<b>Showstopper #1</b>
</p>
<p>
Mongrel, like many other gems out there in RubyLand asks (actually, <i>requires</i>) me to select a specific gem for my version and platform. Unfortunately, the NetBeans interface does not (currently) allow me to interact with the gem install process, so I'm stuck. By the way, philosophically I consider this a flaw in the gem installation process, not in the NetBeans interface. I don't like having to make this input on the command line either. But since this mechanism isn't likely to change soon, it's unfortunately up to the NetBeans team to provide an interface to it. Which I know is on their List of Things To Do.
</p>
<p>
Back to installing mongrel. As it happens I'm used to manually installing my gems anyway, so it shouldn't be too much trouble for me to locate the NetBeans gem repository and install mongrel by hand. I just need to know where the 'gem' command lives relative to my NetBeans/JRuby installation. It happens that there's a setting for this, under Preferences.../Miscellaneous/Ruby Installation. On my machine (running Mac OS X), the major executables live in the ~/.netbeans/dev/jruby-0.9.8/bin/ directory. A quick inspection of this directory verifies that the 'gem' command lives there too. So I just need to define a JRUBY_HOME that points to that jruby directory, and add $JRUBY_HOME/bin to the front of my PATH.
</p>
<p>
<i>(Note to Windows users: Sorry for all the Mac/Unix-isms. All of this stuff is directly analogous to setting environment variables via the usual Control Panel/System/Advanced dance that you get to do. Hopefully you're used enough to it by now that you can just figure it out.)</i>
</p>
<p>
Now with my PATH set properly I can do 'gem install -y mongrel' by hand. I get the same list of options, and I respond by selecting the latest and greatest. Which brings me to:
</p>
<p>
<b>Showstopper #2</b>
</p>
<p>
Mongrel, like a bunch of other "Ruby" gems actually requires access to native C libraries, which get built as part of the installation process. Which causes the JRuby gem installer to fail miserably. Bummer. To make things worse, according to the <a href=http://jruby.codehaus.org/FAQ>JRuby FAQ</a>, native library access will never be available from JRuby. Double bummer.
</p>
<p>
The punch line? No Mongrel on JRuby, at least until someone implements the C-specific stuff in either Java or Ruby (or JRuby, I guess). The good news is that some gem providers are starting to re-work their gems and provide JRuby-capable versions for them.
</p>
<p>
The other good news is I can still use good old WEBrick in JRuby. It's not the end of the world. But it'll sure be nice to have access to Mongrel, whenever that happens. And the install-gems-by-hand trick works nicely for gems that don't involve native libraries. Try it with 'gem install gem_plugin' if you need proof. The only downside is that the NetBeans Ruby Gem Manager doesn't become aware of any hand-installed gems until you restart. Again, this is more of a nuisance than an actual hindrance.
</p>]]>

</content>
</entry>
<entry>
<title>&quot;Nearshoring&quot;?</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/davidrupp/archive/2005/07/nearshoring.html" />
<modified>2008-01-02T17:42:16Z</modified>
<issued>2005-07-15T18:26:23Z</issued>
<id>tag:weblogs.java.net,2005:/blog/davidrupp/171.2939</id>
<created>2005-07-15T18:26:23Z</created>
<summary type="text/plain">What will they think of next?</summary>
<author>
<name>davidrupp</name>

<email>david@ruppconsulting.com</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/davidrupp/">
<![CDATA[<p>
(to the tune of "The Ballad of Gilligan's Island", by George Wyle and Sherwood Schwartz)
</p>
<i>
<p>
Just <a href=http://www.computerworld.com/managementtopics/outsourcing/story/0,10801,103089,00.html>
click this link</a> and you'll read a tale,<br/>
A tale of a fateful slip<br/>
For Java geeks who went to work aboard an old cruise ship.
</p>
<p>
The goal was a mighty savings plan --<br/>
To make their jobs secure,<br/>
They'd give up pay and sail away<br/>
For an entrepreneur.<br/>
(An entrepreneur.)<br/>
</p>
<p>
Employers here have found it rough<br/>
To overseas the cost.<br/>
If not for the virtues of this simple plan,<br/>
More money could be lost.<br/>
(More money could be lost!)<br/>
</p>
<p>
This ship sets sail and it drops its anchor once it's gone three miles<br/>
With Java geeks, (doo doo doot doot doot!)<br/>
A doctor too, (doo doo doo doo doo doo doo!)<br/>
A laundry room<br/>
And some booze.<br/>
</p>
<p>
Ten hours a day<br/>
Gets you one point eight grand a month.<br/>
How could anyone lose?
</i>]]>

</content>
</entry>
<entry>
<title>Ajax, part 2</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/davidrupp/archive/2005/05/ajax_part_2.html" />
<modified>2008-01-02T17:42:16Z</modified>
<issued>2005-05-23T15:32:39Z</issued>
<id>tag:weblogs.java.net,2005:/blog/davidrupp/171.2476</id>
<created>2005-05-23T15:32:39Z</created>
<summary type="text/plain">Of gorillas and men.</summary>
<author>
<name>davidrupp</name>

<email>david@ruppconsulting.com</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/davidrupp/">
<![CDATA[I think it's time we made the painful admission that Sun is no longer the 800-pound gorilla of the Java world. It's not even <strong>a</strong> gorilla. It's a 90-pound chimp, dancing around just beyond the reach of the 800-pound gorilla, waiting for it to drop the Java bone and hoping there's still some meat left on it when it does.
<br/><br/>
So who is the reigning 800-pound gorilla? Let's look at some of the candidates.
<br/><br/>
Microsoft? Bwah hah hah hah hah. Hah. Microsoft is another 90-pound chimp -- the one that's off in the corner by itself, playing with its .NET. Oh, sure, it's only natural, and you can let your kids watch if you want to, but you're going to have some explaining to do. Probably better to ease them down the path to Reptile World.
<br/><br/>
Who else is there, you ask? IBM? Not a bad choice. IBM was at one time on its way to being the 800-PG, but it's stalled out at about 500 pounds. Big enough to block out the sun? Yes. (BTW, anyone still think the name "Eclipse" is a coincidence?) But there's something even bigger that's eating its lunch. What might that something be?
<br/><br/>
Google.
<br/><br/>
Google can (apparently) do no wrong. Google has the Midas Touch. Google's got legs, and it knows how to use them. Google can take a nothing date and suddenly make it all seem worthwhile. <i>[Author's editor's-note-style note: Yes, I'm aware that my metaphors are now totally out of control. I'll switch to decaf as soon as I'm done.]</i>
<br/><br/>
The frustrating thing is this -- it's what Google is doing <strong>without</strong> Java that's holding Java back. And it's not just Ajax. I'll bet if Google started implementing web apps in Fortran, people would stand around, nodding and stroking their chins sagaciously and saying, "Hmm. Yes. Fortran. Brilliant."
<br/><br/>
So now that Ajax is on the Google Map, what's going to happen to Java?
<br/><br/>
I think in the end Java will be just fine. I think Java will be like those kids at the end of "Revenge of the Nerds". Sure it'll have a swirlie, and it'll be nursing those noogie-bruises for a while, but it'll still have stolen the quarterback's girlfriend. It'll still have wowed us with its enterprise-class concert at the talent show. And, most importantly, it'll still have launched the rich and diverse movie careers of Robert Carradine, Anthony Edwards, and That Guy Who Played Booger And Fifteen Other Characters Exactly Like Booger. If those guys can survive, so can Java.
<br/><br/>
I think our Java's gonna make it after all.]]>

</content>
</entry>
<entry>
<title>Ajax</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/davidrupp/archive/2005/05/ajax.html" />
<modified>2008-01-02T17:42:16Z</modified>
<issued>2005-05-23T15:23:52Z</issued>
<id>tag:weblogs.java.net,2005:/blog/davidrupp/171.2475</id>
<created>2005-05-23T15:23:52Z</created>
<summary type="text/plain">Old tricks, new dog?</summary>
<author>
<name>davidrupp</name>

<email>david@ruppconsulting.com</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/davidrupp/">
<![CDATA[Great. Just great. This is all I needed -- a technology that makes Javascript respectable.
<br/><br/>
When I was making the jump from mainframe assembler language to the wonderful world of Java (circa 1996), I, like every other Sun-worshiper, learned to sneer at the very mention of that monumental hack, Javascript. After all, it wasn't OOP, it was more like "oops!".
<br/><br/>
Now, almost 10 years later, I have to accept that I'm now playing catch-up to the rest of the right-thinking Internet world. You want to play Ajax, you have to play Javascript -- it's in the acronym.
<br/><br/>
So let's take a look at what I've been missing. Javascript, it says here, executes in a "Javascript-engine" that's baked in to my browser. Hmm. It's responsible for managing the presentation of the client side UI, event-handling, etc. 'kay. Ajax adds to that the concept of making a behind-the-scenes connection to the server to handle anything that can't be handled on the client side. Interesting. Now I hear there's a <strong>new</strong> concept in Javascript of a kind of "canvas" -- a generic component that will allow Javascript to draw....graphics! Whaddaya know.
<br/><br/>
Um, hello? Anyone ever heard of a little technology in Java called <strong><i>applets</i></strong>?! As far as I can tell, we've had the moral equivalent of Ajax available to us since the last century, and yet applets are now regarded with the same esteem as a sleepover at Neverland Ranch.
<br/><br/>
Where did we go wrong? The one key difference I can think of is that applets had the unfortunate requirement of needing to be loaded all at once. It's the "asynchronous"-ness of Ajax that's permitted it to evolve into the high-flying eagle of the Internet, while applets have sunk into the AWTar pit with the other dinosaurs.
<br/><br/>
Grumble. To quote the immortal Garth Algar: "We fear change."
<br/><br/>
<i>To be continued...</i>]]>

</content>
</entry>
<entry>
<title>Teamwork</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/davidrupp/archive/2005/04/teamwork.html" />
<modified>2008-01-02T17:42:16Z</modified>
<issued>2005-04-13T05:51:06Z</issued>
<id>tag:weblogs.java.net,2005:/blog/davidrupp/171.2299</id>
<created>2005-04-13T05:51:06Z</created>
<summary type="text/plain">The symbiosis of mind and machine.</summary>
<author>
<name>davidrupp</name>

<email>david@ruppconsulting.com</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/davidrupp/">
<![CDATA[<p>I recently ran across <a href="http://en.wikipedia.org/wiki/Advanced_Chess">this article</a> on the Wikipedia. It's about the game of Advanced Chess, said to have been invented by the Grandmaster Garry Kasparov. The game is still chess, but it is played in teams; each team consists of a human partnered with a chess-playing computer program, playing against another team of like composition. This is a twist on the usual scenario, in which a human is pitted against a computer program to see which is the better chess player.</p>
<p>Computer programs for playing chess have long been a subject of research in the field of Artificial Intelligence. Quality strategies and algorithms for automated chess playing are rightly seen as a hallmark of programming prowess and computational ability, since a brute force approach, while technically feasible now more than ever, can still be overcome by a sufficiently skilled human player. </p>
<p>Advanced Chess aims to combine the best of both worlds -- the sheer computational ability of the computer providing an exhaustive analysis of the quality of individual moves, and the innate strategic and reasoning ability of the human mind providing the guidance and overarching tactical selection of moves. Oddly, it seems that this combination creates a symbiosis that results in a team that plays better chess than either of its component members. According to the article, human players that are stronger than their teammate-program get stronger still. Human players that are weaker than their teammate-program <b>end up playing better than the program would on its own</b>.</p>
<p>This is a fascinating subject in its own right, but it also raises interesting questions of what exactly we're trying to accomplish with our use of computers in the enterprise. I think we tend to use the computer more as a slave than as a partner. What if we approached the development of web applications (or applications in general) as the development of "brain partners", facilitators that could be designed to augment the natural inner workings of our brains, shoring up the weaker areas and playing to our strengths? What would be a natural way of expressing such programs that would take advantage of the strengths of both sides?</p>
<p>We already do this, in some problem domains. Modern-day weather forecasting relies on sophisticated computer simulation of the elements that shape our climates. Stock traders use similar analytical tools that help inform their decisions of when and what to sell. Military fighter pilots as we know them today could not function without GPS and HUD and other computer-intensive aids.</p>
<p>What about our Java apps (had to work in a Java reference in here somewhere)? Do they facilitate, or do they impede? How can we make them do a better job of partnering? Is Java even a good language for the task? What about the alternatives like Python and Ruby? Is any existing computer language up to the task?</p>
<p>
Enquiring minds want to know...
</p>]]>

</content>
</entry>
<entry>
<title>Test Driven Learning</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/davidrupp/archive/2005/03/test_driven_lea.html" />
<modified>2008-01-02T17:42:16Z</modified>
<issued>2005-03-31T06:15:47Z</issued>
<id>tag:weblogs.java.net,2005:/blog/davidrupp/171.2230</id>
<created>2005-03-31T06:15:47Z</created>
<summary type="text/plain">A good idea in any language is still a good idea.</summary>
<author>
<name>davidrupp</name>

<email>david@ruppconsulting.com</email>
</author>
<dc:subject>Community: Global Education and Learning Community</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/davidrupp/">
<![CDATA[<p>Mike Clark is on to something. If you know Mike, this won't come as a surprise to you. If you don't know Mike, you should start reading <a href="http://www.clarkware.com/cgi/blosxom">his blog</a>, and <a href="http://www.clarkware.com/cgi/blosxom/2005/03/18#RLT1">this entry</a> in particular. Go ahead and take a look at it now. I'll wait.
</p><p></p>
<p>Yes, I know he's talking about <a href="http://www.ruby-lang.org">Ruby</a>, as well as unit testing, two topics that are pretty much guaranteed to raise the ire of some of the regulars on this site. After all, we're supposed to be about Java right? Java, Java, Java! And Unit Testing? Please. That is <i>sooo</i> 2003!
</p><p></p>
<p>Well, it seems to me that the technique Mike is using to learn Ruby could be applied to any language, including Java. You might even call it "Test Driven Learning", if it weren't for the unfortunate fact that the phrase "Test Driven" in front of anything is sure to send the zealots (pro and anti) into a fruitless frenzy of name-calling and acrimony. And it's not really about unit testing; it just happens that Ruby has a built-in unit testing framework that makes it easy to setup and run these kinds of tests.
</p><p></p>
<p>The principle behind all of this is very similar to "Exploration Tests", an idea that Stuart Halloway has been talking about for a few years now. Exploration tests aren't meant to be as robust or foolproof as unit tests. In a way, they're complementary -- they don't tell you what to expect in the future, they tell you what you've already learned (or are in the process of learning). They don't tell you how the system should behave, they tell you how it does behave. 
<p></p>
Most importantly, they give you a way to learn the way your brain is built to learn, by experimentation. For more (and better) information on this topic, take a look at <a href="http://headrush.typepad.com">Kathy Sierra's blog</a>, and particularly <a href="http://headrush.typepad.com/creating_passionate_users/2005/03/motivated_to_le.html">this post</a> about just-in-time learning versus just-in-case learning.
</p><p></p>
<p>This technique is the moral equivalent of hauling out your chemistry set and mixing chemicals together at random, just to see what happens. Or focusing your magnifying glass on that pile of dead leaves. Or adjusting the angle of the ramp to see if it helps you jump your bicycle over your brother, your sister, <i>and</i> three of your friends. [P.S.: Yes, these are actual childhood experiences. No, I am not necessarily proud of them. I blame my parents for giving me too much unstructured time.]
</p><p></p>
So take a little time to think of some ways you can express some knowledge and/or curiosity about Java in the form of a test. Think of an API you're not quite sure about and go make yourself sure about it. And know that you'll be able to save that snippet of knowledge so you can come back to it later and verify it at will. Now that's an activity worth investing some time and effort into.</p> ]]>

</content>
</entry>
<entry>
<title>Mr. Blogger&apos;s Neighborhood</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/davidrupp/archive/2004/12/mr_bloggers_nei.html" />
<modified>2008-01-02T17:42:16Z</modified>
<issued>2004-12-31T23:22:21Z</issued>
<id>tag:weblogs.java.net,2004:/blog/davidrupp/171.1889</id>
<created>2004-12-31T23:22:21Z</created>
<summary type="text/plain">It&apos;s a beautiful day...</summary>
<author>
<name>davidrupp</name>

<email>david@ruppconsulting.com</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/davidrupp/">
<![CDATA[<i>
It's a newbie-full day in the blogosphere,<br>
A newbie-full day for a blogger,<br>
Here's a new blog.<br>
Read my new blog.<br>
<br>
It's a blogger-y day in this newbie-sphere,<br>
A blogger-y day for a newbie.<br>
Click my trackback,<br>
Check my feedback.<br>
<br>
I have always wanted to be a blogger<br>
Just like you.<br>
I've always wanted to play in the blogosphere<br>
With you, <br>
So...<br>
<br>
Let's make the most of this RSS thing,<br>
Let's find some new aggregators to ping.<br>
Blogging's so neat,<br>
Thus I repeat:<br>
Let me be your blogger.<br>
<br>
</i>
Hello, boys and girls, and welcome to Mr. Blogger's neighborhood. I think you'll like it here. It's a whimsical place, full of rants, musings, and random nothingness. Why, people who live here can say pretty much anything they want, any time they want, without fear of reprisal! Can you say "fear of reprisal"? I thought you could.<br>
<br>
<i>
[knock, knock]
</i><br>
<br>
Oh my, I think there's someone at the door. Let's see who it is, shall we? Okay.<br>
<br>
<i>
[sound of door opening]
</i><br>
<br>
Why look, it's Mr. McBiley, the neighborhood curmudgeon. He's a perfect example of the unregulated freedom we have here in Mr. Blogger's neighborhood. Do you have a blog to share with us today, Mr. McBiley?<br>
<br>
<b>Mr. McBiley:</b><i> #@!$ you, you #@!$ing w#nker #@!$squatting #@!$bending #@!$milking #@!$tardwearing #@!$burglar...<br>
<br>
</i>
<i>
[sound of door slamming]
</i><br>
<br>
Whoa-ho-ho! Mr. McBiley's in rare form today, wouldn't you say, boys and girls? Can you say "#@!$tardwearing"? I thought you could. Mercy. Mr. Blogger can only take so much of Mr. McBiley in one day.<br>
<br>
What do you say we take the magic Segway on over to the neighborhood of F.U.D. to wash the conceptual taste of Mr. McBiley's fully-sanctioned, constitutionally-protected foulness out of our collective metaphorical mouths, shall we? Can you say "collective metaphorical mouths"? I thought you could.<br>
<br>
<i>
[ding, ding; ding, ding]
</i><br>
<br>
Well, boys and girls, here we are in the neighborhood of F.U.D., where bloggers who have some expertise in a technical area get to act like that expertise translates into the realms of politics, economics, and social planning! Let's all point our collective aggregators over this way, shall we?<br>
<br>
<b>Blogger One:</b><i> As you know, Blogger Two, because I have some expertise in writing large-scale, service-aspected, distributed-transactional J2EE hoozy-widgets, I feel perfectly comfortable spouting off about how President Bush couldn't policy-make his way out of a boot if he were stuck at the bottom of the boot and he told his advisers to read the instructions for policy-making to him that were written on the heel of the boot. Ya know?</i><br>
<br>
<b>Blogger Two:</b><i> true dat blogger one and wh@t's up w1th th3 w@y h3 t@lkz huh whut a idi0t</i><br>
<br>
<b>Blogger One:</b><i> Ha, ha! You're such a #@!$tard, Blogger Two. Woot!<br>
</i>
<br>
Well, boys and girls, Mr. Blogger is getting a little tired and needs to point his aggregator back to his own home page. Be sure to come back soon so we can whimsically muse a little, rant some more, and randomly say nothing.<br>
<br>
Woot!]]>

</content>
</entry>
<entry>
<title>Code Generation</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/davidrupp/archive/2004/11/code_generation_1.html" />
<modified>2008-01-02T17:42:16Z</modified>
<issued>2004-11-16T01:34:15Z</issued>
<id>tag:weblogs.java.net,2004:/blog/davidrupp/171.1733</id>
<created>2004-11-16T01:34:15Z</created>
<summary type="text/plain">Friend or foe?</summary>
<author>
<name>davidrupp</name>

<email>david@ruppconsulting.com</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/davidrupp/">
<![CDATA[At the <a href='http://www.nofluffjuststuff.com/2004-11-denver/index.jsp'>Rocky Mountain Software Symposium</a> this past weekend, a few of the presenters took the time to gauge audience reaction to their topics by asking questions like, "What do you think of this?", and "What's keeping you from using <i>[insert technology name here]</i>?". In the case of technologies like <a href='http://www.hibernate.org/'>Hibernate</a> and <a href='http://www.eclipse.org/aspectj/'>AOP/AspectJ</a>, the answer was usually something like, "We think it's cool, but we're worried that it does code generation. How do we know we can trust the generated code?"
<br/><br/>
I always chuckle a little when this question comes up. Don't get me wrong -- I think it can be a legitimate concern, particularly if the code-generating product is new or naively implemented. But it makes me think about how much we programmers take for granted today.
<br/><br/>
For example, I think we have lost sight of the fact that "generated code" is pretty much all that computers deal with, not the precious original source we tinker with in our fancy IDEs. As much as we like to anthropomorphize our computers (with the interesting corollary that we "theomorphize" ourselves; but that's a subject for another blog), they don't really know or care about the language/platform/paradigm silliness we humans engage in.
<br/><br/>
Here's what's not happening inside your computer:
<br/><br/>
<b>Your code:</b>
<br/><code>public class MyIncredibleClass implements Runnable {
<br/>&nbsp;&nbsp;public void run() { 
<br/>&nbsp;&nbsp;&nbsp;&nbsp;try { 
<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;doSomethingBrilliant(); 
<br/>&nbsp;&nbsp;&nbsp;&nbsp;} catch (UnthinkableException neverGonnaHappen) { 
<br/>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;respondAuthoritativelyAnyway(); 
<br/>&nbsp;&nbsp;&nbsp;&nbsp;} 
<br/>&nbsp;&nbsp;} 
<br/>&nbsp;&nbsp;// etc.
<br/>}</code>
<br/><br/>
<b>Your computer:</b> <i>(sounding like Helen Hunt; your internal celebrity voice may vary) Oooh, a classic implementation of the Worker pattern. With robust exception handling! I like the way you think, Mister. Tell me more! Ohhhhh, yes. YES!</i>
<br/><br/>
Here's what's really happening:
<br/><br/>
<b>Your code:</b> <i>(see above)</i>
<br/><br/>
<b>Your computer:</b> <i>(sounding pretty much like your toaster) <code>blah, blah, blah; L R1,$1000; SLL R1,2; ST R1,$1000; NOP; NOP; NOP; blah, blah, blah,...</code></i>
<br/><br/>
So, if you're not writing NextKillerApp v0.0.1a003 in straight assembler language, you can be assured that some generation/augmentation/translation is happening betwixt your app's source code and wherever it ends up running. Nobody sits at the Rocky Mountain Software Symposium thinking, "Geez that javac tool is cool and all, but..." Because we take these things for granted. 
<br/><br/>
Here's the deal -- if you use:
<br/><br/>
<li>a compiler</li>
<li>a pre-processor</li>
<li>any "high-level" language</li>
<li>a third-party library</li>
<li>EJB</li>
<li>RMI</li>
<li>JSP</li>
<li>dynamic proxies</li>
<li>lots of other stuff</li>
<br/><br/>
you're taking advantage of -- nay, actively relying on -- code generation. And these are, for the most part, tools that we have no control over. If MajorCorporateBrandTool introduces a bug when it's decorating your code, what can you do about it? Open a problem ticket with MajorCorporation and argue with them for a month about whose fault it really is? Then sit back and wait six more months for the next service pack to be released? Blech.
<br/><br/>
So I say let's cut code generation some conceptual slack. Take some time to get familiar with Hibernate and AOP. Figure out how they work and what kind of code they're likely to generate. Here's a good one -- <b>read the source code</b>. Can't do that with MajorCorporateBrandTool.
<br/><br/>
Now, if you'll excuse me, I need to get back to Helen...]]>

</content>
</entry>
<entry>
<title>Starting Over</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/davidrupp/archive/2004/10/starting_over_1.html" />
<modified>2008-01-02T17:42:16Z</modified>
<issued>2004-10-29T22:03:03Z</issued>
<id>tag:weblogs.java.net,2004:/blog/davidrupp/171.1697</id>
<created>2004-10-29T22:03:03Z</created>
<summary type="text/plain">Moving from mainframe assembler language to Java.</summary>
<author>
<name>davidrupp</name>

<email>david@ruppconsulting.com</email>
</author>
<dc:subject>Community: Global Education and Learning Community</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/davidrupp/">
<![CDATA[<strong>Me</strong>: <i>Hi, my name is David, and I've been a professional Java programmer for four years.</i><br/>
<strong>Everyone</strong>: <i>Hi, David.</i><br/>
<br/>
Yes, it was just a little over four years ago that I made the jump from the legacy mainframe world into the magical world of Java and the Internet. Prior to the summer of 2000, I spent practically my entire career writing programs for the airline reservation industry, using a dialect of IBM System 360/370 Assembler Language called TPF (Transaction Processing Facility). TPF (originally called ACP, for "Airline Control Program") is an IBM proprietary operating system designed specifically to meet the needs of the airline reservation industry for a highly-available (&gt; 99.99%), high-throughput (&gt; 3000 msgs/second), low response-time (&lt; 3 seconds) system. There have been C and C++ compilers available for some time now, but development still mostly happens in assembler, for speed of execution.
<br/>
<br/>
[Note: There is no need to flame me personally about what a Bad Idea this is. Trust me -- I know. But I didn't know until I escaped this insular world. There is forty years of religion and inertia behind this tradition. You want to fight that battle, go right ahead. I tried for a while, without success. See Robert Heinlein's quote (via Lazarus Long) about teaching a pig to sing.]
<br/>
<br/>
Exactly how I escaped is a story for another time. What I'm trying to do now is to go back and rescue my buddies from the Programming Land That Time Forgot. These people are very bright, and very good at what they do; unfortunately, thanks to the grim economic outlook for United Airlines, they may not get to do it for much longer. And there isn't a market for their exact skill set on the outside. Oh, they might be able to relocate and work for one of the other shops around the country that do this kind of thing, but they don't really want to leave Denver. Can't say I blame them. Besides, those other shops are hurting too. No point in relocating your family from one frying pan into another frying pan. Or worse.
<br/>
<br/>
So I'm asking for your help. If you knew someone in a similar position, someone who was looking to make a career shift from a legacy (say, COBOL) world into Java, how would you advise that someone to go about it? What is the market like these days for senior-level programmers who would be entry-level Java programmers? Any thoughts on strategies for learning the language, coming from a just-one-step-up-from-the-opcode perspective? Keep in mind that most of them will be learning objects for the first time, not just Java syntax.
<br/>
<br/>
I know it's a free blogosphere and all, but I'd appreciate it if you could keep your comments positive. I've heard the "Java is the COBOL of the 90's" joke; even laughed at it the first couple of times. It's not funny any more.
<br/><br/>
TIAFYH.]]>

</content>
</entry>
<entry>
<title>IBM Web Tools Platform for Eclipse</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/davidrupp/archive/2004/09/ibm_web_tools_p.html" />
<modified>2008-01-02T17:42:16Z</modified>
<issued>2004-09-03T16:56:00Z</issued>
<id>tag:weblogs.java.net,2004:/blog/davidrupp/171.666</id>
<created>2004-09-03T16:56:00Z</created>
<summary type="text/plain">In which Our Hero installs the WTP initial contribution on his PowerBook, and learns a thing or two in the process.</summary>
<author>
<name>davidrupp</name>

<email>david@ruppconsulting.com</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/davidrupp/">
<![CDATA[<p>
You gotta love IBM. First they open-source the Eclipse project. You can say what you like about SWT vs. AWT; in my book, Free + Open + Highly Functional == A Good Thing.
</p>
<p>
Then, just for fun, they unleash their <a href='http://www.eclipse.org/webtools'>Web Tools Platform</a> on an unsuspecting (yet hopefully appreciative) world. It seems unjust to call this thing a 'plugin' -- it's an uber-plugin. The main bundle is about 55MB, which is almost as big as the Eclipse 2.1 SDK release was. (Remember Eclipse 2? Ah, the good ol' days! ) Eclipse 3 isn't quite 90MB. So this is a massive contribution.
</p>
<p>
What do you get in exchange for tying up your bandwidth for a 50+ MB download? I was just looking for a good, free JSP syntax-coloring plugin. The WTP provides that and a whole lot more. See the above-referenced website for all the details. 
</p>
<p>
The <a href='http://www.eclipse.org/webtools/initial-contribution/IBM/Getting%20Started.html'>Getting Started document</a> will help you, well, get started. It has a full list of the plugins you'll need to install before installing the WTP. Installing any plugin to Eclipse is pretty easy -- unzip the plugin, copy everything from the 'features' directory into your Eclipse installation features directory, do the same for the 'plugins' directory, restart Eclipse, and you're good to go.
</p>
<p>
There is a small gotcha here -- Eclipse 3.0 caches plugin information to provide quicker startup. To make sure it picks up the new plugin(s), you need to start Eclipse with an argument of '-clean'; this tells Eclipse to flush its plugin cache and load everything fresh this time. This is detailed in section 2.2 of the Getting Started document. 
</p>
<p>
Here's a rare example of a thing that's more complicated on the Mac than it is in Windows. In Windows, you right-click on the Eclipse executable and add the '-clean' option to the command in the 'Target' input field. Apply your changes, run the executable, and you're done. Not so the Mac.
</p>
<p>
On the Macintosh, the executable (Eclipse.app) is really a package -- a bundle of executable and resources that's actually an integrated directory structure. This bundle structure is what makes it pretty easy to plop an application down anywhere on your filesystem and not have to worry about a central registry or any arbitrary restrictions on where executables can live. You can even move it around and be pretty sure of not breaking anything. Try <b>that</b> on a Windows machine!
</p>
<p>
So, in order to set the '-clean' option for Eclipse on the Mac, here's what you do:
<li>right-click (or ctrl-click) on the executable (Eclipse.app)</li>
<li>click on "Show Package Contents"</li>
<li>open the "Contents" folder</li>
<li>double-click on the file "Info.plist"; this will open the file in the Property List Editor application, by default</li>
<li>expand the "Root" node</li>
<li>expand the "Eclipse" node -- on my Mac, this gives me a list of 10 sub-nodes. YMMV.</li>
<li>click on the node right before the '-vmargs' node</li>
<li>click the "New Sibling" button at the top left</li>
<li>in the text input field, type in '-clean' (without the single quotes)</li>
<li>quit the Property List Editor application, saving your changes</li>
</p>
<p>
You can use this sequence to modify the command-line arguments to any Java executable on the Mac that's bundled as an application.
</p>
<p>
I'm posting this entry from a Windows machine, so I don't have access to screenshots at the moment. If anyone thinks it'd be helpful, I'll try to update later with some images.
</p>
]]>

</content>
</entry>
<entry>
<title>Safari, Web Services, and You</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/davidrupp/archive/2004/08/safari_web_serv.html" />
<modified>2008-01-02T17:42:16Z</modified>
<issued>2004-08-01T22:33:34Z</issued>
<id>tag:weblogs.java.net,2004:/blog/davidrupp/171.490</id>
<created>2004-08-01T22:33:34Z</created>
<summary type="text/plain">O&apos;Reilly&apos;s Safari Bookshelf (tm) now has a web services API.</summary>
<author>
<name>davidrupp</name>

<email>david@ruppconsulting.com</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/davidrupp/">
<![CDATA[<p>
Following in the cyber-footsteps of Amazon.com and Google, the good folks at <a href="http://safari.oreilly.com">safari.oreilly.com</a> have published a web services interface to their immensely useful bookshelf product. You don't even have to subscribe to the bookshelf to take part -- just sign up as an "Affiliate", provide some details about your site and how you intend to use the service, and two confirmation e-mails later you'll have a shiny new developer token and a fancy new API to play with.
</p>
<p>
The API is strictly RESTful (sorry, SOAP fans), so it's fairly easy on the eyes. The site is missing some important documentation as of this writing (e.g., a list of valid "metadata abbreviations" for making specific category queries), but the maintainers seem responsive and eager to please. There is a minimal set of examples to get you started.
</p>
<p>
The largest problem I can see so far? Not a single example is written in Java! Perl -- yes. PHP -- yes. VBScript -- yes. Java -- no. Sounds like a challenge to me. Who will accept?
</p>
<p>
The coolest thing about this for me is that I can finally write the app I've been hoping the Safari team would write for me -- a waitlist manager. You see, I try keep my bookshelf chock full, no empty slots. I always have a book I can remove, but I try not to until one comes along that I just have to read now. This app will help me track the books that I don't have to read today, but would like to keep in mind as a potential leisure read later.
</p>
<p>
What a great time to be a geek!
</p>]]>

</content>
</entry>
<entry>
<title>Public Speaking: A Geek&apos;s Handbook</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/davidrupp/archive/2004/07/public_speaking.html" />
<modified>2008-01-02T17:42:16Z</modified>
<issued>2004-07-26T07:54:48Z</issued>
<id>tag:weblogs.java.net,2004:/blog/davidrupp/171.193</id>
<created>2004-07-26T07:54:48Z</created>
<summary type="text/plain">Fear not the terror of the podium.</summary>
<author>
<name>davidrupp</name>

<email>david@ruppconsulting.com</email>
</author>

<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/davidrupp/">
<![CDATA[<p>
No, this is not the next great book in O'Reilly's excellent <a href="http://devnotebooks.oreilly.com">Developer's Notebook series</a>. Unfortunately for me. Nevertheless, public speaking is a topic that we geeks tend to avoid, given half a chance, even though it can at times be a significant part of our job function. Think about it: have you ever been asked to give a presentation at a team meeting? Ever had to lead a design/code review? Did the prospect thrill you, or did it reduce you to a gibbering mass of fear?
</p>
<p>
Jerry Seinfeld talks in his stand-up routine about a survey that claims the number one fear of Americans is "public speaking". Number two is "death". His conclusion is that at a funeral, more people would rather be in the casket than delivering the eulogy. He may be right. I've seen perfectly normal human beings, people who can laugh and crack jokes and speak in full sentences at, say, lunch time, turn into stammering sweat-machines when standing in front of a group of people talking about their latest project.
</p>
<p>
It doesn't have to be this way. With a little practice, you too can stand proudly at the podium while delivering that eulogy, not crawl into the casket. Unless your presentation totally bombs, in which case be my guest.
</p>
<p>
Here's a small sampling of tips that can help you on your journey from Gibbering Mass to Zen Speaking Master:
</p>
<p>
<b>1. Take a class.</b>
</p>
<p>
Your local community college probably offers a class or two in public speaking. An "Intro to Acting" type of course would give you a solid grounding in the elements of stage presence. For those who can't make that kind of time commitment, another good resource is <a href="http://www.toastmasters.org">Toastmasters International</a>. Lots of companies sponsor (or at least tolerate) Toastmasters clubs. If yours does, you can lunch-hour your way to a happier, less-sweaty, public-speaking you.
</p>
<p>
<b>2. Organize your thoughts.</b>
</p>
<p>
Think of your presentation as a little five-minute story -- give it a beginning, a middle, and an end. Jot down an outline of the key points. You don't have to (nor should you) write down the entire text of your presentation, to be read verbatim when the time comes. Chances are you're developing some slides to display -- if so, they can serve as your outline. However...
</p>
<p>
<b>3. Never, <i>ever</i> simply read your slides bullet-for-bullet.</b>
</p>
<p>
Ever. The medium is not the message. Your slides should be for us what they were for you -- an outline, providing enough visual cues to help us keep track of where you are in your talk. Here's another way to think of it -- you went through all the trouble to write those slides -- let us go through the trouble of reading them. <i>Then</i> you can show us how brilliant you are by amplifying on them.
</p>
<p>
Speaking of slides -- have someone proof-read your slides. This does not mean run spell-check in PowerPoint. It means get a living, breathing human being to read them, preferably that obnoxious guy in your office who grades all the memos that come across his desk. In red pen. (In my office, that obnoxious guy would be me). Trust me, you'd rather suffer his (relatively) private ridicule than broadcast your typos, misspellings, and questionable grammar to the Board of Directors.
</p>
<p>
<b>4. Pretend to be someone else.</b>
</p>
<p>
Sounds silly, I know, but it's surprisingly effective. I have a friend who will not sing a solo at our church, but when I cast him as Linus in "You're a Good Man, Charlie Brown" he was turning cartwheels and waltzing with a blanket. Oh, and singing solo. Any kind of performing can be less threatening if it's "not really you" up there.
</p>
<p>
<b>5. Observe other speakers.</b>
</p>
<p>
Learn good technique from people who practice good technique. One of the best places I've found to do this is at a <a href="http://www.nofluffjuststuff.com">No Fluff, Just Stuff</a> Software Symposium. I'm always impressed (with some minor exceptions) with just how good these uber-geeks are at speaking. And yet they're geeks! So you know it can be done.
</p>
<p>
Now get out there and do it!
</p>]]>

</content>
</entry>
<entry>
<title>Everything I Need to Know About EJB...</title>
<link rel="alternate" type="text/html" href="http://weblogs.java.net/blog/davidrupp/archive/2004/07/everything_i_ne.html" />
<modified>2008-01-02T17:42:16Z</modified>
<issued>2004-07-19T18:57:20Z</issued>
<id>tag:weblogs.java.net,2004:/blog/davidrupp/171.672</id>
<created>2004-07-19T18:57:20Z</created>
<summary type="text/plain">A light-hearted alternative to a heavyweight metaphor.</summary>
<author>
<name>davidrupp</name>

<email>david@ruppconsulting.com</email>
</author>
<dc:subject>J2EE</dc:subject>
<content type="text/html" mode="escaped" xml:lang="en" xml:base="http://weblogs.java.net/blog/davidrupp/">
<![CDATA[<p><b>Everything I need to know about EJB I learned from watching Bugs Bunny.</b></p>

<p>In keeping with recent developments in the Java article-writing space, here's my take on a folksy, hyper-extended, EJB-tweaking metaphor (thanks to Bruce Tate and his <a href=http://today.java.net/pub/a/today/2004/06/15/ejb3.html>People of the Elephant</a> for the inspiration; I hope the rumors of a major movie deal all turn out to be true).</p>

<p>When I was a kid, the local network affiliate aired "The Bugs Bunny/Road Runner show" for <i>three whole hours</i> every Saturday morning. I would no sooner miss a minute of this show than I would donate half of my Halloween candy to my brother. Of course, it meant having to get up at the ungodly hour of 7:30 to get ready, but this was <i>Bugs Bunny</i>. No sacrifice was too great. Getting ready consisted mostly of showering hastily, dressing sloppily, pouring my first bowl of over-sugared, turn-the-milk-chocolate cereal (adding sugar as necessary), and staking out my territory in front of the TV.</p>

<p>Then, at 8:00, it happened: that wonderful theme song ("Overture, dim the lights, ..."), followed by the first of dozens of cartoons that I could pretty much recite from memory. If I'd had any artistic talent whatsoever, I probably could have drawn out detailed storyboards as well. Now that I'm a parent, I look back on this time in my life with appalled fascination and wonder what (if anything) my parents were thinking by permitting this weekly ritual that had no redeeming value whatsoever.</p>

<p>And yet, having made the deliberate effort to relate this particular childhood experience to EJB programming (don't try this at home), I think a case could be made that it did have some redeeming value. As it turns out, I <i>did</i> learn a few things from watching Bugs, Daffy, and friends. To wit:</p>

<p><b>1. Leave the singing frog alone.</b></p>

<p>You remember this one: man finds frog, frog starts singing, man sees dollar signs, frog stops singing whenever anyone else is around, man doesn't give up, man's life is ruined. All this without a single word of dialogue (except the frog's singing, which is actually pretty good). Ever feel like EJB is singing a song that no one else can hear?</p>

<p>Even if they could hear it, consider this:</p>

<p><b>2. The Road Runner is probably not worth the effort.</b></p>

<p>Poor Wile E. Coyote. Endlessly resourceful, ever in hot pursuit, yet he never manages to catch the darn bird. But what if he did? Would the sustenance he received from that scrawny framework (er, "frame") justify the expenditure of energy required to achieve it?</p>

<p>And, speaking of good ol' Wile E.:</p>

<p><b>3. ACME = CRAP.</b></p>

<p>Wile E. Coyote must have had really good credit (or a sizable trust fund). Rocket-powered skates, flying batsuit, instant holes; all supplied by ACME, all consistently and hilariously ineffective. Mostly they ended up getting W.E.C. folded, spindled, mutilated, blown up, or crushed by something heavy. Further proof that vendor lock-in can be A Bad Thing.</p>

<p><b>4. An umbrella provides very little protection from falling anvils.</b></p>

<p>Those anvils (boulders were also popular) had the Road Runner's name written all over them, but it was always W.E.C. left standing squarely in their rapidly spreading shadows, with nothing but a spindly umbrella to keep him from being turned into a walking accordion. All that heavy equipment changes from asset to liability at the speed of gravity when something goes wrong.</p>

<p>And, finally, one of my favorite Daffy Duck quotes:</p>

<p><b>5. Consequences, schmonsequences, as long as I'm rich.</b></p>

<p>This is from "Ali Baba Bunny", wherein Daffy, along with Bugs, finds a cave of treasure, including the requisite genie in a lamp. Daffy (in typical Daffy fashion) screws up and incurs the wrath of the genie, who threatens to make him "pay the consequences". The above is Daffy's reply. And it costs him. The lesson here: before you set the genie free, make sure you can keep him happy...</p>

<p>Tune in next week, when we attempt to extend this metaphor even further (and risk a lifelong ban from publishing) by attributing deep significance to the weekly antics of "Hong Kong Phooey" and "Scooby Doo".</p>]]>

</content>
</entry>

</feed>