2nd Post: Computer Programming — Different for Robots (1of2)

If you search for “learn computer programming” you’ll get about 124 million hits.  If you add “for kids” to the search it reduces to 23 million.  My point is that there is no shortage of tutorials & methods available to learn any of the several thousand computer languages.

All of them (that I found — didn’t check them all 🙂 ) deal with learning the syntax of the language and use examples that generate text/numbers or move icons around on a monitor.

If something goes wrong, what do you do?  Basically, shut the program down & start again.  Aside from the annoyance, no harm.  Consequences minimal — no danger.

Contrast that situation with some software that is controlling a mechanical arm that is placing a window on a car body.  Suppose one of the sensors that guides the arm fails (electrical short, accident, etc).  What happens?  What if a person were standing or walking by.  The window could be “planted” on the person!

The “shut down and start over” is not a good solution here.  Safeguards (programs that get run when something goes wrong) need to be invoked.  They can be quite complex.  Safety is paramount.  Minimizing equipment damage is a close second.  Calls to the maintenance folks, messages to processes that depend on the window being in place have to be stopped or warned.

My point is that the consequences of program errors can be devastating.   Making these programs error-free (100% not possible, BTW) or as error-free as possible is much more important than in the 2D Monitor situation.

Because this situation exists for any program controlling a real object, carefully thought out design and coding standards have been developed.  Some are universal and some company specific.  But all are aimed at building robust programs and making them “easy” to maintain and change.

I submit that these standards are largely ignored in the current internet offerings.  Also, few publics school courses teach them or mention how important they are.  The focus is often on being clever, solving a problem in the shortest number of steps, etc.  All cute & fun, but lead to error prone & difficult to maintain programs.

Any “real-world” computer program has two very important “audiences”.  One, of course, is the computer. Even more important, are other humans that will either fix it when errors occur or change it to perform other tasks.

There have been countless studies about the “lifetime” of computer programs.  Something like only 20% of the total cost and time is in the initial design and coding.  The rest is what happens after the program is put into service.  Some efforts are fixing errors, but most of the work is for improvements.

So, it is very important to build software that other people can understand and fix.  That’s where the standards come in.

I see no reason why these standards and approaches can’t be taught from the beginning.  A good analogy is learning proper syntax and accepted use of idioms when learning a foreign language — at the beginning.

Print Friendly, PDF & Email

Leave a comment

Your email address will not be published.

This site uses Akismet to reduce spam. Learn how your comment data is processed.