r/ProgrammerHumor • • Nov 25 '22

Meme Coding strategies

Post image
52.2k Upvotes

385 comments sorted by

View all comments

Show parent comments

13

u/shrubs311 Nov 25 '22

this is the most classic software developer horror story lol it has everything

14

u/[deleted] Nov 25 '22

I have other stories where I'm the hero! I don't think I can tell the PEGA story but a small excerpt I can share anonymously would be that I get to write a duck type parser. It was complicated and clever, but it needed to be. As you can imagine, some systems at AT&T are very old. How old is PEGA? It has its own concept of arrays. If you had a data page with 1 user and you asked for the name, your data key would be "name". If there were 2 users on the page, you data keys would become "name1" and "name2"

And the data wasn't grouped, just a big blob. If you had a name2 there was probably also an age2 on the results somewhere. So naturally I parsed these numbers into an array and assigned the keys as properties of that index, so user[2] = name2. This worked great until one day we encountered a field called "business". This crashed a server because the value was business29999999999 where 2 is the index and 999 etc is a business phone number. Even att servers didn't like when I tried to allocate an array of that size.

So naturally the next move was to identify something that might be an index and look through the data to find a matching one. If we had a "name 2" we could check for any fields that were indexed with 2 and then check the remainder to see if it was formatted like a phone number.

That's probably the worst proprietary format I've ever had the displeasure of working with, but as far as my att adventures go that is neither the oldest system nor the most ridiculous. It might be the most unique though for others here in the field.

Having to get account status by reading through multiple gigs of logs and computing state from change messages? I'm sure that's no big deal for some of you. Having to truncate and format your responses for an ancient API that uses a screen reader that breaks if it receives more than 60 characters at a time? Everyone's had a few of those, right?

7

u/shrubs311 Nov 25 '22

that format makes me want to cry lol. someone on my team had to do something loosely similar and all i could think was thank god it's not me

4

u/[deleted] Nov 25 '22

Building it wasn't fun but it's a great resume piece to talk about