Re:Everyone can write bad code
by kragen on Thursday February 08, 2018 @01:34PM
(#16334381)
Several times I've heard novice programmers cite the "premature optimization" saw as an argument against doing things that weren't optimization at all. Handling edge cases correctly, for example, or throwing exceptions instead of returning incorrect results, or handling two input formats instead of one, or tolerating trailing whitespace on input.
"Optimization" means "making code run faster without changing what it does". If you're changing the code's behavior in an observable way, that's not optimization.
"Optimization" means "making code run faster without changing what it does". If you're changing the code's behavior in an observable way, that's not optimization.