30 March 2014

Build Scripts

Recently I had a chance to create a build script at work for one of our existing projects, for numerous reasons that are besides the point this blog the project didn't have any form of build procedure.

To compound the problem we have multiple builds for different clients each build with it's own settings, all being done manually. So I recommended a build script and got the go ahead, which made me happy.

In this post I will speak about why having build automation is a good idea from your side as a developer. When starting off a project, it might seem like a build script is a waste of time, however if you expect the project to grow (which you should, otherwise why are you building it?) you will need it, even if it's just a simple ANT build script.

There are a list of advantages you should know about when doing build automation but I will let you Wikipedia it yourself, I will rather talk about what it will do for you, the humble developer.

Peace of Mind
Sometimes, unless you are working for a really huge company you might have to do the deploys yourself. Development is a complex task, why would you want to worry about if you are doing the deploy correctly? Are all the jars there? Did you configure the database connection information back from test?  Even if you are not the one doing the deploys, do you really want to give someone else the chance to break your code with a sloppy deploy? These are all needless worries and even if you are really good at remembering all of these, you are wasting your time doing them. Which brings me to my second point.

It's what computers are good at
Computers are good at doing repetitive tasks with one hundred percent accuracy. A computer will do the same thing it's told without getting tired or bored. It doesn't care if it's Friday afternoon and you have to meet your friends after this build for a few beers. You do care, and you should. So let the computer work on the Friday afternoon while you enjoy a few beers with your friends.

Develop quicker
Proper build automation will allow you to focus on development. On releasing awesome code quicker and with more frequency. There is a reason that a proper build procedure is part of the Joel Test in fact it is Step 2. Being able to build with only one button will allow you to iterate over bugs quicker because you don't need to spend brain CPU cycles on what you need to do once you finish this line of code. You code, press play and check if things are working.

As per the Joel Test, I agree that a proper build procedure should be the second thing on your mind, if you don't have one you are making your life needlessly difficult and unpleasant, and who needs that? Am I right?

No comments:

Post a Comment