"be consistent" | |
PerlMonks |
comment on |
( [id://3333]=superdoc: print w/replies, xml ) | Need Help?? |
Superficially it seems that you advocate the whirlpool model
instead of the waterfall one. But really you advocate tripping
blindly in the dark. As I will show, there is nothing wrong with
the method of your teacher but you are getting the wrong lessons
out ouf it!
1. fix the code so it compiled and ran Most compilers run completely out of sync at the first syntactical error and produce a cascad of errors. So incremental fixing is a way to get a program to compile. That was probably the lesson the teacher wanted you to learn. I don't see any other interesting lessons to get from that. Getting a program to compile is no big deal! 2. modify it so it did something slightly different. That's the way we do everything. Proceed from the known to the new. We never start anything from scratch but learn from previous experience. The good teacher is the one that impose in an new exercice a "slightly difference" so that the pupil can both build his confidence and exercice his own initiative. But deducing from these exercices that programming is incremental fixing of bugs is dead wrong. Incremental improvment of programs, or Larry's whirlpool (as opposed to the waterfall model) is way more than that. Testing and fixing is just the inner loop or the whirlpoool. But what you propose is not even that, it is the blind fixing of visible bugs probably creating countless of bugs elsewhere. In the linux kernel mailing list,there are recurring threads about self-proclaimed the bastard Linus against getting a debugger in the kernel to fight this natural but wrong tendency: "just fix the next bug" and to encourage programmers to always get the larger view I guess I could derive my mantra from Arthur Koestler notion of holon. Every complex system is an holarchy where higher holons depends on lower ones. A program is such an holarchy and the first thing to know is at which stage of the holarchy you need to work. Fixing blindly bugs after bugs is working on lower holons and at best building scar tissues. In more pragmatic term, getting local optima (here fixing given bugs) are no guaranty of a global optimum. And we live in a society where every one is a specialist of some holon and is able and prone to get a local optimal there but is likely create a disaster at higher level. Example: "an optimal so-called liberalist american economy is likely to wreck the global ecosystem because it does not care about global warming". Pick up your favorite example. So the mantra is Which holon needs working? or in term of Larry's whirlpool Which loop of the whirlpool needs work? Certainly, these mantra, as any mantra, set the mind but, by themselves, do not define any course of action. The devil is in the details and we must go define in a given fields what an holarchy is and from which holon it is made. Different schools of programming have various ideas about that. I like the concept of holon and holarchy but beware not to get in new-age drug induced illiterrate holistic dreams!! -- stefp -- check out TeXmacs wiki In reply to Re: Re: Re: Programming Mantras
by stefp
|
|