
Have you ever written code no one could understand? - neilk
Followup from the other thread about inheriting incomprehensible codebases. It&#x27;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
I 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
Abstractions strike again!

------
bluejekyll
I’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

