Hacker News new | comments | show | ask | jobs | submit login
Ask HN: How to introduce someone to programming concepts during 12-hour drive?
9 points by nkkollaw 7 months ago | hide | past | web | favorite | 15 comments
I won't go into details to keep this brief, but I'm going to spend a week with this client of mine's kit, and I'm supposed to teach him enough about programming for him to figure out if it's something he might be interested in pursuing.

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.

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:



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


K12CS Framework is good for all ages:


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

To get a job, "Coding Interview University":


This is actually pretty awesome :-)

Very cool! Thanks!

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.

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

One way is to discuss different avenues of software engineering (i.e. web, mobile applications, code that makes things display on screens vs code running in the background that makes things more efficient vs code that helps you predict stock prices, etc.) and see if any of the topics you mention lights him up one way or another?

An alternative way could be to ask him what he likes? When I taught my boss' son, I started off by understanding what interests him - turns out he loved hockey and plays it. So then I went into talking about hockey video games vs hockey statistics.

Thanks! I'll try.

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")


"Metaphors We Live By" explains conceptual metaphor ("internal representation" w/ Clean Language / Symbolic Modeling) and lists quite a few examples: https://en.wikipedia.org/wiki/Conceptual_metaphor

Our human brains tend to infer Given, When, Then "rules" which we only later reason about in terms of causal relations: https://en.wikipedia.org/wiki/Given-When-Then

It's generally accepted that software is more correct when we start with tests:

Given : When : Then :: Precondition : Command : Postcondition https://wrdrd.github.io/docs/consulting/software-development...

... "Criteria for Success and Test-Driven-Development" https://westurner.github.io/2016/10/18/criteria-for-success-...

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

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

> Constructor Theory


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

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

Guidelines | FAQ | Support | API | Security | Lists | Bookmarklet | Legal | Apply to YC | Contact