Teaching my nephew how to code – the basics.

This isn’t a serious post. Just a personal story/recap of what I’m doing to teach my 11yo nephew the basics.

We started with Scratch last year, but both of us got tired of that environment pretty soon. We had a ton of fun making little games, but both of us are low on patience, so any time looking around trying to discover the tool’s weirdness just resulted in two very frustrated people :).

A month ago he reached out to code again, so I decided to throw him into “real world” tools. I think using tools that felt useful and real was key to keeping me engaged as a young dev, so I decided to try that with him, too. Given that he asks for a new lesson every weekend now, I think my plan is working 🙂

So far, he’s been digging into HTML, CSS, and JavaScript. We spend most of the time in JavaScript, but I always have small snippets of CSS around for when I see his energy levels go down — the quick dopamine hit from coding a fun animation is a great way to cut a dense lesson on race conditions.

We have only covered the most basic concepts, but I’ve tried to make it fun. He’s learned about `const`, `let`, simple CSS transitions, how JavaScript’s `console`, `alert` and `prompt` work, and how to pull that together to make some interactive things happen.

As I write this, he’s building his first sum only calculator with a `prompt` and `alert` based UI. In between new concepts, I refresh old ones. “Do you remember why that happens?”, and “What will happen when this code runs?” are my go-to questions; I want him to build good instincts for debugging, so I never stop him if he’s heading towards a bug. I’d rather use the chance to teach him how to solve it.

We’ve dug around in the browser’s debugger, using breakpoints and inspect to learn what our code is doing. I think all new devs should be taught how to solve their own problems, and teaching him about debugging tools is part of that.

I’ve made sure he learns how to read error messages, too. If you don’t know how to read an error message, debugging feels mysterious. So he has to learn, even if he doesn’t like reading.

As we write simple scripts, he learns about code readability, comments, and documentation. I try to avoid lectures by taking a page from my onboarding habits and meshing together lessons with hands on work. When I have validation that he’s getting the concepts, I introduce new levels of depth.

Today he asked for homework again. I count that as evidence that he’s hooked 🙂

If you’ve taught kids how to code and have any advice, please let me know!. I am sure the honeymoon is gonna be over real soon and I’ll need some actual plans to keep the momentum going.

FunEmployment log #1 – Gather Town

Gather provides virtual spaces where people can hang out. Similar to the old Guild houses in MMORPGs, Gather provides a customizable virtual world for you and your friends, teams, or any other group you can think to meet online. They provide a limited HTTP API, and are planning to add Web Sockets at some point. While I need Web Sockets for most of the things I’m interested in doing with it, I’ve started playing with the current APIs to learn more about generated map making scenarios.

I did a very small project demo where I get a list of JSON endpoints and generate them into a map (name, tooltip). When you hit X while standing on top, it highlights the related endpoints for you automatically. Ideally, this would happen without any need for user interaction or website embeds (the hack I found for this), but at the moment it’s interesting enough to stand there and think about what else could be done. Broadcasting demos ? A walkable tour of a company’s API? Sitting down with friends to explore technical docs while showing each other the work? Who knows. I’m eager to find out if there’s something here that would help teams learn together.

The SDK Repo is here, please don’t use it for anything serious, I’m just playing around with ideas, it doesn’t even have tests, and I’m not sure if I’ll keep at it or wait for Web Sockets since IDK if this API is going away entirely or not (this point re deprecation, while very obvious, just occurred to me now).


Alt text: I do a walking tour of endpoints, then show the highlight functionality and some code decisions so far (it’s all prototype-y, of course)