Day 13 — Iterating Isn’t Just For Software Development

weberswords
hoodlumcultured
Published in
3 min readDec 5, 2018
Photo by Suzanne D. Williams on Unsplash

In software development, we’re taught to get a working solution even if it’s ugly and then refactor or rework it into a more elegant solution. This affords us the ability of setting aside the dual work of making something both functional and beautiful all at once. Trying to do both often leads to overload and a bit of yak shaving (a term I learned recently). However, when trying to create new habits so often we’re roll PERFECTION NOW OR NOTHING EVER.

I made this mistake when I was learning to knit. I wanted to knit a beautiful, intricate scarf my first time out and, surprise, I failed. My purls (is that what they’re called?) were lumpy and uneven. It was a far cry from the perfect beautiful scarf I expected myself to produce. Think every Pinterest fail ever.

TDD (test driven development) has a structured cycle to iteration — red, green, refactor. It isn’t just for software development though. It’s a framework you can use to change your habits without feeling overwhelmed.

Red

In software dev, the red stage means writing a test that fails. This way, you’ve thought through what you expect to happen and what your code should do before you write it. If your code breaks in the future, you’ll know.

In creating habits, the red stage is about recognizing what isn’t working for you. Before you can fix something, you have to notice what’s happening and what you expect to happen. I know it sounds like I’m harping on the mindfulness stuff in this series and it’s because I am. Nothing can change until you’re aware of what current status is.

Green

Green means write the code to make your test pass. Find a tiny way to make a change. Make it something so easy that it’s an instant success. It doesn’t have to be both functional and elegant. Right now you just want something functional. If you’re always 15 minutes late, like Jules from Day 1, then try being less than 14 minutes. If your long term goal is to build a gym habit, then wake up and put on your gym clothes. Terry Crews had some of the best advice in this area in my opinion:

It has to feel good. I tell people this a lot — go to the gym, and just sit there, and read a magazine, and then go home. And do this every day. Go to the gym, don’t even work out. Just GO. Because the habit of going to the gym is more important than the work out.

Refactor

In code, we refactor to make the code more readable and extensible. Every week or two refactor your habit and increase the level. If you were aiming for 14 minutes late, shoot for 13 minutes late now. If you were just sitting at the gym, now walk around and check out the equipment.

This same cycle applies to writing. Don’t try to write a novel all at once. Write SOMETHING. Just show up and write everyday. If you try to write something AND make it an Oscar-worthy screenplay all at once, you’re probably going to feel like you’re trying to climb Everest in an afternoon.

What’s something you can iterate on? What are the red, green, and refactor phases of that change?

--

--

weberswords
hoodlumcultured

Software developer & consultant. Former classroom teacher & digital learning coach. Apple Distinguished Educator.