top of page
Search

Should I Rewrite?

  • Writer: Kiranbir Sodhia
    Kiranbir Sodhia
  • Mar 31, 2013
  • 2 min read

I have recently rewritten some code and have observed some people I work closely with rewrite code. There’s a lot of debate on when to refactor, when to rewrite, and when to move on. I recently came across a post from Thomas Davis that has made its way around /r/programming and speaks well on the issue. (https://github.com/thomasdavis/best-practices)

Something a lot of developers experience at some point in their career is taking over someone else’s software. This means they are responsible for new features and of course maintenance. Let’s face it, a lot of times we have to take over code that we think is shit. At some point you might find yourself struggling to add a feature but are nervous at every step that you will unobviously break some functionality. I see a lot of developers hit this point and decide to rewrite software. Although it might not be the best decision, I don’t think it is necessarily wrong. Here are some benefits:

  • When you rewrite software, you force yourself to break everything you would have eventually broke when adding a feature. So you start learning about the weird intricacies and corner cases the previous developer handled. Hopefully, you will find better ways to solve these issues or at least document it for other developers.

  • You gain confidence in the code and can add features faster.

  • You can represent the software and truly take ownership. I hear a lot of people say, “I didn’t write that crap but I maintain it.”

Of course, patterns repeat. You will eventually move on to something else and another developer will take ownership of your code. They will say it’s shit, berate your code, and finally rewrite it.

 
 
 

Recent Posts

See All

Comments


bottom of page