Broken Windows

in Code

I recently started reading “The Pragmatic Programmer” by Andrew Hunt and David Thomas. Written 20 years ago, this book surprisingly stays current with its use of analogies and short stories to help the reader develop into a productive programmer. Think of it as the “How to Win Friends & Influence People” for programmers.

One story that stuck with me describes how quickly great code can go rotten.

Broken Windows

Anyone who has been to a city knows that they are filled with beautiful timeless buildings. But there are also buildings that look like they were left and forgotten, decaying in plain sight.

How do these buildings go from something beautiful to something so ugly? In short, it can stem from a single broken window.

I’ll let Andrew and David explain:

One broken window, left unrepaired for any substantial length of time, instills in the inhabitants of the building a sense of abandonment — a sense that the powers that be don’t care about the building. So another window gets broken. People start littering. Graffiti appears. Serious structural damage begins. In a relatively short space of time, the building becomes damaged beyond the owner’s desire to fix it, and the sense of abandonment becomes reality.

This phenomenon has been studied and coined as “The Broken Window Theory“.

Can you recognize how this “Broken Window Theory” can relate to our codebases?

When we make bad design decisions in our code or notice a function is written incorrectly, do not leave it with the intention to come back later and fix it. Fix it now, or else you’ll find yourself looking at a codebase full of broken windows.

Other code maintainers will begin to adhere to the same standard, ignoring code that should be fixed, and they will continue to implement additional sloppy commits. Over time, the general sentiment towards this codebase can best be described as carelessness. There will be no concern about the quality or maintainability. Then, finally your codebase will be unmaintainable and eventually abandoned.

So fix any broken windows you may come across. This will cultivate a mindset that the codebase is handled with care and responsibility.

Comment and share

Ok, ok I know what you’re thinking. “Mike it’s the middle of February. I think you missed the ‘Start’ of 2019”. Well you’re right, and we’ll get to that. But let’s just jump into it.

It’s not you, it’s me…

I’ve been working professionally as a Ruby on Rails developer for 4 years now. It has been a great experience, and learning this language and framework has been life changing.

Call it a first love, comfort, or even complacency, but it’s about time that I move on to the next language/framework so I can continue to grow as a developer.

As microservices become more of the norm, it is best to dive head first into this new design technique.

2019 will be the year I take on learning and mastering Java, the Spring framework, and all the other technologies that surround the microservice ecosystem… Hello Kubernetes and Docker.

These technologies are battle tested and not going anywhere anytime soon. So it’s been fun Ruby/Rails, but I must spread my wings and fly.

Grow your brain!

Before heading off for school every day, my father would always tell us to “Have fun and grow your brain!”. I always thought this was a bit corny, but it was a good reminder that learning can be fun if you have the right perspective.

As I got older that message slipped and learning became a chore.

I’m starting 2019 with this message fresh in mind. I have a lot to learn, and yes some of these topics are as dry as Spongebob when he entered Sandy’s bio-dome without water. If I have the right perspective, and can apply what I learn at work or on side projects, then learning will feel less like a chore and become more of a game.

I HATE like reading.

I could count on 2 fingers how many books I read front to back in high school and college. That’s bad I know, but in 2018 I read 5 books! Hooray me… 😐.

In 2019 I am shooting to read 12 books. January was “Rich Dad, Poor Dad“, and there will be a review post on this as I have a lot of likes and dislikes. These 12 books will be from all genres… biographies, finance, history, sci-fi, etc. Before it was all self-help books and though they are great reads for motivation, all the good stuff came from the first 30% of the book.

I read “The Three Body Problem“ last year and was hooked the entire way through. So here’s to being more engaged in the readings I choose.

Have any suggestions, let me know in the comments!

Build Build Build!!!

As mentioned, this post is a month and a half late. I’ve been focusing my time building things, and not just writing about what I’m planning on building.

I built a monthly reminder app called Resolution Tracker that helps keep you honest with your New Years Resolutions.

I’m also in the process of building a personalized newsletter to find events and news in your area.

These projects were the result of reading the book “Start Small, Stay Small“ by Rob Walling. It’s a great read if you want to use your programming skills to create a little side hussel while maintaining your primary job. I highly recommend it as it’s a quick read with a lot of great points.

Write it down!

Hello to my loyal follower 👋! You may have noticed that this is a fresh blog. I should have ditched Wordpress/GoDaddy and switched to Github pages years ago.

This blog will hopefully be more active as I learn more, read more, and build more.

Some posts may be quick posts where I learned something that I find useful. Others may be thoughtful epics. And who knows, maybe some music posts will come through.

Wrapping up

So if you read this post, I thank you. But this was more of a personal post to myself, where I can look back and assess a year from now.

So Mike (speaking to myself), do these things and do them well:

  • Learn as much as you can.
  • Don’t become complacent.
  • Read, build, write, repeat.
  • Grow personally and professionally.
  • Have fun!

Lets crush 2019!!

Comment and share

  • page 1 of 1
Author's picture

Mike Murphy

Hello?… Is this thing on?

Software Developer @ Jobcase

Boston, MA