Ask HN: I'm teaching my wife to code. What direction should we go?

41 points by dotdi ↗ HN
My wife has shown interest in learning how to code in order to find flexible (or, even better, remote) work in the future, i.e. after the kids start going to kindergarten and/or school. She has no prior CS experience and has a Bachelor's in French and Norwegian Literature.

I was leaning towards starting her journey with Python, since (1) it's pretty popular and can be used in many different contexts (backend, data analysis, ML, etc.), it's (2) quite beginner friendly, with great learning resources and (3) I have prior experience with it.

Lately, however, I started wondering if I shouldn't push her towards front-end, i.e. HTML/CSS and eventually JS and a respectable framework or two. I did some substantial AngularJS projects a while back, so I could support her if we chose this direction. She is quite inclined towards design and has a good sense of color palettes, fonts, arrangements, etc. (IMHO).

We are located in Germany, and, as far as I've seen, there are many more freelance jobs looking for JS/Angular/React or similar than anything with Python. That might not be a problem when looking for remote work, but some local customers might be interesting for building her portfolio. I could imagine getting some clients under my name and having her "on the team" for the beginning.

Does anybody have any experiences worth sharing? Any pointers, valuable lessons, must-do things?

70 comments

[ 2.7 ms ] story [ 134 ms ] thread
I realise this is a crazy idea but have you tried asking what she's interested in?
Haha, yes, I asked her several times. She's not sure, hence this ask HN.
In well-paying job that can be done remotely, apparently, not the programming itself.
Remote and/or flexible schedule would be the most important aspect, that's true.

But she is quite interested and impressed by all the things one can do with programming and that's what's driving her in this direction.

Take up one app/website that she finds impressive and teach whatever is necessary to implement a prototype of it. Often, when starting out in anything, maintaining and amplifying the initial interest and enthusiasm is a major challenge.
Unfortunately it's increasingly the case that people learn to code to get a well-paying job rather than because they're interested in it (with the employment opportunities being a side benefit).

This is probably what's lead to the rise of Electron, and using Javascript everywhere.

It's was like that in the 1980s. There was always good money to be earned in Law or Accounting but for those without the drive to study IT looked like easy money. Met many a failed accountant that thought all you had to do was sit in a nice office, drink coffee and poke the keyboard occasionally. Over time they moved into project / client management

Which, sadly, explains a lot

I dunno, I've reverse engineered proprietary binary TCP protocols and written assembly ISRs in my current role. I still think electron and js are great! Electron and wasm will be even better though.
How could this possibly be seen as a bad thing?

Note that this does not make it a requirement for anyone to not care about coding. But not only getting into coding because it is so much fun but because, hey, it is actually being paid really well and you are flexible and it's future proof, that seems to me to be one of those good problems to have.

It sounds to me like an industry growing up.

I think the usual advice is that she should try to solve one of her own problems. That doesn't mean curing diabetes or anything. I used to get annoyed because my personal budgeting program expected the debit & credit columns of my bank statement to be swapped, and I had to cut & paste the columns every time I imported a statement. That's a great first Python project, in my opinion. Look for nuisances. Maybe that means front-end development, maybe not. But whether anyone has any personal or professional success with software development depends on that person having the sense that they can solve a genuine problem with their skills, even if it's a modest problem or takes them a while or isn't a perfect solution.
Best point about her solving one of her own problems. It might not even have to be a formal problem, but just something of her interest.

As long as she is interested, she will learn.

This is the best advice.

I learned more about programming when I had a task in mind that I wanted to accomplish than I did just going through the motions with a book or for a class.

I am with FroshKiller's comment, who said to solve one of her own problems. My girlfriend had little interest in programming, but asked me one day if there was a way to track a price on a shopping website and get notified if it changes. I offered to help her make this, and she didn't believe she'd be anyway near capable of implementing something like that.

