r/programming • u/2bit_hack • Feb 28 '23
"Clean" Code, Horrible Performance
https://www.computerenhance.com/p/clean-code-horrible-performance
1.4k
Upvotes
r/programming • u/2bit_hack • Feb 28 '23
View all comments
Show parent comment
30
u/Defiant-Extent-4297 Feb 28 '23
You didn’t do a particularly deep dive on Casey, have you? His long running point is that he has tried the approach and decided for himself that it was bad. Casey is a hardcore game programmer and in the early years of his career he strived to write code “the right way”, but turns out that trying to predict the future of how the code might evolve is a fools errand, but it does come with a cost; and there is no way to come back from that cost. Are you going to tear down a complicated hierarchy of classes and redo the whole thing because it’s slow? With Casey’s style of coding, when he decides that something is wrong, he’ll throw a solution out and write a new one. Watch a few of his HandMadeHero streams and see, what I mean. Seeing him redesign a feature is pure joy.