3 ms·
Have you ever written code no one could understand?
Followup from the other thread about inheriting incomprehensible codebases. It's easy to be self-righteous about the poor programming practices of those who came before us, but maybe a little confession would be good too.
- neilk 8y agoI had to encode a factory's shift schedule. I noticed that it repeated in a regular way with each month. Then I noticed that there was yet another, more subtle symmetry in between weeks, so I encoded that too. Then I realized the remaining pattern was a simple wavy line, so I replaced that part with a function based on a sine wave with the appropriate amplitude and period. In my defense, I was 16.
- ezekg 8y agoAbstractions strike again!
- bluejekyll 8y agoI’ve written code that I can’t understand: "Any code of your own that you haven't looked at for six or more months might as well have been written by someone else." - Eagleson's law