3 ms·
Some software I inherited from my predecessor is already like this. When I got it, one part of it was a single Perl file with about 5k lines of code, with 20+
by perlgeek 2y ago
Some software I inherited from my predecessor is already like this.
When I got it, one part of it was a single Perl file with about 5k lines of code, with 20+ variables visible in the whole file, with 10+ levels of nested loops, basically all of them with seemingly random "next LABEL" and "last LABEL" statements, which are basically slightly-constrained GOTOs. Oh, and the variable names very mostly meaningless to me (one or two letters).
This was only a small part of my job, over the years I've managed to reduce this mess, broke out some parts into smaller functions, reduced the scope of some variables etc. but a core remains that I still don't really understand. There's some mental model deep in the original programmer's mind that I simply cannot seem to grasp and that the code structure is based on.
(We're now replacing this whole thing by cleaner re-implementation, with unit tests, a less idiosyncratic structure, and more maintainers).
Now imagine what it must feel like if the original programmer wasn't human, but some alien mind that we're even further from understanding.