How To Learn to Code as a Stay at Home Mom

You don’t need to pull all-nighters or wear fleece gilets (but you can if you want).

Mary-Ann Horley
Jun 17 · 6 min read
Photo by CoWomen on Unsplash

I started learning to code in my mid-30s when my son, Cian, was four and I was doing my Media Studies Masters degree. I do work but it’s freelance from home and I homeschool Cian, who’s now six, too.

What I’m outlining doesn’t replace a college course or a bootcamp, but it will hopefully enable you to use code to solve your own problems, and to give you a decent grounding if you do decide to pursue it professionally. Robin Hauser Reynolds, the director of a documentary on women in technology, says that one reason why women often don’t make it beyond introductory programming classes in university is because the male students are often ahead of them as they’ve spent a long time gaming and have accumulated knowledge of the basics. The women also often lack “ambient belonging” where they don’t relate to associated but not essential subjects like science fiction and gaming. However, mothers are amazing problem solvers and this, combined with coding skills, can lead to training for a new career when the time is right for them.

I use Python but I believe most of the tips I outline will apply to Javascript or any other common programming language. I had previously done a lot of work with WordPress, which meant I could adjust other people’s PHP and JavaScript and understood things like loops and data structures. I started using Python to light things up on a Raspberry Pi and then built a robot using the Pi which introduced me to Flask for web interfaces. After that I learned a whole lot more Flask for my MA final project, along with MongoDB and API wrangling. I know quite a lot now, but it was all so gradual it didn’t feel like hard work.

I tend to get up early and write code most days and during the day I write down ideas and read articles. If I need to do deeper work I get a day or two a week when my husband’s home and I can spend more time on it.

Have Problems to Solve

My husband and I have both tried various online courses, but we didn’t stick with any because they weren’t closely related to what we want to use programming for. However, if you do think a course or book is what you need, we’ve got furthest with the book Learn Python the Hard Way.

I’ve used Google AutoML for some specialised photo classification and I’m working on using speech recognition in a reading app for my son. Last summer I did an Arduino-based drip irrigator, but it was a nuisance, so this year’s is going to use Raspberry Pi. The impetus is being able to go on holiday without wrecking my tomato plants!

Writing code for the sake of learning a technique can be boring, and possibly counter-productive. Just as runners have been seen to perform worse when asked to focus on their form or breathing, I suspect coders might perform worse when concentrating on learning about data structures or async functions rather than solving their problems.

Philosopher Gilbert Ryle wrote about skill, and described the action of a mountaineer:

“A mountaineer walking over ice-covered rocks in a high wind in the dark does not move his limbs by blind habit; he thinks what he is doing, he is ready for emergencies, he economises in effort, he makes tests and experiments; in short he walks with some degree of skill and judgement. If he makes a mistake, he is inclined not to repeat it, and if he finds a new trick effective he is inclined to continue to use it and to improve on it. He is concomitantly walking and teaching himself how to walk in conditions of this sort.”

Hopefully you can see the analogy to learning to code by solving your own problems! Learning to be a competent programmer is a complex concept and is not easily learned by the “banking model” of education where a teacher makes a “deposit” of knowledge or skill and the student receives it as a “credit”.

Google Everything

That’s what the professionals do. And keep Googling until you find a tutorial or Stack Overflow answer that you understand. If you don’t, go on to something else and you’ll learn enough that eventually you’ll be able to understand the original thing.

Decide What You Want to Do in Advance

I find writing down what each line of code is supposed to do as a comment then writing the code underneath it once I’ve worked out how to do it. This has the advantage of making sure your code is commented which is essential when you come back to it.

Have Smaller Goals

I am trying to write a function a day for the main project I’m working on. Sometimes I do a lot more and that’s great but I’m always making steady progress. It’ll also force you to write smallish functions that you can test easily and then string them together when you’re done.

Make it Easy to See What You’ve Done Before

Use comments in your code, and use a Todo list or a kanban board like Trello. Even if you don’t need it to remember what to do, you can use it to see what you’ve done.

Be Able to Take Advantage of Any Opportunities

Have a Python app on your phone and you’ll be able to make your one function on there and copy it into your actual project later. Or keep a notebook with you and write down precisely what you want your program to do. I planned this year’s irrigation system while waiting for a train the other day.

Move On If It’s Hard

I said this above but it bears repeating. If there’s an aspect you completely don’t get, ignore it and use what you do know how to do to solve your problems. If it’s that essential, eventually you’ll have a problem that you can clearly define where it’ll be obvious how to use the previously head-twisting technique. I’m thinking of things like machine learning with TensorFlow here. Just use AutoML until it can’t solve your problem anymore, then you’ll have a good understanding and will be able to work it out.

Only Do Things Once

Save copies of things you do repeatedly so you can just copy and paste into another project. Or keep a note of what you’ve done, in which project, so you can easily find it again.

Hardware Is Good

Particularly the Raspberry Pi, I’ve found. But physical computing, as it’s known, really helps you visualise what you’re trying to do. Plus the Raspberry Pi resources are great — I used the Physical Computing and Flask tutorials to get started. You can also use MicroPython on the BBC Micro:Bit and CircuitPython on many low-cost boards from Adafruit.

Use These Tutorials to Get Set Up

I set up a Crouton Linux environment on my Chromebook using this article. I’ve set this up as well but I still usually use Crouton. I’m using Ubuntu, I have no experience with any of the other flavours.

RealPython is a brilliant site and they have a tutorial here covering installing Python on Windows, Mac or Linux.

This is how to run your scripts.

This is the first bit of Python I ever wrote, on a Raspberry Pi.

Here’s some ideas for small projects.

This is a good introduction to Git and GitHub. Git is a way of keeping track of what you’ve done with your code so you can undo it when you screw up. GitHub is a web service where you can keep your code as a backup or to share it.

Get These Books

These are the books I’ve either bought and found useful, or borrowed from the university library until they made me give them back:

Learn Python the Hard Way

Automate the Boring Stuff

Data Visualisation with Python and Javascript

Web Development with Flask

MongoDB: The Definitive Guide

Advice for programmers.

Mary-Ann Horley

Written by

Better Programming
Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade