Chapter 6 ½. Building your Code: Insert tab a into slot b...

image with no caption

It pays to follow the instructions... ...especially when you write them yourself.

It’s not enough to use version control to ensure your code stays safe. You’ve also got to worry about compiling your code and packaging it into a deployable unit. On top of all that, which class should be the main class of your application? How should that class be run? In this chapter, you’ll learn how a build tool allows you to write your own instructions for dealing with your source code.

Developers aren’t mind readers

Suppose you’ve got a new developer on your team. He can check out code from your version control server, and you’re protected from his overwriting your code, too. But how does your new team member know which dependencies he’s got to worry about? Or which class he should run to test things out?

image with no caption

There are lots of things you could do with source code: compile it all at once, run a particular class (or a set of classes); package classes up into a single JAR or DLL file, or multiple library files; include a bunch of dependencies... and these details change for every project you’ll work on.

Get Head First Software Development now with the O’Reilly learning platform.

O’Reilly members experience live online training, plus books, videos, and digital content from nearly 200 publishers.