Each time talk about the JRuby integration into java projects, I mention the project setup as an important task and that it can be done much easier with an integrated JRuby environment.
In this post I want to discuss this topic separately and describe the motivations behind it.
So why do I think the project setup is very important?
Lets consider it from the project managers view…
Our assumption is that we are working on a java project that will take 6 months of work for the first production release and have a team of:
- One project manager
- 4 developers
- One technical lead
What I usually experienced in the projects and this was the best case or worse:
1. Assumptions at the beginning
The project manager assigns the task of the project setup to a developer, lets call him the “configuration manager”. The time frame is set to around 1-2 days. He has to face all the initial problems and create the documentation. The assumptions here are mostly the following:
- The config manager will have solved the initial issues and will have documented them in the wiki.
- Other developers will make it faster and will still need the maximum time of one day for it.
- Wiki is the main knowledge source here.
- With any project setup change in the future you will enhance the wiki as well.
- No one else or barely any people will ever enter the project and doesn’t need the setup again, if they do they still have the documentation.
- It is all considered as one time task and doesn’t need to be automated.
2. Reality at the end
- The config manager needs two days to setup and document everything ( database, build, right project libraries, eclipse setup ).
- Even if he does a good job, its easy to over look things in the documentation and make assumptions about knowledge others does not have.
- During the setup on each other machine you still need the configuration manager to support the developer, it takes up to 30% of his time to constantly support the system setup on other machines.
- Even during the first phase of the project at least two other devs will join the project and will need the setup again (e.g. supporting developers, contractors.
- At least one of the devs will need to setup his system again for various reasons (machine switch or a machine crash).
- The project will be developed for at least two more phases and might bring at least 6 new developers that will need a new setup again.
- While the people tend to document everything very well at the project begin, they have no time to do it at the end if running towards the deadlines.
- Each new enhancement to the project build will be barely integrated in the right way and will not be documented, so after the first launch when the team changes, barely someone knows what to do.
- The project setup is specially painful for junior developers: equipped only with pure java knowledge, the junior developers will be sitting for 3 days, not knowing if they should ask someone for help or they should know the solution for their current problem by themselves, of course everyone is busy in the team and will have no time to help them.
- New team/company members: since each company has its standards and best practices, a completely new team member will have much more questions, even with the documentation.
- You will potentially avoid the project setup to integrate new team members quickly, so you don’t do it at all and have another project restriction.
Do you think it’s pessimistic or exaggerated? For each point that I mention here I did a personal experience myself in existing companies.
So what is the solution you ask? Project Setup automation with the goal of maximum automation!
I experienced that possible is much more then it looks it would be. Its just that no one really tries to do it fully automated. Here are some guidelines to do it the best way:
1. Dedicate a motivated senior developer to do the configuration management
- Make clear that you want to have as much as possible to be automated.
- Do it properly since if its done once you will use it again and again.
- Develop the setup scripts prepared working on two different platforms like Windows and MacOS.
- Minimal resulting documentation will be mostly about the basic tools installation (e.g. svn and the chosen database).
- Automate even the developer tools installation as much as possible, I will present the Yoxos later for an automated Eclipse-IDE setup.
2. Clearly define a project task and allocate budget for it.
Lets make one thing clear upfront that most people usually forget: tasks that will be executed by each team member should be as less time consuming as possible, since any afford here is multiplied a lot of times.
With assumption described for a not optimised case, I would consider the following calculation as realistic:
Important here are several things:
- The system setup time for one developer machine is set to an average value of 9 hours.
- The configuration manager needs initially 16 hours for the very first setup and documentation in the wiki.
- Each developer setup takes in parallel 35% time of the configuration manager, its distracts him from his tasks.
Lets say you give the configuration manager the clear goal to automate and one more day of time so we could calculate the following:
Assumptions here are:
- Now one system setup will take only 2 hours.
- Configuration manager needs much less time to support each setup ( factor 0.1 ).
Here you have it, one smart decision and working with a strategy in mind you can reduce the costs of a task drastically. Don’t forget, nothing is more annoying as the setups of old systems using outdated wiki pages. So besides the clear numbers here, I definitely believe that:
- You will prevent the people in the project from a lot of frustration in general.
- Motivate your developers for more automation in the project like data import/export, daily builds, convenient svn updates.
This was the project managers view on the whole topic. In my next posts I will give samples and show some tips and tricks for the configuration managers to realize an automated system setup.
To do a small preview here are some things I will discuss in the future:
- Your main tool for project setup is your build tool, in the most java projects it would be Ant.
- Most projects have enough single ant targets, but no one is putting them together to the ultimate setup target.
- Provide the operating system specific scripts if needed like *.bat and *.sh files to let run build targets, svn updates or start specific eclipse versions.
- Eclipse setup usually consumes a lot of time as well, you can use the Yoxos Eclipse configuration tool to make this task much easier.
- Ask the user of the script if possible for decisions in dependency of his system, instead of writing it in the wiki.
- Finally I can strongly recommend to get rid of Ant as your main build tool and use Rake (from Ruby) for it, the reasons are discussed in my presentation on JRuby.