Live data from Hacker News

Goodbye, Clean Code (2020)

overreacted.io

1–10 of 224 posts

Re: Goodbye, Clean Code (2020)

#3
This article really buries the most important lesson about refactoring:

> I didn’t talk to the person who wrote it. I rewrote the code and checked it in without their input. Even if it was an improvement (which I don’t believe anymore), this is a terrible way to go about it. A healthy engineering team is constantly building trust. Rewriting your teammate’s code without a discussion is a huge blow to your ability to effectively collaborate on a codebase together.

Also (2020).

Re: Goodbye, Clean Code (2020)

#7
This is why I tend to avoid refactoring code as often I find just having a common pattern in code that's been adopted either officially or unofficially by the dev team being more important than trying to 'clean it up.' Sure, I say delete commented out code since we have git and other VCS today that makes this habit unnecessary but if a piece of code doesn't use LINQ style queries to parse lists and uses for loops instead, I just leave it be.

Re: Goodbye, Clean Code (2020)

#8
That was a great article!

I really appreciate it, when people write from hard-won personal experience.

For myself, I write in Swift, and it’s quite possible to write totally inscrutable code in Swift. I am guilty of making code harder to read, and less grokkable, in my “cleanup” sweeps.

I am currently doing a bit of navel-gazing, on this very topic. I have gotten into the habit of writing very “swifty” code, and am thinking that I should probably back off a bit from that.

Post reply on HN