The Beginning; Making Decisions

I sit at my computer a lot. I’m sure it is too much. But I do enjoy what I do. But as I was writing some code the other day my 11-year-old asked: “Daddy, will you teach me how to write code?” “Absolutely!” I replied.

Now to figure out what and how and when.

The When: that’s easy (almost)

Since we homeschool, we should be able to work it. We have extracurricular activies too and he does already have a pretty full workload. But I imagine we can work it in. On the the what.

The What: type of code to start with

The what is a harder question. I spend most of my time in C# and SQL and the front-end stack of HTML, CSS, and JavaScript. But I don’t think starting full stack is the way to go. And while C# my be my favorite language, I’m not sure it’s the right place to start.

I ran a few quick experiments with his participation.

console app

> dotnet new console -o demo
> cd demo
> dotnet run

And showed him the output

> code .

Edited the Program.cs file a bit to allow reading a name from the Console and Writing a personalize hello.

He liked that. I wasn’t a fan of the boilerplate code to get a console app going in C#.

web page

> ni index.html
> code index.html

And wrote and discusssed the most bare bones HTML page ever. I then talked to him about CSS and styled the heading and paragraph I had on the page. Then added a quick input box to capture a name; added a script tag and an event listener for capturing the input. Then added an element to dump the “Hello, {name}” into and did that.

He liked this too.

scratch

I then pulled up Scratch and did some drag and drop magic to make the cat move around the screen. A year or so ago, I worked on a couple of games in scratch with my other two kids. I never really fell in love with it, but saw the benefit in teaching.

He wasn’t all that excited.

We discussed the different types of coding above. He seemed to heavily prefer the console application. So that part of the what is decided. No on to the more difficult decision.

The What: Coosing a language

C#: It is my go-to. It is general purpose, going to be around for a long while, has a good bit of traction and with the new dotnet core is cross platform. But I think the overhead is going to be a bit much. The compiling, etc. just seems like overhead that isn’t needed at this point.

Go: I’ve explored it. Have a couple of Windows services in production written in Go. I’ve been wanting to learn more. It is very easy to write. But the overhead of a compiled language would still be there. It’s the new kid on the block. I think it has a very bright future.

JavaScript: I have a love/hate relationship with JavaScript. I like it in the browser, but don’t really like it anywhere else. (I am entitled to my opinion, justified or not.) If he wanted to write something in the browser first then it would make sense. Since he doesn’t, I don’t think it is a good fit.

Ruby: I used to use Ruby a lot. I went from C# to Ruby back to C#. There are things I love about Ruby. I would feel comfortable here. I’d have to refresh my memory, but could do it. It would remove the compilation overhead.

Python: I know about Python, but I don’t know Python. It would remove the compilation overhead similar to Ruby. I know that it is used heavily in AI, RasberryPi (I have a couple), Machine Learning and other scientific and math endevours. I know those uses won’t have much to do with now but later has to be considered too.

My gut tells me Python. But it could just be the Pop-Tart I ate for snack. I don’t know. But I think that’s what I’m going to go with. I’ll have some learning to do too. That, in fact, may make it better. I sometime get impatient, and if I’m still in the learning mode too, my patience may not be as thin.

While choosing a language wasn’t an easy task, the next decision is the hardest.

The How

The challenge will be teach enough basics to do something non-trivial and keeping the challenges at acceptable levels. Pacing is everything.

This section is going to stay a bit bare for the time being. I’ll add to it as we progress and explore. I’ll document the lessons that went well and the ones that didn’t. We’ll learn together and make decisions about the each next step together.

Each step in the process will look something like this:

  1. Review what we already know.
  2. Introduce the new concept.
  3. Expand on the new concept.
  4. Ask the student to explore on his own.
  5. Review the exploration.
  6. Discuss possible next step bearing in mind the questions below.

At each step in the process, I’ll ask:

  1. Did we learn the previous lesson successfully?
  2. Do we need to take a small step or a big step?
  3. What about my teaching method needs to be adjusted?