Monday, February 12, 2007

Continous Integration

Continuous integration is a practice introduced by Extreme Programming (XP) that brings in the idea that developers should check in their code often and that their work should be continuously integrated and tested to ensure that no error goes unnoticed (see article by Martin Fowler). The practice is tightly integrated with the concepts of source control, unit testing and automated building as these are the privileged means of bringing the code together and running tests on it. Continuous integration (CI) not only works nicely but does enforces some pretty important habits to developers.

  • Developers working on a CI project will be required to use source control for their code. Sounds like a basic tool for any development project but I've seen too many projects where source control is completely absent...CI simply requires it...nice.
  • Developers working on a CI project will be rewarded by putting in place as many unit tests as possible. How ? By seeing that less errors will sneak by because of the existence of this safety net of testing. It is pretty cool to see that you avoid putting mistakes into production because of this first line of defense. Better our CI screaming at us than our clients right ?
  • Developers working on a CI project get used to the concept of automated building and the concept of building from scratch. Again, often have I seen in the past cases where code that is not rebuilt regularly from scratch becomes too entangled in dependencies that prevent it from building from a clean slate.
All these make for pretty strong points in favor of CI. And it is not that hard to put it in place...There is a significant amount of tools that joined together make for a great CI platform. Just look around. A winning combination for me, developing in Java, has been:

  • Cruise Control. A CI framework that glues together all the components to provide a pretty decent CI setup. From HTML reporting to email notification of success failures of builds, this is a pretty cool tool to use.
  • Subversion. A version control system that addresses a lot of the typical weak spots of other version control systems (e.g. CVS).
  • Ant. An automated build tool for Java. I doubt anyone working in Java never heard of Ant.
  • TestNG. A really cool testing framework for Java. Check it out...
All of the above are free tools that you can get and play with, together they make up for a pretty strong CI.

CI takes a step ahead when talking about Continuous Database Integration (CDBI). Paul Duvall at Test Early has been doing some pretty interesting presentations on it. It does bring a new level of testing to your database-driven apps. One which enforces the cooperation between developers and database administrators and builds a structure that ensures that you can deploy your application at any point in time. If you ever seen a project where to redeploy in a new system you have to go chasing for the DB schema required to deploy a clean system, you know the kind of sorrows CDBI can save you from.

I simply *guarantee you* that if you ever start using CI, you will not want to work again without it.

Wednesday, February 07, 2007

Javascript: The Definitive Guide

The title does sound presumptuous but after reading it you can only agree that if there is any Javascript book worth reading, this is it. David Flanagan does a most excellent work of introducing the Javascript language and of exploring all the kinks and nice features that you can take from it.

Having known Javascript for sometime I could not avoid being wowed in some chapters by some cool features that I really did not know existed in the language.

This 5th edition is well worth it even if you read previous editions. I did have a previous version and found that this new edition brings a significant amount of new content worth spending your budget in.

The book is well structure dividing it's presentation in core javascript and client-side javascript. Something I really liked seeing.

The core Javascript section presents pretty successfully crucial aspects of the language like closures and prototyping (among many others)...Even if you already know Javascript you should give it a try...I'm almost sure you will learn something from it.

The client-side Javascript is where this book gets even more of its value... from a fantastic CSS reference chapter (I do not believe you need much more than this to get you rolling with CSS), to even handling, DOM navigation, XML handling and scripting with Java, Flash, charting with Javascript and CSS (way cool). A really interesting read.

Like I said before, if you're out to get just one (or your first) Javascript book, I believe this is it! An interesting and absolutely essential read for any web developer these days.

5 stars!