Spring 3.0 – Interesting after all…

Spring 3.0 RC1 is out!

I’d initially thought Spring 3.0 was a bit of a “yawn”. The previous posts on it left me underwhelmed (and… to be honest my interest in new technologies has been elsewhere.

However, Juergen’s latest post has me a bit intrigued.

Yeah there’s support for JEE6, Portlet 2.0, full Java 5 support and their “Spring expression language”. Blah…blah… Still awake? Yeah… me neither.

But, its significant additions to the annotations for “declarative model validation” and advanced binding for Spring MVC (again through annotations) that are really interesting to me.

The guys at Spring can do a better job of explaining than I can so see here and here.

This looks really interesting and provided there are a bunch of standard validation and formatting annotations included with Spring 3.0, it would be immediately useful on my projects. A clear and consistent place to put validations and formatting details where they make the most sense.

I know some people might think that placing that information (especially the formatters) into your model is a violation of separations of concern. But, I don’t see it that way. The formatting is still handled by a separate class (the annotation) and in any app there would have to be some mapping between the model and how its formatted for the screen. I see these annotations as an elegant solution (if Java can be elegant ;-)).

Have you looked at Spring 3.0 yet? If so, what are your thoughts?

Coming up on Three Years since making “The Switch”

In another month or so it will be 3 years since I switched my main computer from a Windows Compaq laptop to a MacBook Pro. So… its time for a Mac Post rant. πŸ˜‰

Even though my Mac is near 3 years old it still works great (that doesn’t mean I’m not thinking about getting a new one, but… it still works great! :-) ). Macs aren’t perfect and there are some issues to be sure, but… overall I’m very pleased.

Now that I’m a Mac User raving Mac fan-boy, I get into PC vs Mac conversations all the time with my fellow geeks. Its always interesting and I try to keep the focus from being “Macs are SO much better than PCs” (they are, but… πŸ˜€ ) to more of a “For me, the Mac just fits me really well and the extra cost is more than made up for by the enjoyment I get from it.”

After my last conversation I was driving home reflecting on it when it occurred to me: In every discussion I’ve had with people who are dissing the Mac, those doing the dissing havenever used a Mac at all! *sigh*

Whereas almost every Mac user has spent significant time on both platforms (indeed – I’ve been a Windows user for 15 years at least).

I realize this is anecdotal, but I know a lot of people who have switched to a Mac and all are happy with their decision. I don’t personally anyone who has switched the other way (though I’ve read of a few people who ditched Apple for Linux for semi-religious reasons – real geek types).

The other day, I was talking to a guy who does a lot of “PC Support” stuff on the side. He’s always over at somebody’s house replacing hard-drives, removing viruses, restoring registries, etc. He said to me that the number of calls he gets from people after they buy a Mac drops off to maybe a 10th of what they were before. A tenth!!! When the do call its usually not a Mac issue, but more likely that their ISP is having trouble or some other networking issue.

Finally, when I bought my Mac it came with OS X version 10.4, I’ve upgraded it to 10.5 and now to 10.6. Each time it went off without a hitch and in less than an hour I was back in business. Sure.. there have been a couple of applications that needed to be patched/upgraded but no errors or major problems. I’ve never once had to do a “complete reinstall” as I’ve had to do every time with my Windows boxes.

So to all my fellow geeks out there with Windows. Good luck with that upgrade from Windows XP to Windows 7! πŸ˜€

Ouch!!

Up until 4:00 on Sunday I’d made it 39+ years without a) breaking a bone b) visiting an ER for me and c) riding in an Ambulance.

Now I’ve accomplished all three!

On Sunday I was at my parent’s place on Lake Miltona. My dad had setup a “zip line” that ran from a tree near the beach out into the water to a rig attached to our boat lift.

The idea is simple: Climb up the ladder, grab the handle, go for a ride, land with a splash at the end.

Sounds fun, eh? No? Hmm… well I suppose you’d have to be there.

It was fun… until the cable broke while I was mid-ride.

I fell about 5 ~ 6 ft down onto the beach landing on the water’s edge. The handle hit my head and cut me a little. But as started to get up, I looked at my foot and… it wasn’t pointing the way its supposed to point (it looked like a bad football injury.. the kind they won’t show replays of :-/ ). I knew I wasn’t going anywhere.

