News for hackers. Stuff that matters.
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.

Re:Everyone can write bad code by maxxxxx on Thursday February 08, 2018 @01:40PM (#16334435)
Also things like copying huge arrays back and forth or hammering the database repeatedly.