Compilers sometimes are a blessing, sometimes a curse.
I prefer to work top down especially when I am developing complex software.
Write the high level methods first.
These call lower level methods, which do not exist yet.
- The software runs into an error, of course.
And that is exactly what should happen.
I use the debugger to see if everything so far has gone according to plan.
Only then do I write a lower level method, which will call even lower
level methods.
An interpreter allows me to focus my mind on one branch, the green part of the tree.
I can test this branch separately,
before
I need to think about all other branches.
- Finally I reach the bottom, such as getters & setters.
And everything works, top to bottom.
So,
start small, solve small bugs and work towards a big success, not vice versa.
- This
top-down-depth-first
method works very efficient.
Only the required methods,
which do not exist yet,
require development effort.
- In addition the
top-down-depth-first
method increases software quality.
As a result of the intermediate debug inspections I am sure that the program is rock solid at a high level,
before
I would waste any time on lower methods.
Some methods are reusable in other branches, and well tested too.
Thesis:
It's not a compiler, but an interpreter that eases the path towards quality software.
Till next week,
Nut
|