Modify as Little as Possible

modify as little as possible
modify as little as possible

Today’s post is going to be on my opinion on modifying existing systems. Unless you’re a one-man-coder-army, and if you are… kudos, but often times, you’ll find yourself working with other people’s code. When working with code that you’re not too sure of its functionality, you should tread extremely carefully. Make small changes, review the effect, and then proceed. I’ve seen a lot of projects go wrong when they change multiple elements of a system to get to a specific result, only to fail, and then absolutely have no idea what went wrong.

By making small incremental changes, you can change the direction of the project when you’re getting unexpected results, you’ll also know what went wrong, and you can also correct it quickly. That being said, you can probably feel more confident making these changes if you were in a TDD (test driven environment), since you can run a regression test on the existing system to make sure nothing is broken and everything is working the same. On the other-hand, a TDD environment introduces its overhead. Unless you have a TDD environment, it’s probably best to stick with the practice of making your changes small incremental bursts followed by a lot of review.

Leave a comment

Your email address will not be published. Required fields are marked *