Thursday, January 21, 2010

Real world examples of basic programming elements

Variables: "So, what are you going to name your kid?"

For loops: "My job is so boring. Every hour, I have to check the temperature on this gauge, and if it ever overloads, I just flip a switch to cool it down."

While loops: "Every day when I get up, I go fishing in the morning. I'll probably stop once I get older."

If statements: "When they get here, I'm not gonna let them in unless they're carrying a white flag."

Parameters: "What do you want on your pizza?"

Return values: "Hey, I'm back from the store. Here's those taco ingredients you wanted."

Any other ideas?

3 comments:

  1. I think it is neat that you can apply programming terms to real life. As much as I would love to give my input on programming and its real world parallels, I am a dunce when it comes to programming...so I don't have any good ideas.

    ReplyDelete
  2. You share your sense of humor very well William. I appreciate your effort to make some of your programming world accessible to illiterates like me!

    ReplyDelete
  3. I don't know enough programming elements to give you input!But what you have there is good.

    ReplyDelete