4 ms·
What's difficult is the tension betwen compact code and verbose code. Compact code makes the higher levels of abstraction easier to read, while more verbose co
by d--b 2y ago
What's difficult is the tension betwen compact code and verbose code.
Compact code makes the higher levels of abstraction easier to read, while more verbose code makes lower levels of abstraction easier to read.
In large codebases, if you spend 10 lines describing an optimization for sorting stuff faster, you may lose the overall idea of what the function is doing. But if you don't, no one is going to understand that particular optimization. People will say that these should go in subfunctions, but having too many subfunctions is yet another problem that breaks code's linearity, making it also harder to read.
- WillAdams 2y agoThis gets discussed in great detail in Ousterhout's _A Philosophy of Software Design_: https://www.goodreads.com/book/show/39996759-a-philosophy-of-software-design https://www.goodreads.com/book/show/39996759-a-philosophy-of... Like most things in life, it's a series of tradeoffs and a balancing act.
- BlueTemplar 2y agoIsn't this mostly solved by a "collapse comment(s) / function(s)" text browsing feature ?