No such thing as a small change | |
PerlMonks |
Re: Control flow revisitedby dragonchild (Archbishop) |
on Sep 05, 2003 at 16:33 UTC ( [id://289267]=note: print w/replies, xml ) | Need Help?? |
After reading a lot of the responses, as well as some of your other questions, I am coming to a very important conclusion. You are not really designing your code. You're throwing stuff together and getting very confused when it doesn't work.
You really need to get away from the keyboard and put down on paper exactly the steps you want your code to achieve from the user's perspective. Treat your code as a black box and write down the actual specifications. Important questions you need answers to:
And, that's only a subset of the questions you need to ask. Remember - you are telling a being with a 0 IQ exactly what it needs to do. Unless you explicitly tell it, it won't know to do it. If you don't check for a situation, you cannot expect it to do so. So, if you're not sure of what you want to do, you have absolutely no way of telling the computer what to do. Programming, in my mind, should be 75% design and 25% coding. Both of those tasks should be 40% doing the task and 60% verifying you did the task correctly. So, if you do the numbers, you should really be spending your time as such:
Yes, design is that important. If you have it right, correct coding is a breeze. If you don't have it at all, correct coding is impossible. ------ The idea is a little like C++ templates, except not quite so brain-meltingly complicated. -- TheDamian, Exegesis 6 Please remember that I'm crufty and crochety. All opinions are purely mine and all code is untested, unless otherwise specified.
In Section
Seekers of Perl Wisdom
|
|