3 ms·
I can't replicate the brainwaves of some people. Some level of "bad code" is just unreachable once you understand the basics... In my experience, a lot of "ba
by Groxx 16y ago
I can't replicate the brainwaves of some people. Some level of "bad code" is just unreachable once you understand the basics...
In my experience, a lot of "bad code" mimics what you see on a lot of TDWtf stories: (statically-positioned) string operations for everything. Super-fragile, super-slow, but it does work and sometimes is all one can think of doing without looking at documentation.
- pmjordan 16y agoIn a way, those "strings for everything" WTFs have an air of some kind of Turing-machine reductionism about them. In any case, I don't think I could bring myself to deliberately write bad code. Enough of my code ends up that way already (though I of course always try to clean up after myself). I find that almost all of my "bad code" comes from not fully understanding the subtleties of the problem and trying to hack warts onto the original imperfect solution. Occasionally it also happens that a problem is so complex that it's extremely difficult to keep everything in mind at once - this mostly happens to me in C, when I have to think of memory management, concurrency/asynchronous I/O, as well as the actual problem I'm trying to solve.