If You Have Any Interest In Looking at Groovy, Read "Programming Groovy"

It's probably glaringly obvious, but I haven't had much time for blogging lately. Any regular readers will know that it's due to a total focus on the work I'm doing for Broadchoice and our Collaboration Platform and Analytics Suite. A big part of my ongoing effort with this has been further refining my Flex and AIR skills, as well as ramping up quickly on Groovy.

Since Groovy seems to be a slowly growing topic of interest around the ColdFusion blogosphere, I thought I'd take a moment to recommend "Programming Groovy" by Venkat Subramaniam. This is a very recent book (April, 2008) and is by far the best of the Groovy books that I've looked at.

While you do need a basic understanding of Java and object-oriented programming, the book does not assume a huge amount of experience and it goes through the features of Groovy (as well as how they actually work under the hood) in a very step-by-step, systematic way. Each element is introduced and explored (with lots of code examples) before moving on to the next building block.

The book is essentially broken into three sections: Beginning Groovy, Using Groovy, and MOPping Groovy. The beginning section explores what Groovy is, the differences between it and Java, and begins to look at the core features such as Closures, dynamic typing, and the convenience methods that Groovy adds to normal Java classes. The second section is a more thorough rundown of using these features to solve problems. And the third section is devoted to the Meta-Object Protocol, which is Groovy's approach to fully dynamic programming, runtime method injection, introspection, and DSL (domain-specific language) creation.

In many ways, Groovy is quite similar to ColdFusion. It doesn't provide the huge services layer that CF does (such as PDF creation or image manipulation), but is more low-level. All of the things that CF'ers have been experimenting with like duck typing, onMissingMethod(), dynamic method invocation, etc., are all present in Groovy.

Like ColdFusion, Groovy attempts to make much of the common grunt work that Java requires go away. It adds many helper methods to commonly used Java classes (such as the Collection classes) to make many tasks that are overly complicated in Java work much more simply.

It also places much more trust in the developer, and as a result, highly advises you to adopt a test-driven development approach to ensure code quality. Unit testing is built right into the language, so this is very easy to do. You don't have to catch every exception that could ever be thrown within your code as Java forces you to do. You don't have to type everything, though you can if you want to. Essentially, it offers a pretty sweet spot where you can decide how dynamic you want to go vs. how much you want the compiler to check at compile time.

We're experimenting to a certain degree with integrating Groovy code into CFML-based apps, since its dynamic nature makes it quite a bit easier to deal with than straight Java. Anyone who's tried to integrate CF into a lot of Java code will grow to hate the JavaCast() function. A lot of this goes away when integrating with Groovy since it is dynamically typed.

In any event, the real point here was to direct folks to "Programming Groovy" if they have any interest in checking out this very cool language. I've found Groovy to be quite fun to get to know, and this book was really helpful in understanding its inner workings and capabilities.

Comments Comments (1) | del.ico.us del.icio.us | Digg It! Digg It! | Linking Blogs Linking Blogs | 5965 Views

Review of the Amazon Kindle Wireless Reading Device

I recently bought an Amazon Kindle and thought I would share my thoughts on it. Before someone drops $400 on something, they usually want to know if it's worth it.

Overall, the Kindle is amazing. The text is completely clear and readable. I quickly forget that I am looking at a screen at all. The technology draws no power to keep text on the screen, it only uses juice to refresh the screen. There is no "burn in": if you put it down and pick it up two weeks later, you're still fine, and it used no power to keep the screen that way the whole time.

The device uses Sprint's EVDO 3G network to connect to Amazon and let you download the books that you buy. They download in under 30 seconds. The device has enough memory to store a ridiculous number of books, and if you want to drop $20 for a 4 Gb SD card, you basically go to unlimited storage space.

The books are generally 30-50% less than the printed versions. For about $100 so far, I have the entire H.P. Lovecraft library (of course), 1984, The Singularity is Near, Patterns of Enterprise Application Architecture, Implementation Patterns, Agile Java Development with Spring, Hibernate and Eclipse, and more.

