Java: Development Process

Software development can be looked at from two perspectives

  1. Process - Techniques for doing the work of programming.
  2. product - The actual programming language elements.

Process is how you go about writing programs. Product is about the programming structures themselves (types, statements, classes, ...). Most programming books, as well as these notes, are concerned primarily with the product, eg, how to use a loop in a specific programming language. To be successful, you need to know how to use the programming language, but you also have to master the software development process.

There are basic program development techniques which make program development much easier, and which are used by professional programmers for maximum effectiveness.

Iterative and Incremental Programming

"The longest journey starts with a single step" - Chairman Mao

The following is advocated by many top developers. It's really effective in producing programs not only faster, but with better quality.

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 Java Coding Standards.

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!