Sustainable Software: The Small Things Matter

Aug 17th, 2015
3 min read

Sustainable software is the difference between happy productive developers and disheartened developers with less hair and a LinkedIn thread with a recruiter.

The idea of sustainability has been an omnipresent theme throughout my life. It really started to take root in high school when I started my first company Great Lakes Aquaponics with my father. The idea of aquaponics is to create a mini sustainable eco-system to grow plants and fish at the same time. Pure harmony.

Aquaponics refers to any system that combines conventional aquaculture (raising aquatic animals such as snails, fish, crayfish or prawns in tanks) with hydroponics (cultivating plants in water) in a symbiotic environment.

As a salesperson, sustainability meant building strong relationships with my clients. Not just doing a demonstration to make a sale but to make a friend and hopefully a client for life. It was about going the extra mile and doing what was unexpected of me. Spending the time to prep and do the little things that would allow me to connect with people on a deeper level.

My sales career got me super into personal growth. Devouring books for a few years straight made me realize the importance of sustainable choices. One thing I quickly started to learn was that sustainable choices are difficult to maintain.

The hard truth is: sustainability can be hard.

It requires patience.
It requires discipline.
It requires long-term thinking.
It requires creative thinking.
It requires purpose.

Sustainable choices often require us to go against traditional thinking. They force us to divorce the idea of short term gratification for the less destructive alternative. They drain resources from our finite tank of daily willpower.

So what does all this have to do with software?

Six months teaching software development to beginners at Launch Academy, one thing I noticed is how difficult it is for beginners to make sustainable choices. It makes perfect sense. Their growth feeds off that instant gratification of results. When I was in their shoes I was just as guilty. I had that hacker mentality of get it done as quickly as possible instead of do it right to prevent headaches in the future. I was missing context. Context that is almost impossible to comprehend until it happens to you. I was unable to see the bigger picture and therefore approached coding with an unsustainable mindset.

What is sustainable software?

Sustainable software comes from a mindset in how you approach software development. It’s comprised of many small idioms and practices. Some of which include:

  • taking time to name variables and classes well
  • properly formatting your code using the community style guide
  • avoiding comments where more expressive code is required
  • writing unit/acceptance tests
  • refactoring when your classes get too big
  • following Single Responsibility Principle
  • not violating Law of Demeter
  • staying DRY

The list could go on and on. For more ways in which to write sustainable software just read Clean Code by Robert Martin (AKA Uncle Bob).

These small practices make up the whole of your code base. Most of them are easy to do but also easy not to do. The mindset required to write sustainable software requires that you do these things; always. Let one method slide and soon it cascades throughout the system.

Neglect is like an infection. Left unchecked it will spread throughout our entire system of disciplines and eventually lead to a complete breakdown… (Jim Rohn)

How you do anything is how you do everything. When you start to care about the extra white space in a file or the missing tabs, your software organically starts to become more sustainable. It’s a complete paradigm shift. From just doing the minimum required in order to finish your current story to writing beautiful code you can be proud of.

Find the broken windows

Malcom Gladwell in The Tipping Point talks about the broken window theory. During the 90’s in NYC there was a flux of crime. In order to reduce crime police officers started becoming way stricter with little things like broken windows, boarded up doors, and vandalism. As the small crimes were reduced the bigger crimes also saw a drastic reduction.

Every time you let something small slide in your code base a seed is planted for the next developer. A seed that grows into more neglect, into more miscommunication, and results in 1000 line long controller actions or Classes. It results in unsustainable software that makes the next developer want to pull their hair out when working on it.

Find the broken windows in your code base. Be a good citizen and start fixing them up one line at a time.

Create a more sustainable future

We’re all human and nobodies perfect. There is no such thing as a perfect code base. However, a sustainable mindset is about taking pride in your work. Care about the small things and commit to approaching software development with a sustainable mindset from here on out.

Software developers are artists of the 21st century. Painters take care of their brushes, musicians take care of their instruments, it only makes sense that we should take just as good care of our code bases.

sustainability
software
design

Can I be honest? I want your email.

I love teaching and writing new content but sometimes find it hard to justify.

Getting your email motivates me to spend more time creating awesome content and notifies you when new posts or screencasts come out.

I will never share your email or spam. Expect less than 5 emails a year and feel free to unsubscribe at any time.