4 ms·
My first job out of college, my boss and I took over some code that was written by two genius PhDs (one math, one physics - we were working in finance.) I noti
by xyzelement 4y ago
My first job out of college, my boss and I took over some code that was written by two genius PhDs (one math, one physics - we were working in finance.)
I noticed a variable (long word starting with z) used in a lot of places. Turns out it was the German word for "counter".
It was my first hint that most of the backend codebase was written as a competition between the two of them to seem the smartest.
On the front-end, I remember opening some many thousand line long file trying to figure it out. I scrolled pages and pages to the top of the file looking for a comment. I found one. The comment:
/* What is this shit? */
Written by someone who tried to help those guys.
- dfee 4y agoGulp. I’ve left a comment like that or two. Probably isn’t helping the cause, but it’s waving a flag for the next person who’s got budget to clean it up.
- deleted 4y ago[deleted]
- kugelblitz 4y agoGrunt. Yarn it!
- heavyset_go 4y agoThat last anecdote is too relatable.
- haginile 4y agoSimilar story: a few years out of college I too inherited a codebase written in the 1990s by some genius phd, also in the finance field. Someone else clearly tried to clean it up before me. The word “WTF” was in comments throughout the codebase.
- kwkelly 4y agoThe word with Z may be related to “zahlen” which is where Z as the letter commonly used to represent the integers comes from. [1] [1] https://en.wikipedia.org/wiki/Integer#History https://en.wikipedia.org/wiki/Integer#History
- xyzelement 4y agoI think it was a much longer word, and to be clear - neither of the dudes was German.
- stingraycharles 4y agoThat’s an important detail, I assumed they were German. That makes it much sillier.
- ruune 4y agoMaybe Zählvariable or something like that?
- dayjaby 4y agoCounter is Zähler, not Zahlen, though.
- tored 4y agoT_PAAMAYIM_NEKUDOTAYIM
- orrymr 4y agoHebrew for 2 dots haha
- WesolyKubeczek 4y agoTwo double dots
- gfaregan 4y agoTen levels of C++ templates and typedefs are a pretty good way of proving how smart you are and making the code completely opaque.
- zcw100 4y agoMaybe this would be a good use for AI code generation. Reversable non-obfuscated obfuscated code. If you just obfuscate it it's pretty obvious what you're doing but if an AI can obfuscate it in a what that looks like something that is plausible that you could have written it you'd get away with it. Reversable so that you could undo it make updates and then reobfuscale.
- ascotan 4y agoCould be worse - my first was a program where someone had written the source in Delphi and run it through a Delphi -> C converter and then they threw away the original Delphi code. The resulting spaghetti was the only production code available.
- rolenthedeep 4y agoWhat kind of monster would do this