Java: Development Process

Software development can be looked at from two perspectives

  1. Process - How to organize and do the work of programming.
  2. Product - What is actually produced.

Process vs product

Process is how you go about writing programs. Product is what is actually produced, ie, the source program. Most programming books, as well as these notes, are concerned primarily with the programming elements that make up the product, eg, the syntax of the switch statement, how to use a loop, etc. To be successful, you need to produce programs, but you also have to master the software development process.

The bigger the problem, the more important good process is. In small programs you can use just about any development technique and you can succeed. As your programs become larger, you'll find that using the right process techniques becomes more and more important.

What are the best process practices?

  1. Understand the problem.
  2. Use iterative and incremental programming.
  3. Set aside blocks of time without interruption.
  4. Use debugging techniques (assert, println, breakpoints).

1. Understand the problem

2. Use Iterative and Incremental Programming

The iterative process is used by many top developers. It's very effective in producing programs not only faster, but with better quality.

3. Set aside blocks of time without interruption

Most ideas about good work habits apply to programming as well, but there is something different about programming than many activities -- you have to juggle a lot of stuff in your head at once. It takes a little while to wrap your mind around the programming issues, and if you get interupted, it all comes crashing down, and typically takes a while to restart.

See Paul Graham's Holding a Program in Ones Head.


There are several aspects to debugging.


Everyone writes programs with bugs in them. The goal is to catch them as soon as possible.

Strive for simplicity

Have others read your code

The value of having someone other than the original programmer read code has been well demonstrated -- this second reader often notices problems or issues with the code, resulting in a much better program. This is hardly a surprising result, and it is used effectively in many areas of human endeavor.

Pair programming carries this to the extreme, where two programmers sit at one computer. The two are discussing the code, and one is writing doing the typing. The non-typist is reading the code and thinking about cases that aren't handled, etc. With a compatible pair of programmers, this can be extremely effective in producing good programs, more than paying for the cost of two programmers to write on piece of code. Of course, the wrong pair of programmers is not going to be effective. See Wikipedia's Pair Programming.

Use good coding practices

At the beginning level, simple things like good naming and indentation are very important. But there are many things involved in good coding. See Google Java Style Guide.

Refactoring = Making internal improvements

Refactor (rewrite) parts of a program wherever you can can see that internal improvements can be made. This is about internal issues, not about adding features, and refactorings are often about making the program simpler or easier to understand (simpler, easier to understand, faster, easier to modify, more portable, ...). Refactoring A better written program will be less likely to have bugs and will be easier to extend for the next iteration.

Renaming variables, methods, and classes is one of the easiest, most common, and most effective techniques for improving a program. It sounds too simple, but it's surprisingly effective.

Use good tools

The right tools can save you a lot of grief. It's not enough to just choose good tools; you must also learn to use the well.

Best Practices Resources

In any field the most effective techniques become enshrined as Best Practices. There are lots of good books (and lots that aren't good!). Here are some that I've found very good, and all of them are very readable, even enjoyable!