3 ms·
> It's also important to teach students how not to prematurely optimize Except if you need a certain level of performance. It would be silly to write a million
by amelius 10y ago
> It's also important to teach students how not to prematurely optimize
Except if you need a certain level of performance. It would be silly to write a million lines of code to find out that you could never reach the level of performance that was actually required.
But in general you are right.
I'd like to add that perhaps the most difficult aspect of software engineering is a situation in which specs change all the time. This happens a lot during prototyping, and afterwards, when a prototype has been promoted to a product.
- khedoros 10y agoIf you need to maintain a certain level of performance, and the system has early indications that you won't be able to reach that by continuing with the current implementation, then that's hardly "premature" optimization. When people use that phrase, they're usually talking about the nit-picking, obfuscation-inducing stuff that'll get you a 3% increase in speed, that you'd generally do at the end of the development cycle.
- gravypod 10y agoI've never seen a large project completed without either a comprehensive test suite or prototyping. That's why I think premature optimization is bad. We should be testing as we go. We also all understand the limits of our hardware and our abstractions we are applying to the project at hand. If we should be considered professionals we need to prove it by being able to reason about our systems. We should be able to tell beforehand what abstraction is appropriate for the project. That is the knowladge that must be taught.