3 ms·
A project I worked at during an internship had an unmanaged C++ portion for rendering complex typography, which was written when every letter in a variable cost
by joelhaasnoot 16y ago
A project I worked at during an internship had an unmanaged C++ portion for rendering complex typography, which was written when every letter in a variable cost $10 (or so it seems). The result was that "pointer to a metadata character" became the variable "pmc", and that was just the beginning of it. I never quite did understand what the variable lpmnoics meant, and debugging the C++ was quite the drag and the task everybody avoided, and pushed off to the original developer of that code (who happened to be in a different geographic location).
- Stormbringer 16y agolpmoics a long pointer to a meta object in cthulhu studies... ... see also Hungarian notation as implemented by Miskatonic University
- joelhaasnoot 16y agoI went back to the code repository (happens to be open source now) and found a few (real) examples: - prgpttp: paragraph pointer to "TextProps" - prgpvwvc: pointer to the root something something view controller
- kragen 16y agoThat sort of thing is a lot easier to understand if you have the secret decoder key: http://www.joelonsoftware.com/articles/Wrong.html http://www.joelonsoftware.com/articles/Wrong.html But it's probably a defensible idea, in context. The idea is to supplement the type system of a low-level language with a manually-checked type system that helps you find semantic errors.
- joelhaasnoot 16y agoYou're right, eventually I did get the hang of the chunk of code and wasn't afraid of it. Lots of others in the team were however. Also, because of eXtreme Programming and pairing, I knew the C# and what it was doing in 2 weeks and was writing code, having never seen C# before. I had some C++ experience, but by the end of my 6 month internship wasn't comfortable with the "views code". Yes, it was high performance code that did black magic, but making it readable is halfway to being able to understand it. It worked and it was fast enough and did good stuff (ever try doing a vertical unicode editing view?).