After a nice ride in the ambulance and a warm welcome in the ER I learned that I’d broken my fibula and dislocated my foot (well… one look at my foot at that much was obvious).

The excellent doctor at the hospital gave me some “happy-forget” medicine and put everything back in place, wrapped me in a splint and then sent me on my way.

There was potential that I might need surgery to have a plate put in, but after visiting an orthopedic specialist yesterday it appears that I’m very lucky and things should heal up just fine.

Looks like I’ll be in a cast for 4 to 6 weeks. Fortunately, I’m not in any pain. I’m being very careful, but… so far, so good. Its nothing like I thought it might be.

The biggest issue is the inconvenience of hobbling around on crutches and having to cancel my big trip I was leaving on this week. :-(

On the plus side… I should have plenty of time for Ruby, Objective-C, and other technical pursuits… :-)

Java is fading…

Earlier this year came the news that Oracle was buying Sun. And now this?

After today’s news, it sure looks like its going to happen sooner than later. What next? IBM sells off its application servers and Rational software to Microsoft?

Java has already grown rather stagnant. There’s little innovation or exciting things happening in the Java world these days. The few interesting things that are out there, don’t seem to get any attention (can you say GWT?). Most of the “thought leaders” that I followed into the Java world, have moved on. I can’t substantiate it, but I wouldn’t be surprised at all to find that most of the non-corporate sponsored open source projects commit levels are a fraction of what they used to be three years ago.

One of the unique things about the Java community was that although Sun owned Java, they really weren’t a software company. Yeah… there’s Solaris, but they didn’t even know what to do with that outside of running it on their servers. Sun took an engineering interest in Java, but never did figure out how to really make money from it. That left Java fairly open. Lots of freedom for small companies to make a dent.

Yes, the big guys were there playing the Java space – IBM, Oracle, etc, but… they didn’t own it.

One thing Oracle knows how to do is make money off of software. Have you ever tried to buy a license for Oracle? Hold on to your wallet – tight! Although I’m sure Java will always be free, look for Oracle to use Java as leverage to pull you into its fold.

Furthermore, beyond the core DB server, I have yet to work with any software written by them that’s even remotely usable. Working with Oracle still brings back memories of the “Certified Novell Engineer” and the Encyclopedia Brintannica volume of books that came along with it just so you could figure out how to get two computers to talk to one another (if you’re old enough to remember those days. πŸ˜‰ ).

I just can’t see how this is good for Java in the long term.

Now SpringFramework… er… SpringSource, original antithesis to the Java Corporate community, is being purchased by a very odd suitor. What’s the point of this? More and more I feel the Spring Framework is becoming that what it was originally designed to combat – complexity in Java. When it takes a 800 page book to cover the material, its no longer simple.

Don’t get me wrong – I still like using the SpringFramework, and given that I’ve been working with it since pre-1.0 days, the complexity has been manageable. Starting from scratch is a fairly daunting task. I also believe has one of the best, most consistent APIs I’ve worked with.

Its possible that Oracle won’t change Java and its possible that VMWare won’t change Spring. Its also possible that Duke Nukem Forever will ship, but it ain’t likely. πŸ˜‰

With all this change happening and the rising interest in other languages – Java two years from now will be much different and quieter place.

What do you think?

Building the “Yazoo” System

When I was a kid, I worked on a small golf course my family owned (we no longer do). One of my tasks was to mow the ditch out in front of the parking lot. The parking lot was about 20 ft above the highway and therefore the ditch had a fairly step slope to it. Mowing it was a challenge. The only mower we had that was up to the task was one called Yazoo. They don’t make this model anymore, but it was a rear-steer three wheeled mower with wide wheelbase, a large mowing deck out front and a fairly low center of gravity. It was the only machine we had that could do the job.

