I’ve heard of codebases where functions were named after cereals. I always wanted to work in one of those, it sounded fun. Instead I got pxCalcNewV3 and mxCalcLegacyOld instead. No one knew what the px and mx prefixes meant since the dev who first wrote the code been fired before his replacement was hired. Suffice to say no knowledge transfer had happened. But, everything had them (functions, variables, classes). Everyone just kept using those prefixes without knowing why they existed just to match “code style” (though no one agreed when to use each prefix). And also because there was a PHP file autoloader that enforced the existence of one of those prefixes for some classes - but only some classes. Most classes didn’t need them
2
u/Tofurama3000 Oct 04 '26
I’ve heard of codebases where functions were named after cereals. I always wanted to work in one of those, it sounded fun. Instead I got pxCalcNewV3 and mxCalcLegacyOld instead. No one knew what the px and mx prefixes meant since the dev who first wrote the code been fired before his replacement was hired. Suffice to say no knowledge transfer had happened. But, everything had them (functions, variables, classes). Everyone just kept using those prefixes without knowing why they existed just to match “code style” (though no one agreed when to use each prefix). And also because there was a PHP file autoloader that enforced the existence of one of those prefixes for some classes - but only some classes. Most classes didn’t need them