33
Root
3y

I’m adding some fucking commas.
It should be trivial, right?
They’re fucking commas. Displayed on a fucking webpage. So fucking hard.

What the fuck is this even? Specifically, what fucking looney morons can write something so fucking complicated it requires following the code path through ten fucking files to see where something gets fucking defined!?

There are seriously so fucking many layers of abstraction that I can’t even tell where the bloody fucking amount transforms from a currency into a string. I’m digging so deep in the codebase now that any change here will break countless other areas. There’s no excuse for this shit.

I have two options:
A) I convert the resulting magically conjured string into a currency again (and of course lose the actual currency, e.g. usd, peso, etc.), or

B) Refactor the code to actually pass around the currency like it’s fucking intended to be, and convert to a string only when displaying. Like it’s fucking intended to be.

Impossible decision here.

If I pick (A) I get yelled at because it’s bloody wrong. “it’s already for display” they’ll say. Except it isn’t. And on top of that, the “legendary” devs who wrote this monstrosity just assumed the currency will always be in USD. If I’m the last person to touch this, I take the blame. Doesn’t matter that “legendary Mr. Apple dev” wrote it this way. (How do I know? It’s not the first time this shit has happened.) So invariably it’ll be up to me to fix anyway.

But if I pick (B) and fix it now, I’ll get yelled at for refactoring their wonderful code, for making this into too big of a problem (again), and for taking on something that’s “just too much for me.” Assholes. My après Taco Bell bathroom experiences look and smell better than this codebase. But seriously, only those two “legendary” devs get to do any real refactoring or make any architecture decisions — despite many of them being horribly flawed. No one else is even close to qualified… and “qualified” apparently means circle jerking it in Silicon Valley with the other better-than-everyone snobs, bragging about themselves and about one another. MojoJojo. “It was terrible, but it fucking worked! It fucking worked!” And “I can’t believe <blah> wanted to fix that thing. No way, this is a piece of history!” Go fuck yourselves.

So sorry I don’t fit in your stupid club.

Oh, and as an pointed, close-at-hand example of their wonderful code? This API call I’m adding commas to (it’s only used by the frontend) uses a json instance variable to store the total, errors, displayed versions of fees/charges (yes they differ because of course they do), etc. … except that variable isn’t even defined anywhere in the class. It’s defined three. fucking. abstraction. layers. in. THREE! AND. That wonderful piece of smelly garbage they’re so proud of can situationally modify all of the other related instance variables like the various charges and fees, so I can’t just keep the original currency around, or even expect the types to remain the same. It’s global variable hell all over again.

Such fucking wonderful code.

I fucking hate this codebase and I hate this fucking company. And I fucking. hate. them.

Comments
  • 3
    I am so sorry, friend.
  • 3
    Just refactor it - doesn't matter what they say.

    If they don't want you to touch their junk, they shouldn't assign you their smelly tickets...
  • 1
    I guess what you could try is to first do option A, then when they complain, ask them to do it better. I'm not sure if that would help with anything but it has got to be possible to somehow put their incompetence on display?
  • 1
    So basically the code is so badly designed that something as simple as...um...adding commas to a web page (wtf) is a big project then? Sucks the legendary Apple hero won’t let you fix it
  • 2
    I mean, the "correct" place is right where you convert from currency to string.

    Refactor as much as needed to get there I'd say.

    Doing multiple transforms on the string in unrelated places sounds bad
  • 2
    @rEaL-jAsE I’ve been using RubyMine, a jet brains ide for Rails. The codebase is complex enough in some areas that it gets … very confused.
  • 0
    @Root I feel you. Just that. Gather the courage to start fixing things. It gets better after a long while. Or at least that's what I hope.
Add Comment