Apr 12

Caller context and list.add(..).add(..).add(..)

Java, Perl, Tech 12 Comments »

One of the first things that bugged me about Java when I first started to use it was a small thing. Why didn’t add() return the list (or Vector back then) so I could chain the calls together.

I wanted to be able to:

Vector v = new Vector().add(”foo”).add(”bar);

The same goes for having chained set* methods:

foo.setA(a).setB(b)

We see this used, especially in certain packages such as Hibernate.

One feature that I liked in Perl was the ability to know about the callers context:

my $scalar = @list; # or function which returns a list

is very different to:

my ($element) = @list; # or function which returns a list

Sometimes I would love to do the same in this world and say “If the caller of my set method wants the object back, give it, else we are in void world and that is fine too”.

Of course, I don’t think this would happen :)

Another way to make me a little more happy would be to give me named parameters, but that doesn’t give me the same power.

Apr 12

Maven 2 on the right track…

Builds, Tech 2 Comments »

Matt Raible thinks that Maven 2 is looking good.

He says that he doesn’t like Maven 1, and from the entry it is due to:

  • Speed (on his Mac)
  • Transitive dependencies (lack off)
  • Local Jar Files????

I don’t notice the speed difference between maven and ant on my powerbook or DELL. Well, I do notice it if I do a full clean on a huge build. But that takes for ever on both :)

Maven 2 has transitive dependencies, which is really nice. However, apart from the initial painful setup, it hasn’t been THAT big a deal for me.

I don’t really get the local jar thing. I guess Matt could just go into maven.jar.override mode, but why you would wnat to checkin copies of jar files is beyond me. Whenever I do a search on someones computer and see 56 struts.jar files I cringe.

More power to you :)

Apr 12

OpenSource: If you pay $15

Open Source, Tech 5 Comments »

If a product opensource if you have to pay $15 to get it? Maui X-Stream plans to opensource Cherry OS a Mac OS emulator on May 1st.

Why are they doing this? They have been under attack by PearPC developers, who allege that some of their code was stolen. Maui is going to try to use OpenSource as a way to proove that they haven’t stolen anything.

What was interesting was the quote:

The company is waiting until 1 May to release the source code to allow time to prepare for the “onslaught of response” that it expects. It will charge $14.95 (

Apr 12

Craigslist + Google Maps

Google 1 Comment »

The cool usage of Google Maps as a platform has continued with this very cool merge of Craigslist with Maps.

Now only do you see the housing in an area on the map, but it even shows images (if there are any) in the popups.

We keep annotating the web!

Apr 11

Process, Threads, and Scaling

Java, Ruby, Tech 22 Comments »

Jon Tirsen took some time out of his day surfing in Oz to write about the FastCGI approach to scaling vs. the Java way.

Watching the talk on the Ruby side of the house has been a blast from the past for me. I remember a LONG time ago, testing a Perl based web application under FastCGI and mod_perl.

One of the big problems at the time was damn leaks. One advantage to the old fashion CGI environment, is that a programmer can be very sloppy and get away with it. You forgot to close something? Weren’t a good boy with some resource? No matter, the proc will die in a sec anyway.

Moving to the new model changed all of that, and people found a LOT of bad things in their code.

At the time mod_perl was a big winner over FastCGI, and I have been surprised to see how it has grown up.

There are obviously pro’s and con’s in the process/thread game. That is why Apache 2 has the nice hybrid approach, and you can choose your strategy depending on the platform you are on etc. All processes are not created equal. Ditto for threading. Remember running WLS without the native ‘performance pack’ enabled? Holy slowness :)

We are also seeing a lot of great things coming out of the JVM vendors such as JRockit to give us the best of both worlds. Hopefully we can all learn from eachother…

Apr 11

YACMS: Container Managed Swing

Java, Tech, UI / UX 222 Comments »

Ben had to add another CMS acronym didn’t he. He has been talking about the idea of taking the tough threading stuff out of the path of the Swing developer.

Now, after badgering us all about it, he blogs about it.

If a project can pull of the vision, it can only be a good thing. It is arguably necessary for Swing to be what it wants to be. With all the complexity that EJB brought, one of the nicest features was that the container would handle threading for you.

Let’s bring that to Swing, but let’s not call it CMS ;)

Apr 11

RE: The high price == stable company fallacy

Tech 1 Comment »

Mike Cannon-Brookes has written about the high price == stable company fallacy, answering the calls to make his products more expensive.

There are a lot of good points there.

I have always been amazed at the psychology of clients. For example, take the J2EE application server space.

