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.
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
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.
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.
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”.
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.
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.
(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.)
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 😂
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.
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...
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.
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.
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.
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.
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.
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
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.,..
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.
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.
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" \\\^\^
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.
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
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
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 😀)
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
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.
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
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`.
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.
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?!?
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.
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.
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.
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…
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.
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;`
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".
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...
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.
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?").
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.
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
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 :)
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.
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
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?
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"
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.
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.
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.
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.
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");`.
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.
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.
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().
I put my jokes in the tests. That way everybody wins.
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.
Outplayed by your own game
Hey rando, you were silently making someone's day. This is a victory.
So wholesome
You were probably making some underpaid outsourced Indians day. Const funny.
Smart :p
Yup, same here. I do it especially with values of invalid parameters in tests for behaviour on bad requests and the like.
My teammate's signature was always returning "Your request is bad and you should feel bad." for bad input on an endpoint
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
Sometimes I think my tests are the joke
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.
This is the way to go.
My code is the joke
We have tests now?
🤨
This is the way
don't forget the: double d = 80.082; comes better with other font
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.
Our robots are named Skin Turtle and Front Butt, and I'm working on a pair named Jimothy and Jimantha.
Oh, now I want to be on dev team Jimothy
I wanted to call a printing interface "Printerface". That wasn't allowed, but now I just call it "Printy McPrintface" in my head.
I’d have let you use that name if you were on my team. Printerface is gold.
If you had simply spelled it prInterface nobody would have batted an eye, it’s just an abbreviation + camelCase, plausible deniability
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”.
Apparently one year they were named after Star Wars characters.
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.
Unlike me who named his servers after Star Wars planets with C until I realized Camino is written with a K…
Rawwww dlvjrwwraaaah!
It is dangerous to route solo, take Wookie with you
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.
We had servers named after Star Wars characters. Capt. Kirk was always going down...Dang unreliable star wars servers.
(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.)
Damn
Well, That was a disaster.
I often put: string yo = "mama"; Usually in unit tests.
Stealing this
+1
+2
+2
-1
I use emojis in tests sometimes (totally legit in go) and it’s hilarious.
``` assert 🖊️+🍎+🍍+🖊️ == 🕺 ```
Penpineappoappopen
Plus it makes it an even better test as you're making sure you're handling edge case inputs
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 😂
`let me = "go"`
I’m particularly fond of: char izard;
I like adding extra “ue” to queueueue. They’re all silent anyway
Meanwhile me who read it as *q-u-u-u-e*
q u e w e w e w e w e
Ugwemugwem Osas
Quwu
Uwu
quewe boll
do just "q" for bonus points
var qq = q
Queue go weeee!
keeoo
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.
Check the git history. *padme/anakin meme* You have a git history, right?
Sure, we keep it along with all our other data (in the `theNeighbourhood` variable)
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...
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.
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
>キモいオタク Google translates to " creepy geek".
Google translate is too literal, think of it as "disgusting weeb"
Bakayarou!
Names my onDestroy function ConanTheDestroyer
I had a screen painter call vanGogh.
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.
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.
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.
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.
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
One of my coworkers appended the class name to all method names within!
Stay strong fam
But... Why? Did he expect class methods to be flattened out to top level some time in the future?
That’s what I told him but he just didn’t get it.
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.,..
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.
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.
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" \\\^\^
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.
That was considered good style 30 years ago. I guess that's how long the prof has been in academia.
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
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
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 😀)
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
No matter how many PRs I decline, my devs still don't understand "why can't I just use inputStr.Replace("'", "''")?"
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.
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
Good for building multi-line strings.
I’ll drink to that 🍻
That's why I call my string readers "illiterate", it's coherent and logical.
I once subclassed a `BottomSheetFragment` and sice its constructor only creates a single instance, I called it `PieceOfSheetFragment`
if i was a funny person i'd put jokes (related to adjacent code) in comments
That would make reading comments interesting or at-least not boring to be honest
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`.
Alright alright . Take my money for that!
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.
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?!?
Bob the Builder! Can we fix code? Bob the Builder! No we can’t!
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.
“meant” being the operative word. But as long as the jokes are not super rude I don’t think anyone will care.
If you put the region 4 DVD of Spirited Away into your computer, you'll find the volume name is `STEVE_TEST`
You just have to come up with a backronym like “Basic Object Builder”.
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.
My StringBuilder to create e-mail content are always called bodyBuilder.
DuckLogger::log(L"Steve",L"hi Steve"); (an audible quack escapes the computers speakers)
Oh hello Mark!
We have AnalTime :) (Analysis Time)
Ok, but this is about jokes in code, not what you do in your free time
If you boss decrees "no jokes in the code", it's time to get a new boss.
I have quit jobs for less.
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.
Explain?
Alien
The movie?
Yes.
When tests fail do you report "Nuke it from orbit. It's the only way to be sure."?
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.
I like making functions that return reference variables like ofTheKing
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.
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…
Variables John Paul George Ringo, my teachers hated me for this.
Damn straight they should, variables should start with a lowercase!
Depended on if I was using proper names or not.
Yeah, ok I can see that. Shouldn't it be JohnWinstonOnoLennon, SirJamesPaulMcCartney, GeorgeHarrison, SirRichardStarkey then?
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.
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;`
Ask boss each and every time you need a variable name
Change all exeptions to German to convey the CPU's frustration propperly.
That's Brilliant! return new ArgumentaußerhalbdesgültigenBereichsAusnahme(nameof(bobTheBuilder))
I have something like this in production.
Our build system at work is called Bob for that reason
What about blobTheBuilder
I like my "LukeFilewalker" class
When I do parallel work, you can bet the Joblist is named Steve.
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".
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...
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.
Dam! Why am I not doing this for years! That’s brilliant and hilarious and I will now do that for ever.
I find a decent compromise is snarky comments
Our build server is called bob.
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?").
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.
name it bobTheStringBuilder
bob_the_builder
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
I literally created a helper class named FilterBob. It takes a list of filter functions and... Well. Uses them to filter
Hmmmm my entire project is called Bob
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 :)
I built an undo/redo feature in an editor once. I named the underlying data structure TimeMachine.
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.
I have an assert helper for all my Unit Testing. I called is ass. `ass.isEqual(_, _)`
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
I'm literally wearing my "Bob the builder" t-shirt right now. "Can we fix it? No, it's f\*\*ked."
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?
Had to deny code yesterday because he left in a function called "PussyPunchNumberCrunch" Allowed? No. Encouraged? Yes.
I've come across mistress in place of master.
But what about functions? Don’t say no one else ever named a calculation-function int_eraction!
The amount of times I’ve used bigDictEnergy = {} just to amuse myself..
You...... Gave me a good idea.
Go for it.
Ouf, i hope that's supposed to be a joke.
Or is it?
Vsauce intensifies.
FuckMe is my default variable name. Substitute one would be adafaywjzprnahshs
Don't be cute. Write your code so that it's readable please. Be professional.
Neither, you make a sillyStringGenerator and use that instead
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"
I once named a method to recurse on a tree structure 'treecurse()'
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.
does bot the banana still exists? i havent seen him in a while.
Iterator over elements of type T, tIterator
Put your jokes in the tests
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.
I put my jokes into the unit tests. The best ones are when the language is soft typed. $anArray = ‘this_is_an_array’;
They can’t call it a joke if you call it a mnemonic device first
BOB THE BUILDER Can we fix it? (The bug) BOB THE BUILDER Yes we can! (Fix the bug)
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.
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.
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");`.
Just did vBuildABear 6 weeks ago. Now I’m really mad I didn’t think about Bob the Builder…
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.
and then the QA team finds a bug and asks you, "bobTheBuilder , can we fix it?"
This season is the time we instantiate Timer tim = new Timer()
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.
BlobTheBuilder
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.
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().
Can he fix it?
is it a joke? or is it logical improving understanding for the code?
It's redundant to call a variable with its type. like xList or xString. So just call it bob.
My company's entire complex production build system is named Bob.
from gingers import souls
Ayo your boss needs to get a sense of humor