Ask HN: How did you manage to teach your spouse/partner/half Programming?

11 points by tsenkov ↗ HN
How do you get her/him interested?

I've been trying for years to get my girlfriend interested in programming, because she is a logical person and I am absolutely convinced she would enjoy commanding the computer billions of times a sec (after all she does enjoy doing that to me, so... haha). But so far no success. :(

Please share a story and some advice.

21 comments

[ 4.8 ms ] story [ 50.1 ms ] thread
I got a tester/analyst at work interested in programming and she is now learning Python. I showed how how to set up test cases, parse files, connect to the DB, etc to make her job easier. So I think if you can show someone how it would make their regular job easier, it is more likely to take hold.
I tried a variation of the same approach - thought my girlfriend how to use MS Excel formulas and she became better than I am at it in no time, because she managed to apply it in her job. But how to get her to code still eludes me...
maybe teach her how to write small VB micros in Excel. that is a good start.
Hm... I forgot about Macro's... Thanks.
That is what I got the tester/analyst to get away from and use Python instead. Handling data files in Python is far, far more powerful than what you can do with Excel macros. One of the things I am teaching her is to throw Excel, CSV and XML files in SQLite and then validate and query the data.
First, make it fun. Teach through examples and explain stuff later. As interest grows, the desire to figure out the "why" also increases.

For most people, "fun" is building something you can play with. Web development falls nicely into this category - even now I'd still recommend learning Ruby and then Ruby on Rails for a first language/framework. Ruby is a beautiful language and RoR lets a beginner make working prototypes without overwhelming them.

Others might enjoy parsing large sets of data, making games, or other things. Figure out what they enjoy and the rest will follow.

Why try to get her into it? If she wanted to get into it she would have. It sounds like you are trying to force her into something that she isn't interested in. My fiancee is an incredibly intelligent person who I believe would be an amazing programmer, but her passion is history. I wouldn't all of a sudden try to "get her into" programming. Your passions do not have to be her passions.
Sure we don't have to share passions. And no I haven't forced her or anyone else (other than myself a few times in my life) to do this or anything else. But I am convinced she is missing out on something she will truly appreciate. So I wanted to see how other people communicate their passions in a way to create interest.
I believe the question was poised to people who's spouses/partners wanted to learn programming so I'm not sure why this reply even exists except to make people feel bad.
I didn't say it to make anyone feel bad. It was just the opposite point of what the OP had asked. Beside the fact, the question is clearly not directed in the assumption that their spouse wants to learn programming. It was directed that OP thinks they would like it so they tried to get them into it.
My wife had completed a computer science degree before we ever met - although she changed career entirely and is now a (medical) doctor.

I don't try to teach her anything, nor have I tried to teach any previous partner. If people are interested they'll ask, if not I thinking trying to force knowledge upon them would be misplaced and unwelcome.

Reading the replies here I can see that it doesn't seem to end well most of the time. People are different, have different interests, and different tastes.

(Now I wonder what partners have tried to teach you, that you've rejected?)

He liked 3D modelling and creating games, so I taught him C# coding in unity so that he could do things like trigger animations, light flickering, play sounds, things like that.

You can code in Javascript or C# in unity, but I chose to teach C# because the Intellisense/Code Completion in the editor is better.

Also having short concrete goals sped up the effort -> reward cycle, with thing he actually wanted to do in his games

I tried to teach an ex how to use Excel effectively. I made a few spreadsheets to help her with grading and such. But it never stuck (she is mathphobic).

My current girlfriend already understands Excel pretty well, I've helped her use some more advanced features from it for work tasks. I've asked if she wanted to learn how to program, she said no. I'm a nerd, programming and math are a too large percentage of my thoughts most days so she hears me talking about it anyways. She's picked up on some things, but she'll probably never be a programmer (which is fine, she's better off in her current career from a personal-satisfaction perspective).

Yes! Excel was what I thought would be the foothold. I imagined it will be like a gateway grug, haha. She picked it so quick. But nothing past that, unfortunately.
Does she play video games? Download a copy of Human Resource Machine and have her play it. It's basically assembly programming on a Harvard Architecture computer with Single Accumulator.
My husband is also very smart and logical, likes math, builds computers for gaming, but he has absolutely no interest in programming at all. We've been together for 6 years, I've brought it up a few times, showed him some things, but he's like "Okay, that's nice. Sorry, just not my thing" And that's fine.

He's a social worker who runs a group home for intellectually disabled adults, and he's been in this career for 15 years now, and he loves it. There's absolutely no reason for him to get into programming, and he's had enough opportunities over the years that if he were drawn to it he would have already done it.

He's certainly supportive of my work, he brags to his friends about cool things I've done, he knows enough to talk about what I do, but as far as actually doing it himself, he just doesn't care. I think you need to be okay with your girlfriend not being a programmer. I mean, do you feel a drive to pick up her career as a hobby? :-p