Skip to main content

Why fix invisible code?

Posted by daniel on March 21, 2005 at 6:56 AM PST

Advantages of only shipping binaries

Have you ever been in a house that looks really neat and clean
until you open a drawer? In order to get the outside appearance so
nice, the people straightening up shoved papers and clothes and items
anywhere - just so that they were out of sight. Maybe, suggests Frank
Sommers, that's the problem with source code. "Almost nothing you work
on ever leaves your development environment or the close confines of
your development team." As much as we argue for cleaning up the code
base, the visitors to our binary code never look at the clumsy
variable names and magic numbers and overly coupled code. They see a
clean UI and figure everything is right.

In Also
in Java Today
, Frank writes that unlike artisans in
other areas, we do not deliver what we do. In href="http://www.artima.com/forums/flat.jsp?forum=106&thread=96154">The
Code Quality Myth he writes that musicians deliver the music they
produce but computer programmers deliver binaries and not code. This
means that "few people outside your close team members ever care about
the quality of that source code. And most compilers don't care about
source code quality, either - how you name your variables, how long
and clean your methods are, the clarity of your object model, or even
the algorithms you use, are of little interest to the compiler that
can happily create an equivalent binary from ugly or pretty code."

Lorenzo Puccetti says that code reuse has reached a critical
juncture: "what we need now is a tool that blends separately developed
components into a well-crafted finished product; a tool that protects
major subsystems of the architecture from each other." In href="http://www.onjava.com/pub/a/onjava/2005/03/16/seppia.html">Building
Modular Applications with Seppia, he introduces Seppia, an open
source project that lets you build applications from existing
jar-based collections of java code, stitching the pieces together with
JavaScript.


In today's Weblogs ,
Inderjeet Singh posts about href="http://weblogs.java.net/blog/inder/archive/2005/03/pulsating_led_o.html">
Pulsating LED on a Powerbook: A case of UI Effects Gone
Overboard. He writes " Apple is usually really good at design and
UI effects. In this blog, I discuss a UI effect in powerbooks that may
be a case of bad design, and talk about some lessons that I learnt in
UI design."


In Projects and
Communities
, The java.net href="http://community.java.net/linux/">Java Linux community
homepage has been relaunched. The left column is full of resources
including links to active projects, books and articles, distributions,
JVMs, and development tools.

How do Generics alter the implementation of some of the classic
GoF patterns? Java
Patterns
members should read Hugo Troche's article href="http://www.developerdotstar.com/mag/articles/troche_factorychain.html">
Factory Chain: A Design Pattern for Factories with Generics.


Peter Kessler has some helpful information about Math and the Hotspot VM in today's href="http://forums.java.net/jive/index.jspa">Forums. "The Sun
HotSpot virtual machine starts out interpreting things, and only
compiles to native code if a method is used enough to warrant
compilation.[..] Also, we offer two runtime compilers, which you
access with -client or -server on the command line. The -client
runtime compiler generates code quickly, but the generated code itself
is only so-so. The -server compiler is a full-up optimizing compiler,
and I'd be surprised if we weren't turning Math.sin() and Math.cos()
into the hardware instructions on platforms where that was available
(maybe after appropriate scaling to get the argument into the range
that the instruction can handle)."

HLovatt posts "The following href="http://forums.java.net/jive/thread.jspa?messageID=12771&tstart=0#12771">
Pattern Enforcing Compiler (PEC) adds multimethods, called
multiple dispatch, to standard Java: href="https://pec.dev.java.net/nonav/compile/index.html">https://pec.dev.java.net/nonav/compile/index.html
Particularly: href="https://pec.dev.java.net/nonav/compile/javadoc/pec/compile/multipledispatch/package-summary.html">https://pec.dev.java.net/nonav/compile/javadoc/pec/compile/multipledispatch/package-summary.html"


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 the href="http://today.java.net/pub/q/news_rss?x-ver=1.0">java.net News
RSS feed.


Current and upcoming href="http://www.java.net/events"> Java Events :

  • March 26, 2005 JUG.RU meeting at
    St. Petersburg
  • April 5-6, 2005 href="http://developers.sun.com/events/techdays"> Sun Tech Days:
    Brazil
  • April 6, 2005 href="https://sv-web-jug.dev.java.net/servlets/NewsItemView?newsItemID=1971">
    Silicon Valley Web Developer JUG: The Spring Container
  • April 8-10, 2005 href="http://www.nofluffjuststuff.com/2005-04-boston/index.jsp">New
    England Software Symposium
  • April 22-24, 2005 href="http://www.nofluffjuststuff.com/2005-04-houston/index.jsp"> Lone
    Start Software Symposium
  • April 29 - May 1, 2005 href="http://www.nofluffjuststuff.com/2005-04-minneapolis/index.jsp">Twin
    Cities Software Symposium
  • May 5-7, 2005
    JustJava2005

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 href="http://today.java.net/pub/q/java_today_rss?x-ver=1.0">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.

Advantages of only shipping binaries