Compilers sometimes are a blessing, sometimes a curse.
I prefer to work top down especially when I am developing complex software.
start small, solve small bugs and work towards a big success, not vice versa.
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
An interpreter allows me to focus my mind on one branch, the green part of the tree.
I can test this branch separately,
I need to think about all other branches.
- Finally I reach the bottom, such as getters & setters.
And everything works, top to bottom.
It's not a compiler, but an interpreter that eases the path towards quality software.
method works very efficient.
Only the required methods,
which do not exist yet,
require development effort.
- In addition the
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,
I would waste any time on lower methods.
Some methods are reusable in other branches, and well tested too.
Till next week,