Live data from Hacker News

Goodbye, Clean Code (2020)

overreacted.io

41–50 of 224 posts

Re: Goodbye, Clean Code (2020)

#41
post #4

This blog is essentially a journey of self discovery arriving at https://sandimetz.com/blog/2016/1/20/the-wrong-abstraction "duplication is far cheaper than the wrong abstraction."

The thing I hate most is when some creates the "new way of doing things". Then fails to convert most of the existing code which is "doing things the old way" even when it's clear that it is the same thing.

The "new way of doing things" is risky and might not turn out so good after all.

If you treat the new way as an experiment, and only gradually convert the rest of the code, you're in for a smoother ride.

Re: Goodbye, Clean Code (2020)

#43
post #38
post #14

Earlier quoted context omitted.

Why one should ask to the original developer if the code can be modified? If I see a code I want to change, I do it. I don't ask for permission. And colleagues can do the same with code I wrote. We trust each other.

If I ever see you again rewrite someone else's code without asking, I will fire you on the spot.

[deleted]

Re: Goodbye, Clean Code (2020)

#44
post #25

Having duplication does not mean your code is not clean. Sometimes, having duplication is actually cleaner, and easier to understand. Removing duplication may introduce complexities, and force developers to untangle the additional logic that was introduced to remove dupes. Good duplication means code just happened to be the same in a few places (but it can be potentially different). It's fine and easy to read. On the…

Would you go with a simple comment/tag to denote both piece of code are identical but not abstracted away on purpose ?

Re: Goodbye, Clean Code (2020)

#46
post #38
post #14

Earlier quoted context omitted.

Why one should ask to the original developer if the code can be modified? If I see a code I want to change, I do it. I don't ask for permission. And colleagues can do the same with code I wrote. We trust each other.

If I ever see you again rewrite someone else's code without asking, I will fire you on the spot.

Ironic. You learned nothing from the article.

Re: Goodbye, Clean Code (2020)

#47
post #25

Having duplication does not mean your code is not clean. Sometimes, having duplication is actually cleaner, and easier to understand. Removing duplication may introduce complexities, and force developers to untangle the additional logic that was introduced to remove dupes. Good duplication means code just happened to be the same in a few places (but it can be potentially different). It's fine and easy to read. On the…

It's not duplication unless the intent is exactly the same between the disparate code fragments.

Re: Goodbye, Clean Code (2020)

#48
When we don’t feel confident in our code, it is tempting to attach our sense of self-worth and professional pride to something that can be measured.

I don't think assuming people who disagree with you lack confidence and are "compensating" is an effective way to reach an audience.

Rewriting your teammate’s code

There should be no such thing as "your teammates code", there is only your team's code. If the changes were improvements they should be welcomed by the team, if they worsen the code they should be unwelcomed - independent of who first authored the lines.

There is absolutely judgement involved in refactoring, code replication, and choosing the right abstraction. But this article doesn't offer much wisdom that helps with those decisions.

Re: Goodbye, Clean Code (2020)

#49
There are always judgement calls to be made. Some of this is throwing out the baby with the bathwater. You don't want to be so rigid that you can't violate the rules for good reason. Also, refactoring someones code is not necessarily a bad thing per se, though it is better to come up with a style that everyone agrees with.

Re: Goodbye, Clean Code (2020)

#50

There was a discussion a couple of years ago on this article with 500+ comments, for those interested: https://news.ycombinator.com/item?id=22022466

No thanks, we're doing it all over again here. This time will be better!

The mantra of every disasterous rewrite.
Post reply on HN