Dec 30

2006 Tech Predictions

Tech 630 Comments »
  • The need for quality tech will increase again :)
  • Usability, usability, usability
  • Apps will keep simple and focused when it makes sense
  • Apps will keep simple when something rich actually makes sense (give me an RSS reader for a power user!)
  • The platform API will matter. Web 2.0 apps need to include an API for mashups and the like.
  • Ajax will become a toolbox that you use in web development without thinking that “I am doing Ajax”. It will become dhtml again :)
Dec 30

Joel on JavaSchools. Move on :)

Java, Tech 240 Comments »

Joel is at it again with The Perils of Java Schools.

It is great to think that you are high and mightly because you can pack() and unpack() your way out of a paper bag, or that you love crazy pointer arithmetic.

These days, I want to develop with developers who can deliver business applications to our users.

It drove me nuts that my CSci program taught me how to write my own database from scratch, but didn’t teach me how to use Oracle well. If you needed me to write an OS from scratch… I was your man!

I had to go to industry to get the skills that truly matter to me now.

This isn’t to say that you don’t need anything from these courses, but they are far from required. There are 3 or 4 developers who I truly think are geniuses (that I have worked with). You know these guys. They get done the work that 100 others could maybe do. 3 of the 4 didn’t have CSci degrees. The other seemed to focus on music, art, and biography of all things.

There is room for different programs at college, but lets not get on our high horse.

Isn’t Joel whipping out crappy VB programs anyway? Not exactly amazing algo’s using the power of LISP is it? Have you checked out FogBugz? ;)

Dec 22

Happy Festivus

Personal 3 Comments »

With the idiot Bill O’Reilly jumping on the “war on christmas”, I now resort to only withing people a Happy Festivus.

Here’s to you Constanza!

Have you got your aluminium pole ready?

Dec 21

interface Excel { @MaybeEasiest businessGuyDoit(); }

Tech 1 Comment »

I was just working on a project, and a lot of time was spent working out a large workflow to get part of the system working. Weeks were put on the project plan to build an eleborate workflow system that made breakfast for you.

We then came in and said “Wouldn’t it be simpler if you gave me your Excel spreadsheet in a format like this and we imported it?”

Er, we get Excel, said the nice business folks. A day later and we were at the races.

It wasn’t sexy, but one thing I think we can learn from other software worlds is to not reinvent the wheel, and letting business users interface to your system via Excel is actually not always such a bad thing. It may not be the most elegant solution, but the users really know how to use Excel, and you should have see them sign in relief as they thought about opening up Excel and working in there, versus learning some weird web based system that we would throw at them.

Excel baby.

Dec 16

Running PHP in your J2EE server?

Java, PHP, Tech 106 Comments »

Caucho has a cool feature in their new server. They have PHP integration via their Quercus, a PHP implementation in Java.

To use PHP you can just register a PHP servlet (com.caucho.quercus.servlet.QuercusServlet).

You can also tie in PHP code to call any Java code via:

package example;

import com.caucho.quercus.module.AbstractQuercusModule;

public class HelloModule extends AbstractQuercusModule {
public static String hello_test(String message)
return "Hello, " + message;

and then using it like:

<?php echo hello_test("World") ?>

Another example of using Java as the platform, and various dynamic languages on top. JRuby. come to papa. Ruby on Rails on JVM.

Dec 16

Twinkle: Swing/OpenGL Photo Viewer

Java, Tech 2 Comments »

Microsoft Max was shown off at PDC, letting us see the great effects via Avalon.

Romain Guy is doing killer work with Swing, and just showed off Twinkle, which is a Swing demo using JOGL and Java2D to create a great looking UI.

Check it out to see the seemless effects, and how it isn’t rocket science also. You can grab the source. Romain has acknowledged that we don’t have a nice tool to build these yet… but we will get there.


Dec 14

Spring 2.x: Two pain points solved

Java, Lightweight Containers, Tech 23 Comments »

It has been great to hear about the new Spring 2.0 features. There are a few much needed ones, but I was particulay interested to see solutions to pain points that I currently have:


I discussed cleaning up scoping with JSF and Spring. The ugliness of having a jsf:scope attribute added via schema, and generated files is no more.

Spring 2.0 supports richer scopes, including web based ones (http session, request, etc) ThreadLocal, webflow conversations, and others. Being able to set the scope to these high level abstractions is needed.

Injecting Domain Objects

I run into, and need to use custom code for this one all the time. I want to inject a lot of the objects that I work with. One of the issues is that you want Spring to be in charge of the objects that you with to inject.

A common area in which this isn’t the case is when you get objects from your persistence store (e.g. hibernate). Having to have routines takes these objects and inject them is a pain, as we want this code hidden.

This is where Spring 2.0 comes into play. It allows you, via AOP, to go into these domain objects and wire them up correctly.

Very, very, nice.

Dec 05

20.weeks.ago vs. java.util.Calendar

Java, Ruby, Tech 7 Comments »

After playing with a Rails project that needed to do a lot of date maniupulation, I was shown another of the many “small” differences that make you so glad you are in Ruby-land.

With Ruby, and the time extensions that Rails adds to the Ruby time module, you get to do things like:


now =

This is just a touch of what you can do.

The thought of doing a lot of this work in Java with the great java.util.Calendar and java.util.Date makes me cringe. I have a DateUtil that I use to do a lot of work, and there are other utils like JodaTime etc, but none compare in my opinion.

Dec 05

Flickering Holiday Lights

Personal 1 Comment »

Being a home owner is so much fun :/ Since it is so bloody cold here, and due to the fact that I live in the land of convenience, I recently purchased a timer for our xmas lights.

The timer has a light sensor, so we set it to “come on when it is dark enough”.

I noticed that when dusk came around, the lights would start flashing. I wondered if there was a short somewhere, and then came to the following conclusion.

When dusk first hits, it is JUST dark enough to flip the bit on the photosensor. The lights are then triggered on, which brings more LIGHT, enough to make the sensor think it is light time.

The end result is that we get flashy lights until it gets dark enough that even with the lights on, the sensor is tricked back.

Ah, the small things.

Dec 01

God forbid you have extra space at the end of your PHP file!

PHP 2 Comments »

While working on an Ajax app using PHP on the server, I have had an interesting time seeing the quirks of PHP.

The first item to get used to is being in HTML mode by default, so when you want to write real PHP classes and such in their own files you have to make sure to have the magic:


… your code …

Normally this isn’t a huge deal and you find out quickly.

Recently though a developer made some changes and suddenly no output was to be seen in their area of code. From looking at the errors it told us that “headers can’t do anything since you have already started to write to the browser”. It turned out that the developer had put in a new file, and it had an extra bit of space at the end of the file.

A PITA for sure. So, now we have a script to check for this :)

# --------------------------------------------------------------------------
# seekingalpha-checkphp - make sure extra space isn't at the end of PHP files
# --------------------------------------------------------------------------

if (@ARGV < 1) {
print "checkphp: need file(s) to check\n";

foreach my $filename (@ARGV) {

my @contents = readFile($filename);
my $IS_SPACE = 0;

foreach (reverse @contents) {
if (/\?\>/ and $IS_SPACE) {
print "Warning: check PHP file: $filename\n";
next FILE;

if (!/^\s*$/) {
print "PHP file OK: $filename\n";
next FILE;
} else {
$IS_SPACE = 1;

# --------------------------------------------------------------------------
# Functions
# --------------------------------------------------------------------------
sub readFile {
my $filename = shift || die "readFile: need a filename";

open FILE, $filename or die "readFile: couldn't open $filename\n";
my @contents = <FILE>;
close FILE;

return @contents;