The Best Code is the Code you don’t write

Earlier in my software development career, I would get an assignment and eagerly jump into writing the code.  Hours later — after frustration and then the joys of success — I had the code done.

Writing the code was a learning experience for me — I got better at programming the more I practiced — and this was all ok.

Sometimes, the client was super happy and the task was done.   The computer did what it was supposed to do.  Assignment completed.  Yay!  I felt like a genius.

Other times, it turned out that my interpretation of the requirements was not the same interpretation that the client had in mind, or the business requirements had changed in the meantime, or for some other reason, the outcome was no longer the desired one.  So, I’d have to revise the code, change it to meet our new shared understanding of what we need to accomplish.

As a programmer who is learning, having to go back and write more code, is not necessarily bad.  It means more experience.  But, from a business perspective, this means wasted money, wasted time, and a longer route to getting to “done.”

At a certain level of expertise in any given programming domain, there is no longer a question of whether something can be done, but whether it is the right thing to do.

The vast majority of client requests are completely feasible.  It might take 2 hours or 30 hours, but a programming solution is possible.  There’s very few tasks that are “impossible.”  It’s more a matter of whether it makes business sense to spend the time on the task, when there may be other items that would derive more business value.

Since I work at an agency, I use the term “client”, but this applies to any programming endeavor.  Just because you can think up the programming solution, doesn’t mean it would be the best use of your time to implement it.

I love designing software systems.  In my mind, I can solve any problem.  But, I now do not actually write out the code until I am sure of the value it is going to provide.

“Value” can mean a lot of different things.

If you’re working for a client, it’s most often business value — maybe the code is going to provide a proof of concept, maybe it’s going to bring in additional revenue, or maybe it’s going to automate something.  In these cases, your job as a software developer is to ask the questions to make sure you understand the value you are delivering.  Don’t write the code first.  Instead, read and ask a lot of questions.  You will hopefully spend less hours programming the wrong solution.

There are times when the “value” is the learning experience.  Which is 1000% awesome.  But, don’t mistake that kind of value from business value.

But, if the code isn’t teaching you something, or isn’t generating money, I’d ask, why are you writing it?

So step back, imagine the systems in your head, and ask questions.  As a skilled WordPress plugin developer, I once imagined a whole plugin…. and I enjoyed thinking about the software I could build… But then I realized that it was completely unnecessary.  So I didn’t write it.

Just because you can, doesn’t mean you should.


One response to “The Best Code is the Code you don’t write”

  1. […] not alone in thinking that the best code is the one you do not have to write or maintain. I would extend […]

Privacy & Cookies: This site uses cookies. By continuing to use this website, you agree to their use. To find out more please see our Privacy Policy.