This is the 63rd Step towards gaining the Programming Enlightenment series. If you didn’t learn the 62nd Step, read it.
What is Build?
It is the process of converting source code files into standalone software that can be run on a computer. It is where the source code files are converted into executable code.
However, this is not the case with languages like Perl, Ruby or Python which are examples of interpreted languages or even web-related languages which do not require compilation.
Why Build?
The build is what creates executable artifacts for developers and end users to test and run. It is an essential part of the development process and can make the code and coding simpler.
We need to perform software building for:
- Version control the release.
- Code quality by using a static code analysis tool.
- Compilation might be a complex process in many projects, which done inside build will save time and removes errors during the automated build.
How to Build?
The process of building is usually managed by a build tool, which is a program that coordinates and controls other programs. Example; Gradle, Ant, Maven, etc. One needs to write scripts in order for the build tool to perform.
In Gradle, the scripts are written with Groovy language, in the .gradle files.
Why understand the Build process?
- It can simplify software development lifecycle and reduce costs.
- A simple-to-execute build allows a new developer to get started quickly and easily.
- Automating configuration in build can deliver consistent results for building software for releases.
- Many build tools allow running reports on code quality.
- By understanding the build process, we can increase the speed of software build times.
TL;DR Learn Enough of your Build Process to know when and how to make changes. Build scripts are code too.
Go to 62nd Step
Go to 64th Step.
References:
- 97 things Every Programmer Should Know ~ Git Book
- 97 Things Every Programmer Should Know ~ Paperback
- Software build ~ Wiki
- Build automation ~ Wiki