Thursday, September 14, 2006

You Know IOException? Think Again!

I was amazed today to find out that there was no constructor IOException(String, Throwable) or IOException(Throwable) in JDK1.4 and JDK1.5. It is finally in JDK1.6, I can't believe it took Sun that much time to change that.

So the workaround is:
IOException ioe = new IOException("message");
ioe.initCause(e);
throw ioe;
It can also be written as:
throw (IOException) new IOException("message").initCause(e);
It is not a major problem, but still. We can all thank the guy who reported that as a bug to Sun in 2004.

You Know IOException? Think Again!

I was amazed today to find out that there was no constructor IOException(String, Throwable) or IOException(Throwable) in JDK1.4 and JDK1.5. It is finally in JDK1.6, I can't believe it took Sun that much time to change that.

So the workaround is:
IOException ioe = new IOException("message");
ioe.initCause(e);
throw ioe;
It can also be written as:
throw (IOException) new IOException("message").initCause(e);
It is not a major problem, but still. We can all thank the guy who reported that as a bug to Sun in 2004.

Monday, September 11, 2006

Good Software Books - 2006 version

Here is an update of the most interesting software books I found interesting. I already made such a list in 2005:

  • Object Oriented Software Construction, 2nd Ed, by Bertrand Meyer. This made me understand why OOP is important, what is important in OOP and why it is still relevant. It contains lots of important guidelines you can apply to better design programs. One famous quote is "Real systems have no top". Code Complete (Microsoft Press) covers some of the same ideas as Meyer's book, and some more pragmatic issues that arise in software projects ("measure twice, cut once"). I also liked the chapter on "table driven design".
  • Concurrent Programming in Java, Second Edition, by Doug Lea: there is all you need to know about programming in a multithreaded environment in it. The chapter on synchronization should be a must read for every Java developer.
  • Design Patterns by the GoF: simply the best presentation of most common design patterns. I have a glance on it once in a while.
  • Artificial Intelligence through Prolog, by Neil C. Rowe (Prentice-Hall): if you don't remember much about Prolog, it's a good book. It details how Prolog interpreters work.
  • File Systems Forensic Analysis, by Brian Carrier (Addison Wesley): everything you need to know about disks and file systems, every trick to recover lost data. To go more in depth into file systems theory, you can read the free Practical File System Design with the Be File System from D. Giampaolo, the creator of BeFS.
  • Mind Hacks (O'Reilly): you probably already bought that one. Not about software, but excellent.
  • Practical Issues in Database Management by Fabian Pascal (Addison Wesley): short but concise book on relational database theory. F Pascal is of CJ Date school of thoughts, "null are evil". You don't need to read it if you have read any other similar book (by CJ Date for example).
  • Inside The Java Virtual Machine, by Bill Venners (McGraw-Hill): there are other books on the same subject. While this book has some bad reviews, I found it an easy read, and it explain well enough for me all the inner details of Java. I found "Programming for the Java Virtual Machine" not better, and with some bad example of a Prolog language for the JVM (1 full chapter for this to present a way too simple thing to be of any use).
  • Programming Jabber, by O'Reilly: I have read it 2 years ago, I enjoyed how they made you go through building a Jabber server.
  • Lucene In Action: the only book about Lucene, some of the info is useful to understand how it is designed.
  • Hibernate In Action: if you have to use hibernate, this is the book to read. It presents different ways of using it.
  • some Javascript+DHTML(+CSS) book: useful if you have none. They often have good tricks to solve the usual problems. In the AJAX days, it becomes useful again. I find O'Reilly's "Javascript - The Definitive Guide" good to have an API reference (as ebook), and "Javascript and DHTML Cookbook" has the most useful recipes.
  • Lean Software Development by Poppendieck (Addison Wesley): easy to read, good presentation of software dev management problems and pragmatic solutions. My favorite on the subject. Another good one but very specific is "Requirements Management" (MS Press).
  • UML Distilled by M Fowler: always useful to have if you need to draw UML diagrams.

Good Software Books - 2006 version

Here is an update of the most interesting software books I found interesting. I already made such a list in 2005:

  • Object Oriented Software Construction, 2nd Ed, by Bertrand Meyer. This made me understand why OOP is important, what is important in OOP and why it is still relevant. It contains lots of important guidelines you can apply to better design programs. One famous quote is "Real systems have no top". Code Complete (Microsoft Press) covers some of the same ideas as Meyer's book, and some more pragmatic issues that arise in software projects ("measure twice, cut once"). I also liked the chapter on "table driven design".
  • Concurrent Programming in Java, Second Edition, by Doug Lea: there is all you need to know about programming in a multithreaded environment in it. The chapter on synchronization should be a must read for every Java developer.
  • Design Patterns by the GoF: simply the best presentation of most common design patterns. I have a glance on it once in a while.
  • Artificial Intelligence through Prolog, by Neil C. Rowe (Prentice-Hall): if you don't remember much about Prolog, it's a good book. It details how Prolog interpreters work.
  • File Systems Forensic Analysis, by Brian Carrier (Addison Wesley): everything you need to know about disks and file systems, every trick to recover lost data. To go more in depth into file systems theory, you can read the free Practical File System Design with the Be File System from D. Giampaolo, the creator of BeFS.
  • Mind Hacks (O'Reilly): you probably already bought that one. Not about software, but excellent.
  • Practical Issues in Database Management by Fabian Pascal (Addison Wesley): short but concise book on relational database theory. F Pascal is of CJ Date school of thoughts, "null are evil". You don't need to read it if you have read any other similar book (by CJ Date for example).
  • Inside The Java Virtual Machine, by Bill Venners (McGraw-Hill): there are other books on the same subject. While this book has some bad reviews, I found it an easy read, and it explain well enough for me all the inner details of Java. I found "Programming for the Java Virtual Machine" not better, and with some bad example of a Prolog language for the JVM (1 full chapter for this to present a way too simple thing to be of any use).
  • Programming Jabber, by O'Reilly: I have read it 2 years ago, I enjoyed how they made you go through building a Jabber server.
  • Lucene In Action: the only book about Lucene, some of the info is useful to understand how it is designed.
  • Hibernate In Action: if you have to use hibernate, this is the book to read. It presents different ways of using it.
  • some Javascript+DHTML(+CSS) book: useful if you have none. They often have good tricks to solve the usual problems. In the AJAX days, it becomes useful again. I find O'Reilly's "Javascript - The Definitive Guide" good to have an API reference (as ebook), and "Javascript and DHTML Cookbook" has the most useful recipes.
  • Lean Software Development by Poppendieck (Addison Wesley): easy to read, good presentation of software dev management problems and pragmatic solutions. My favorite on the subject. Another good one but very specific is "Requirements Management" (MS Press).
  • UML Distilled by M Fowler: always useful to have if you need to draw UML diagrams.