
Ask HN: How to introduce someone to programming concepts during 12-hour drive? - nkkollaw
I won&#x27;t go into details to keep this brief, but I&#x27;m going to spend a week with this client of mine&#x27;s kit, and I&#x27;m supposed to teach him enough about programming for him to figure out if it&#x27;s something he might be interested in pursuing.<p>He&#x27;s about 20, and still struggling to finish high school, but he&#x27;s smart (although perhaps a little weird).<p>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&#x27;d teach him HTML and enough CSS to see what&#x27;s used for. I&#x27;m thinking that if he gets excited about typing code and seeing things happening he&#x27;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).<p>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:<p>- turn key
- start car<p>That could turn into an infinite loop, though. A better way would be:<p>- turn key
- start car
- if it starts, exit
- if it doesn&#x27;t start, repeat 3 more times
- if it still won&#x27;t start, call a mechanic<p>Stuff like this—that anyone can understand, that can be explained without looking at a computer, but that it&#x27;s still useful.<p>Any idea what I could talk about? Examples, anecdotes, anything.
======
westurner
Computational Thinking:

[https://en.wikipedia.org/wiki/Computational_thinking](https://en.wikipedia.org/wiki/Computational_thinking)

> 1\. Problem formulation (abstraction);

> 2\. Solution expression (automation);

> 3\. Solution execution and evaluation (analyses).

This is a good skills matrix to start with:

[http://sijinjoseph.com/programmer-competency-
matrix/](http://sijinjoseph.com/programmer-competency-matrix/)

[https://competency-checklist.appspot.com](https://competency-
checklist.appspot.com)

"Think Python: How to Think Like a Computer Scientist"

[http://www.greenteapress.com/thinkpython/html/index.html](http://www.greenteapress.com/thinkpython/html/index.html)

K12CS Framework is good for all ages:

[https://k12cs.org](https://k12cs.org)

~~~
westurner
For syntax, learnxinmyminutes:

[https://learnxinyminutes.com/docs/python3/](https://learnxinyminutes.com/docs/python3/)

[https://learnxinyminutes.com/docs/javascript/](https://learnxinyminutes.com/docs/javascript/)

~~~
nkkollaw
Good one, but that's kind of hard to do while driving, though.

------
tixocloud
Start simple, start small and start with something he's interested in.

There's the part about helping him discover whether he likes to create things
through computers and whether he actually believes he can create things
through computers. You're spot on that he might be interested about typing
code but you'll have to figure out whether he's a visual person, a logical
person, etc. For example, I got started learning to code once I understood
what code can do to help automate things. A friend of mine got interested
after seeing what websites he can build. Everyone is unique so you'll have to
learn about him as you're trying to teach.

~~~
nkkollaw
Good advice. Do you have any tip of how to figure out if he's a visual or
logical person, etc.?

~~~
westurner
You can learn about a person's internal representation by asking Clean
Questions and listening to the metaphors that they share; in order to avoid
transferring and inferring your own biased internal representation (MAPS:
metaphors, assumptions, paradigms or sensations).

It's worth reading this whole article (and e.g. "Clean Language: Revealing
Metaphors and Opening Minds")

[https://en.wikipedia.org/wiki/Clean_Language](https://en.wikipedia.org/wiki/Clean_Language)

~~~
westurner
I believe it was Feynman who introduced the analogy:

desktop : filing cabinet :: RAM : hard drive

Here's a video: "Richard Feynman Computer Heuristics Lecture" (1985)
[https://youtu.be/EKWGGDXe5MA](https://youtu.be/EKWGGDXe5MA)

Somewhere in my comments here, I talk about topologically sorting CS concepts;
in what little time I spent, I think I suggested "Constructor Theory" (Deutsch
201?) as a first physical principle.
[https://en.wikipedia.org/wiki/Constructor_theory](https://en.wikipedia.org/wiki/Constructor_theory)

~~~
westurner
> Constructor Theory

[https://en.wikipedia.org/wiki/Constructor_theory#Outline](https://en.wikipedia.org/wiki/Constructor_theory#Outline)

Task, Constructor, Computation Set, Computation Medium, Information Medium,
Super information Medium (quantum states)

The filing cabinet and disk storage are information mediums / media.

How is the desktop / filling cabinet metaphor mismatched or limiting?

There may be multiple desktops (RAM/Cache/CPU; Computation mediums): is the
problem parallelizable?

Consider a resource scheduling problem: there are multiple rooms, multiple
projectors, and multiple speakers. Rooms and projectors cost so much.
Presenters could use all of an allotted period of time; or they could take
more or less time. Some presentations are logically sequence able (SHOULD/MUST
be topologically sorted). Some presentations have a limited amount of time for
questions afterward.

Solution: put talks online with an infinite or limited amount of time for
asynchronous questions/comments

Solution: in between attending a presentation, also research and share
information online (concurrent / asynchronous)

And, like a hash map, make the lookup time for a given resource with a type(s)
~O(1) with URLs (URIs) that don't change. (Big-O notation for computational
complexity)

Resource scheduling (SLURM,):
[https://news.ycombinator.com/item?id=15267146](https://news.ycombinator.com/item?id=15267146)

------
owebmaster
Talk about the games he played (or still play) that could be improved with
programming.

