Developing an Algorithm

Until now, the coding we've done has been fairly straightforward, and we've just plowed ahead without too much forward planning. Now, however, we're getting into territory where a little planning can save us a lot of time later.

An algorithm is simply a way of doing things. For instance, if I were to plan out my workday morning, it might look like this:

Turn off alarm clock
Get out of bed
Shower
Shave
Get dressed
Eat breakfast
Kiss wife goodbye
Get into car
Start car
Drive to work

The handy thing about doing this is that I can review it before I've committed a whole lot of time to it. This way, if anything doesn't make sense, it can be fixed before I commit to it. For instance, if I left out “get dressed,” I'd certainly ...

Get XML and Java™ from scratch now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.