The code I referred to yesterday
was a bit of robot programming, which should have been extremely simple. A robot picks up a part from a vibratory feeder, deburrs it, and puts it in a tray with little nests for the parts.
No damned reason on earth there ought to be 1500 lines of code.
The programmer decided rather than teach each individual point in the tray, (48 each tray) he’d write a complex algorithm that calculated the position of each nest.
Problem is, the nests are injection molded plastic, and most are warped, improperly assembled, or just plain fucked up.
So it makes more sense to teach each point individually, since the calculations were full of little circumlocutions that compensated (or tried to) for irregularities as well as the original calculations.
All in all, it should have been maybe 250 lines of code. I’m going to correct that, as soon as the customer can afford the downtime for me to do it properly. And it will run.
I spoke a bit about this to the maintenance folks, and they lit up at the idea of learning to program robotics; they were a bit apprehensive but I did a ten-minute primer at one of the cells as to how robots work, and it removed all trace of concern. Robots- especially Fanuc robots- do not have to be complex. I have taught robot programming for fifteen years and it’s not that big a deal, if you pay a little bit of attention.
13 comments Og | Uncategorized

Sounds like the original writer never heard of the KISS principle.
Dude’s a computer programmer dangit! Any ole machinist can do that CNC-like simple code stuff. If he tells it where to go, then he’s doing the work. If he tells it how to think then he’s creating smart.
“…then he’s creating smart. ”
In his own eyes.
If it’s bad enough that it can no longer be admired, but must be replaced, he didn’t do what he was paid for.
Elegant code is often never appreciated, because it’s never examined.
We’ve got it good today. Anybody remember the days of tape controlled machines and the infamous “Flexiwriter”? (also known as the inflexiwriter) Finish a complete tape of code with one tiny mistake & then start all over again. Now its a couple of keyststrokes for corrections.
Roger
Roger:
I OWN a Friden Flexowriter.
http://neanderpundit.com/?p=2389#comments
Og my friend; what is the difference between your elderly Flexowriter and my elderly Jaguar?
Both are antiquated, both can be difficult to live with, both are intolerant of error and both when properly administered can produce great results. Its perhaps frightening, even in disagreement, we agree.
LOL Roger
My flexowriter was free, I don’t need to use it every day, and it costs me nothing whatsoever to keep it. Additionally, it sometimes generates income for me.
No damned reason on earth there ought to be 1500 lines of code.
Maybe not for your apps, but have you ever seen a COBOL program?
I used to call my knowledge Data Processing, but now I call it Computer History.
lol.
yes, I have futzed with Cobol and Fortran and all that crap. This is Fanuc TPP programming, the most versatile and efficient code on earth.
I’m such a dork. I came here because this is a horrible website run by a guy I hate because he actually does things, when my accomplisments consist of being an asshole and pissing in the comments of people whose nutsack I am unfit to moisten with my tongue. I would also insert my patented “HAR HAR HAR” but I have become too stupid to even do that.
“I spoke a bit about this to the maintenance folks, and they lit up at the idea of learning to program robotics; …”
You’re an idealist, Og. Its examples such as this as to why I am here.
So many people are proprietary of their ‘education’ and they would rather keep people in the dark so they can keep their position and wage (perhaps the ‘complex code’ may be part of that???).
You understand that its not just what you know, but that it is the labor you give AND your generosity of spirit.
Error checking is my big beef. Never assume the environment the code runs in is stable.
I hated it when errors bubble up through the system. That is like the old game of whsiper something in a ear at one end of a line and then see what comes out the end.
The more they overtake the plumbing, the easier it is to stop up the drain.
– Scotty