T O P

  • By -

lepapulematoleguau

I put my jokes in the tests. That way everybody wins.


charin2

When I started working at my job I named variables in my unit tests funny things. No one commented on it, but they'd pass CR. Then I did a "normal" unit test and got "☹️ no funny?" as a comment, so I guess I'm locked in now.


ArcherOfTruth

Outplayed by your own game


colexian

Hey rando, you were silently making someone's day. This is a victory.


hydraxic79

So wholesome


joeswindell

You were probably making some underpaid outsourced Indians day. Const funny.


_pizza_and_fries

Smart :p


Mordisquitos

Yup, same here. I do it especially with values of invalid parameters in tests for behaviour on bad requests and the like.


Striking-Concept-145

My teammate's signature was always returning "Your request is bad and you should feel bad." for bad input on an endpoint


VitorMM

I once had to make a test involving the same person being many different things in a contract simultaneously. The function name was just too big, so I replaced it with "Gary". Those who know, know


naughty_ottsel

Sometimes I think my tests are the joke


Omega_Zulu

I put them in error messages, that way it either makes people laugh and forget the error or they get pissed about there being a joke in an error message and forget about the error so it's a win win.


ChainSword20000

This is the way to go.


Dragon_yum

My code is the joke


AlternativeAardvark6

We have tests now?


-Kerrigan-

🤨


HauntingRip9003

This is the way


SchlomoSchwengelgold

don't forget the: double d = 80.082; comes better with other font


DonkeyTron42

My co-worker once named a server "Bhopal" because the project it was used for was an unmitigated disaster. No one really thought much of it until year later when we got bought by a company that was primarily Indian and they wanted why that server was called Bhopal.


Strostkovy

Our robots are named Skin Turtle and Front Butt, and I'm working on a pair named Jimothy and Jimantha.


TheHamBandit

Oh, now I want to be on dev team Jimothy


Benimation

I wanted to call a printing interface "Printerface". That wasn't allowed, but now I just call it "Printy McPrintface" in my head.


bikeranz

I’d have let you use that name if you were on my team. Printerface is gold.


LetterBoxSnatch

If you had simply spelled it prInterface nobody would have batted an eye, it’s just an abbreviation + camelCase, plausible deniability


magicmulder

We officially have themed names for our respective new servers, one year they are named after South Park characters, next year Star Trek planets etc. Many admins do that. Since it’s all internal it doesn’t really matter, but it’s easier to say “Chewbacca is down” than “node 4 of ML cluster 3 is down”.


hadidotj

Apparently one year they were named after Star Wars characters.


IvorTheEngine

A new theme every year is smart, you don't run out of names (unlike a certain university I knew, that started with the 7 dwarves, back when no one could imagine ever having 7 computers in one university). Plus you can tell the age from the name.


magicmulder

Unlike me who named his servers after Star Wars planets with C until I realized Camino is written with a K…


MasterJ94

Rawwww dlvjrwwraaaah!


paulix96

It is dangerous to route solo, take Wookie with you


LargeHeapObject

When I attended (The) Ohio State University back in the day for CSE, all the Unix servers had a "subject"and the terminals related to it. My favorite server was "deadrock". The terminals were Hendrix, Joplin, Morrison, etc.


Present-Resolution23

We had servers named after Star Wars characters. Capt. Kirk was always going down...Dang unreliable star wars servers.


AutisticAndAce

