News for hackers. Stuff that matters.
Re:Strings Are Evil by commandlinefan on Wednesday June 20, 2018 @01:34PM (#17357569)
Yeah, you could easily argue (as I've had many, many bosses do) that the final version is objectively worse as it's doubtful that it will save as much time as it cost to develop (and debug - I doubt he got it right on the first pass!) and will drive in ongoing maintenance: the first version is simple and easy to understand (but inefficient) while the final version is almost impenetrable unless you read through the whole blog post, which is probably not part of source code control.
Re:Strings Are Evil by kemiller2002 on Wednesday June 20, 2018 @02:08PM (#17357978)
The perfect is the enemy of the good. For a few hundred dollars I can buy more memory etc. that I can use over and over again. The time that is sunk into building it to make it more efficient is gone forever.

Admittedly, I liked the write up. It's a fun exercise to go over, but I would ask my devs to go with the original program.

Re:Strings Are Evil by ant6n on Wednesday June 20, 2018 @04:07PM (#17359240)
You can't buy memory on your user's devices.
Re:Strings Are Evil by cityhomesteader on Wednesday June 20, 2018 @03:19PM (#17358777)
In a similar strain.

Premature optimization is the root of all evil. - Knuth

Re:Strings Are Evil by girvo on Wednesday June 20, 2018 @10:43PM (#17361675)
Here is the larger quote:

“We should forget about small efficiencies, say about 97% of the time: premature optimization is the root of all evil. Yet we should not pass up our opportunities in that critical 3%.”