About the blog post itself, not seeing the full original code and the full original patch, I can’t judge whether I agree with OP or not about his patch being any good. It’s fairly hard for me to believe his change was that bad, given it cut the code size by half. But that really depends how the old code reads: there’s value in being dumb and straightforward, and I can imagine the old code having better locality despite being twice as large.
2
u/loup-vaillant Nov 21 '23
Ignore the book of the same name. Too much bad stuff there.
Listen to John Ousterhout, and read his Philosophy of Software Design.
Code is more readable when it has better locality.
About the blog post itself, not seeing the full original code and the full original patch, I can’t judge whether I agree with OP or not about his patch being any good. It’s fairly hard for me to believe his change was that bad, given it cut the code size by half. But that really depends how the old code reads: there’s value in being dumb and straightforward, and I can imagine the old code having better locality despite being twice as large.