lesscode.org


Archive for July, 2005

Wait. Did he say J2EE?  4

Cat.: Then they fight you..., Rails
15. July 2005

As a side note to the last post about the Rails and J2EE article, it’s interesting that the title of that article was Ruby on Rails and J2EE: Is there room for both? when there was barely an official J2EE technology mentioned. Struts and Hibernate weren’t J2EE technologies the last time I checked - they evolved in real life hacker communities under liberal licenses, not under a vendor sanctioned expert committee. Perhaps the original comparison that used cross vendor, JCP approved specs like PO Servlets, JSP, and EJB was just too much to bare?

I’m not trying to be a troll or anything, I’m just wondering whether others find it interesting that the popular Enterprise Java technologies today aren’t part of J2EE at all.

People wonder why there’s a push for Sun to free Java, I don’t. I personally don’t give a shit what they do with it but when you see the results of one of these communities in action it’s hard to advise against it from a technical standpoint.

Rails Furthers Industry Acceptance  9

Cat.: Then they fight you..., Rails
15. July 2005

I have to admit that as a Python guy I sometimes have a hard time reporting on all the recent Rails press (and I’m doing something about that, I promise). But hey, those guys are kicking ass and have made huge advances in getting the rest of the industry to wake up to the benefits of not only dynamic languages but also some of the concepts and practices that are common to the wider community. The old walls are starting to come down and its in no small part to the Rails community. Big ups and all that.

I think its interesting that of all the really inventive material the Rails guys have thrown together (movies, books, and now a friggin podcast), you just can’t beat a public display of less code, such as the one you’ll find in this IBM developerWorks article published a few days ago by Aaron Rustad:

Hibernate (Java State of the Art)

<hibernate-mapping>
  <class name="models.Order" table="ORDERS"
         dynamic-update="true" dynamic-insert="false"
         discriminator-value="null">

    <id name="id" column="id" type="java.lang.Long" 
        unsaved-value="null">
        <generator class="identity"/>
    </id>

    <set name="items" lazy="false" inverse="false"
         cascade="none" sort="unsorted">
         <key column="id"/>
         <one-to-many class="models.Item"/>
    </set>

    <property name="name" type="java.lang.String"
              update="true" insert="true"
              access="property" column="name"/>
  </class>
</hibernate-mapping>

public class Order {
    private Set items;
    private String name;
    private Long id;

    public Long getId() { return id;}

    public void setId(Long id) { this.id = id;}

    public Set getItems() { return items;}

    public void setItems(Set items) { this.items = items; }

    public String getName() { return name; }

    public void setName(String name) { this.name = name; }
}

ActiveRecord (Rails)

class Order < ActiveRecord::Base
     has_many :items
end

That’s hard to ignore.

I just hope that with all the recent attention paid to the Rails community those guys keep in mind that we all stand on the shoulders of giants and that all roads eventually lead to Lisp <ducks>

The End of the Cold War Between Static and Dynamic Languages?  0

Cat.: Languages, Then you win.
15. July 2005

Lots of people talking about this Meijer / Drayton paper (warning: PDF, sane HTML version here) coming out of Microsoft Corporation. The paper is titled, Static Typing Where Possible, Dynamic Typing When Needed: The End of the Cold War Between Programming Languages.

We are interesting in building data-intensive three-tiered enterprise applications. Perhaps surprisingly, dynamism is probably more important for data intensive programming than for any other area where people traditionally position dynamic languages and scripting.

That’s the first part of one of many paragraphs I found intriguing and, IMO, is dead on. Unfortunately, that leads us to the sentences that are meant to support that claim:

Currently, the vast majority of digital data is not fully structured, a common rule of thumb is less then 5 percent. In many cases, the structure of data is only statically known up to some point, for example, a comma separated file, a spreadsheet, an XML document, but lacks a schema that completely describes the instances that a program is working on. Even when the structure of data is statically known, people often generate queries dynamically based on runtime information, and thus the structure of the query results is statically unknown.

I’m not sure I follow the logic here. Dynamic languages like Python, Ruby, and Perl have a more powerful set of data manipulation facilities that require less code and read easier than their statically typed analogs in Java, C#, and C++ but they’re no more aware of the data’s underlying type system. I have a bad feeling they really wanted to go down the same old SOAP/RPC and XML Schema (see: gHorribleKludge) data binding path here and figure out how we can just abstract away the entire concept of data and make everything look like nice little objects. If it didn’t work with our current languages, it must be a problem with the language, right?

Anyway, the paper received a pretty thorough beat-down over at Lambda, which is always a bad sign when you’re talking at the type/language theory level. I personally have mixed feelings on the paper - while I think anything that puts dynamic languages on equal ground with the more accepted statically typed languages is a good thing, I’m not sure that inventing a new peacefully integrated language and discarding the ones we’ve actually observed working for so long is the best way forward.

How about you guys just drop your types for now and we’ll add them back in later. :)

Pencils Rock  4

Cat.: Theory
13. July 2005

This is great:

“This is a Fisher Space Pen,” he said — a pen developed for NASA astronauts in space, a pen with ink that just keeps on flowing. A pen able to write upside down and even underwater.

“It’s sophisticated, it’s costly, it’s very nice and very shiny,” Geck said.

Geck is chief technology officer at SuSE Linux, an open-source software outfit now owned by Novell (Nasdaq: NOVL) , and he’s about to make his point: “The Russians just used a pencil.”

I can’t vouch for the rest of the article as I’m on my way out and it’s pretty long and businessy. However, it seems he has his facts a bit mixed up - it’s common knowledge that in Soviet Russia the pencils use you!

Python Template Engine Shootout Blogs  1

Cat.: Python
13. July 2005

I just stumbled on, not one, but two separate weblogs dedicated to comparing and contrasting various Python template languages. The Python Template Blog by Tim Underhill and The Python Template Weblog by… another Tim? Neither have actually progressed so far as to make actual comparisons but if they end up being anything like the PyWebOff blog, which compares Python web frameworks, they’ll be a tremendous resource for the community.

Go Tims!