October 2010
Monthly Archive
Monthly Archive
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.
Programmers who are too cool for the room. Guys who write unnecesarily complex code so they can show off their programming chops. Guys who don’t comment code, and write ten lines of code for every one needed so they can display their 1337 math skylz.
No, actually I don’t care about those guys at all.
What drives me nuts is cleaning up their messes.
Good lord what idiots geeks are sometimes. I always prided myself in SMALL code. Guess unlimited memory has made people sloppy.
Tam distills all the rules of gun behavior down to one: Assume you’re an idiot.
This works for me, because it’s something I already do.
Today I climbed on top of a machine about thirty feet tall. If I had been thirty feet up a rock cliff, (Which I have done, in my skinnier days) I would have been scared shitless; the fact was I wore safety equipment against falling and though I was in some precarious positions i was never in any real danger.
The inherent danger of firearms makes it important that you follow safe handling rules, and frankly, I strive to be ever more anal retentive about safery- but I have to say, I like Tam’s rule.
I tend to apply it to almost everything I do, because I do a lot of other things that are inherently dangerous. Bluing guns is basically playing with five gallons of boiling lye. All woodworking tools are potentially lethal- if you got your hand in a Lauderdale chop saw, for instance, you would bleed out before it let go of you. Metalworking machinery- don’t get me started. Welding, cutting steel, forging… Just about everything I do offers me an assortment of amusing and varied ways of snuffing it, or at least causing myself serious bodily harm.
So I assume the next move I make is the one that’s gonna get me killed. As often as not, even being careful, I need to be able to get the hell out of the way quickly. And all this is amplified by the fact that I have SEEN the injuries of which I speak; there are a number of friends who I’ve buried or visited in hospital after having been harmed by industrial machinery. And if you want to see gruesome injury, go to a farm.
Good advice, that. Assume you’re an idiot. You won’t be often wrong.