Deleted code has fewer bugs.

This is a simple one.

Sometimes the problem with a complex code base is that there is simply too much code there.

There may be code that was created as a spike, to explore ideas, or to support business functionality that is no longer used or wanted. This code should be deleted. Leaving it in place only confuses the reader, and worse, may give other programmers the impression that the code actually belongs there and should be used.

Other code may be horribly complex and could be refactored to a simpler solution. Add five lines so you can delete twenty.

Don’t make things more complicated than they have to be. You’ll be amazed how often stuff gets over-engineered with highly complex code that needlessly adds confusion to a project.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

%d bloggers like this: