Books & Tools Techniques

Comprehensive coverage of Ruby 1.8 and 1.9

"The New Most Important Ruby Book"
Peter Cooper,
rubyinside.com

Completely updated for Ajax and Web 2.0

"A must-have reference"
Brendan Eich,
creator of JavaScript

Jude

Jude is my Java documentation browser. It combines Sun's definitive javadocs with the easy-to-use format of Java in a Nutshell, and tops it off with easy keyboard-based navigation and full-text searching.

Jude is available for free evaluation.

See the user's guide for more info

Java in a Nutshell

The 5th edition is now out, with complete coverage of Java 5.0!

It includes a fast-paced tutorial on the language, and a compact quick-reference for the core Java API.

Java Examples in a Nutshell

The 3rd edition, updated for Java 1.4

This edition has all-new coverage of the NIO and JavaSound APIs, completely rewritten Servlets and XML chapters, and coverage of new Java 1.4 features (assertions, logging, preferences, SSL, etc.) added througout. A great book for those who like to learn by example. 193 working examples: 21,900 lines of carefully commented code to learn from.

Java 1.5 Tiger: A Developer's Notebook

Amazon incorrectly credits me as the main author on this book. I'm actually the second author: really more of a consultant. This is a good book about all the language changes in the latest version of Java.

Effective Java

I didn't write this excellent book, but I wish I had.

Author Josh Bloch is probably best known for the collections classes in the java.util package. His experience and wisdom are apparent in this book. I learned from it and recommend it highly.

June 23, 2006

Jitsu: new framework for web apps

Jitsu is a new web application framework. They call themselves "a next-generation user interface toolkit for building rich web applications"

Jitsu was developed by ATTAP, but has been open-sourced. The website is slick, and there is a well-written tutorial. Its a complete application framework, not something you can just add onto an application, so you really have to adopt it from the start. But its got a lot of nice features, and particularly strong bi-directional data-binding capabilities.

I haven't actually used it myself, but it looks very promising.

June 13, 2006

Groovy Spec. Lead Change

Remember Groovy, the JVM-based scripting language that the Java world was abuzz about? I gather that it has bogged down in the JSR process, and all the buzz seems to have faded away. I don't know if this means anything, but the following email just came in from the JCP:

To: JCP-INTEREST(at)java.sun.com
From: Liz Kiener
Subject: JSR 241 - Spec Lead Change - The Groovy Programming Language
------
The Spec Lead of JSR 241 has changed from James Strachan to
Guillaume Laforge.

I don't know James or Guillaume, and I don't even know Groovy, for that matter. But wouldn't it be nice if this change got us a standardized version of Groovy sooner?

June 05, 2006

Integer division and negative numbers

I thought I understood basic arithmetic!

I've just learned that Ruby and Python (and, I'm told Tcl) define integer division of or by a negative number differently that C and Java do. Consider the quotient -7/3. Java gives -2. Ruby gives -3.

Modulo is different, too: In Java -7%3 is -1. But in Ruby it is 2.

I think I prefer the C and Java version of division, because it has the nice property that: -x/y = -(x/y). In general, this is not the case in Ruby.

On the other hand, Ruby's integer division can be explained with a simple rule. For the quotient q=x/y, we can say that q is the largest integer such that q*y<=x. For this rule, "largest" and "less than" have their obvious meanings: closest to positive infinity and closer to negative infinity. Maybe there is an equally succinct and general definition of integer division for C and Java, but it looks to me as if it requires special-casing the signs of the operands or defining "less than" as "closer to zero".

I haven't done much programming in Ruby or Python, but I suspect that this isn't the kind of thing that lis likely to cause bugs in practice. I don't know when I actually do integer division with negative operands. It reminds me, however of Josh Bloch's recent blog post and drives home his point that integer arithmetic is not as simple as it appears!

(Ruby and Python aficionados are invited to use the comments to explain why your language of choice does the right thing :-)

Update: comments are now closed. Comment spammers have found the entry

Advertising
About
Store
Search
Google
Web this site
Archives
Syndicate

Powered by
Movable Type