Took an evening, she wrote it in Python, and I had her look everything up (StackOverflow and other places), and just helped in explaining the rough concepts involved (here's what a variable is, then you need to read a website's entire content into a variable, see what that website actually looks like in code, spot the words..., here's how you can cut and slice text, and find word positions, etc.) — I then wrote her a tiny python library that only has one function, like a "send_email(to, subject, message)" and takes care of using my smtp setup. She was excited (and exhausted), but she was REALLY excited when she received an e-mail about a week later about a price-drop.

Stuff like that is gold, it takes time to spot those opportunities and find something that matches her interests, but working on things that she actually needs will make things incredibly easier.

Another issue is that most people don't know what they can actually 'do' with programs. A friend of mine lost his job and started studying programming, and when I asked him what projects he had in mind, he had no idea what's even in the realm of things possible. I helped him make a temperature reader with the Raspberry Pi, and a website. And he loved it. But he completely freaked out when I showed him that same website can be opened on his phone and stored as an "app-like" bookmark on his home screen. He showed all his friends, and I'm sure he didn't sleep much that night wanting to improve the website to make it even cooler.

The hardest part about programming isn't the language, it's learning all the technologies and concepts involved in how it all ties together, how to break any given project into its core components that need to be implemented, and what tool is right for the job.

Why not dot net and asp.net core, there will be a lot of jobs in it and the transition is just beginning.

Start with her own website ( no CMS)

I've been telling my wife that she would be a good coder for years. She finally agreed to let me show her some things the other day.

I'm planning on going the JS route. She actually knows a tiny bit about HTML (BBCode from the MySpace days) so there will be something familiar to work with. Plus, it doesn't take much to get to the point where you're moving <div>s around, and I want her to actually see results so she stays interested.

teach him about frontends: the design(html, css).

dont force her to do something she doesnt what.

thats bad idea.

Always remember effective learning can be achieved by doing something like small project and stuff.

dont confuse her to make or clone something big. it's really hard to discern.

tell her about good learning trick like spaced repetition

https://www.cantikcan.tk

Same story here. My wife did some online course at EPFL for java programming, then she did the front end developer nanodegree from udacity.

Now she is writing elm with me. I'm doing my best to keep her away from all the js "drama" (setting up webpack, dealing with npm...) and only into programming to avoid her being overwhelmed. And all this build stack/devops... part can be really frustrating.

Also, functional programming is somehow much easier to grasp when you start with it.

I'm interested in teaching non-programmers to program via Elm. I think the baggage that comes from imperative programming is a deterrent to pure fp. But if you start with pure fp, it's all pretty clear.
before teaching her programming find out if she is into logical thinking. it may sound horrible but I came to believe my math teacher that only 20% of mankind is capable of 'logical intuition', and only those can become true good programmers.
I don't know about the claim of 20% but I fully understand where you're coming from. You can usually tell who lacks that intuition when they have a problem. They come to you with a problem: thing X isn't working. "Well, what have you tried so far?" you ask them. "Oh, nothing. It's just not working."

They see the world as "thing works" and "thing doesn't work" and never stop to wonder, "why?"

Someone with logical intuition might first think, "Well, it was working earlier, what's changed since then?" Even if they possess none of the knowledge to fix the problem themselves, they may be able to come up with some theories as to why it's not working.

I don't know why you're getting downvoted. You can teach anybody to program, but they're still going to struggle if they don't know how to logically approach issues and software design tasks. I've seen people struggle and move on to other things because of this.
I would start by doing simple calculator in scheme, then maybe tryruby.org and then maybe analysis of brainfuck/turing machine.
Try Go, it is a nice language for making small tools that can simplify and automate your life. I wouldn't touch JS ecosystem with a ten foot pole, it only leaves you with frustration.
For general programming? Start with Python. She's not going to get that job tomorrow. You may as well help her get some strong fundamentals in a language that's easy to code in and has straightforward semantics. If she really wants to do JavaScript, she can pick it up later.
I told her the exact same thing a few days ago. Thanks!
Consider starting with theory.
I have tried to teach couple of close friends programming in Java before. Most people are interested with what you are building and excited to learn. But after writing some code with not much visual result, they interest started to fade in. So I would recommend to start html/css/js so she can see results of her work and get more interested to build more. ))
I think Java can be a bit off-putting for beginners because of verbosity and somewhat forcing people into OOP.

HTML and CSS definitely have much more immediate "results" but don't offer the benefit of generally teaching CS thinking. Even if you are an expert in HTML and CSS, being declarative, they don't help you in any way with "traditional" programming.

I'm actually going to conflict with some other suggestions here, but when I first started learning to code, I started with simple HTML, CSS, and JQuery/Vanilla JavaScript. I took a framework: bootstrap and started building websites. I liked this approach because the elements are well documented and easy to pick apart AND even more important, you can start to see the results of your code immediately.
I'll second this. Especially based on "She is quite inclined towards design and has a good sense of color palettes, fonts, arrangements, etc. (IMHO)."

I'd probably also suggest taking a look at WordPress. Barrier to entry is pretty low to start making things pretty and despite what you read, still very much in demand. It's easy to progress quickly, and just as easy to quickly get a portfolio of sites under your belt (for prospective employers or freelance work).

>you can start to see the results of your code immediately.

I don't think this can be understated. Python is a great language to start with since it's clear and fairly straightforward, but there's a nontrivial amount of overhead. It's peanuts to open up the editor in your browser and tweak HTML/CSS to immediately see a change. Creating a quick prime calculator or whatever as your first program is cool, but it's still hard to beat "I made a webpage!" It establishes the importance, provides immediate feedback and excitement, and you can easily establish the mindset/thought process needed before moving on to other languages.

I suggest picking a project, and focusing on it while learning how to code. Learning is such a continuous process while coding that I think you need some kind of focus to ever feel like you have learned enough to apply the skills. Plus, that project could be a portfolio piece when she is seeking work.

Also, the project doesn't have to be a business - I think utilities that you would use, whether it's family communications or something funny, are perfect.

