ORIGINAL: bo
Mistakes where, I dont understand about bugs, I am not a programmer, but if you are a trained programmer with a lot of experience at programming why isnt the code written right in the first place
Bo,
None of this is directed at you in a bad way. You asked a question in good faith and deserve an answer. The problem is that for the people who are capable of delivery of an answer backed by
experience, this top is inflammatory.
I am not trying to be
too sarcastic or mean. Please do not be offended. Part of this is intended to be humorous. This is, however, a subject near and dear to my heart.
Consider a program that takes two numbers as input and outputs the average of those two numbers.
Things that must be considered....(for code to be
written right)
1) The mathematical relationship between the 3 numbers
2) The visual display of each number (how many decimal places, font size, negative values, etc.)
3) The data entry of the two numbers (how do you handle when someone puts a letter in when it should be a number, etc.)
4) When does the math get done (do you do it immediately when a number changes, do you give them a button to control the execution, etc.)
5) Are there special circumstances that will affect any of the decisions that you have already made? (Do we need to be able to cut and paste info from another program, do we need to link behind the scenes to another program, etc.)
6) Who will use the program and what is their level of expertise? (Is it for accountants or is it for 3rd graders to check their homework, etc.) How will that affect #2
I could go on... and admittedly this is a bit of overkill, but you would be surprised at how each of those items can be a failure point.
Now multiply the situation by Thousands of variables and Thousands of operations.
Now multiply the situation by Mulitple methods of display that are often graphical.
Very quickly the problem is large enough that it makes sense to modularize it.
Now the trick becomes to keep these millions (yes millions - do the math) of relationships in your mind so that when you change one thing, you make sure that everything else that it affects is changed if needed.
Trust me on this one... HOPE THE PHONE DOESN'T RING AT EXACTLY THE WRONG MOMENT.. you will 'drop' the cloud of quickie tasks floating in your head and likely not pick them all back up when you resume.
NOW
Consider the idea that many of these tasks are complicated. They are not simple averages of two numbers. They are events that must gather data from multiple locations and perform dozens of steps to be accomplished.
NOW consider this analogy....
When was the last time that you got lost driving somewhere you have never been before. Consider that - Really.
You had a map. You studied it ahead of time. You consulted Mapquest. You followed the path as good as you could, but you just couldn't find the spot.
Oh, you got there eventually - maybe even quickly ... but DID YOU DO IT CORRECTLY THE
VERY FIRST TIME?
And then, what if when you did not drive directly to the destination, it had the potential to disrupt any other trips that you are about to take OR
have taken previously.
Furthermore, if you suspect that a previously taken route may have been affected, now you have to retrace it EXACTLY and alter it if needed.
Meanwhile.... you are being paid based on how many trips you make.
Meanwhile... everyone believes they are the best navigator in the world and consider you a failure if you choose (for reasons they may have never considered) a path that they would not have chosen.
And it has to work even if the streets have potholes (bad drivers, hardware problems, etc.)
And it needs to work for cities where the speed limit is low (old machines)
And it needs to work well enough that at the end of the day, people feel that it *almost* made as good of choices as they would have (i.e. the AI needs to be a challenge but can be beat - otherwise everyone will accuse it of being stupid or cheating)
SUMMARY
Writing large computer programs is a very challenging task that involves keeping up with huge amounts of detail and tying ALL of the loose ends together in a nice package.
POST SCRIPT
Even though there are theorists and university types that will sing the praises of TOP DOWN STRUCTURED PROGRAMMING or OBJECT ORIENTED PROGRAMMING as if they are the second coming and will prevent any systemic and endemic problems from occurring...
Experience has shown that they are full of $#|T
This rant has not been directed at anyone in general.
I feel better.
Thanks for enduring it.
Bridge is the best wargame going .. Where else can you find a tournament every weekend?