We pretty quickly got to the point where choices were:

  • “Free”: JBoss / open source [note: open source certainly isn't free as in beer...]
  • Expensive / High end: BEA / IBM / Oracle / …
  • Medium: Resin, Lutris, JRun, and the like

I saw a lot of clients dismissing the medium camp as they saw things as black and white:

“We are doing large enterprise stuff, so surely we need BEA/IBM”

“We can ‘get away’ with the free JBoss/Tomcat”

So, I always felt bad for the middle tier which had compelling products for a lower cost, but had to always justify this, and also SELL MORE.

Apr 11

COmega and Ted :)

Microsoft, Tech No Comments »

I had one slot in which I wasn’t speaking at the No Fluff Just Stuff in Boston, so I snuck into Ted’s talk on COmega.

In typical Ted style, a tangent occured, and an hour later we had only gone through a few slides ;)

This isn’t a bad thing though, as we got to play with some interesting pieces of COmega. I had been looking mostly at the XML/SQL features, which are a step up from Groovy for example, as they are first class citizens (Groovy SQL / XML is a large step up from Java though!).

What I hadn’t spent much time looking at was the Polyphonic C# side of the house. It really was interesting to see the chord based concurrency constructs.

For example, here is how you can implement Reader/Writer Locks:

class ReaderWriter {
ReaderWriter() { idle(); }

public void Shared() & async idle() { s(1); }
public void Shared() & async s(int n) { s(n+1); }

public void ReleaseShared() & async s(int n) {
if (n == 1) idle(); else s(n-1);
}

public void Exclusive() & async idle() {}
public void ReleaseExclusive() { idle(); }

}

Very, very cool stuff. I hope much of it gets into C# 3.0, and hence Java 7.0 ;)

P.s. it is good to have Ted in town this week. Hopefully we can show him a good time in the Mad-town!

Apr 08

Maven 2.0 Technology Preview Release

Builds, Java, Tech 11 Comments »

There has been a lot of talk on the release schedule of Maven in the past (remember people desperate for 1.0 final? :). Now we have people asking to see the new and improved Maven 2.0, and we have a tech preview release:

The first Maven 2.0 Technology Preview release is now out.

Maven is a software project management and comprehension tool. Based on the concept of a project object model (POM), Maven can manage a project’s build, reporting and documentation from a central piece of information.

http://maven.apache.org/maven2/

We’re looking forward to hearing your feedback, ideas, and (to a lesser extent :) bug reports.

If you need help with the release, please consult the documentation frequently as we continue to update it, and subscribe to the [email protected] mailing list. For more information, please see http://maven.apache.org/maven2/about.html#get-help

We welcome contributors to the Maven project – if you are interested in helping out, please get involved!

Thanks to everyone who has worked on this release!

– The Apache Maven Team

Features

Maven 2.0 has the following major features:

  • Simple project setup that follows best practices – get a new project or module started in seconds
  • Consistent usage across all projects means no ramp up time for new developers coming onto a project
  • Superior dependency management including automatic updating, dependency closures (also known as transitive dependencies)
  • Able to easily work with multiple projects at a time
  • A large and growing repository of libraries and metadata to use out of the box, and arrangements in place
    with the largest Open Source projects for real-time availability of their latest releases
  • Extensible, with the ability to easily write plugins in Java or other scripting languages
  • Instant access to new features with little or no extra configuration

The following features are available in Maven 1.0 and will be available and much improved in Maven 2.0 through the coming releases:

  • Deployment and release management
  • Comprehensive project information and reporting
  • Website and documentation building tools

On the reasons/goals

You’ve seen above the goals that Maven aims to achieve, however there have also been questions about why Maven 2.0 is rewritten from the successful Maven 1.0. In summary, the main goals of the new Maven 2.0 architecture are:

  • To be simple to use – it should be more obvious and consistent about how things are working
  • Fast – a new architecture and smaller memory footprint make it as fast as possible
  • To be able to implement the features demanded that were not possible under the Maven 1.0 architecture

Unfortunately, to reach these goals – we’ve had to sacrifice backwards compatibility to do this. Instead of making many small incremental changes that would break compatibility often over time, we decided to build on a new, solid base that can be reliable for the future, and also to maintain the existing Maven 1.x product to ensure that existing users are not left out in the cold.

Apr 08

Fever Pitch

TV / Movie 1 Comment »

I am a big fan of Nick Hornby, and loved his book: Fever Pitch.

Now it is a movie, for the second time. First time around Colin Firth played the Arsenal supporter that is basically Nick himself. The movie was average, and I doubt many yanks saw it :)

This time around we switch from Arsenal to the Red Sox, and coincidently I travel to Boston today to speak at the No Fluff Just Stuff Symposium this weekend.

It will be good to see Cameron and company.