Jun 30

Geronimo Congrats: Culture of the Engineer

Java, Tech 1 Comment »

I think it is very apt that the Apache Geronimo team passed the J2EE (Java EE :) TCK at JavaOne, 22 months after they began. Soon the server will be certified and time to move on to other things.

Sun has always been the cult of the engineer, and everytime I have seen the Geronimo team, they have been coding like mad men. You know that you will see them at a conference, and it will be the group huddled around hacking away.

Congrats guys. Great to see your hard work paying off, and I am excited to see what the team will get done now the tests are over and they can focus on items that developers really care about!

Jun 29

Java SE/EE/ME: Cutting 2000 to 2

Java, Tech No Comments »

Graham Hamilton’s come out at let us know the big news of JavaOne, in: Goodbye “J2SE”, Hello “Java SE”.

The 2 has always been dumb. Java 2 Enterprise Edition 5.0 makes no sense.

A friend on the No Fluff tour told a story of how Java 2 was actually going to be “Java 2000″. The engineers at JavaSoft got so offended that they started a petition arguing how lame that was, and asking marketing if they had see the success of Windows 2000? The price on the petition was for the engineers to quit if they didn’t make the change.

Urban legend has it that the change was made, but the problem was all of the JavaOne banners were already produced. What did they do? Cut off “000″ from the sign!

Jun 28

BEA endorses Spring

Java, Tech No Comments »

I am having fun seeing the usual suspects at JavaOne this year. The Sun keynotes have been a little painful from all accounts.

I went to the BEA keynote, and the CTO waffled around a little (starting off talking about 70% of us use frameworks??? I feel bad for the 30%).

After the fluffy “The Servlet API was here in 1999″, and the Adrian Colyer trinity of annotations/aop/dependency injection, we got to the meat.

BEA is supporting Spring. Rod Johnson was brought on stage to show how they are working together, and how the WebLogic console groks the Spring Beans via JMX etc etc.

I am looking forward to seeing “File -> New Spring Project” in the Eclipse based Workshop tool, being able to drop in Spring beans to WLS and have it just work, and all that jazz.

Marry that with Spring/Geronimo support, and Spring is everywhere ;)

Jun 27

The Flash. The Rails one, not the Macromedia/Adobe one

Ruby, Tech 4 Comments »

There are lots of features in Rails that make you think “yeah, I really have wanted just that”. Often, it isn’t that you couldn’t get the same affect in [insert your favourite web framework here], but you got it as a hack.

One of the small features that made me smile was the flash that Rails has.

As Dave mentions in his new, excellent, Rails book:

The contents of the flash are available to the next request in this session before being deleted automatically.

You just access the flash in your controller a la:

flash[:error] = “Doh. I thought I saw a pussy cat”

and then in the view simply:

<% if @flash[:error] -%>

Error: <%= @flash[:error] %>

<% end -%>

Side Note

How nice is it that you can use -%> to suppress newlines. No more pages of empty lines in your damn voice source (a pain in J/ASP land).

So, sure, you can write a filter to do this stuff, and it is a small thing. But with Rails it is all just there.

Thanks for thinking of me :)

Jun 25

Advertising in RSS Feeds

Tech 3 Comments »

Advertising in RSS feeds isn’t totally new, but it is becoming more common place. Whenever I see feeds with ads at the bottom I don’t mind TOO much, as I know that these companies are just trying to make some money, and I am good at ignoring them (unless they do a great job of giving out REAL content).

Dave saw, what I recently say, when TheServerSide added ads via pheedo. In this case it was just a (hopefully) one of mistake.

The biggest annoyance is when feeds are not setup correctly. I have had a few feeds, where a day later, and I have 10 duplicates of the same entry, with the only difference being the ad content at the bottom!

This is unacceptable, and has the affect of making people unsubscribe to the feed.

So, if we DO have to go with ads in feeds as more people use feed readers to get their content, lets at least be smart about it.

Jun 23

Typical Benchmarks…. in Ruby Land

Java, Ruby, Tech 4 Comments »

