This is something the windows interface people have been dealing with for years, and they have a lot of decent solutions out there for automated UI testing, but most of them are fairly sensitive to things like widget placement, etc. There are also products like Silk that will both do functional and load testing of your app. But almost all of these are targeted at QA folks, which are far too late in the game to actually let you catch your errors. Usually by the time things get to QA as regressions, you have to go through a bug process, etc, and it's just a huge pain. There was an old Rational ad that I always think about when I'm unit testing: Is a mistake a mistake if nobody ever sees it?
Anyway, HTTPUnit seems to me to be the clostest thing to the missing link I've yet seen. It simulates the servlet container and the browser (including javascript, frames rendering, etc) and lets you unit test servlets, jsps, etc, along with write java code that actually walks click paths in the application, sets form values, does posts and verifies UI integrity. All for the developers. All without having to start Weblogic. I'm currently working on integrating it with my application platform to ensure that it serves our needs, but the promise so far is huge.
What I find encouraging is that after the dotcom crash and the whatever the hell we're in now, it seems like the numbers for women showing up in the hiring pool that are actually really qualified and solid candidates are really looking up. It gives me some fairly large measure of hope for fixing the gender gap in software, I suppose.
Then I started working in Java. Did I mention I learned how to properly do OO using Smalltalk? All of my Java code always seemed like a hack. There were static "helper" functions cropping up that constantly made me ill. And most importantly, I was writing code that did conditional downcasts that I couldn't work around.
Then it dawned on me: in Java, if I need it, I can't add a method to string to clean my code up. Swing is fixed. All my commericial libraries have fixed APIs. In Smalltalk, if you need to add a method to Boolean, you just go right ahead and do that. The libraries and your code merge into one sort of blob that are both honed to each other. This is a clean, elegant blob that works perfectly, but it also means that you incur the penalty of maintaining all that gargantuan amount of code you've just "tweaked" to make cleaner.
I'm really not sure which is a better tradeoff, but the idea of tweaking the JDBC drivers and the appserver to really make my code smooth, and then incurring the weight of maintaining those 250-500kloc of code that I could previously write off as someone else's problem doesn't sound all that hot. Maybe I'll live with my Java hack code and simply remember OO nirvana like a sweet, pleasant memory.
What I discovered today was Bonkers, which is a non-loose Mate in tea bags. The genius thing there is they have super caffeinated Mate, which is like making a good thing 10x better. It's called WIRED & CRAZY MATE; I encourage you to go find some at your grocery store (I shop at the Piedmont Grocery, which is Divine, and carries all the Bonkers you need).
What this means from a practical perspective is that if you have deep path structures in your webapp, and you have your appserver deeply structured (such as WebSphere), you'll run into stray messages like:
(The system cannot find the path specified)
The problem is, WebSphere puts the app (by default) at C:\Program Files\WebSphere\AppServer\installedApplications\hostname. When you tack this onto the deep, nice file structure you have in your app, suddenly you're looking at paths far in excess of 256 characters long. And the beauty of it is, WebSphere fails silently and tells you that it deployed correctly. You only see the above message when you try and copy the files manually into the deployment directory using something like ant.
The solution is to tell the appserver to deploy the app (when you're pushing it in the deployment tool) into a shorter path, like C:\temp\ws. This way, it will actually deploy correctly when it says it did.
The part that really blows me away is that people actually believe this sort of junk and then parrot it to the rest of the world. How is Java too powerful? It has OOP that works and wasn't tacked on as an afterthought? It helps you structure your code so you can actually not end up with a total mess at the end of things?
My only retort to this article is that scripting languages should be used like duct tape. They seal up big cracks in software systems so they work, but they're almost always a hack, and when you try not to make them a hack, it's a hell of a lot more work than it would have been to actually write it using a full featured language in the first place.
I'm not here to argue about strong versus weak typing. I'm here to encourage people to actually TRY the technology in the real world before they start becoming a pro or con evangelist. And, yes, before you ask: I've written more Perl for money than I care to recall. There's a reason why I use Java now, and it's not because it's fashionable.
Over the last 6 months, I've had the opportunity to put out ads and get resumes for various software positions in the bay area. 6 months ago, we would get 200 responses to a job posting in the first day, and about 500 in the course of a week. We put out an ad last week for a java/XML person, and got a grand total of 100 resumes in a week. I see this as a definite sign of real economic recovery. We also didn't get any resumes from the people that were applying for jobs way below their skill sets, which I find relieving. At one point, we were hiring a junior engineer and got a resume from one of the original multics designers. That was a depressing day.
Anyway, long story short: it seems economic recovery is upon us, in some sense (cross our fingers). With this recovery, I'm seeing a lot more mention of alternate technologies and people pursuing real project development in things like Ruby and Python. And, of course, C# is rapidly gaining momentum. There's a feeling of a breath of life and fresh air in the industry, like someone opened the attic and remembered that a long time ago we used to actually invent new things and not keep banging out junk using the same old tools, and maybe they should invest some time, money and effort in moving things forward.
Here's to the future.
The thing that struck me most about the book is always the thing that struck me most about dealing with enterprise software in general: the RDBMS is like a giant boat anchor that's unfortunately necessary. It seems like a massive chunk of the book is dedicated to dealing with getting your clean object model into and out of the database while not sacraficing too much efficiency or cleanliness. To his credit, Mr. Fowler does a great treatment on the subject that's clear and easy to understand and implement. I thank my lucky stars that hibernate exists, and implements a large number of the patterns in the book cleanly and efficiently so I don't have to.
Integer i = 12;And will "auto suggest" that it be changed to:
Integer i = new Integer(12);Which conveniently solves a major language shortcoming with just an IDE hook. It does a LOT more than that though, working around a lot of other Java foibles cleanly and gracefully.
Other useful blogs I like to read:
misbehaving
boingboing
k5
/dev/null
crazy bob
igor's lampost
vanity foul
James Strachan's Radio Weblog
Otaku