Sep 24

How the politics of thinking about Java as a platform, versus Java as a language, will be good for us

Tech 1 Comment »

When Microsoft copied the Java platform and came out with .NET they did something smart.

The marketing machine really pushed the fact that .NET was a platform, and that you, the developer, can use whatever language you want. This allowed for a unity between VB/C#/C++. Well, at least in theory ;)

A lot of people saw .NET vs. Java as:

Java == Platform portability. One Language (Java)
.NET == One Platform (Windows. Mono? ;). Language Portability (VB/C#/C++/Python.NET/insert pet language here)

Now. .NET did get the chance to play with some opcodes in their VM (CLR), which could help various languages, but TECHNICALLY the JVM and the CLR are pretty damn similar, thus we can have a bunch of languages which produce Java bytecode can’t we?

Of course we can. And we have had this for a long time. There are hundreds of languages that spew out bytecode.

However, Sun screwed up. They didn’t help these projects. Microsoft did.

I was hoping that Sun had Got It, when they started talking about JSRs for PHP support, and then when they pushed through the Groovy JSR (which I never thought would get through!).

However, I still don’t think they get it. The proof is in subtle ways in which we see the way they think about the platform.

They keep putting functionality in javac!!!!!!

The obvious recent example is Generics. Most of the Generic stuff was shoved at the compiler folk. With Erasure, people playing with the bytecode don’t see anything of the types that the Java programmers had been using. They are blind to that knowledge. It all just looks like bloody Object’s to them.

What a waste. I really hope that Sun gets that functionalty should be put into the platform when it makes sense. When this is done, then any language/tool that sits on top of that platform gets use out of it.

This is what Microsoft does. They have VB, C#, and C++ folk watching over the CLR folk. As soon as anything happens you can be sure that people jump in saying “HOW CAN I SUPPORT THAT!”. No favourites. Like your kids.

When all of your kids are happy, they can all get out on the campaign trail helping the cause. If your kids aren’t happy they get sent to europe as to not embarrass ;)

Come on Sun. Think about the strength of the platform….

Sep 23

George W Bush and John Kerry are both Essex Boys!

British, Personal, Politics 37 Comments »

I know a lot of Essex Boys aren’t the sharpest tools in the shed. So it seems to make sense to me that Dubya is actually an Essex Boy. But I was really surprised to hear that Kerry also has heritage in Essex.

In fact, both Bush and Kerry are related. Back in the 1600’s the common ancestor of both candidates hailed from Wickford, Essex, England.

For those who don’t know what the hell I am gabbing about… Essex is a county that borders the Greater London area. These counties are known as home counties, and Essex is where I come from.

Essex boys are known as being likely lads, and Essex girls? Well, think of the blonde jokes, substitute s/blonde/essex/g and you will have the same jokes.

Lovely jubly!

Sep 23

Encapsulating Generic Types

Tech 1 Comment »

I am a little scared of Generics (as you may have noticed).

I see some value, but I also see two problems:

  • Some programmers don’t/won’t get it
  • Holy readability batman!

As a way to help readability, AND to allow you to make changes to your codebase easier, I think it is often wise to encapsulate your Generic types.

Cedric did this very thing.

This is very ugly isn’t it?

Map<String, List<Account>> accounts = new HashMap<String, List<Account>>();

So encapulate:

class AccountMap extends HashMap<String, List<Account>> {

}

Not only is it nicer to work with in your code now, but you can add functionality to the AccountMap if it makes sense. And all of your code gets the new functionality.

Sep 23

Advanced SiteMesh Article

Tech No Comments »

I don’t know if I would go as far as saying that this article is Advanced, but it is always great to see more articles and coverage of SiteMesh.

I carry SiteMesh into every application that I work on. I feel sorry for those who don’t know about it. I even feel sorry for those who think Struts-Tiles is as good ;)

Try it. Love it. Then realise it is just a bit of simple technology and go out to play in the nice weather :)

Sep 22

Using our students as slave labour!

Personal No Comments »

My wife is a teacher (as I have mentioned before). I am often amazed at the things that happen at schools these days. There are the typical programs such as allowing corporate sponsorship. Isn’t it strange to have Pizza Hut day? Coca Cola ONLY?

Well, I recently heard that at my wifes school they have a new program which makes the kids slave labour.

It is really a smart idea. Someone must have thought:

I want to mobilize a sales force.

Wait a minute. What if I use KIDS as a sales force!

  • I can get them cheap by promising them prizes for selling well
  • People always feel like they have to buy from a kid

This is what is happening. A slick set of sales people came into the school and got the kids excited about selling magazines. The kids that sell the most get toys such as “boom boxes”, skate boards, and more.

Why can’t we get someone in to get the kids excited about something that is actually educational? Instead, we get them running around selling Hunting and Fishing magazine.

