domingo, 1 de abril de 2007

Setting up an Agile development environment

During the last week I had the opportunity to build a development environment from scratch, something that is rarely possible, as a lot of the clients tend to have infrastructures (and procedures) of their own. It was an amusing task as I could decide all the needed tools and how and when they would be used. I think this has been the first time really where I've started a project that includes everything that will be useful later!

So let's start talking about what I do consider an Agile environment. It is important as Agile is composed of several methods and not all of them can be applied to a project always. As a matter of fact only saying Agile can make a manage shudder! For example, Agile software development specifies that risk can be reduced if iterations (planning, requirements analysis, design, coding, testing and documentation) are used. That wasn't an option this time as all the design work was already done. A system based on (code) milestones was considered enough. So what are absolute necessities then?
  • Linux!
  • A powerful Source Code Management (SCM) tool like Subversion: A fantastic code repository where several developers can work at the same time (no locks), supports truly atomic commits, branching and merging, binary files, tags and different network protocols
  • A Continuous Integration Build tool (I like CruiseControl): This is fundamental! It allows to have a reliable repository at any time and it's the basement for other tasks. It ensures developers are always working with the latest artifacts
  • Test Development Environment (JUnit and Cobertura): It's like Test Driven Development without been a purist (tests first!). In my experience, no project can be under control after it reaches some critical mass unless the testing is somehow automatic.
  • Project Management tools (wiki, issue tracker, blogs, timelines...): I've worked with Jira, Trac and Scarab. All are good. Jira is outstanding tracking issues (but is commercial). Trac is a suite of tools and integrates nicely with Subversion.
  • Coding style: A lot of tools in the Java world can test the code. PMD, Checkstyle and Simian can be all recommended (and will help squashing bugs)
  • Netbeans and Glassfish: Have Eclipse & JBoss been outclassed by Sun?
  • Open Source Frameworks: At least Spring, Hibernate and DWR!
  • QALAB! To get nice reports on how everything has been going
  • And the usual crop of Weblogic (10!), Oracle and such...

Trying to build this kind of environment from scratch is difficult, belive me. But it is worth the effort. Fortunately, Buildix exists! Buildix is a Linux distro that installs and configures Apache, Tomcat, Subversion, Trac and Cruisecontrol for you. Add in the scripts (to manage users or to create projects) and the amount of time it can save is just awesome. Just install (from the FAQ: Log in as root and run knoppix-installer). Take in account that it comes with a price as doing it by yourself will let you select the suite of tools and get the latest available version of each tool (for example, Trac adds blogging in their current builds). But really, if it is the first time or your Linux skills are not that sharp, you are better off choosing Buildix.

Just one advice to conclude. Agile development enviroments are hard to install and to maintain, so use them! There's no point in having a wiki and not writing or not adding bugs to the database. This kind of installation offers a lot of possibilities to project managers, developers and, even, the client because they are valuable knowledge repositories. Use them as much as possible and keep track of how everything evolves.