Ask HN: How to introduce someone to programming concepts during 12-hour drive?
He's about 20, and still struggling to finish high school, but he's smart (although perhaps a little weird).
I thought about introducing him to touch typing just to get a useful skill out of this regardless of the outcome. Then, I thought that during this week I'd teach him HTML and enough CSS to see what's used for. I'm thinking that if he gets excited about typing code and seeing things happening he'll want to study more and learn more advanced stuff in the future and perhaps even make it his profession (this is what my client hopes will happen).
Now, part of this trip is a 12-hour drive. I thought I could use this time to introduce him to simple programming concepts. For instance, if asked to list all steps involved in starting a car, most people would say:
- turn key - start car
That could turn into an infinite loop, though. A better way would be:
- turn key - start car - if it starts, exit - if it doesn't start, repeat 3 more times - if it still won't start, call a mechanic
Stuff like this—that anyone can understand, that can be explained without looking at a computer, but that it's still useful.
Any idea what I could talk about? Examples, anecdotes, anything.