A Ruby newbie posted to Ruby Lang that he had implemented an is_prime? algorythm in Ruby, Perl, and Java with results:

  1. Ruby result: 101 seconds
  2. Java result: 9.8 seconds
  3. Perl result: 62 seconds

Ruby lang is a great community, and over time they broke down the code and got all of the versions to fractions of these numbers.

It again really showed:

  • How micro-benchmarks are a scary beast
  • The choice of the algorythm here made the biggest difference (good ‘old Big O). The right choice with Ruby was magnitudes faster than the wrong choice in C.
  • The power of CPAN and company, where everything you ever need is already done
  • Inline C. Mmm :/
  • FAST ENOUGH IS FAST ENOUGH

That being said, having Ruby grow up from the world of the interpreter would be very cool (YARV etc etc).

Jun 23

Perl Best Practices

Perl, Tech 1 Comment »

I know:

  • Some people think that Perl Best Practices is an oxymoron
  • Some people think there is one best practice: Use Ruby/Python/[insert your language of choice here]

However, the title of this upcoming book will really peeve Ted since he hates the term Best Practices so much :)

Also, on Sunday, there were 3 simultaneous

Jun 22

Gravy: Using Ant from Groovy for short non-build scripts

Groovy, Java, Tech No Comments »

I recently had to whip out a one/few-off script that took a directory, and recursively grabbed jar files from it, and put all of the classes in one place. I looked at JarJar and Uberjar, but in the end it was easier to whip together a few lines of Groovy to make it happen (although I could have used Ruby, JavaScript/Rhino, Perl, etc etc).

When it came to jar’ing and unjaring files, instead of using the Java APIs, it was easier to just use ant via the AntBuilder. This allowed me in one simple line to use the tasks available there:

ant.unjar(src: file.path, dest: structure[typeOfJar].outputDir)

Very convenient. This isn’t using Ant in a more formal “I am driving the build from Groovy” way, but rather being pragmatic and thinking “oh there is a simple ant task that already does this, so lets just call into it”.

Example

def buildJar(String typeOfJar) {
println "Building a jar file for the type: $typeOfJar"
new java.io.File(structure[typeOfJar].dir).eachFileRecurse { file ->
try {
//println file.path
if (file.path =~ "\\.jar") {
println "jar xf $file.path $structure[typeOfJar].outputDir";
ant.unjar(src: file.path, dest: structure[typeOfJar].outputDir)
}
} catch (Exception e) {
println e
}
}

ant.jar(destfile: structure[typeOfJar].jar, basedir: structure[typeOfJar].outputDir)
ant.delete(dir: structure[typeOfJar].outputDir)
}
Jun 21

Corporations even in our childrens fantasy?

Personal No Comments »

We are in the era of the Corporation. Books have been written about the move from countries to corporations when it comes to power.

You really know that it has come when your childrens fantasy has moved beyond the land of princes and princesses. Sure there are still some out there, Shrek et al, but what about Robots?

Robots was showing on my last flight. The hero has to go in and save a corporation (to save The World). He falls in love. With a princess? A beautiful elf? Nope, someone in the executive board of the company.

Wow. Even our kids have to learn this at age 5? :)

Jun 21

Forbes: Fighting talk on Open Source

Java, Open Source, Tech No Comments »

So, I am incommunicado for a week, and the world didn’t explode. I start trying to get through the mountain of email/rss that I now have as a gift for taking time out from the real world, and I instantly run across the Forbes.com article by Daniel Lyons.

Man he doesn’t hold back as most analysts do. He must have been shouted at by his wife or something, as he comes out with exactly what he thinks, in no uncertain terms. Kinda nice to see actually.

Cosby says IBM is just responding to customer needs. He says he hasn’t thought much about what IBM’s acquisition of Gluecode means for JBoss.

What is particularly cool about the Gluecode acquisition is:

Gluecode used to make money by selling some “closed source” programs that ran on top of its free open source stuff. No more, says IBM, which intends to release the source code for all of Gluecode’s programs and distribute them for free

A free cup of JOE huh. Nice.