Monday, June 30, 2008

More Items on my Bookshelf

As a follow-up on my previous post, I have a confession to make. When I looked through my recent additions in Delicious Library, I realized that I had accidentally skipped one of my recent purchases. So in an effort to rectify that, here are some more items that recently found themselves added to my collection.

The item that I forgot to mention, was TCP/IP Sockets in Java. One of the tasks at my day-job is the maintenance of a monitoring service for diagnostics machines - also known as sample or specimen analyzers. The communication between our Laboratory Information System and these machines is of the utmost importance to our customers, and the laboratory staff need to be alerted when the analyzers fail to send their data because of a stalled translator service.
The monitoring system is basically divided in two parts: the service daemon which monitors communication, and the dashboard user interface that displays the status. Both of these are written in Java, enabling monitoring on multiple operating systems - the ubiquitous Windows workstations, as well as Mac, Linux, Solaris and other Unix-derivatives. The data exchange between these parts relies on multi-threaded socket communication, and that's why I bought this book, as I'm sure I'll need it when I go about rewriting portions of the engine to make it more scalable and alleviate the limitations that the current version is bumping into.

Which brings me to the next item on my bookshelf: Java Concurrency in Practice. As computers gain multiple cores and both operating systems and CPUs get ever smarter about dividing up the workload among the available resources, not to mention the fact that users don't like waiting around twiddling their thumbs while data is getting processed, it becomes more and more important to learn how to write multi-threaded applications.
Now Java was built from the start with multi-threading in mind. Over the years, the APIs have been improved, and Java 5 and Java 6 added classes that make concurrent programming a lot easier, shielding developers form the low-level plumbing needed to make it happen. And there's a lot more planned in Java 7 to help sorting and other tasks make better use of the processing powers offered by multi-core environments. This book gives you a lot better insight about the tricky little details of concurrency, explaining how processors, in an effort to maximize throughput, may shuffle instructions around in memory to optimize performance. If you're using Java and want to make optimal use of concurrency, this is a must-read.

The last item that I want to mention this time around, is Effective Java (2nd edition). Considered by many as the bible of properly using Java, this book was revised and updated for Java 6, exploring new design patterns and language idioms, showing the reader how to make the most of features ranging from generics to enums to annotations to autoboxing to (you guessed it) concurrency utilities.
As I'm spending more and more time with Java, I'm looking for a deeper understanding of the technology and the language, hoping to make my code clearer, more correct, more robust, and (fingers crossed) more reusable. Don't worry, I'm still using Revolution as often as I can - it's the language that I jump back to whenever I get a chance. It makes things so much easier and with the upcoming browser plug-in, I can avoid the un-fun of Java applets, AJAX, Flash and Silverlight.

But it is equally important to look around, learn from the available technologies and then pick the best tool for the job. Revolution is a wonderful solution for desktop applications that both need to look good and connect to databases and the internet. But when it comes to building highly-scalable multi-threaded applications, there's no replacement for Java. Ah, if only we could marry these two cross-platform technologies. Or maybe we can? That will have to wait for another post, however.

Monday, June 23, 2008

New Items on my Bookshelf

One of the defining characteristics of Information Technology, is that it is constantly shifting, and that you need to spend a lot of time just to keep up with the topics that you focus on. Not to mention the pet projects that you hope you'll eventually get around to but have already bought some books on for that magical moment when have time to actually read them.

And maybe I should wait to buy these books until I have that copious free time needed to properly digest their contents, but hey, what better motivation to move things along than a growing stack of books that you convince yourself have to be read before the end of the summer? A little pressure never hurt anyone, right?

On with the show - what did I recently add to my collection?

The Definitive ANTLR Reference - if you've ever dreamt of building domain-specific languages, ANTLR is the tool to get if you're not already knee-deep in LEX and YACC. Now why on earth would you need that? Well, if you're building business applications, this sort of embedded scripting languages can make a world of difference when it comes to customizing the workflow of your application.
Granted, if your focus is exclusively on MacOS X, you're better off making your application OSA-scriptable, so that your users can interact with your application via AppleScript. Or go one step further, and embed Automator actions. But if you're not that lucky, and you need cross-platform scripting, ANTLR and the visual grammar development environment ANTLRWorks will make your life a heck of a lot easier - producing code that is actually readable, rather than the undecipherable state machine mess that you get from YACC.

And now that we're talking about MacOS X (ooh, there was a smooth transition to the next book) - I just got my copy of Cocoa Programming for MacOS X by Aaron Hillegass. The just-released third edition was updated for MacOS X Tiger and Leopard, including coverage of XCode 3, Objective-C 2, Core Data, the garbage collector and Core Animation.
While I also have a copy of the Wrox-book Beginning MacOS X Programming, this will be the one that gets me going with Cocoa (that's my story and I'm sticking to it!) as the last Mac-specific development I did was using Think Pascal and the first 5 books of the original Inside Mac series, back in the day when Macs used Motorola 680x0 processors and we were happy to get System 7.

The last book I want to mention is The Art of SQL. Now I may live and breathe databases but you can never learn enough tricks of the trade. In this book, the author aims to teach people who are no longer novices how to write good SQL code from the start and most importantly, to have a view of SQL code that goes beyond individual SQL statements.
Remember the days when developers managed to fit entire accounting applications, including the data, onto a set of floppy disks or (gasp, we will never fill that up) 10 megabyte hard disks, running in 128 kilobyte RAM or less? With the way database sizes are exploding nowadays, you need to plan ahead and employ a different strategy - so I'm definitely looking forward to getting more in-depth than ever.

And just in case you're wondering: no, I don't always cuddle up on the sofa with a mug of hot cocoa and this type of book. Whenever I get a chance, I'll read books by Raymond E. Feist, Tad Williams, David Eddings, Margaret Weis and Tracy Hickmann. Hmm, another stereotypical geek trait: fantasy and science fiction. Ah well, when the shoe fits :-)