As a teacher, your job is to expose the student to a variety of programming topics early on. But when it's time to narrow the focus, their interests should be what guides their study.
That's definitely an important aspect. I was leaning towards python because it's a mostly sane language which can be used to teach a ton of different topics without much ceremony and other annoyances.
The hardest part of this is actually convincing companies afterwards that she can actually code. Although there is a huge shortage of developers companies still are primarily looking for Senior Devs with years of experience in this very special framework the company is using.
I'm aware of this issue, and that's why we considered having me "front" for her so that she can get some work while I lend credibility.
If the end goal is remote work, I think front-end is the way to go. Like you said, there are the most freelance jobs associated with it.

I've been thinking about this a bit so I thought I'd share: Two successful, but fairly tech illiterate, Women in my life have wanted websites built for their businesses. I put both of them in touch with a bunch of developers and they also searched on their own. They both ended up choosing a Woman freelance developer. They said the Woman made them feel most comfortable and seemed to empathize with their needs and many uncertainties. I wonder if there is untapped potential there.

(comment deleted)
Thanks for your comment.

Since I'm much more of a backend guy, that would also have the added benefit that, down the road, we could take projects that require significant work on both front and backend.

Would be be so kind to share your research up to this point, i.e. the great learning resources you have been referring to? Seems like you already put quite some thought into this :)
Everyone gets into coding a different way. If she is inclined toward design, I would definitely start with HTML and go from there.

As a new coder even things like learning the tree-like structure of HTML, the brutality of an errant slash or missed closing tag, or the frustrations of bringing a visual idea to fruition with plain text are challenging enough. I wouldn't worry too much about HTML "not being real code".

If time is on your side (more than a year), I would gently nudge her into HTML and see what she comes up with. If she finds it tedious maybe try another route, but if it sticks I would segue into simple Javascript or CSS after that depending on what she wants. If she wants more control over how the page looks, naturally she'll want to learn CSS. If she wants more control over functionality and making the page "do" something, Javascript.

As a completely radical idea, you could show her LOGO. I remember that being incredibly inspirational when I was a kid and appealing to the artistic side.

If time is on your side, you are lucky in that she can afford to play around and not go down the bootcamp route which will inevitably lead to burnout. I say nurture the interest as gently as possible.

My wife actually got into programming using netlogo, then processing. It's all about agents, and her work was trying to explain how aggression leads to sociality. It provided a nice clean (and fun) interface for tweaking parameters and seeing how creatures "evolve".

From there she learned some python and Ruby. It was a pretty naturual progression, she just wanted to "do stuff"

There's a Rails Girls coding event in Munich in April, I highly suggest checking that out. Even though my SO didn't stick with Ruby, it was a catalyst for her interest in programming and understanding of frameworks.

http://railsgirls.com/munich2018.html

How much previous knowledge did your SO have?
I had a similar discussion with my wife. I instead found it better for her to start off native mobile app development. She has started the udacity android course and is loving it. The best thing about learning Android for beginners, compared to Web dev, is there are fewer things to learn. They just need to learn Java and Android Studio, and have an Android phone to test their app. I guess the same stands for iOS dev too.
I have no idea why I haven't brought that up with her! Take my upvote.
>however, I started wondering if I shouldn't push her towards front-end

Yeah I would do the same

>i.e. HTML/CSS and eventually JS and a respectable framework or two. I did some substantial AngularJS projects a while back, so I could support her if we chose this direction. She is quite inclined towards design and has a good sense of color palettes, fonts, arrangements, etc. (IMHO).

Go for Vue, it's way easier to learn and to build small things quickly, and the doc is really well made so it will not be as frustrating as it could with angular

Having done a small project with Vue, I agree. I'm a bit reluctant on the whole JS ecosystem, though.

I had significant CS and professional experience before getting to do a big Angularjs project and it still was, at times, unbelievably frustrating. I can see that whole drama killing all the joy and wonder of actually creating something, especially for beginners.

There is a good, free book on Python[1] that teaches practical skills for automating tasks. I sometimes recommend it to people, because it's immediately practical.

After that, you could try Flask[2] or Django[3] (Python web frameworks) and gradually introduce HTML, CSS, and JS.

JavaScript frontend development has more moving parts, so I think it's harder to pick up as a first technology. You have to explain asynchronous code earlier than with Python, and that's one more mental concept to juggle.

There are also a couple of online courses[4][5] that might be useful. I've only watched part of the first one -- it was good.

[1] http://automatetheboringstuff.com/

[2] http://flask.pocoo.org/docs/0.12/quickstart/

[3] https://tutorial.djangogirls.org/en/

[4] https://www.edx.org/course/introduction-computer-science-mit...

[5] https://www.edx.org/course/cs50s-introduction-computer-scien...

My wife took the CS50 Harvard course, great content, engaging lecturer and the problem sets are very satisfying. Gives a wide spectrum of coding exposure and then she can choose where to go from there. The CS50 in a box/virtual machine makes getting up and running pretty straight forward.
It's on my radar, thanks. I agree that it's a great course.