| Books & Tools | Techniques | |
|
Comprehensive coverage of Ruby 1.8 and 1.9
"The New Most Important Ruby Book" JudeJude 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 NutshellThe 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 NutshellThe 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 NotebookAmazon 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 JavaI 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. |
March 16, 2004What does the word "generic" promise?Bruce Eckel, author of Thinking in Java has a controversial blog entry about generic types in Java 1.5. I believe that Bruce has largely missed the point of Java's generics, and that the "latent typing" ideas he discusses would take Java in a very unJava-like direction. His post turns into something of a rant, but the crux of it seems to be this:
Basically, Bruce had heard about generics in Java 1.5, but had not yet read about them. The use of the word "generic" gave him a very mistaken idea about what this language feature actually entails. And then when he actually sat down to study generics in Java he was sorely disappointed. I don't want to debate Bruce's other points here. I am curious, however, whether anyone shares Bruce's concern that the term "generic" when applied to Java's parmeterized types, promises something beyond what Java delivers. I haven't read Bruce's books, but he's presumably a pretty smart guy. If he's gotten this confused by the use of the word, I wonder whether others share his confusion. If the term "generic" is confusing, I'll want to avoid it in the next edition of Java in a Nutshell, or at least include a footnote about the potential confusion. If you're familiar with generics in Java 1.5, and have used a similar facility in another language, your comments are encouraged! March 07, 2004Java 1.5 Enum Line NoiseTim Peierls, a colleague on the JSR-201 expert group, shared the following Java enumerated type declaration with me. He described it as "line noise":
enum _{_,;;}
(Remember line noise? I think it has been a decade since I last used uucp or had to manually debug a ppp connection by sending atdt to the modem, so I don't see much line noise these days...) Tim's examples always seem insightful or instructive. This is one of them, and it highlights a couple of important points about the syntax of enum declarations. So let's take this declaration a token at a time.
It is the optional bits of syntax that Tim has highlighted with this example. If we strip it down to just the required tokens, we're just left with an example that is not nearly as interesting:
enum _{_}
If you want to try it out yourself, here's the test program I wrote around Tim's enum:
public class linenoise {
enum _{_,;;}
public static void main(String[] args) {
System.out.println(_._);
}
}
Finally, Tim leaves us with an exercise for the reader:
enum _{_,;;} // if this were an emoticon, what would it mean?
If you have an answer, feel free to leave a comment. March 01, 2004Updated Examples from Java Examples in a NutshellIf you're a reader of my book Java Examples in a Nutshell, and have previously downloaded the examples from this site, you may want to grab them again from http://www.davidflanagan.com/javaexamples3. A few of the examples require auxilliary properties files, which I forgot to include originally. Thanks to Ronald Tosh for pointing this out. The new .tar.gz and .zip archives contain the required properties files.
|
Advertising
About
Store
Search
Archives
April 2008
March 2008 February 2008 January 2008 November 2007 October 2007 September 2007 August 2007 July 2007 June 2007 May 2007 April 2007 March 2007 February 2007 January 2007 December 2006 November 2006 October 2006 September 2006 August 2006 July 2006 June 2006 May 2006 April 2006 March 2006 January 2006 December 2005 November 2005 October 2005 September 2005 August 2005 July 2005 June 2005 April 2005 March 2005 February 2005 December 2004 October 2004 September 2004 July 2004 June 2004 May 2004 April 2004 March 2004 February 2004 January 2004 Syndicate
|