Java: Development Process
Software development can be looked at from two perspectives process
and product. 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 write a loop in a specific programming language.
To be successful, you need to know all the product information,
but you also have to master the process of software development,
which is largely self-taught.
There are basic program development
techniques which
make program development much easier, and which are
used by professional programmers for maximum effectiveness.
"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.
- Start small - Start with a small working program. It doesn't have to do what you want,
but it will get you started along the path of incremental development.
See Start with a working program.
- Incremental development - Starting with a small program, make a very
small change toward your goal. Compile it and test it. When it works repeat the process
with another small change. Also called Iterative Programming.
See Iterative/Incremental Development.
More simple techniques
- Pair programming - Work with someone else.
- Use good coding practices - Be scrupulous about naming and indentation.
See
Java Coding Standards.
- Know your tools - Choose good tools (editor, IDE, ...) and learn them well.
Intermediate techniques
As time goes on, you will want to do some of the following.
- Save your programs -- you may be able to use them as the
nucleus for another program.
- Create you own library. When you write a good
general class or method, add it to this library.
- Refactor (rewrite) parts of a
program if you realize there is a better way. A better
written program will be less likely to have bugs and will
be easier to extend for the next iteration.
- Use an IDE (Integrated Development Environment), eg, NetBeans,
Eclipse,
or JBuilder (see IDEs.
A Java IDE requires learning, and therefore may not be a good
choice for beginning programmers. However, after you are
comfortable developing simple Java programs with a text editor
and the JDK, the advantages
of an IDE for creating user interfaces and debugging can be
significant. As with all tools, learn to use it well.
Check the menus for options that might be useful.
Best Practices
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!
- Code Complete second edition by Steve McConnell, Microsoft Press, 2004.
Don't be put off by this being a Microsoft book. It's full of wonderful
coding and process advice that you can use after your first programming course.
- The Pragmatic Programmer by Andrew Hunt and David Thomas, Addison-Wesley, 2000.
Filled with good product and process advice for the intermediate+ programmer.
- Rapid Development by Steve McConnell again, Microsoft Press, 1996.
This is still great, tho it could use a little updating in view of
some "agile" development methodologies like Extreme Programming.
This is filled with facts that everyone who works on or manages a
major software development should read.