5 ms·
How I describe programming to non-programmers: Imagine you have a set of mentally handicapped employees. They are capable of following instructions perfectly e
by falcolas 13y ago
How I describe programming to non-programmers:
Imagine you have a set of mentally handicapped employees. They are capable of following instructions perfectly every time, but are completely unable to intuit how to do something without very explicit instructions. That is, they don't know how to scramble eggs without explicitly stating every single minute step (including how to get an egg from the carton (in different positions every time!), what to do if the carton is empty, how to order more cartons of eggs, how to identify spoiled eggs, etc).
Now imagine that you are using these employees to staff a restaurant. You have to write detailed, explicit instructions in a way which will give you a constantly working restaurant given that the customers, stock, and equipment will change parameters minute over minute, day after day.
Now, imagine expanding your restaurant into a chain. How will the programming have to change to work in a building with a different configuration? With different operational hours? With different recipies?
Now, imagine your boss wants to change the menu slightly EVERY BLOODY DAY!
That is what we do.
- mwcampbell 13y agoNot bad, except that these employees are superhuman in one crucial way: You only ever have to give them a procedure once, and they've got it for good, and you can then build on that procedure to define more complex ones.
- falcolas 13y agoTrue, but procedures can be coded as "go to page 5, do instructions 2 to 55, and move to instruction 3 on this page." Of course page 5 was probably written by someone else, because it's probably a very basic instruction. But that just adds to our fun as programmers!
- angersock 13y agoAnd by page 5, we really mean the 6th page of the book. Oh, and instruction 2? It was the third instruction, and mentioned that you should switch books.
- wernercd 13y agoExcept if you give them a procedure that doesn't make sense (Like divide the restaurant by Zero) you either open the restaurant for international terrorists, the place blows up or they snap and go postal.
- squeaky-clean 13y agoThis reminds me of an experiment my music teacher did with my class in grade school. I'd completely forgot about it until just now, and thinking back, it may have been one of the things that influenced me to become a programmer. He was trying to teach us the idea of explaining yourself more clearly (he was one of those teachers that went off on tangents totally unrelated to music when he felt there was an important life-lesson other classes might not cover). He stood at the board and told us that he would draw whatever we said, and the goal was to have him write out a musical staff and certain notes on the chalkboard with no physical gestures, just talking. As if we were having a conversation over the phone. He went around the room giving every child a turn at a time. So it starts off "Ok, draw 5 lines." And he gets a piece of paper and drew 5 horizontal lines. "No! No! On the board!", said the next one. So he goes to the chalkboard and draws 5 lines in random places. "No! No! make them horizontal!" And he drew 5 horizontal lines that squiggled around and were of random lengths. And this went on and on until you we ended up with something like "On the chalkboard draw 5 straight horizontal lines, about 1 inch apart, and all 2 feet long." And then we still had to figure out how to explain drawing in notes on the correct line, whether the circle was filled or un-filled (quarter note, half note, etc). We never actually finished, most of the kids got too bored. But I thought that was such a fun lesson. Almost 15 years later I can still recall it as clearly as if it were last week. I've had a few intro programming or algorithms teachers explain a similar concept. A robot baking cakes is a common one, or that programmer joke ("buy butter and if they have eggs then buy a dozen."), but actually shouting commands someone as inept as a computer really made it sink in.