3rd Post: Computer Programming — Different for Robots (2of2)

Almost all of the programming taught involves two-dimensions.  The simulated sensor inputs, collision of objects, etc.  can be complex, but it’s trivial compared to actual happenings in the real (3D) world.

Dealing with a moving robot, even just avoiding only stationary objects,  is very difficult, especially if the third dimension is relevant.  (Much easier if the robot is rolling and stays on a floor)  Adding other moving robots or objects gets extremely complicated and difficult to deal with.

But being difficult doesn’t mean it’s impossible.  Some folks have spent considerable time (many person-years) building so-called “physics engines” that can be used to make the programming tractable.  Learning how to use these and other tools will take time — and again need to be used in “standard” ways.

If you examine a professional programmer’s code you will see references to various pre-programmed tools (e.g., a physics engine, or the languages’ libraries) following standards so that another person will be able to change the programming in the most pratical way — minimizing the chances of making errors.

There’s lots more, but the soap box that I’m standing on helps me yell loud and clear about learning programming properly from the ground up.  Might as well do that rather than learn bad habits from “entertaining” folks and methods.

What’s needed is more than just logical thinking — it’s disciplined logical thinking.

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.

1st Post: Get ready! The revolution is coming fast

How will it play out?  My crystal ball is broken, so I can’t say — but we (and our kids) can learn enough basic things so that we can be ready for “whatever”.

In one sense, robots of any type will create opportunities for activities such as sales, marketing, financing, etc. — that’s no different from any type of mechanical device.

What I want to deal with is the actual building & controlling  of the robots.  We need to know about the following areas.

Computer Programming

Mathematics

Electronics

Mechanics

Low-Level AI (How to respond to sensor inputs)

Pretty daunting.  No one can know them all.  Also, no one really knows what the demand will be for folks in the individual areas.  So what to do?

We can study “music appreciation” type survey courses, or we can study the individual areas in depth.

If you are interested in “playing an instrument” then the survey course approach is pretty useless.  Same thing here.

For that, the first area to study is “Computer Programming”. Why?  It’s the basis of any robotic function — and, as an added benefit,  there is a huge market for programmers in all fields.  Bureau of Labor Statistics and others, say that expected growth is over 8% per year for the next 10 years.

I’ve made my living designing and building computer programs for some 50 years (started young!).  My concern is that the approaches used in the schools and on the internet (not all) use the, “Hey, it’s easy, just move a few icons around, capture the dragon, gain some points” approach.  The emphasis is often more on entertainment, rather than building a rigorous foundation for future development.

BTW, that’s not all bad.  It can get folks interested and involved.  But why not learn the programming language and the design methods properly — right from the start.