Oh, and some of it goes to charity of course… but look at the small print on how much.

Why do I get more and more angry at the state of our educational system? The most frustrating part is that there is SO much potential. There are great people in the system (great teachers, and administrative people). And, if you spend some time with the kids you know that they have infinite potential. We are letting them down.

Oh, and we are leaving them a nice record deficit to deal with. What have my grandkids done for ME anyway!

Sep 22

Revenge of the “Enterprise Architect”

Tech 2 Comments »

I feel sorry for Bruce, Kris Thompson, and the other lads on their project.

I don’t feel sorry for them JUST because they have to work with eachother, but rather due to the revenge of the “Enterprise Architect”.

The story that Bruce tells is a common one in large companies. One large company gets in bed with another (insert one of: IBM Global Services, Accenture, EDS, etc) and this relationship leads to nightmare projects.

The gang seemed like they had snuck by this problem. In their last project they used open source software and it was the most succesful project ever! You would think that people would learn from that, and it appeared that they had… as in this project they got to start from where they left off.

That is until the inevitable happened. Mr. Enterprise Architect says that Spring/XDoclet/… is FAR too simple and robust, and that they have to migrate everything to the IBM stack. Oh momma.

Let people do their job. It is tempting to write up a dev equivilent of the Bastard Operator from Hell, but I guess that is Dilbert :)

Sep 22

People taking photos of my house…

Personal 3 Comments »

Maybe I am paranoid since the virus is still in me, making me barely able to speak (I think my wife likes that).

However, when I have been concious, I have seen 5 cars driving down my road… stop… and take a photo of my house.

I wonder if Dubya Bush has read my blog and has put me on his list?

Sep 22

The Seventh Antual ICFP Programming Contest

Tech 1 Comment »

It is always fun to watch the various programming contests that happen every year.

In this Ant contest the judges had interesting things to say:

“Java and C++ are very suitable for rapid prototyping.”

“Haskell is the language of choice for discriminating hackers!”

“Haskell and C++ are fine programming tools for many applications.”

And in the language statistics:

25 C++
24 OCaml
23 hand coded
21 Java
20 Haskell
16 Python
15 C
12 Lisp
11 Perl
9 Scheme
8 unknown
7 C#
5 Ruby
5 Pascal
2 SML
2 Basic
2 m4
1 Mercury
1 Scala
1 Erlang
1 Tcl
1 D
1 Alice
1 GNUepsilon
1 Nemerle
1 bash
1 Revolution
1 Smalltalk

Now, it doesn’t make sense to try to take these stats and make comparisons to The Real World. I don’t think a huge group of people are coding in OCaml ;)

It does show you that there are MANY good languages out there. You can “get the job done” in many of them, and other things are more important that the actual language that you use.

Sep 21

Google browser in the works?

Google, Tech No Comments »

I read a rumor that a Google browser may be in the works.

The browser could be based on the Firebird codebase, which gives them a great place to start at.

I remember Adam Bosworth talking about changing browsers to work in a near-time mode. His vision was of an application that can work “offline”, and can sync up when you get back online. He wanted this to be “standard” for browsers, but without the power of IE behind it, how could he do it at BEA?

Now, at Google, he CAN push this ahead with a Google Browser.

Who knows, maybe we will be hitting gbrowser.com sometime soon.

Sep 21

Adam Bosworth: XML over HTTP vs. WS-*

Tech No Comments »

I have a posted comment about just using XML over HTTP. Yes. I’m trying, right now to figure out if there is any real justification for the WS-* standards and even SOAP in the face of the complexity when XML over HTTP works so well. Reliable messaging would be such a justification, but it isn’t there. Eventing might be such a justification, but it isn’t there either and both specs are tied up in others in a sort of spec spaghetti. So, I’m kind of a skeptic of the value apart from the toolkits. They do deliver some value, (get a WSDL, instant code to talk to service), but what I’m really thinking about is whether there can’t be a much simpler kindler way to do this.

I think a lot of people are thinking this. It is especially easy when you have simple languages that let you write the glue in no time at all. Such as Ruby and co.

E.g. Groovy: You can just create methods which act as the glue into your real business logic which is in your service tier (i.e. Spring beans :)

import groovy.net.xmlrpc.*

# The Server Side 
server = new XMLRPCServer( 2, 10, 8, 1000, 1000 )
server.testme = { | name | name + ” is cool!” }
server.multiply = { | number | number * 10 }
serverSocket = new java.net.ServerSocket( 9047 )
server.startServer( serverSocket )

# Client
serverProxy=new XMLRPCServerProxy(”http://127.0.0.1:9047″)
println serverProxy.testme( “Groovy” )
-> “Groovy is cool!”
println serverProxy.multiply( 7 )
-> 70

# Kill the server
server.stopServer()