Hacker News new | ask | show | jobs
by kilgnad 1197 days ago
Here's another controversial opinion:

It's the genius programmers who write the shittiest code. In my experience clean code tends to be a waste of time for geniuses because shitty code isn't really a problem for smarter people.

The further away you are from genius the greater the tendency for you to write cleaner code because you need it in order to deal with the complexity.

What's common among HN readers is that they think they're smart. So you may be reading this and thinking "Wait a minute, this isn't true! I'm smart and I like clean code!". Well, I hate to break it to you. The truth hurts because most likely one of those two attributes probably doesn't actually describe you.

Also as a side mention, I'm a clean code Nazi. My code is really clean.

2 comments

This was funny. But I've seen too much clean code written by people smarter than me to agree.

I actually think how "clean" your code is depends on lots of factors. Eg.

(a) Do you care if your coworkers find it easy to modify your code?

(b) Do you feel a sense of ownership over the code you're touching?

(c) Does your organization reward delivery speed without any checks for code quality? (eg. no culture of code review)

(d) Is the code a proof-of-concept that needs validation from users before further investment?

You're not dealing with the geniuses. You're likely just dealing with people smarter than you. I can assure you geniuses are rare, and people of the same intelligence level tend to gather so you can go through a career completely missing them depending on where you work. There's enough noise such that among these groups you won't notice the correlation.

Tbh the geniuses don't view their own code as shitty, to them it's quality. It's only viewed as shitty externally.

I've come to the same conclusion, really smart people who write compilers, name their variables one single letter and the like (the extreme variant) etc., they can actually see the matrix beyond the funny characters on the screen, they have the capacity and attention to understand the messy bits without having to make it neat, those three nested for-loops inside multiple conditionals don't bother them, they can quickly visually parse difficult code without refactoring and sectioning it off. On the opposite side, there some like me who are deficient in that regard, so I spend my time pimping my code to look nice, nit-picking on syntax style, eliminating else-clauses, trivial stuff like that.