Re:I wasted weeks hand optimizing assembly because I benchma...
by Cthulhu_ on Friday July 25, 2025 @04:10AM
(#44680846)
Or one should spend a little more time at first to fully understand the problem, in both the mentioned case and the OP, use realistic data.
Re:I wasted weeks hand optimizing assembly because I benchma...
by TillE on Friday July 25, 2025 @04:17AM
(#44680883)
Writing code is very very often a big part of understanding any new problem. It's just that you should be quite comfortable discarding that code. Refactor mercilessly and all that.
Re:I wasted weeks hand optimizing assembly because I benchma...
by yetihehe on Friday July 25, 2025 @04:13AM
(#44680866)
Sometimes you can't have realistic data without writing some code first, that will allow you to gather that data.
Re:I wasted weeks hand optimizing assembly because I benchma...
by scott_w on Friday July 25, 2025 @06:25AM
(#44681621)
Writing code that solves the problem is a huge way of proving you understand the problem.
Re:I wasted weeks hand optimizing assembly because I benchma...
by ddalex on Friday July 25, 2025 @04:19AM
(#44680899)
I came to the same conclusion months ago with the advent of coding LLMs.... I used to treat code as precious, carefully saving, cataloguing and referencing git commits and SQL scripts and command line histories, because they were painful to write, and thus they are valuable. I mean, they were, because when I had the same need again, I could find previous instances and reuse stuff.
Now ? I just dump the problem into an LLM and it spits up a script that solves it, and then I throw away the script because it horribly bugged for any other case then my particular problem, but hey, I just solved my problem
Re:I wasted weeks hand optimizing assembly because I benchma...
by BigJ1211 on Friday July 25, 2025 @05:19AM
(#44681230)
This is why I strongly adhere to WET¹, you discover so much about the domain the first time you write something. By the time you have it 'working' you realize you should've written vastly different code to solve or cut-off edge cases.
That's why these days I just start writing code, get it to 'it works!' level. To then throw it all away and start again. Takes a little more effort, but the payoff is far less problematic code and tech debt.
¹: Write Everything Twice
Re:I wasted weeks hand optimizing assembly because I benchma...
by wizzwizz4 on Friday July 25, 2025 @06:21AM
(#44681599)
Don't do WET with your entire system, though, or you're likely to end up with the Second System Effect.
Re:I wasted weeks hand optimizing assembly because I benchma...
by MathMonkeyMan on Friday July 25, 2025 @10:47AM
(#44683768)
I think the idea is you never release the first version.
Re:I wasted weeks hand optimizing assembly because I benchma...
by 5pl1n73r on Friday July 25, 2025 @09:22AM
(#44682860)
My reaction to the article title was recalling how old assembly teachers would drill into our heads to make sure we have proof of 200% gains before implementing an optimization. However the article shows how sometimes such planning doesn't work.
Learning this is worth writing the otherwise useless code.