Program like a Shaker
Simple Gifts
The Shakers were known for their design principles that featured simplicity and utility. Their furniture is not ornate and yet it is beautiful, elegant, and enduring. Because the function of an object is not compromised by unnecessary add-ons, it is easy to see the purpose for which a given object is intended.
In today's Weblogs, Tom Ball blogs 'Tis a Gift to be Simple. Tom describes a coding episode where he pulled complicated code apart to isolate classes to be more easily tested. The next thing he knew the code itself was more communicative and simple. What caught my eye was the following paragraph in Tom's blog entry:
Some engineers pride themselves on writing complex, hard-to-understand code, and sneer at simple code as being "obvious". I believe that writing simple code requires extra work and discipline, but that work is justified by the code's quality, ease of testing and comprehension by my co-workers. When a design gets refactored to the point where it is "obvious", it means that it's time to move to other areas which are not so clear.
I spent some time this weekend unraveling Java code written by a C programmer who is self-taught in Java. What the code did was pretty cool and he used some Java constructs in fairly interesting, mature, and clever ways. But the entire application consisted of one source file containing three classes. The first class implemented five interfaces which had little to do with each other. I'm not criticizing his design - I'm just agreeing with Tom's post embracing simplicity.
In other weblogs posts, Joerg Plewe writes about Functional Ant saying "Typical Ant projects are designed to deliver a single jar as a result. One has to know how the name of the jar and the place it is stored. But Ant can also be used in a more functional style 'returning' a rich set of results on a target invocation."
In Also in Java Today , the JDK comes with the command-line profiling tool HPROF. Kelly O'Hair takes you through many of the options as well as through a sample session in HPROF: A Heap/CPU Profiling Tool in J2SE 5.0 . He writes "HPROF is capable of presenting CPU usage, heap allocation statistics, and monitor contention profiles. In addition, it can also report complete heap dumps and states of all the monitors and threads in the Java virtual machine."
The ONJava Reader Survey is underway and available for a limited time. The accompanying article Writing Your ONJava Wish List discusses how the results from the survey are amassed, considered, and used to help determine the future editorial direction of the site. As an added incentive, five randomly-selected participants will win three O'Reilly books each.
In Projects and Communities, members of the Java Games Community, Nokia and Hong Kong-based SmartTone are pairing to create the recent announcement first commerical online mobile Java gaming community, delivering rich mobile Java games with community features like friend lists and instant messaging.
From the Mac Java Community page: The Apple Developer Connection article Optimizing Your Application With Shark 4 shows how to use Apple's "Shark" developer tool to profile running Java applications, including a sample with deliberately mis-coded hotspots for you to find.
KirillCool observes that Java has no systematically based and tested mathematical packages in today's Forums. " The majority of the scientific community write in C++, MatLab and (believe it or not) Fortran . The later one has such an extensive algorithmic database, that most of the modern algorithms are based on this code (using an equivalent of JNI to access it). Try to write a sparse-matrix linear equation solver in Java - it doesn't even has a sparse matrix package. Well, for this matter it doesn't even have a dense matrix package."
PeterKessler comments on the Mustang Roadmap. " There's a funny distinction between code -- which we do release -- and plans for code -- which we are reluctant to discuss. I'll see if I can pry loose some rough schedule so you can plan your own work. You might even find some holes in what we've planned, and step in to fill the gaps."
In today's java.net News Headlines :
- Apache Cocoon 2.1.6
- Commons HttpClient 3.0 beta1
- EditiX 2.1
- Flow4J-Eclipse 0.9.3
- NailGun First Public Release
- LIMO 0.5
Registered users can submit news items for the 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 :
- November 27 Hong Kong JUG - J2SE 5.0 Update
- December 6-9, 2004 TheServerSide Enterprise Java Architecture Workshop
- December 7-8, 2004 Eighth Jini Community Meeting
- December 13-17, 2004 JavaPolis, 2004
Registered users can submit event listings for the java.net Events Page using our 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 java.net Archive.
Simple Gifts- Login or register to post comments
- Printer-friendly version
- daniel's blog
- 523 reads





