HomeDigital EditionSys-Con RadioSearch Java Cd
Advanced Java AWT Book Reviews/Excerpts Client Server Corba Editorials Embedded Java Enterprise Java IDE's Industry Watch Integration Interviews Java Applet Java & Databases Java & Web Services Java Fundamentals Java Native Interface Java Servlets Java Beans J2ME Libraries .NET Object Orientation Observations/IMHO Product Reviews Scalability & Performance Security Server Side Source Code Straight Talking Swing Threads Using Java with others Wireless XML

What a month this one has been! Life has this wonderful way of letting you know that no matter what you're feeling at any given moment, you just can't predict what's going to be round the next corner. One of our chaps is at this precise moment lying flat on his back, bored senseless, in our local hospital. It all began last weekend.

Murray was having a quiet weekend - not doing much, just relaxing. He climbs into bed on Sunday evening with a wee nagging pain in his stomach. By the time Monday morning rolled round he was feeling a pain never before felt and the doctor was called immediately. Doctor then called an ambulance, and within five hours Murray was on an operating table having his ruptured appendix removed.

In a very short space of time poor Murray's world was completely turned round. All plans he had, all plans we had, are on hold for a number of weeks until he's back on his feet again. Poor bugger. I don't envy his position at all, complete with a drip into his arm. I have to admit to being a bit of a wimp with regard to this sort of thing. Needles and blood don't really work for me. I'm the sort of person that can nearly pass out watching "ER," and as far as I'm concerned nurses who have to deal with this sort of thing daily are pure angels. And if all that isn't enough, no e-mail access! The man is in hell! I think we should spearhead a campaign to have hospitals linked up to the Internet with at least 64K of bandwidth to each bed.

One thing about hospitals and the whole general health thing, it certainly focuses your mind. With us all going in on a daily basis we are more thankful for our own state of health, and now even more determined to try and maintain a general state of good health. However, we've been having some rather interesting conversations regarding all the software that must be running throughout the hospital. In the ward in which Murray is laid up is a vast array of devices that are continually flashing, reading, monitoring, alerting, whatever.

Let's imagine that the world is the utopia we Java developers believe it will be one day in the fact that Java has found a home in many of these application areas. Assume for the moment that Java is the underlying software running within a medical monitoring tool. Now, given that, let's pretend something goes wrong. Since this is all make-believe so far, let's pretend that a java.io.IOException is thrown for some reason. I don't know...the port reading the sensor from the patient goes wrong. What do you do? What is the worst-case scenario here? Well, death, I suspect.

When you think about it, how many of us would have faith enough in our own code to have our lives depend on it? I know there are a number of classes I've written that I'd probably risk somebody else's life on, but not my own!

Okay, we jest here. But when you think about how Java is structured, there's really so much to go wrong that's not even your responsibility. We all assume the virtual machine we entrust our bytecodes to has been coded to a very high standard and will run 100%. Of course it's not 100%, but we as developers have to make that assumption - otherwise we're merely building a house of cards.

That said, I believe I'd be more comfortable with, say, Java as opposed to a C/C++ alternative. Many other languages aren't quite as tolerant of mistakes as Java. The exception handling is very good, considering that many applications can still run after an error has been reported, which is in contrast to a bad memory reference in C/C++ that has the potential of bombing the program completely.

If anyone has had the experience of writing mission-critical health applications, I'd love to hear from you. Join our mailing list and let us know just how much testing goes into this kind of software. I think I'm scared to know this information in case it's not as much as I would expect. So, fingers crossed.

One L
This month we also ran into a funny wee problem that had us chasing our tails for at least a couple of days. I'm more than confident this is a situation many of you have had happen at some point in your development. Let me take you through the tale.

One of our clients, who will remain nameless, had this bright idea of using the password anjelia1, with a "one" at the end as opposed to a lowercase "L." Not a problem, we figured, and never gave it much thought until we started to move the end system from our development server to their production server.

