Mar 15

(is (lisp comeback) ‘true)

Tech No Comments »

Have you noticed an increase in the word “Lisp” recently? I have. It keeps sneaking up on blogs, in talks, in articles. Are there a bunch of Little Lisper rubbing their hands, and waiting for the return of the king?

Lisp has had a MOP, a cool macro language, and many other features that we are only just coming to in the Real World ™.

Since Eclipse is the “Emacs of ther 21st Century”, if they start to support LISP plugins, and maybe read my .emacs.el, then we will know that the time has come. If that is the case, get your paren keys ready…. you may want to remap them on your keyboard so you don’t need to SHIFT all the time!

Mar 14

Web Services and Unix Pipes

Tech No Comments »

Russell has an interesting entry on When will Web Services become like Unix’s Software Tools?.

I was struck by a thought while I was reading the first section of the Linux Cookbook that Web Services, if they agreed on some sort of input/output standard, could operate much like the Unix toolset with stdin and stdout. I’m not the first person to think of this, but because I’m working with both XML and Web Services lately and now am starting from scratch learning a new distrib, the parallels dawned on me again. I think when I first heard about this notion a few years ago, I couldn’t really see the parallels because I saw a large division between the concept of software and service. But that’s changed now, I think – the lines have blurred because the Internet has proven its reliability.

He then goes on to explain why this is the case, and how it could be even more coupled. For example, he discusses STDIN/STDOUT/STDERR in the Unix world, and how that could be applied to the WS world.

Unix pipes are great in their simplicity. The contract between the processes is simple “you will be getting some stuff”, and if the format has to be munged you can plugin filters along the way:

someScript.sh | mungetobetterformat.pl | otherScript.sh

Web Services is different and similar. We have much more defined contracts (WSDL/XML), and to change the formats we can potentially use XSL:

some WS | XSL transformation | other WS

Looks a little like history repeating itself. With WS it is more complicated, yet the contracts can be better (note: can).

Dion

Russell updated his blog with another entry

Mar 12

I still like Named Parameters ;)

Tech No Comments »

Cedric has written up a history of why Named Parameters were not added to C++.

I understand the point made. It is true that named parameters don’t give you new functionality, yet I still prefer the “look” of methods in this manner.

I much prefer:

Window w = new Window(x:0, y:0, color:blue)

to:

Window w = new Window().x(0).y(0).color(blue);

OR (if you don’t happen to return an yourself on your set)

Window w = new Window();
w.setX(0);
w.setY(0);
w.setColor(blue);

Also, this is just looking at constructors…. what about the other 99% of methods?

foo.doX(String firstName, String lastName);

versus:

foo.doX(firstName=x, lastName=y);

Also, even for constructors you may want to say “this object HAS to be constructed with a Foo, a Bar, and a Baz”. If you have to call set*() methods then you need to verify your state in other ways.

This is really a matter of taste, and I just happen to like them (and understand if you don’t).

Mar 12

What happened to all of the “JVM on hardware” solutions?

Tech 1 Comment »

I was reading about a MIPS-based core to run Linux, Java byte code in parallel when I got a flash-back.

Pretty soon after Java was out of the door there was a rush of news from vendors and startups, who were promising that they would have have VMs in hardware that would natively grok the opcodes and such.

Whatever happened to these? Was the gain just not worth it? Was it a pain to have to flash your hardware to make an upgrade? Are we just not there yet and soon we will see these VMs on all sorts of cards? “Here sir, just plugin this pcmcia card and test out the latest VM”.

Mar 10

The hanging weblogic installation

Tech 2 Comments »

Installing BEA WebLogic 8.1SP2
….

Installing JVM
[----------------------------------] 100% “blinking cursor”

That is what I was facing on a linux box today. The installation of weblogic just kept hanging. It was bizarre.

Thanks to command line switchs we could see a little more about what was going on:

% ./wls_server812_linux32.bin -mode=console -log=~/wls_install.log

… and to put the tmp files elsewhere …

% ./wls_server812_linux32.bin -mode=console -log=~/wls_install.log -Djava.io.tmpdir=/extra/tmp

The install log was complaining about finding archive.bea, and some properties files. It was all confusing. After troubleshooting for awhile, trying things such as:

  • Grabbing a new copy of the executable just in case it was screwed up
  • Playing with permissions to make sure it was happy
  • Running the network installer instead
  • Looking through lsof to see any file locks / issues

and a million other things, we ended up doing a desperation reboot. Miraculously after rebooting the box the install was sound as a pound.

This is one situation where the knee-jerk “reboot it” reaction would have been good. If this was a windows box instead of linux we would have probably reached for that a lot sooner. What was the problem? I can only guess that some process was being a bad boy…. some files were locked …. or something sneaky. Oh well, back to normal, but what a waste of a couple of hours!

This has *nothing* to do with WLS. It is running like a charm now. A big improvement.

Mar 09

CVS and Permissions

Tech 699 Comments »