However, doing the job was a bit of an art. The mower’s transmission was a bit old, and unless you kept your hand on the lever, forcing it into gear, it liked to slip into neutral. On top of that, the slope of the hill forced you to sit on the very edge of the uphill side of the seat or you risked sliding off. Finally, the real trick was managing the weight of the mower deck. At the steepest part, enough of the weight came off the high-side wheel. It would slip, lose traction, and cause the mower to turn uphill until you were stuck with no other option but to back down the hill and start over. The only way around this was to carefully transfer the weight off the mower-deck by lifting it slightly with the lever used to raise the deck for transport. Then, and only then, could you successfully mow the steepest part of the hill. Also, keep in mind that any wheel spinout left a nasty scar in very public view of all that drove by the golf course (and the ensuing “discussions” about my lack of mowing talents with my father).

To recap, the trick was – sit on the very edge of the seat leaning heavily to the hillside, with one hand hold the mower in gear, with the other hand hold the steering wheel, with the right foot, push carefully down on the “deck lift lever” and with the left foot balance yourself (100% OSHA approved! :-) ).

So what does all this have to do with software?

The other day I was working through some issues with the system we’re building. The system is a replacement for a semi-manual data entry process.

In it, there’s a lot of “if use sets flag X and Y then set flag Z to true” and a lot of “the users are trained to know that they need to add B when they see A”, etc. All of these rules the users need to remember make getting the system to work sound a lot like describing mowing the ditch with the Yazoo.

The system feels like someone observed me mowing and build a new mower to make my life easier, but missed the point. They put a button the steering wheel that as long as I push it, will hold the mower in gear – “Now you can keep both hands on the wheel”, they made the seat twice as wide – “Now you can just slide over instead of leaning on the edge”, they made the “deck lift lever” foot operated instead of hand – “Now you’ve got a pedal to push”.

If only someone had asked “why?” and kept asking “why?” instead of just observing and asking “what do you do?”. If they had, the designers would have built a mower that stayed in gear, had much better weight over the powered wheels, and… maybe an iPod holder (every project needs a little gold plating!!)

Far too often analysis seems to end at asking “What do you do?” with out asking enough about “why?” is it done. I recommend following the “5 whys” to get the root cause. This is really important! Only with that kind of questioning do business systems really deliver the productivity gains and competitive advantages that justify their costs.

There is a danger in all of this though. Its easy to copy the existing process – broken as it may be at least its known to work. As you start to build the system that strives to solve the root cause, there is the real chance that you may deviate too far from their old process and miss the mark – creating clever software that doesn’t solve the real problem. Mistakes during the analysis at this level can be disastrous.

The key to avoiding it? Agile Methods.

Get the software with the new process in front of the users ASAP – short, focused iterations. Have the users use it to do their jobs (not just “play” with it) and get their feedback… and continue to ask why.

Testing MarsEdit

I’m testing out MarsEdit. I’ve been using TextMate for my blogging and I really like it. Except it has this nasty habit of screwing up my posts by escaping all my quotes and putting “\n” everywhere I hit return within my post (the posts are all written in HTML so it should ignore that stuff).

I just learned that MarsEdit supports editing in TextMate as an “integrated” external editor.

I’m hoping this will avoid my TextMate issue (MarsEdit does all the publishing instead of TextMate) and hopefully find some other useful features.

Merging with Subversion and IntelliJ IDEA 8.1.x

A few days ago I created a branch in Subversion to work on some refactoring ideas I had. I wasn’t sure it would ever see the light of day (and I’m still not ;-)), but I wanted a “sandbox” to play in.

Today I wanted to update my branch with the changes the other developers were making in the “trunk”. In theory this should be straightforward, in practice, well… that’s another story.

