I just discussed a topic about build scripts with my friend, he said they will have build scripts, but not in plan yet, it makes me think more on the build scripts. Typically, in a software project, build scripts are in charge of the following tasks automatically when we execute them:
The steps above are just a typical situation in J2EE projects, the build scripts may be changed and adjusted according to different types of project, as long as you can imagine, it can do it for you automatically, such as creating branch, finding bugs and so forth. CPU is really the guy serving you for free at any time.
I notice there many many software teams agree that the build scripts are very important, but they have no time to implement them because of the tight timeline, and then they forget it gradually. When someone mentions why they don’t provide build scripts, they will always explain that no time, no time, no enough time. Let me analyze and calculate the time, and help you save more time.
Suppose:
TIME_A = 3 * 60 = 180 (minutes) : The time of doing build and deploy manually, normal, maybe two or three hours each time, because you may encounter different environments and different problems.
TIME_B = 3 * 8 * 60 = 1440 (minutes) : The time of developing good build scripts, it may take two or three days.
Wow, now I understand the developers who don’t like to write build scripts, it really will take much time to do it, especially within a tight timeline. But please realize that the timeline of software development team should be always tight, because we are facing competitions every day, also the shareholders are waiting for revenue every day. We should be foresighted and then we can make right decision and save time and money for company. Let’s continue to calculate…
Continue to suppose:
TIME_C = 5 (minutes) : The time that the developer will take to execute build scripts, just execute a command basically, let’s assume the time would be 5 minutes. (The developer must be loafing on the job :D )
If the project is succeeded, it will go into the maintaining lifecycle, then many new patches, new releases will come out methodically, during the whole process, we may do the building and deploying task hundreds of times, or even thousands of times in some large-scale products, just assume the time would be 500 times. Let’s compare the total time between two situations – to write build scripts or not to write.
This is only calculated by ideal time of manual building and deploying, I think there should be many problems each time when you build and deploy manually. Now it’s your time to decide to write build scripts or not to write, at the same time, you are choosing to be shortsighted or foresighted. What I want to say is that developing build scripts is a must, not option in any situations . As long as you care about the project, you must be interested in doing it right now.