Skip to main content

Cooking lessons

Posted by daniel on August 13, 2004 at 10:13 AM PDT

Thank you Julia

Julia Child died earlier today. In addition to writing many wonderful cookbooks, the CNN obituary says "She was 51 when she made her television debut as "The French Chef." The series began in 1963 and continued for 206 episodes. Child won a Peabody award in 1965 and an Emmy in 1966, and went on to star in several more series for Boston's WGBH-TV."

Warning - this may feel tangential, but for me this has a lot to do with programming, Java, and the things we do daily. Skip below the next horizontal line if you feel your eyes rolling back in your head. Much of what informs how we do our daily job comes from other places. It's part of the "how we do anything is how we do everything" idea. In any case, from the many relevant thoughts, I would like to take two.

First, Child made her television debut at 51. She lived and worked another forty years. Are you thinking in terms of that time frame? What is your passion? What is it you would really like to be doing? For me, there are three apps and two books that I really want to write. I look up at the end of each day and think, "wow, that went by really quickly". Child reminded me that there's no rush. I can continue to enjoy what I'm doing now and that there will be time to do more later on.

But what I really learned from Julia Child was to show wrong turns and mistakes and how to fix things. She was an excellent teacher. She would show you what a dish looked like if it wasn't quite right and how to tell. I recently wrote a Java tech tip on threading where I showed how to ensure that the GUI remained responsive. Child taught me to motivate the solution with an example that showed how the GUI can easily be locked up. There is a move to teach Design Patterns earlier in the curriculum. I wonder about teaching students how to use these patterns to avoid problem areas that they have not yet encountered.

I never watched much Martha Stewart. I may be remembering wrong, but it seems to me that everything she did on her show came out right in ways that made me think "I could never do that". With Julia Child, if a cake didn't come out quite right she would show how to mask the problem with frosting. If that didn't quite cover it, then she had some other technique like sprinkling cake crumbs. Like the best developers Child believed in keeping things simple. She would freely show her techniques. She worked with others and acknowledged their contributions. If Stewart made a cake, the implication seemed to be that it was from wheat that she had grown, harvested, and milled herself.

Ok - here's the stretch. With Perl and C you can be too clever. When a really good Perl hacker shows me some snippet, I feel as if I'm watching Martha Stewart. Sure, we've all done some really clever bit of hacking that made us proud. I did an Obj-C application where I read the alt-text of a button in as a string and called a method with that name. It allowed a button to have a + sign on it with an alternate name plus which could be used to call a method with the name plus. Then the same button handler could be used to handle all of the basic arithmetic operations with no if. It was nice, and I love coding in Obj-C, but working with a good Java developer makes me feel like I'm watching Julia Child. "Oh, we don't have dynamic typing so we have to apply a little frosting to enable you to call the method you want."


In today's Weblogs,
James Gosling writes about provenance. "This usually refers to the history (particularly of ownership) of an object. Wouldn't it be cool if file formats of all kinds had provisions for recording the provenance of a file? For example, wouldn't be cool if the EXIF header standard for JPEG (and other) files had a place for historical information? So that Photoshop and other imaging applications could record and least a summary of what was done to the file? "


In
Also in Java Today
, in Web Services Integration Patterns, Part 2, Massimiliano Bigatti continues his catalog of design patterns as adapted to the web services domain. Three of the five patterns involve logging, going from convenient logging of the data flow to a database (for ease of inspection later), to a state logger that allows the service to skip over steps that were successfully performed in earlier invocations.

Apple's WebObjects seems to be the forgotten enterprise Application development and server environment. In Applying Digital Hub to Enterprise design, Adam Behringer
shows how WebObjects " can be used to handle the conversions from database to XML to database so that any applications or scripts that can parse XML can participate in the system."


Do you
Favor the use of standard exceptions
? In today's Forums Hlovat writes "I often find it useful to extend a standard exception to give the exception a better (more descriptive) name and to also provide conveniance constructors. But I do find that using the standard exception as the base is useful,[..] So I don't quite agree with Item 42, what is your experience?"

Ashley Herring writes that even Sun does not Adhere to generally accepted naming conventions. "The Sun push for standard naming conventions will always smacks of hypocracy until they practice what they preach. Take a look at the variety of naming conventions in use within the Java libraries and you'll see what I mean.... List.iterator(); // why not List.getIterator()??"

The thread continues on Optimizing judiciously. Archangel writes "If someone points out an obvious inefficiency in my code I say 'Oh, I know; I'm going to come back to that and optimize it later if I need to.' [..] I think there is a difference between optimization and writing software using good practices. "


In Projects and Communities, you can now read the transcript for the Java Live chat Java Web Services Developer Pack (Java WSDP) 1.4.

The JavaDesktop community homepage points to David Shay's wish list of things he'd like to see from Swing.


In today's java.net News Headlines
:

Registered users can submit news items for the href="http://today.java.net/today/news/">java.net News Page using
our news submission
form
. All submissions go through an editorial review before being posted to the site. You can also subscribe to
thejava.net
News RSS feed
.


Current and upcoming
Java Events
:

Registered users can submit event listings for the href="http://www.java.net/events">java.net Events Page using our href="http://today.java.net/cs/user/create/e"> events submission
form. All submissions go through an editorial review before being
posted to the site.


Archives and Subscriptions: This blog is delivered weekdays as the
Java
Today RSS feed
. Also, once this page
is no longer featured as the front page of
java.net
it will be archived along with other past issues in the href="http://today.java.net/today/archive/">java.net Archive.