Further, you can email yourself documents to a special Kindle email address for automatic conversion and downloading to your Kindle. The address only accepts mail for addresses you specify to avoid any spam. The conversion costs 10 cents, and it even works with PDFs, though the PDF conversion is still labeled "experimental" and the results are not perfect. Even so, I emailed the entire Flex 3 Developers Guide, the Flex 3 ActionScript Guide, and other big PDFs to myself and now have a vast set of things to read at any time.

The real hidden power of the Kindle, though, is it's built-in cellular connection. In addition to letting you get to the Amazon Kindle store, it includes a basic web browser. You can see where this is going already. Because you don't pay for any of your wireless usage (it is just included with the cost of the device) and don't have any sort of account with Sprint, this high-speed internet access is really, really kick ass. The browser works best for text-based sites, so hitting things that are optimized for cell phones is preferred. You can go to any site you want, but the layout can be screwy for "wide" sites with complex layout or graphics.

Even still, this opens up a gigantic range of options. I've been using Google Mobile, including Google Reader for all my RSS and blog needs, GMail, Wikipedia, Google Maps, and more. They all work very well, which basically makes the Kindle a free portable internet reader as well. And this is arguably as big a deal as the Kindle's book reading capabilities. Between the net access, PDF reading, and Kindle bookstore, I have an unlimited store of interesting things to read, any time, anywhere.

The device is easy to use. It is very light. Which makes reading tech books that are normally big and bulky much nicer. You can change font sizes any time. It has a built-in search which lets you search for anything across your whole library. And it has inline lookup against dictionaries and Wikipedia if you're reading something and want a definition or more information on something.

If there are any drawback to the Kindle, it is with the design of it. First, it's not very cool looking. This was not made by Apple. I mean, it's not horribly ugly, it's just meh. The other issue is that it will take you a few minutes to get used to holding it. The sides of the device have "next page" and "previous page" buttons to let you "turn pages", which means you have to be careful about how you hold it to avoid accidentally turning the page. Clearly, this is a pretty minor deal, since you will quickly figure this out, and if you do flip the page you can just go back again. It just means figuring out how to hold the Kindle comfortably will take you a minute or two. Yes, these are about the only two "drawbacks" I could come up with.

Overall I'd recommend this thing to any serious reader. $400 sounds like a lot, and I guess it is, but it is a pretty amazing piece of technology, and when you factor in the unlimited 3G net access the price quickly becomes a lot more justifiable. Since anyone reading this blog is probably already a pretty hard core reader, just set aside some money and buy one. I'd wager you'll love it too.



Comments Comments (7) | del.ico.us del.icio.us | Digg It! Digg It! | Linking Blogs Linking Blogs | 7810 Views

Non-Tech Reading: World War Z

It seems rare nowadays that I actually read a non-tech book. I just finished "World War Z: An Oral History of the Zombie War", and it was superb!

It is a "future history" book, written as a series of first-person interviews with different people who survive a catastrophic war against the living dead. Basically, in the near future a virus causing a zombie outbreak spreads around the world and drives the human race to the edge of extinction. The book covers the whole timeline of the war, from early attempts at containment and denial, to disastrous military counterattacks, to worldwide panic and the collapse of civilization, to mankind's attempt to regroup and fight back against a global zombie horde numbering in the hundreds of millions.

What makes the book great though isn't the zombies. Really, one could substitute just about any natural disaster or disease in and the story could still work. The strength comes from the wide array of people who are interviewed, some heroic, some selfish, from around the entire planet. The situations described by the survivors are chillingly realistic. What do you do when society collapses? Who is really the enemy, the unthinking zombies or the fellow humans who betray each other to try and survive? How does a leader live with themselves when they have to abandon huge numbers of people to the undead because there aren't enough resources to save everyone? These are the kinds of questions and scenarios the book works through.

Anyway, I won't spoil it any further. It's a great read and a welcome change of subject matter. If you're in the mood for something different, something that will stick in your head and make you wonder "what if?" (and scare you to boot), then give World War Z a look!

Comments Comments (3) | del.ico.us del.icio.us | Digg It! Digg It! | Linking Blogs Linking Blogs | 6888 Views