24
Root
3y

Commas.
I fix one display, and another breaks.

Now I’m getting “$$1002.99” and can’t figure out why. Where is this popup coming from? Where does the encrypted URL point to? What does this ajax call do? Where does the amount go? When does it change? Why is it a string now? Where does the total get defined? How far down the rabbit hole do I need to go?

Short short version:

I found something to try fixing. I made some changes, forced a crash to inspect, and… Joy! My log stopped updating. How long have I been debugging on stale data?

Skipping a long debugging session…

I discover a suspect instance var in a suspect method, and… i have no freaking clue where it’s being defined. It’s used in the class, but never defined in it. Oh, and the name is pretty generic, so searching for it is even more fun.

Just.
Qxfrfjkalstf.

WHO WRITES THIS CRAP?!
AND WHY DO PEOPLE CALL THEM “LEGENDS”? Like, really. That’s the word they use. “Legends.” I still can’t believe it.

Comments
  • 6
    The double-$ problem might be in a resource (nested, translated macros). Might. I can’t tell, but it’s my only remaining lead.

    Why not?
    It’s a special kind of resource that returns different data (and data types), uses different macros, etc. based on what extra data you give it. And this isn’t in a method anywhere that’s easy to read: it uses some convoluted data structure stored in the db, and I don’t know how to interpret it. And ofc the code for it is all generic, and reading that is somehow even more confusing.

    Guess who wrote it?
    That’s right. It’s another legendary feature.

    Oh, and an infuriating tangent: these resources are often used for HTML snippets. Except the syntax for ad-hoc macros (as opposed to built-in macros) is identical to the syntax for tags so they don’t work! Just brilliant.
  • 3
    If someone as savvy as you is struggling with displaying commas in this code base, that says a lot about how messy and terrible it is. It’s probably a big pile of spaghetti and vomit
  • 4
    They’re legendary in that they pulled off this nearly impossible accomplishment, aka creating a system so poorly designed you can’t even add commas to a webpage without jumping through hoops
  • 1
    ...and managers still often don't get the concept of "technical debt". "But how bad could it be if we just wanted to do something with a comma?!"
  • 2
    The legendary creators of fuckfests so big, no one could hope to tackle them.
  • 0
    @Root wait, I can’t believe I didn’t ask earlier but are these people actually literally called “legends” by your boss over there?
  • 3
    @TeachMeCode Bosses. And execs. And coworkers. Yep.
  • 1
    sounds horrifying, this is how you burn out.

    Reminds me of the leet code a coworker had to sludge through years ago. Hundreds of concatenated string JavaScript lines, and the concatenations included functions with another set of hundreds of concatenated string JavaScript lines. I remember seeing at least 3 to 4 levels of depth and I could only think "I'm just glad it's not me fixing that trash" before going back to fix the bug in one of the 1k lines function while contemplating jumping off the nearest window.
Add Comment