← All articles

Unnecessary Abstractions

A code review facepalm: someone hand-rolled IP address parsing logic that .NET's built-in IPAddress class already handles perfectly.

Donn Felker

Donn Felker

2008.08.27 · 1 min read

Jason Bock had a similar title to this post awhile back … and I found a forehead-slapper today when reviewing some code in a app I’m working on during my free time. I seriously said “What the ”.

Here’s the code:

image

There is absolutely no need to do this. This is exactly WHAT the IPAddress class does. The worst part is that the programmer who developed this knew that the IPAddress Class existed.  I’m amazed daily.

Donn Felker

Written by Donn Felker

I've spent 25+ years shipping software, writing books, and running my own companies. I write about thinking clearly, working for yourself, and doing real work while AI rewrites the rules. New essays land here every week.

Get the newsletter

Keep reading