It is very frustrating when you do a cvs update, and file permissions have changed. Especially when your trusty scripts are now chmod -x.

This is one reason alone to jump onto the Subversion bandwagon. That at the ability to move directories, rename files, have atomic commits, etc etc.

I can’t wait for our svn host to be setup :)

Mar 09

National Holiday: Voting Day

Personal 1 Comment »

As the election gets closer (well it is a long way off, but they drag it out here in the states) people start to talk a little more about politics.

My brother had the obvious idea of making voting day a national holiday. We WANT higher turn out, so lets enable it as much as possible!

Traditionally it is people of lower classes that don’t make it to the polls, and anyway to help them vote is good in my book (especially as it will help get this pseudo-president out of power).

Here in Boston, St Paddy’s day comes with a day off work, so surely election day could be :)

ps. I am looking forward to my first paddy’s day in Boston!

Mar 09

Definite synergies with AOP & EJB/J2EE

AOP, Tech 2 Comments »

Ramesh Loganathan asked AOP & EJB/J2EE- any synergies?.

I personally think there are some obvious synergies, but the main point that I want to respond to comes from this paragraph:

Regardless, the fact simply remains that AOP cannot be a panacea for Systems Design issues. It is at some level, (even if I risk a sweeping conclusion here) not too different from say using a logging framework. Albeit, it can do a little (;-)) more than just logging. It can only “extend” an existing complete biz application to perform some additional plumbing. But cannot be used to build complete end-applications!

  • AOP is not a silver bullet
  • AOP does not mean you don’t do OOP anymore
  • AOP makes sense as a solution for CROSS CUTTING CONCERNS

I have to keep saying this, as I don’t want people to go down the same route as we did with OOP (and others) and think that everything should be an object. That is not the case. We need to use common sense, and move slowly.

Ron Bodkins, Ramnivas Laddad, myself, and others are working on an open source project that shows AOP in practice. We have some really nifty ways to handle:

  • Persistence: The user doesn’t have to worry about Hibernate sessions, you just use your POJOs
  • Security: The policy is external. One place to set it all up
  • Virtual Mock Objects: AOP can really help out here
  • … and many more …

We of course have a solution for logging, but I don’t want to mention that as people get SO distracted by AOP logging examples.

In our project there is PLENTY of OOP going on, with a sprinkling of AOP to help out where needed. We don’t go the extreme and do the following:

class Person { }

… aspects use mixins and other advice to plug everything in …

Don’t use aspects unless it makes sense. Do use them when it DOES make sense. With polymorthism in OOP we now favor composition. We can do the same in AOP… to keep us on track.

I am excited to be heading to the AOSD 2004 in the UK (Lancaster? weird). I think this will be a good year for AOP… so lets see where it leads us :)

Mar 09

Good code and web frameworks

Java, Tech, Web Frameworks 1 Comment »

Hani has a fairly mild bile on “Is good code relevant?”.

It seems to have a couple of main points:

  • We are creating successful projects with code that is “good enough”.
  • We can create a successful projects using ANY technology (don’t have to use the latest and greatest).

This has definitely always been the case. As a consultant travelling to various dev shops in the US and London, I have found that 99% of projects are a few years behind with respect to the latest and greatest tools/techniques that we talk about on various forums.

This is fairly natural. If you build a fairly complex application using tool X, pattern Y, and library Z, and it works. Why change it? There has to be enough of a gain to refactor to make it worthwhile.

One example is the codebase for TheServerSide itself. We use EJB. We use Entity Beans. We use BMP Entity Beans. Yet it all works. It isn’t as pure as you would like of course…. we would love to get rid of the EJB layer and use a transparent persistence mechanism (and we will). But it works… and quite well in fact.

Carlos Perez also asked How many java web frameworks can you name?. He came up with a lot. Why are there so many frameworks out there in the Java community?

When people migrated to Java, we didn’t have any good frameworks. Everyone was working with a low level layer (Servlets and then JSP) so people started to abstract on top of these layers…. and frameworks were born. Again, at TSS we use our own custom MVC layer (as Struts and co didn’t exist at the time of writing). We would like to move to WebWork/Tapestry, but everything works fine, and it doesn’t give us THAT MUCH…. so it sticks around like a bad smell :)

We also probably haven’t found THE best way to do web development (if there even is one) so people keep experimenting :)

Mar 09

Where do the rules engines fit in?

Tech 1 Comment »

Simon Harris has written a nice little JRules overview.

I have found it interesting to observe rules engines and where they fit in, with the average Java development. From my observations, there is one group that doesn’t leave home without them. A lot of logic goes through the business rule processes. The larger the enterprise projects, the higher the chance that you see these folks.

However, the majority of users developing web-based/GUI apps seem to ignore the world of the rules engines. Why is that? Isn’t there a need for these folks to have an engine do the heavy lifting?

I think that the two worlds are going to mix even more in the future… especially with the standard rules engine API, good open source solutions such as drools, and solid commercial products like ILog JRules.