Botched Interview Question #1: Continuous Integration
Part 1 of my many to come series on botched interview questions will begin with Continuous Integration. Having deployed a couple of apps on Heroku, I have embarrassingly (in hindsight at least) ignored the continuous integration option. This finally caught up with me yesterday. So let’s get right into it.
Continuous Integration, also commonly referenced as just CI, is a development practice that strongly focuses on testing. Developers share code into a shared repository throughout the day. This practice is known as checking-in. Upon pushing code to this repo, an automated build will run and detect any problems before the push reaches the master branch. The ‘build’ essentially compiles, runs unit tests/integration tests/quality analysis, and so on.
The idea behind CI is that when working on large projects with various different developers; there will be many moving parts. As a result, pushing your code frequently will detect issues early on. I am sure we have all, at some point, spent days building out a feature only to spend another few days dealing with errors and merge conflicts.
So keep to these best practices in order to avoid those days of misery and focus on building out all the cool new features your app needs:
- Maintaining a code repo
- Automating the build
- Committing code frequently
- Keep the build fast (perhaps use a dedicated integration build machine)
- Transparency with continuous feedback mechanisms
- Always test in a clone of the production environment
That’s all folks.