3 ms·
This reminds me of a "problem" we had in a code base that we maintained. It was a test framework written (and I use the term loosely) in perl. Someone wrote a t
by noufalibrahim 4y ago
This reminds me of a "problem" we had in a code base that we maintained. It was a test framework written (and I use the term loosely) in perl. Someone wrote a throwaway script which later grew like a mould into a "tool" that was used by a large business group. None of the maintainers (including myself) knew perl properly. Of the 8k odd lines, 5k was a single function descriptively called `run`.
All the variables were global since there were not functions to pass things into and we had a problem similar to what the OP posted about using variable names that someone else might be using somewhere else. One thing we needed was `machine_type`. There were some references to `MachineType` and `machine_type` and `machineType` so, a colleague decided to use the name `MaChInEtYpE` to make it unique. For all I know there are still people who trip over themselves on the keyboard typing this while maintaining it.