Self-documenting code is (mostly) nonsense

Your code isn’t as clear as you think it is, but there’s things you can do to help

Christopher Laine
IT Dead Inside
Published in
7 min readJun 16, 2019

--

Photo by rawpixel.com from Pexels

I just got through reading Cindy S Cheung’s great article on technical documentation and why devs need to explain their code better, and I have to say I completely agree.

I’ve been at this IT game a long bloody time, and in my experience, there is one self-delusion which developers and engineers just can’t help but cling to.

My code is self-documenting — The Delusional Dev

The theory here is that an engineer’s code is so clear, so easy to read, that is doesn’t require documentation.

Yeah, this is nonsense…mostly.

Why is ‘self-documenting code’ nonsense?

Look, you might be the Ernest Hemingway of programming. Your code might be super-duper clear and easy to read (to another dev). The fact remains that it IS code, and no matter how concise and clear your work might appear, it is not meant for…

--

--