2 ms·
> Another thing I learned is that dumb, explicit code is highly desirable I knew for a long time that "dumb" code was easier to reason about, but it wasn't unt
by Gracana 11y ago
> Another thing I learned is that dumb, explicit code is highly desirable
I knew for a long time that "dumb" code was easier to reason about, but it wasn't until I started looking at compiler output and profiling my code that I realized being "clever" in the source text really didn't matter. Now I'm quite happy to write code in the most straightforward fashion, rather than foolishly "compress" things. I imagine the same experience could be enlightening for a lot of newbie and intermediate programmers.
- TillE 11y agoThere are definitely exceptions to this (generally correct) rule, in situations where performance does matter. RAM is still incredibly slow compared to the CPU caches, so painstaking cache-optimization can make a huge difference when that's the bottleneck. Of course, if you're just writing some I/O bound program anyway, it hardly matters.