For some reason we couldn't get our database connection up and running. It kept saying "incorrect username and password combination." The problem was further augmented by the fact that we had no control over the database as it was running on an external server. We couldn't even change the username and password to one that we knew.

So we had to work with the one we were given. But we were convinced we had the right username/password entered. Then one of us joked that the "1" looked very like a lowercase "L." Well, in actual fact, with the font choice in our telnet window and the font of the normal text in Netscape, they rendered to be pixel for pixel exactly the same. We had no idea what the "L" we had typed in the configuration file.

Needless to say, we changed the configuration file very, very carefully, ensuring that our hands typed a "one" as opposed to an "L." Well, after restarting the server, the whole thing burst into life and the problem was solved.

It may seem obvious now, but at the time it was an eventuality we didn't even think about. So the moral of the tale is that from this point forward we have banned all use of ones and zeros from all usernames and passwords. Drastic I admit, but a decision I feel comfortable in enforcing.

I'm running out of space at this point so I'll just have to remember to tell you next time about a really bizarre encounter one of our chaps had with a Microsoft lawyer. If you knew how remote we really are, you'll think it even more bizarre. Next month, I promise.

Mailing List
As you know, each month I plug the mailing list that this column spawned. Well, some good news on this front. No, this isn't the last plug, but in fact a report of something good being born from the whole discussion list. We've been discussing many interesting topics, and an idea that's been bouncing around was that of an open-source Java library. This is where a core set of libraries would be held that would serve as a handy set of utility classes. We looked into offerings from other sites trying to do the same thing, but felt many of them lacked proper management. So at this precise moment we're looking to form our own version of this. For more information on this and other threads of discussion, come and join our mailing list. The good news is that getting off the bugger is just as easy as getting on to it.

To join send an e-mail to [email protected] with subscribe straight_talking-l in the body of the e-mail. From there you'll get instructions on how to participate on the list.

Salute of the Month
This month I'd like to take my hat off to three people who, together, do a fine piece of work that all of us in the Java community benefit from. I'm talking about the core team behind the Apache JServ project, which enables the Apache Web server to run Java Servlets: Jon Stevens, Stefano Mazzocchi and Pierpaolo Fumagalli. They not only make Apache attractive to use, they're also pretty cool guys. We haven't come up against any combination like Apache + JServ that makes running servlets so easy, without compromising performance.

Jon "read-the-faq" Stevens deserves a special mention for the effort he puts into maintaining the JServ mailing lists. We've come across many in the corporate world who feel really uncomfortable with the lack of official support for using the likes of Apache and other open-source software. But the speed at which Jon answers questions puts a lot of companies that charge for this level of support to shame. So, Jon, on behalf of the developer community, thank you, sir, for a job well done.

Book Review
This month I haven't had time to read any books, which is truly a shame. If anyone has any good references to books they think I should read, please e-mail me. Would love to hear from you. But as one door closes, another opens. This month we've discovered the wonder of Neil Diamond. The man is a saint! I never appreciated what I dismissed as his middle-aged music before, but after hearing one of his compilation albums I realized I hadn't known just how much stuff he wrote that's been covered by many other artists. So I'm on a journey of Diamond-discovery and who knows where that will lead me to.

On that note, I have to tottle off now and get on with some real work....Sweet Caroline... bom-bom-bom!

Author Bio
Alan Williamson is CEO of n-ary (consulting) Ltd, the first pure Java company in the UK. A Java consultancy company with offices in Scotland, England and Australia, they specialize solely in Java at the server side. Alan is the author of two Java Servlet books and contributed to the Servlet API.
He can be reached at [email protected] (www.n-ary.com).


All Rights Reserved
Copyright ©  2004 SYS-CON Media, Inc.
  E-mail: [email protected]

Java and Java-based marks are trademarks or registered trademarks of Sun Microsystems, Inc. in the United States and other countries. SYS-CON Publications, Inc. is independent of Sun Microsystems, Inc.