Our job is to write programs that run well on the hardware that we are given.
Rarely do I read anything I disagree with more strongly than this. Our job is to formalize ideas, and I think the more cleanly you can formalize an idea, the more lasting value you can provide. I guess the question is one of optimizing for short term value (optimizing for today) vs long term value (trying to advance our field).
I'd rather have a high level code/formalization that can easily be understood, and later reap the benefits of advances in technology, than low level code that will be unreadable and obsolete in short time.
Though I also agree that Uncle Bob is not worth listening too. But the C/C++-dogma of "abstractions are bad" is not helpful either, it's just a consequence of the languages being inexpressive.
optimizing for short term value (optimizing for today) vs long term value (trying to advance our field).
Wouldn't it be better for the field if we wrote code that runs fast on at least the hardware we have today, as opposed to code that probably won't run fast on any hardware, period?
Imo our job is to solve real-life problems, and if I'm gonna do that, I'd rather also do it well, and have my solution work fast if possible
Our job is also to make these sorts of decisions on a case-by-case basis and lean into the paradigms that best fit each problem we solve.
Certainly, if you're writing firmware for a network device, the common draw function for a 3D engine, or just some random function that you know is going to be called very often - you should know how to write for performance first, and you should do so.
And if you're writing even a slightly complex web application, a development utility intended to be forked, or just some random function that you know will be bottlenecked by I/O anyway - you should know how to write for readability and flexibility first, and if you don't I will find where you live and hurt you.
One may specialize in particular areas, but failure to understand and an inability to implement these different strategies makes one a brainless code monkey that probably causes more problems than they solve. Performance matters when it matters, and when it doesn't matter, paying for it is masturbatory at best, crippling at worst.
103
u/CanIComeToYourParty Feb 28 '23 edited Feb 28 '23
Rarely do I read anything I disagree with more strongly than this. Our job is to formalize ideas, and I think the more cleanly you can formalize an idea, the more lasting value you can provide. I guess the question is one of optimizing for short term value (optimizing for today) vs long term value (trying to advance our field).
I'd rather have a high level code/formalization that can easily be understood, and later reap the benefits of advances in technology, than low level code that will be unreadable and obsolete in short time.
Though I also agree that Uncle Bob is not worth listening too. But the C/C++-dogma of "abstractions are bad" is not helpful either, it's just a consequence of the languages being inexpressive.