←back to thread

190 points baruchel | 3 comments | | HN request time: 0.736s | source
Show context
gwbas1c ◴[] No.44424165[source]
One thing that's surprised me throughout my career is just how inefficient most of the code that I've inherited is. I suspect we could do a lot more with the hardware we have if we simply became better at programming.

(Perhaps more AI coaching could help?)

replies(3): >>44424202 #>>44424776 #>>44428402 #
jiehong ◴[] No.44424776[source]
I'm also surprised by how many developers just don't seem to care much.

Yet, the general population isn't behaving like scouts most of the time, so I suppose it's only fair that developers also aren't.

"Leave the world a better place than you found it" (s/world/code/g)

replies(1): >>44426571 #
1. Agingcoder ◴[] No.44426571[source]
I’ve spent many years working on hpc problems, and most people simply don’t have , or don’t care about, or don’t know what to do with performance problems.

Don’t have to because they usually have a full machine, and unless they saturate it, the problem doesn’t exist.

Don’t care, because many people think it’s alright if things are slow, or inefficient ( the user can wait, or will live with 100ms instead of 1ms).

Don’t know what to do - this one is interesting : many people don’t realize it’s actually possible to get the same result , but faster.

replies(1): >>44426721 #
2. gwbas1c ◴[] No.44426721[source]
> Don’t care, because many people think it’s alright if things are slow, or inefficient ( the user can wait, or will live with 100ms instead of 1ms).

It's not that.

I've encountered code where someone wrote complicated "scale out" code instead of learning how to use a database and fix the n+1 problem; or another case where someone wrote complicated caching code instead of learning how to avoid cartesian explosion.

replies(1): >>44431849 #
3. Agingcoder ◴[] No.44431849[source]
Ah that’s nice a one - it’s ’do the wrong thing’!