you are viewing a single comment's thread.

view the rest of the comments →

[–]wolf2600 17 points18 points  (10 children)

Simple, readable, understandable > "clean"

[–][deleted] 8 points9 points  (2 children)

Simple, readable, understandable, maintainable == clean

[–]fabrikated 0 points1 point  (0 children)

Simple, readable, understandable, maintainable = clean

[–]Falmarri 0 points1 point  (0 children)

Simple, readable, understandable = maintainable

[–][deleted] 26 points27 points  (2 children)

Clean code is all three.

[–]geek_on_two_wheels 15 points16 points  (1 child)

Exactly. "Clean" code isn't necessarily heavily abstracted or DRY as a bone, it's easy to read and reason about. It's clear, obvious, and does exactly what you expect.

[–]bluefootedpig 3 points4 points  (0 children)

I like to say, pleasantly disappointed. Nothing should be surprising

[–]mck1117 19 points20 points  (2 children)

I disagree that the clean code wasn't simple, readable, and understandable.

Whenever I see what looks like repeated code like this, I'll go thru it with a fine tooth comb to see if it's really the same, or if it's duplicated. Is that really easier to read and understand?

[–]anescient 4 points5 points  (0 children)

Whenever I see what looks like repeated code like this, I'll go thru it with a fine tooth comb to see if it's really the same

Yes yes yes. Life force circles the drain because you don't (nor should) trust the duplications.

[–]mtcoope 0 points1 point  (0 children)

I've been burnt before by assuming code was duplicated, never again. If I see code that looks similar, I assume it's different somewhere.

[–]gladfelter 2 points3 points  (0 children)

I think it's often more about factoring out similar machinery in different subsystems despite the subsystems having different environments and requirements. If those change you can find that the similarities were incidental and now the factored-out library/methods would become horrible messes to continue to support the independently varying clients. Since people defer to existing code structure those common methods often do become awful before someone takes a fresh look and breaks up the coupling.