The documentation for how to do branch merging with IDEA is lacking in many ways (unfortunately this is true for a lot of IDEA features :-(). There is just the most basic description of how the dialog works, but no help for the actual process of merging your code from another branch.

First, make sure the local, working copy of the project is current with no changes to it. You want to be in a “clean” state so that the only changes to your working copies are the changes made during the merge process itself.

Next, choose the Version Control/Integrate Project… option from the menu. In the dialog that appears set the “Source 1” path to the branch you’re working on. Select the revision # where the branch started (hopefully there’s a helpful note when the branch was created ;-)).

“Source 2” should be set to the path of the “trunk” with “HEAD” as the revision(remember, we’re merging the trunk’s changes into our working copy of the branch).

Next uncheck “Use Ancestry”, I’m not sure what this does, but when checked I tend to get a bunch of files reported as “different” that really aren’t during the merge process

If you want to see what files are effected by the merge without actually doing it, check the “Try merge, but make no changes” option.

Click “OK” and let it fly!

After a bit, you’ll get a report in the “Version Control” tool window that describes the files that were changed.

If at this point things look really screwed up, or you don’t understand what Subversion/IDEA did – you can “Revert” all your changes and go back to the way things were before the merge attempt.

The last step in this scenario is to commit the merge changes into your branch.

You should now be current with the changes from the trunk in your branch.

And then there are bad days…

I’ve had my own consulting business now for a little over 4 years (wow, already? Man… time flies!) and I’ve really enjoyed it.

Having my own consulting business gives me more freedom to apply myself where I think I can provide the best benefit to my clients. It puts me in control of my professional life versus relying on some manager to “guide” me (“John, I really think you’d be a wiz at Struts and EJB 2.0!” – no thanks!). On top of that, I tend to make more money as well (not a bad thing! :-) )

I frequently recommend going “independent” to friends in a similar situation as myself so that they can share in the success that I’m enjoying.

However, sometimes Shit Happens.

About a year and a half ago the “vendor management” firm for my client declared bankruptcy (I wrote about it here). It was a real made-for-Hollywood style con game being run by a couple of thugs at Chimes (actually their parent company Axium). I ended up losing a bunch of money, but thankfully I still had work and my client at the time did all that they could to smooth over a very bumpy situation.

So for the last year and a half my company get tons of letters explaining how the bankruptcy trust is spending more money on accountants and lawyers. I filled out paperwork to try to claim the money my company was owed hoping to at least see some of it (though… I know Smalltalk has a better chance of becoming mainstream than I do at receiving any money).

Then last week I get yet another innocent looking letter from the bankruptcy trustee…

Ah… but this one was different! Not only did I lose money that was owed to me when Chimes declared chapter 7 bankruptcy, it appears that now the trustee wants my company to send back the payments it received FOR THE PRIOR 90 DAYS!!

So, due to no fault of my own (or my end client for that matter), these crooks believe they’re entitled to nearly 1/3 of my company’s annual revenue. They’re claiming that my company may have received “preferential payments” and according to the bankruptcy code the trustee has the ability to go back 90 days looking for questionable payments (and I’m not alone).

I assume the code is there to catch a situation where crook knows he’s about to go bankrupt so he decides to pay off his friends first before he goes under and everything is turned over to the courts.

However, in my situation that is clearly not the case. There is a clause to the code that excludes “ordinary course of the business”, but its on me to prove it. So it looks like I’ll be talking with a lawyer…

So, back to my original comment about being an independent consultant: Today is NOT one of those days where I’d be recommending it. :-(

Quick Eclipse Tips

So… these days I’m bouncing back and forth between Eclipse and IntelliJ IDEA. I prefer IDEA, but my client prefers Eclipse. * sigh *

One of the things that I really missed in Eclipse was IntelliJ’s convenient “navigate to implementation” feature.

When I’m developing interface-based-design (especially when using Spring) I’m constantly wanting to jump to the implementation of an interface, but the normal way of navigating in Eclipse only takes me to the interface (holding down control while clicking on the method you want to navigate too). There are no “gutter” indicators like IDEA has.

Finally, I discovered Eclipse’s shortcut for going to an implementation: Ctrl-T!!

It may even be better than IntelliJ’s implementation… maybe.

With your cursor on the method anywhere in your code (where its declared or where its used) hit “Ctrl-T” and Eclipse will display a popup with all the classes that implement that method. Very slick!

At first I thought I was probably the only guy who didn’t know about this shortcut, but it was news to at least two of my colleagues as well… so I thought I’d share!

Also, while I’m thinking of it: Ctrl-O is another shortcut that I’m using a lot these days. It brings up a list of all the methods in the current class that can be filtered as you type.

Trying Baseball

Agile is the buzz word everybody uses these days. A lot of places claim to be doing agile development, but follow very few if any of the practices. Then when the inevitable failure comes around they blame the “Agile” for it and run back to their old, unproductive process that the never really got away from.

This is an old post from Ron Jefferies that I missed when it was posted. Just thought I’d share in case you missed it too. πŸ˜‰

Developer At Large