r/cscareerquestions • u/avril_de_plonkers • Oct 30 '19
I got fired over a variable name....
At my (now former) company, we use a metric called SHOT to track the performance within a portfolio. It's some in-house calculation no one else uses, but it's been around for like 20 years even though no one remembers what the acronym is supposed to mean. My task was to average it over a time period, with various user-defined smoothing parameters... to accumulate it, in essence.
So, I don't like long variable names like "accumulated_shot_metric" or "sum_of_SHOT_so_far" for what is ultimately just the cumulated SHOT value. So I gave it the short name, "cumShot", not thinking twice about it, and checked it into the code. Seeing that it passed all tests, I went home and forgot about it.
Two months later, today, my boss called me into a meeting with HR. I had no idea what was going on, but apparently, the "cumShot" variable had become a running joke behind my back. Someone had given a printout to the CEO, who became angry over my "unprofessional humor" and fired me. I didn't even know what anyone was talking about until I saw the printout. I use abbreviated variable names all the time, and I'm not a native speaker of English so I don't always know what slang is offensive.
I live in California. Do I have any legal recourse? Also, how should I explain this in future job interviews?
2.7k
u/oakles Senior Engineer Oct 30 '19 edited Oct 30 '19
On the off chance this is real, this might be the best post since the dog incident.
356
u/PrestigiousBroccoli2 Oct 30 '19
fake but pretty funny 7.5/10
4.9k
u/3lRey Senior Oct 30 '19
lol no fucking way
865
u/applenerd Oct 30 '19
https://www.mathworks.com/help/matlab/ref/cumsum.html
558
u/shrithm Oct 30 '19
I'm sorry but this is an awesome story. I cried with laughter.
I once called a variable cuntData because I was sick of how it was formatted.
I'm sure you could talk to the CEO and tell him you didn't realise an it's the obvious abbreviation.
610
u/Cryptonomancer Oct 30 '19
Maybe ask in legaladvice, although with at-will I suspect you have limited recourse.
58
u/abomanoxy Oct 31 '19
I know this is off topic, but accumulated_shot_metric or sum_of_SHOT_so_far are SO much better than cumShot. Both of them communicate the variable's purpose so much better, and there's no performance difference or reason whatsoever to choose an opaque abbreviation other than your desire for your code to be how you think looks visually snappy and cool. The next person to read your code has to take a few extra seconds to puzzle through your variable names, because "you don't like long variable names" for no real business reason. In a very small way, you are prioritizing your own fussiness over the success of the business.
325
u/dswpro Oct 30 '19
No recourse but do post a review on Glassdoor about your former employer and their lack of humor and desire for long variable names. I once setup test accounts where people were supposed to login with user names auto generated from first initial followed by last name. My test users names were Fred Uckme, Sam Hitface and Theodore Hissucks. Never heard a word.
178
u/[deleted] Oct 30 '19
at-will-termination is used in cases like yours.
Sorry dude, i'm sorry. Best advice i can get is to get a reference from a lower manager in that company that actually likes you and understand the situation.
147
u/anxietyisstressful Oct 30 '19
This is absurd! I don't believe you got fired over cumShot (even though it's a hilarious variable). Your CEO must not have been an Engineer and doesn't understand how variable naming works. The biggest asshole must be the person who printed that out. Who the fuck has time to print out someone's code just to snitch about a silly variable?
20
u/arunv Oct 31 '19
There’s your first problem
27
u/Halfwayhome22 Oct 30 '19
You should've called it sumShot. At least that at least would've given you the slightest of plausible disabilities. Then the function mySumShotSoFar() could've taken you down a beautiful road.
19
u/[deleted] Oct 30 '19
Well...that’s not a happy ending.
9
u/Fizzelen Oct 31 '19
Honestly, every other developer in the department who had access to the source control and chose not to remove the offensive term should of been reprimanded, and the manager should of quietly discussed this with the developer. There are lots of examples where this type of thing has occurred in the past e.g. expertsexchange.com
8
u/ToBePacific Oct 31 '19
This is where I think you're lying. I think you knew what you did and thought claiming ignorance would protect you.
20
u/_DreadLockRasta Oct 30 '19
sucks that it happened and that no one thought to actually tell your manager who would pull you aside to change it, before it escalates. Consider yourself lucky that you're out of that environment. We are all adults, if they had a problem they could have easily told your manager and have them tell you to change it instead of making it a joke (which escalated) behind your back. However word to the wise, the variable name "accumulated_shot_metric" is alot better than "cumShot". The latter gives no description as to what that variable would even do, if a random dev looked at the name.
7
u/rubthewrongway Oct 31 '19
Coding a UI: button = butt. Ergo naming included buttHandler, buttTapped, getButtTapped, buttHandledSuccessfully etc.
Saw a colleagues commit was "Fixed sloppy handler of butt" snicker
13
u/bored_and_scrolling Oct 30 '19
I really hope this isn't real. You need to explain that that was a genuine mistake and that english isn't your first language and all that stuff. That is an insane thing to lose a job over.
27
u/big_phat Oct 30 '19
You were allowed to just check in code without any other person approving it first?
6
u/seanprefect Software Architect Oct 31 '19
So legally speaking they can fire you for any reason or no reason so long as the reason isn't protected (e.g. race , age, religion etc)
as a practical matter however if that's the sort of company that fires someone over a simple , easy to clear up , misunderstanding well maybe that's not the company you wanna work for.
5
u/e-gorman Oct 31 '19
I'm pretty sure this isnt' real but if it is - that's not the reason they fired you, it was just the last straw.
65
u/[deleted] Oct 30 '19
Ah another fake post to try to take the throne of the fake stepped on dog post. Can’t believe how anyone actually believes this is a real story and that someone would post such an identifiable scenario on the internet for points.
16
u/csjerk Oct 30 '19
I hope you learned your lesson and will use longer variable names in the future.
19
u/[deleted] Oct 30 '19
Pretty funny if it's true. A lot of companies wouldn't care at all.
But no, you don't have any legal recourse. Committing vulgarity into version control isn't a protected class unfortunately.
4
u/Scannerguy3000 Oct 31 '19
isFake == True
4
u/Weather_Machine Oct 31 '19
So. No joke it's not wrong to ask for your job back, being told you're fired is NOT the end of the situation. Going right into legal recourse is a bad move at this moment.
Send an email to the CEO asking for the opportunity to explain the situation, and mention forefront that English is not your native language and your intention to make a short name for the cumulative accounting of the SHOT metric unfortunately resulted in being interpreted as being a crude joke which you did not understand and did not intend. Reference the lack of any prior evidence of behavior in that manor and that you've never made any joke about it yourself.
Long story short, explain the situation and kiss some ass and hopefully the CEO will calm down, ask around, and give you your job back.
4
u/uhhuhwhatever Oct 31 '19
Avril username... April. So April’s fool joke?
Unbelievable parts:
Also, with that many people looking at the code, there would be code reviews.
4
u/yikes_42069 Oct 31 '19
It's almost as if you shouldn't needlessly shorten variable names
4
u/Insertjojorefernce Nov 08 '21
This story seems kinda bull, but it probably could happen, like I mean have you seen the Valve programers code its fucking hilarious and they didn't get fired, it really seems weird for a company to fire a competent worker for this
4
u/[deleted] Jul 22 '22
Some shops would welcome you as a legend
9
u/nuclearmeltdown2015 Oct 30 '19
This has to be fake lol, nobody gets fired for this, someone must have spoken to you and given a slap on the wrist, but what kind of place even prints out code and shows it to the ceo. Good story though lol.
6
u/ThePeskyWabbit Oct 30 '19
L O L
I left behind a ton of funny variable names in JUnit tests at my previous job. But this is golden. Got fired cuz the boss had their mind in the gutter more than you. wow. Hate that something this dumb was sent all the way to the top and you were never questioned about it.
6
u/shoretel230 Senior Oct 30 '19
I call bullshit.
3
u/[deleted] Oct 31 '19
I highly doubt you didn't know that was offensive.
3
u/Horzta Oct 31 '19
Damn doesnt your office have code reviews? Why didnt your senior just called your attention and explained why it wasnt a good variable name? Your excom was ran by kids
3
u/carc Director of Software Engineering Oct 31 '19
I hate abbreviated variable names, I'd still fire you.
Half kidding. If this post isn't satire, that's a really silly reason to fire someone... They should have at least got your side of the story before making the decision to fire you. And crude humor in source code is worthy of an eye-roll, not a pink slip. Prudes.
3
u/[deleted] Oct 31 '19
You should be ashamed of giving a variables such a vague name.
3
u/zak13362 Oct 31 '19
Definitely file for unemployment. It's a pain for most companies even if you don't win. From a legal standpoint, if it became a running joke behind your back, then others were partaking in unprofessional humor and suffered no recourse. You got fired, no warnings or write-ups, over something you can argue you didn't exactly understand was 'wrong'. It's not abnormal to preface things with cum in code for cumulation. Def speak to a lawyer, most will consult for free. There may or may not be some sort of legal case here, but you can definitely get it labeled as unreasonable termination in an unemployment case.
3
u/overflow_ Oct 31 '19
I saw this on /g/ lol
3
u/Neu_Ron Nov 09 '19
Copy and paste the code lol.
3
u/[deleted] Jul 05 '22
Lol I’ve seen this posted so many times and every time it still cracks me up - idc if its fake it’s hilarious 🤣🤣
11
u/WhackAMoleE Oct 30 '19
Cumulative shot. Makes perfect sense. They have no sense of humor. Fuck 'em if they can't take a joke.
9
u/Hi-Polymer_Eraser Oct 30 '19
I always get a kick out of serial liars.
6
u/TheRedmanCometh Oct 30 '19
I maintain an EHR featuring many instances of various classes with "Analysis" in them. There are a lot of things called stuff like "incomingAnal" and "analConversion". It started as a joke but now it's just for convenience.
I'd be fucked at your company
6
u/p4bl0 Oct 31 '19
This is probably not real, but if it was: this is why you should unionize.
1
u/K-Max Oct 30 '19
Ugh. That's a brutal one. I feel like no one fought for you at the CEO level. Like seriously, couldn't your executive member defend you on that faux-freudian slip?
How long did you work at that company up to now?
4
u/ButtbuttinCreed Oct 30 '19
Funny story but I don’t believe it
5
u/GagaOhLaLaRomaRomama Oct 30 '19
This is definitely fake but nice try
2
u/fsk Oct 30 '19
They were unreasonable. The first person who saw it and thought it was wrong should have just pointed it out to you and asked you to fix it.
2
u/Throwaway__shmoe Oct 30 '19
Was there no code review by someone else?
2
u/colt_stonehandle Oct 31 '19
I've been laughing for two minutes because this reminded me of a post I saw one day.
A school came up with an acronym for doing good, or something. And the acronym was N.U.T. There was a poster that said something like "be a good student and N.U.T. all over the school"
2
u/turck3 Oct 31 '19
Take names seriously. Stop abbreviating. If you're thinking of those longer names and rejecting them, then your priorities are backwards. Here's one great explanation of some of the why: https://www.youtube.com/watch?v=MBRoCdtZOYg. When you explain it in future interviews, laugh about it and say you learned about the importance of naming variables the hard way.
2
u/Zapsy Oct 31 '19
You cant use the I'm not a native english speaker excuse after typing that wall of text.
2
u/XTheSniperGodX Oct 31 '19
I feel like this is so funny that an interviewer would just hire u on the spot if he heard that story lol
2
u/sad_developer Oct 31 '19
throw CumShotException();
2
u/LWdkw Software Engineer Oct 31 '19
A coworker once made a typo in the commit message and send 'fixed bug while holding shit' to production (was supposed to be shift). He was mortified, we printed a screen shot and put it up on the wall.
Adding this anecdote to say, I believe you.
2
u/edoras176 Oct 31 '19
This 100% did not happen. Cute story though.
2
u/[deleted] Oct 31 '19
You OP are a gentleman and a scholar
2
u/SeattleChrisCode Oct 31 '19
Was the person who reviewed your code also fired? If they are a native speaker, it seems they are even more responsible for any precieved inappropriateness.
Who are the people who began sharing this as an office joke? It seems they are the ones who initiated an inappropriate sexual reference in response to a common industry abbreviation.
At the time it was identified as an issue to the OP, were they willing to take corrective action? When other coworkers became aware of the issue, how quickly did they seek correction? How much did the coworkers or the OP perpetuate the inappropriate conversation? Did the company take similar actions against these other participants?
As this situation was perpetuated over time, was it done so in a manner that was disparaging of the OP? What steps did the company take to ensure the work environment was sensitive to employees with different cultural & language backgrounds? Were there employees who were also responsible for this codebase who, instead of making corrections, participated in perpetuating the issue? As they knowingly contributed to the problem, did the company treat them less harshly?
By firing the OP, is it the companies intention to indicate that they support the bullying of employees for their diverse background?
2
u/__---_zy_---__ Oct 31 '19
Fake
2
u/schammelam Oct 31 '19
You can't get fired for that shit right? There have to be laws in place for something like this. Also, your boss is an unreasonable peace of shit who didn't get or show respect for your end of the story.
2
u/neotorama Oct 31 '19
Pew pew pew
2
u/[deleted] Oct 31 '19
Why am I not surprised that there's no sense of humor left in California??
2
u/CPSuperstore Oct 31 '19
Put this on r/Wellthatsucks and r/ProgrammerHumor!
2
u/NAFAL44 Oct 31 '19
If English isn’t your first language then this probably counts as some form of discrimination.
2
u/TrumpLyftAlles Nov 15 '19
I worked on a project that randomly generated four-letter keys. The keys were visible in the application and someone found one offensive -- so I was tasked with creating a list of four-letter words (like "SHIT") to filter out of the randomly-generated keys.
2
u/sparky76016 Nov 18 '19
You’re lying buddy
2
u/skaterjmt Nov 15 '21
We had one called cash units - it was cobol so of course we had to abbreviate and made it c-un…blah blah blah. Since we were the only one who could really read the damn thing, no harm no foul.
2
u/[deleted] Apr 04 '24
This has got to be a top tier shitpost.
5
u/tahp_master Oct 30 '19
accumShot woulda saved you...that being said, this is hilarious
4
u/Guarionex_ Oct 30 '19
This is totally fake and it isn't even funny.
3
u/stratogy Oct 30 '19 edited Oct 31 '19
Yea should've went with my_cum_shot_so_far() :/
3
u/ThrowThineAssBacketh Oct 31 '19
One of the first tenets of clean code is to think long and hard about your variable names. So I guess you deserved this.
4
u/pornaccount1282828 Oct 30 '19
FAKE GTFO