Re:It's probably time to stop recommending Clean Code (2020)
by nytgop77 on Tuesday May 25, 2021 @04:34PM
(#27282267)
One more angle: reliable & internalized abstraction vs unfamiliar one.
Java string is abstraction over bytes. I feel I understand it intimately even though I have not read the implementation.
When I try to understand code fully (searching for root cause), and there is String.format(..), I don't dig deeper into string - I already am confident that I understand what that line does.
Browser and linux api I guess would fall into same category (for others).
Unfamiliar abstraction even with seemingly good naming and documentation, will not cause same level of confidence. (I trust unfamiliar abstraction naming&docs the same way I trust weather forecast)
Re:It's probably time to stop recommending Clean Code (2020)
by TeMPOraL on Tuesday May 25, 2021 @02:37PM
(#27280542)
I think it may be harder still: typically, when writing against a third-party API, I usually consult that API's documentation. The documentation thus becomes a part of the abstraction boundary, a part that isn't expressed in code.
The function calls you write will often “know too much,” depending on implementation details in a way that make the implementation harder to change. It’s okay if you can fix all the usages when needed.
Real abstraction boundaries are expensive and tend only to be done properly out of necessity. (browser API’s, Linux kernel interface.) If you’re reading a browser implementation instead of standards docs to write code then you’re doing it wrong since other browsers, or a new version of the same browser, may be different.
Having lots of fake abstraction boundaries adds obfuscation via indirection.