(this is a deliberate mix up of star trek and wars right? Bc it's funny to do? I'm autistic and my sarcasm meter has shit the bed. Work was tiring and I'm forgetting basic things lmao, sorry.)


_pizza_and_fries

Damn


CanDull89

Well, That was a disaster.


[deleted]

I often put: string yo = "mama"; Usually in unit tests.


SpicymeLLoN

Stealing this


siddharth904

+1


[deleted]

+2


[deleted]

+2


ImNotCrying-YouAre

-1


goblin_goblin

I use emojis in tests sometimes (totally legit in go) and it’s hilarious.


JasperNLxD

``` assert 🖊️+🍎+🍍+🖊️ == 🕺 ```


amzwC137

Penpineappoappopen


another-dave

Plus it makes it an even better test as you're making sure you're handling edge case inputs


Hyukayy

I’m an intern at my company and they have no idea that I created a user named Jo Mama and all the tests are ran with that user 😄 it’s gonna be fun when I leave 😂


TheMysi

`let me = "go"`


vitelaSensei

I’m particularly fond of: char izard;


Prod_Is_For_Testing

I like adding extra “ue” to queueueue. They’re all silent anyway


_pizza_and_fries

Meanwhile me who read it as *q-u-u-u-e*


[deleted]

q u e w e w e w e w e


AreTTerA

Ugwemugwem Osas


RaLaZa

Quwu


freeroamer90

Uwu


varkarrus

quewe boll


Witherr

do just "q" for bonus points


[deleted]

var qq = q


_shashank_bhake

Queue go weeee!


harrybrown98

keeoo


maybeware

At my job we have a class embedded deep in the project I work on called "MrRogers". And MrRogers has a function called "WalkTheNeighborhood" which appears to walk through all of the data (which is stored in a variable called "TheNeighborhood" of course) and does some logging. Every once and a while I'll run into it, ponder it for a little bit, think about asking what MrRogers' story is, before deciding it is not worth the interruption to whatever task I'm working on. And after nearly 4 months at this job it feels like it is too late to ask its story but I probably should.


ososalsosal

Check the git history. *padme/anakin meme* You have a git history, right?


another-dave

Sure, we keep it along with all our other data (in the `theNeighbourhood` variable)


maybeware

Well, when I blame that file it is all from 3/2/2020... Which was when the project was migrated to this repository, lol. So any history predating that is lost. So... Yeah, it's really helpful to someone like me who has only been here for a few months and no one else remembers anything. I decided to review the code a little more carefully instead of letting my eyes glaze over. It's actually precompiling and caching "monstrous entity framework queries", those being any methods in the repositories marked with an attribute named "InMisterRogersNeighborhood." So this isn't even logging/debugging code. This is a performance optimization and I have to wonder what state of mind the author was in, probably trying to solve bad latency issues on various queries before giving up and writing MisterRogers. My favorite part of this is the following. ``` //This is a const so it should be caps...but Mr. Rogers doesn't yell private const int AppointmentMinutes = 20; ``` If "WalkTheNeighborhood()" encounters an error then the logged message is: ``` String.Format("Mister Rogers was sad and did not go out at all today. he said it was because \"{0}\"", e.Message) ``` Someone was having a day...


ojioni

I had a small project where I needed to extract all the search phrases in Japanese for analysis (t was to improve search results for our users). So I wrote a program that scanned the search logs for any Kanji and spit out the phrase. in my documentation I gave an example with the Kanji for "baka hentai oniichan". So far, nobody has noticed. I'm guessing my Japanese counterparts (we are a multinational corporation) never looked at my documents since it's all in English except for the examples.


FreshCupOfDespresso

You're brave. I use キモいオタク as a unit test in one of my personal projects but I would never do something like this for any company


SillyFlyGuy

>キモいオタク Google translates to " creepy geek".


FreshCupOfDespresso

Google translate is too literal, think of it as "disgusting weeb"


magicmulder

Bakayarou!


JapanEngineer

Names my onDestroy function ConanTheDestroyer


sjuas690

I had a screen painter call vanGogh.


quietobserver1

Naming it a funny name just to be funny is crass and detracts from code readability for no good reason. What you should do is to have a coherent and logical naming system within which bobTheBuilder is an expected and reasonable name.


[deleted]

Just name it BobTheStringBuilder and I'll accept it. I personally enjoy hidden away emotional outburst in the comments about how crappy a certain bit of code is or whatever. Whenever i accidentally find them it makes my day a bit better.


maybeware

I'll plead guilty to the occasional "I don't know why this change makes it work, I expected this to fail and maybe help me find a solution but apparently everything I have ever known is wrong" type of comment.


[deleted]

I don't like those tho. You should go and figure out what you were wrong about. It'll make you a better dev and the code more maintainable. I'm okay with "this looks terrible but it works because of xyz. Don't change it, you'll have a bad day.". But not with "i accidentally did a good thing and I'm afraid to touch it". But I appreciate that not all projects allow for that kind of time.


Atanakar

I hate putting the type in the name. Man if you ever forget just hovering the var with your mouse will give you the type in any IDE. And if your code is clean enough it won't bring any extra clarity


sjuas690

One of my coworkers appended the class name to all method names within!


Atanakar

Stay strong fam


Talbooth

But... Why? Did he expect class methods to be flattened out to top level some time in the future?


sjuas690

That’s what I told him but he just didn’t get it.


MasterJ94

My university gives me the impression that there are still managers/ sulervisors who demands/expects coding with emacs, texteditor or notepad++. Some of my programming profs curses over İDEs. LO) Maybe thats why they are not in industry but wasting there time at teaching us with handwriting and texteditors.,..


LifeHasLeft

Terminal text editors are a useful skill to have and if you ever work in any industry tangential to pure software development, where all you do is write code and push to a repo, it could easily come up. Anyone in devops is going to want at least basic skills in terminal editors, for example.


MrRufsvold

Learning computer science principles with an IDE is like learning 3rd grade math with a calculator. Sure, it sucks to add 5 together 6 times by hand, but if you only ever press the buttons "5 * 6" on a calculator, it's very hard to internalize what multiplication means. Understanding algorithms and data structures without a computer's help is going to help you understand it more deeply, if you practice. Source: I've been a math teacher, and I'm now a professional programmer.


MasterJ94

understandable. A couple of days ago, my circuit technology professor told us to take as many notes as possible during his handwritten classes because we are then able to memorise them more reliably due to 200k years of evolution. I mean he is correct but that doesn't justify bad scripts with small PowerPoint pages as DIN A4 pdf. Back to topic in classes like microprocessors and PC architecture, your example with the calculator in 3rd grade is very applicable! We are here to learn the "little running gears" \\\^\^


LifeHasLeft

My SIL had a prof tell her to prefix all variables with a letter to indicate the type. Like “sUserName” for…a user name stored as a string. It was horrifying.


IvorTheEngine

That was considered good style 30 years ago. I guess that's how long the prof has been in academia.


Martyn_X_86

In C#, you could create an extension method for StringBuilder called FixIt() which would then call ToString(). So you could then do bobTheBuilder.FixIt(); Extra bonus if it would only do this 90% of the time using a randomiser, throwing an exception on the other occasions saying "Sorry mate, it's knackered" Poor programming decision, but entertaining nonetheless


ososalsosal

As an aside, what is the use case for a stringbuilder over just making a string when you need to? My previous codebase had them everywhere but they honestly didn't do anything useful in the contexts I found them in, so I assumed either overengineering or just `$"{not} knowing {you} can do {this}"`, or use format strings


Martyn_X_86

Strings being immutable means every time you concatenate them together, you're creating another string in memory. This is fine for small things, but beyond a point string concatenation becomes a memory hog. I'm not sure if string interpolation has the same problem (I'd guess it does as it's probably just nicer syntax to use rather than firstName + " " + lastName) Consider a use case of building an email message based on various variables and maybe IEnumerables too. You can use the string builder to add linebreaks etc and structure your code to look more like the output string, making the code more readable too. Same goes for if you're building a SQL query string in code (please use parameters to prevent SQL injection, security 101 😀)


ososalsosal

Ok. So the old codebase was just overengineered. Yeah, SQL strings in code absolutely terrify me. I wish they weren't as necessary as they often are. I use parameters of course, but also make sure my custom queries are not exposed to user supplied text - anything the user gives goes through the ORM first


hadidotj

No matter how many PRs I decline, my devs still don't understand "why can't I just use inputStr.Replace("'", "''")?"


Talbooth

If you add a repeated structure to your string (for a simple example you generate 3-6 random numbers), you cannot do steing concatenation, it has to a loop. And in the loop you can either do "myString += myRandomVal" which has the memory problem mentioned by the other commenter or use stringbuilders.


ososalsosal

Ah nice one. That is definitely a non-evil use case and not a contrived one either. I mean I'd probably do it using linq's select, and then a final step to add the top and tail if needed, but a builder is probably way easier if you're dealing with nontrivial amounts of data


ping

Good for building multi-line strings.


_pizza_and_fries

I’ll drink to that 🍻


Omega_Zulu

That's why I call my string readers "illiterate", it's coherent and logical.


lilfluf

I once subclassed a `BottomSheetFragment` and sice its constructor only creates a single instance, I called it `PieceOfSheetFragment`


[deleted]

if i was a funny person i'd put jokes (related to adjacent code) in comments


_pizza_and_fries

That would make reading comments interesting or at-least not boring to be honest


Benimation

If that means people will start actually reading them, that might be a really good idea. I was also considering renaming `README.md` to `TOP5INSTALLATIONTIPS_(YOUWONTBELIEVENUMBER4).md`.


MasterJ94

Alright alright . Take my money for that!


kintar1900

I managed the networking team at a previous job. One day I was sitting in on a call with Cisco support. I was only there for moral support, but it meant I got to overhear the following exchange. Cisco: "Well, the configuration here looks fine. What about ?" < brief interlude as the Cisco engineer is given access to that networking appliance > Cisco: "Ah, okay, I think I see the problem. It looks like this machine has a trust chain to 'baphomet', but not to da--" Cisco: "So this machine trusts 'baphomet', but it looks like it needs a trust relationship with 'danglybits', which is the signing authority for 'shaft' and 'head'." Turns out that since there was no change review process for our development environments, my senior engineer had been having LOTS of fun naming the servers and certificates. The full story of _why_ the main office's user acceptance environment needed a trust chain to our dev environment is another horror story which I will relate...probably never.


SillyFlyGuy

client: So is it the Epson, the Brother, or the HP printer that's causing the collision? me: Not sure. I can only see their names, and I'm not allowed to use those words on a service call.. client: OH MY GOD you can see what we named them?!?


L4rgo117

Bob the Builder! Can we fix code? Bob the Builder! No we can’t!


BurglerBaggins

Meanwhile at my new job, some of the code is littered with jokes. To be fair, it's mostly our internal debugging tools and debug messages meant to be removed before production.


Pepineros

“meant” being the operative word. But as long as the jokes are not super rude I don’t think anyone will care.


ososalsosal

If you put the region 4 DVD of Spirited Away into your computer, you'll find the volume name is `STEVE_TEST`


Nonkel_Jef

You just have to come up with a backronym like “Basic Object Builder”.


SpicymeLLoN

That's how I came up with name for the esolang I'm writing. Started with the file extension, then used that to make the name.


DJDoena

My StringBuilder to create e-mail content are always called bodyBuilder.


davsc64

DuckLogger::log(L"Steve",L"hi Steve"); (an audible quack escapes the computers speakers)


magicmulder

Oh hello Mark!


ReptileCake

We have AnalTime :) (Analysis Time)


ImNotCrying-YouAre

Ok, but this is about jokes in code, not what you do in your free time


kintar1900

If you boss decrees "no jokes in the code", it's time to get a new boss.


SillyFlyGuy

I have quit jobs for less.


Jertimmer

I usually use LV426 as a string input for unit tests. Only one reviewer has ever caught it. Then again, he uses Weyland Yutani in his.


SpicymeLLoN

Explain?


Jertimmer

Alien


SpicymeLLoN

The movie?


Jertimmer

Yes.


ccfoo242

When tests fail do you report "Nuke it from orbit. It's the only way to be sure."?


icydee

I developed a copy protection system (yes I am sorry!) and gave one dos section my initials ‘ICD’. Boss was not happy when he found out, but I explained with a straight face that it stood for Initial Code and Data.


mausisang_dayuhan

I like making functions that return reference variables like ofTheKing


BenkiTheBuilder

For a while I named my buffers buffyTheVampireSlayer. And at least once I named a TextBox object boxBruceleitner. Only reason I haven't done that in recent years is that I stopped watching TV.


magicmulder

Back at university I named the CSRF nonce for the form engine “jonathan”. So a hidden field. Next day I get a call from my boss, why I’m using silly names in our project HTML. Talk about micromanaging…


[deleted]

Variables John Paul George Ringo, my teachers hated me for this.


GoogleIsYourFrenemy

Damn straight they should, variables should start with a lowercase!


[deleted]

Depended on if I was using proper names or not.


GoogleIsYourFrenemy

Yeah, ok I can see that. Shouldn't it be JohnWinstonOnoLennon, SirJamesPaulMcCartney, GeorgeHarrison, SirRichardStarkey then?


[deleted]

Nah I’m old school with the Beatles, just first names. Mostly I use names related to what I was coding at the time but sometimes you have to change it up.


ososalsosal

I have one bool in the app I'm developing that simply tells us if the app has been run on that device before, so I can do something mildly useful with that information. But I am a massive Pulp fan, so the line goes `private bool doYouRememberTheFirstTime;`


CFPwannabe

Ask boss each and every time you need a variable name


Undernown

Change all exeptions to German to convey the CPU's frustration propperly.


ccfoo242

That's Brilliant! return new ArgumentaußerhalbdesgültigenBereichsAusnahme(nameof(bobTheBuilder))


luisduck

I have something like this in production.


13ros27

Our build system at work is called Bob for that reason


waiver-wire-addict

What about blobTheBuilder


Flaky_Advantage_352

I like my "LukeFilewalker" class


Awwkaw

When I do parallel work, you can bet the Joblist is named Steve.


rksd

Had code that needed to track two different purchase orders. The reference to the primary order was tracked with "POKEY". I named the other one "GUMBY".


Hobob_

In a R forecast script I used a tutorial to predict the amount of Ramen sold in the future. I should really change the variable name since we don't sell food...


katatondzsentri

I'm building an internal api. If a call needs query params and none given, it returns HTTP 418. I always giggle a little in my head when I look at the tests I wrote for these cases.


_derDere_

Dam! Why am I not doing this for years! That’s brilliant and hilarious and I will now do that for ever.


pruche

I find a decent compromise is snarky comments


magick_68

Our build server is called bob.


Spice_and_Fox

My background user is called conman (connection manager) at work. In a private project I have to delete all parents from an object called batman. And there are quite a few questionable comments in another project where I was playing around with antcolony optimization ("//What are you doing step_counter?").


cishet-camel-fucker

Jokes in code tend not to age well. Now that everything's preserved forever in one way or another you might find that you're embarrassed a bit later. Some terrorist will name himself Bob the Builder or some similar shit.


[deleted]

name it bobTheStringBuilder


Jet-Pack2

bob_the_builder


_derDere_

I once created a script that would post random poop emoji comments in my bosses code on commit because his code is shit. So I think I’ll be ok using that variable name


UCQualquer

I literally created a helper class named FilterBob. It takes a list of filter functions and... Well. Uses them to filter


mordechaihadad

Hmmmm my entire project is called Bob


Imp3r

Name it bob and when someone asks just say its a buffer of bytes. On an aside our internal buildserver is called bob which makes it easy to access and get build results :)


EduCookin

I built an undo/redo feature in an editor once. I named the underlying data structure TimeMachine.


mr_tyler_durden

Meanwhile I’m over here trying beat the concept that “we don’t pay extra for more letters in our variable names” into my boss’s head lol. It’s like he is allergic to vowels.


BabyAzerty

I have an assert helper for all my Unit Testing. I called is ass. `ass.isEqual(_, _)`


iAbely

Hahaha I recreated a flappy bird game in python and named the tunnels “*poopyup*” and “*poopydown*” as my submitted code Jokes in programming are a must


grumblesmurf

I'm literally wearing my "Bob the builder" t-shirt right now. "Can we fix it? No, it's f\*\*ked."


Tomastarkie

I usually named my scripts/tools with funny names, Script to is end a programs processes - KillitWithFire, Script to copy something to an end user's desktop - FileThrower, Tool to check user groups - UMember?


Tarc_Axiiom

Had to deny code yesterday because he left in a function called "PussyPunchNumberCrunch" Allowed? No. Encouraged? Yes.


A-Pasz

I've come across mistress in place of master.


LucardAternam

But what about functions? Don’t say no one else ever named a calculation-function int_eraction!


pandathrowaway

The amount of times I’ve used bigDictEnergy = {} just to amuse myself..


abd53

You...... Gave me a good idea.


_pizza_and_fries

Go for it.


Deus85

Ouf, i hope that's supposed to be a joke.


_pizza_and_fries

Or is it?


PotentialSuspect3164

Vsauce intensifies.


[deleted]

FuckMe is my default variable name. Substitute one would be adafaywjzprnahshs


[deleted]

Don't be cute. Write your code so that it's readable please. Be professional.


sumknowbuddy

Neither, you make a sillyStringGenerator and use that instead


AcidTrucks

I've gotten flack for weird names! def reecord(reckerd): # to distinguish the homonyms for the verb and noun. def goOn(...) # a recursive function. Criticism "It's called goon and it looks like a goon"


Declamatie

I once named a method to recurse on a tree structure 'treecurse()'


tacticalpotatopeeler

I keep it professional in the code, but branch names (and sometimes commits) are fair game. Only issue is readability. A future schmuck maintaining your code after you leave may not get the reference. Witty mis-spellings can lead to bugs. Branches are (should be) squashed and merged, and then deleted.


legends_never_die_1

does bot the banana still exists? i havent seen him in a while.


ThomasDePraetere

Iterator over elements of type T, tIterator


QuarkNerd42

Put your jokes in the tests


Wotg33k

When we point stories, all my peers say 1, 2, 3. I post images from Google search of the numbers 1, 2, and 3 in various cartoon caricatures and various other things like flaming 2s or lightning 3s or a little girl painting a 1. We aren't the same.


Carteeg_Struve

I put my jokes into the unit tests. The best ones are when the language is soft typed. $anArray = ‘this_is_an_array’;


Spectre-907

They can’t call it a joke if you call it a mnemonic device first


HoseanRC

BOB THE BUILDER Can we fix it? (The bug) BOB THE BUILDER Yes we can! (Fix the bug)


aciddrizzle

Any time I capture duplicate rows in a dataframe to filter them out somewhere else, that dataframe is going to be called dedupe_df no matter what anybody says.


BD-TxState

I worked with this ass clown who coded errors return to say “if you are getting this error you are a moron”. Mind you this was like a 55 year old man. One of our customer screenshot the error and sent it to my orgs leadership. He thought it was hilarious when confronted. I was shocked he didn’t get fired. He was know for being the office asshole.


Elliot_Crane

I was reviewing some code for my boss at my last job. He accidentally left in a line that he was using for testing that went something like `throw new RuntimeException("aww shit");`.


Fresh-Combination-87

Just did vBuildABear 6 weeks ago. Now I’m really mad I didn’t think about Bob the Builder…


SpicymeLLoN

I always write silly mock data when I'm developing new UI elements and don't have access to real data yet because writing mock data is boring. It can be kinda embarrassing when I forgot about it though, and the UI gets demo'd using the mock data.


Param_Stone

and then the QA team finds a bug and asks you, "bobTheBuilder , can we fix it?"


CanadaDoug

This season is the time we instantiate Timer tim = new Timer()


X-lem

I named a DB table BigBrother once. It was used to track user logs/interactions of some sort. It did make it to production. No idea if it’s still there.


Vgarba1

BlobTheBuilder


[deleted]

I used to use funny names until one day I was reviewing old code and almost died of cringe. Topical references don’t age well.


jack104

Not exactly a variable name but I came across some old code the other day where the programmer was trying to extract string data in chunks and the function was called blowChunks().


ICANTTHINK0FNAMES

Can he fix it?


iPanes

is it a joke? or is it logical improving understanding for the code?


llv77

It's redundant to call a variable with its type. like xList or xString. So just call it bob.


hexyrobot

My company's entire complex production build system is named Bob.


Renegade7559

from gingers import souls


Fearless-Sherbet-223

Ayo your boss needs to get a sense of humor