4 ms·
Over the years I have tried to teach people to code a lot (and mostly succeeded) in various settings. I went through a lot of approaches, so here is what I lear
by Cu3PO42 9y ago
Over the years I have tried to teach people to code a lot (and mostly succeeded) in various settings. I went through a lot of approaches, so here is what I learned:
Some restrictions in what a language lets you do are helpful, whereas others are not. In particular, functional programming has been a lot harder to pick up for many folks I have worked with before, so I would definitely go with an imperative language (which appears is what you were going to do anyway).
A static type system has been helpful, though. Both in requiring the aspiring programmer to think about what type their data has or should have and in documenting your own and standard library code. Additionally compile errors (and annotations right in the code) have proven helpful by catching errors earlier and reducing frustration.
I wouldn't recommend C, C++ or Rust or a similar systems programming language for a first language, but C# or Java. If you have access to a Mac, Swift might be a good idea. I have personally made very positive experiences with the Playground for teaching.
After explaining the bare minimum needed in a language to get anything done reasonably (and reinforcing with exercises) I generally let the student choose some task they are interested in tackling (if they try to do something that I know will be virtually impossible for them to do, I encourage them to choose something else now and revisit it at a later date), for example a Sudoku solver, and let them work on it until they ask for help or feedback or haven't made progress in some time. I will generally give them a nudge in the right direction if they are stuck or give opinions on how code could be simplified, sometimes introducing new language features.
Only when someone is reasonably comfortable with programming and can solve most "problem solving tasks" (not neccessarily efficiently), I would move on to frameworks and such.
Since you mentioned you were based in Germany: In my experience it is quite hard to get a permanent job here without some formal education. Your wife probably doesn't want to get another degree due to the immense amount of work required, so a long term goal of freelancing might be sensible. Since there is a relatively large demand for freelance work in the web field, and particularly in front end, I would be inclined to agree that that might be a good long term goal.