Uncategorised

Micro-habits, spaced repetition and creating a ‘village’: what I learned from 100 days of coding

Just look at all those lovely badges.

Just look at all those lovely badges.

Being able to code is a good idea. Even President Obama says so. Even if you don’t want a decently-paid job in the new information economy, it’ll let you speak the language of the people who do. I’ve been meaning to learn it for a while. And at the start of the year, I decided to make the jump.

I started with Code Academy. As a learning tool, it has its critics – but probably the best thing about it is that it keeps track of your ‘streak’, or how many days consecutively you’ve done at least one exercise. Inspired by nothing else than this, I managed to go 100 days straight without missing a single one. Some days I’d spend two hours finishing whole slews of the programme, on others I’d go to bed, remember I needed to keep the streak alive, and code for five minutes. On my birthday, drunk and full of cake in Abu Dhabi, I staggered back to my hotel room, fired off two lines of code and passed out. Most days I’d get up early, code for twenty minutes, write some notes, and move on with my day. This is what I call a microhabit – BJ Fogg calls them tiny habits – doing the absolute bare minimum needed to reinforce the idea of doing something every day. Fogg suggests starting a routine as simply as lacing up your running shoes (no running) or putting a pan on the hob (without cooking in it). This makes sense to me: often, as soon as I start doing pullups or shadowboxing, I wonder why I haven’t been all day.

Of course, what makes Code Academy great is that it’s pass/fail – if you don’t do an exercise, however simple, you lose the streak and don’t get it back. Can you do this with 0ther things? Well, there are tons of apps that promise to nudge/cajole/threaten you, but the problem with most of them is that you can lie about whether you’ve done the thing or not. My suggestion (which I’ve tried with press-ups):  just use a calendar. A real, physical calendar. X it if you keep the streak, ignore it if you don’t. Why? Well, unlike clicking a button on a screen, writing on a thing on a wall is outside your normal experience. It’s something you have to make an effort to do. Are you still going to do it if it’s a lie? Maybe, but it’ll be harder to justify than clicking a button.

SECONDLY. I’ve been learning about spaced repetition recently, prompted by a friend who’s using it to memorize the most common kanji. In essence, it means revising things just enough to remember them – ‘upgrading’ and ‘downgrading’ them as necessary. Think about having four decks of flashcards – you’d look at one every day, one just once a week, one every fortnight, and one once a month. Remember something in the daily stack and you’d promote it to the weekly – forget something from the monthly stack and you’d ‘demote’ it. The best resource for doing this online? Memrise, which has done the legwork for you with thousands of user-created ‘decks’ – here’s just one of the available HTML options. Working this into your own training is slightly harder, but well worth doing – for the last couple of years, I’ve kept a log of interesting jiu-jitsu positions I’ve learned, and I occasionally glance back through it to make sure I haven’t forgotten anything. I did a similar thing with my Code Academy notes: if it emerged that I’d forgotten something, I’d do practise exercises on it for a couple of days afterwards.

THIRDLY, I’ve been doing something that I’ve decided to call creating a ‘village’. It’s well-established, of course, that you’ll succeed in most fields if you surround yourself with likeminded people – your ‘village’, where your pursuit of a black belt in BJJ or a 1,000lb powerlifting total or 8% bodyfat seem normal. The problem: what happens if you haven’t got any likeminded people? The solution: create a virtual village with Reddit. It’s already my homepage, since I like the combination of world news, scientific breakthroughs, highly-informed debate and pictures of cats. What I did specifically for coding, though, was customised my list of subscribed subreddits to include /r/programming and /r/learnprogramming. That way, even on days when I just went to the internet for pictures of cats, I’d be constantly exposed to people talking and swapping ideas about programming. More than once, I’d be exposed to a new coding resource, shown a new concept or simply prompted to do some revision at a time when I had no intention of coding. It took about a month before I fell down the rabbit hole into Github, which is the next step – collaborating on projects with other people. I’d seriously recommend giving this a try.

Bottom line, then: can I code after 100 days? Not by a long shot. If anything, I’ve discovered that coding is an artform in itself – a learning process that could take years. However, I can write decent HTML and style it up with CSS, I know enough about JQuery and Javascript to have an idea of what’s possible for the more experienced coders in my office, and I’ve learned a new skill.  What’s more, I’ve convinced myself – once again – that there’s really nothing you can’t do, and started work on some new tools for doing it. I’d call that a good couple of months.

HOMEWORK: An actual, proper, pass-or-fail homework this week: sign up for Code Academy, and do the Introduction To HTML course. You could do it in a day, but spread it over the week – make sure you do a bit every single day. Then, decide whether you’re going to carry on, or start a microhabit you care about more.

About the author

joelsnape

Editor and creator of Live Hard. Fighting enthusiast, steak lover and aficionado of all things self-improvement related.

Leave a Comment

This site uses Akismet to reduce spam. Learn how your comment data is processed.