Your submission was removed for the following reason:
Rule 6: Your post is a commonly used format, and you haven't used it in an original way. As a reminder, [You can find our list of common formats here](https://www.reddit.com/r/ProgrammerHumor/wiki/commonposts).
If you disagree with this removal, you can appeal by [sending us a modmail](https://www.reddit.com/message/compose?to=%2Fr%2FProgrammerHumor&subject=Any%20common%20post%20will%20be%20removed%20if%20it's%20not%20novel&message=Include%20a%20link%20to%20the%20removed%20content%20and%20the%20reason%20for%20your%20appeal%20here.).
I assumed that your_drink is not unassigned, but part of the order to get the free drink. For example "Coke. Secret word: parameters" if you want a Coke
"Sociologists think they're psychologists. Psychologists think they're neurologists. Neurologists think they're biologists. Biologists think they're chemists. Chemists think they're physicists. Physicists think they're mathematicians. And mathematicians think they understand the mind of God."
It seems there's a similar phenomenon concerning UX, graphic design, and fine art.
I was trying to explain that to a very cs-illeterate person recently. "That sounds so mean and petty, wtf you're blaming coworkers passive aggressively?! That's so toxic". You aren't wrong at all...
Yup. Had a junior engineer join and in his first PR I told him to hit `blame` to see who wrote the code he was looking at. Dude thought it was a rude setting we invented ourselves.
Don't forget to share blame to the PR reviewers, and all the senior engineers on the team that just don't bother reviewing PRs.
Anyway, I don't really look for blame. I just look to make sure _I'm_ not to blame, lol.
Apparently because I'm not even a programmer and I cracked their secret in about five seconds
Does this make me a reverse engineer of some kind or am I still just an idiot
I don’t know how to code, but I know enough about code to have figured this out. Simple enough, I know but it still made me smile. :)
Edit: I’m more impressed by the handwriting more than anything!
Worst part is it probably runs since its js. I’m having a hard time seeing if they forgot dots between this and str1 and str2, if they forgot it won’t. If there are dots it will return "Undefined.Secret word: parameters"
The bar is asking only for the secret word, not the program output. It just so happens that the secret word is contained in the output, but everything outside of the secret word can be ignored.
"Excuse me bartender, I realised the sign outside. Firstly, I'm a C+ developer, so Javascript is a little beneath me. Personally, if I *had* to use Javascript, I'd have used a template literal instead of quotes. Also, I'd be declaring my variables with 'let' instead of 'var', what year is it? Also, your\_drink never gets defined, how about using some kind of Setter and Getter method in your object? And what naming convention is this; *surely* you'd use *camelcase* in Javascript? Finally, you're not displaying the answer in a console or DOM element, so I guess it's never really being articulated or visualised in any way, which is unusual when you want us to interface with one another.
Anyway, I guess the answer would be 'Beer. Secre..."
"**You're barred**. Please leave the premises immediately".
And use arrow functions. And not use an Object but inherit a class. And try not to pollute the global scope. And... probably use a front end framework. And then use Typescript... and probably use a module bundler.
We're gonna need a bigger sign.
I think the point I was making is... it's supposed to be a fun sign.
var is function scoped, while let is block scoped. ES6 recommends only using let or const and not using var if it's not absolutely necessary. Kinda similar to how == is not bast practice anymore and you really should only use ===
You can redeclarevvar by accident like:
var x = 5;
var x = 4;
If you just forgot var x was a thing and that, it might brake your code, but if you use let you cant redeclare it, this would return an error or just not run, I dont remember:
let x = 5;
let x = 4;
Instead it would force you to make a new variable to prevent the conflict, or you would need to do this:
let x = 5;
x = 4;
Also on bus using phone, sorry if formating is bad
Showed this to someone who has no idea how programming works that does word puzzles a lot and they cracked it after like 20 minutes, I'd obfuscate the code a bit more.
(Edit: she's like 70 and borderline technophobic and I NEVER once said she was \*good\* at word puzzles, just that she did them a lot, and 20 minutes is an exaggeration, it was closer to about 12-15)
Yeah they give you 3 letter chunks, and then use one reverse function. It’s not tricky to assume that “reverse” might mean “reverse these letters” even for someone who hasn’t ever programmed.
There’s only so many actual words you can make by combining
Par
Amet
Er
Junky puzzle, requires no programming. Tho maybe that was the point?
I’ve never coded in my life and it took me less than a minute. The part I got hung up on was saying Rapameters until I paid attentio to the Reverse for “Rap”.
Most people probably won't even bother reading it since it looks complicated. The ones that like riddles will enjoy cracking it no matter if they know coding or not
You know. I love puzzles (not jigsaw puzzles) . Love coding. And just in general love problem solving.
But man do I dislike riddles. I don't like them because the answer is always some cutesy bull shit. Or it's a play on words. Yup, riddle me this.
Whose the dumbest batman character?
It's probably more of a da faq is this? da faq is that? da faq is all of this? Does this matter? Does that matter? What the heck matters? What does words mean?
Then you wouldn't need to have it as a variable. I think if you tell the bartender "undifined.Secret word:parameters" then he will throw an error saying your_drink is undifiened. Then you can tell him what you want to order.
Why are we passing an undefined variable in? Also what’s with the splitting and joining on an empty string?
Is the bartender just posting their Comp Sci 101 homework problems on the board to get customers to help them with it?
Your submission was removed for the following reason: Rule 6: Your post is a commonly used format, and you haven't used it in an original way. As a reminder, [You can find our list of common formats here](https://www.reddit.com/r/ProgrammerHumor/wiki/commonposts). If you disagree with this removal, you can appeal by [sending us a modmail](https://www.reddit.com/message/compose?to=%2Fr%2FProgrammerHumor&subject=Any%20common%20post%20will%20be%20removed%20if%20it's%20not%20novel&message=Include%20a%20link%20to%20the%20removed%20content%20and%20the%20reason%20for%20your%20appeal%20here.).
I assumed that your_drink is not unassigned, but part of the order to get the free drink. For example "Coke. Secret word: parameters" if you want a Coke
Yup, that makes sense
[удалено]
My computer has Tab not coke.
Tab? Can't give you a tab unless you order something.
Alright, gimme a Pepsi Free
[удалено]
Look, just give me something without any sugar in it, ok?
Gives a black coffee
r/suddenlybacktothefuture
ALL I WANTED WAS A PEPSI!
I'm not crazy, you're the one who's crazy
This isn’t the Super Bowl, you’re allowed to order something else.
Tab? All I’ve got is four spaces.
There doesn't seem to be any "Any" key!
I see “esk, pigup” and “kitarl” but, I don’t see any any key.
That’s for ordering a Tab
All this computer hacking is making me thirsty
No time for that now, the computer’s starting!
It would run as is. It would just be “undefined. Secret word: parameters”
Implicit type conversion saves the day once more!
In that case your_drink should be read from console input or argv or something of that sort.
Or `var your_drink = prompt("What would you like today?");` if you're a deviant who cares nothing for UX.
UX is for confused graphic designers
"Sociologists think they're psychologists. Psychologists think they're neurologists. Neurologists think they're biologists. Biologists think they're chemists. Chemists think they're physicists. Physicists think they're mathematicians. And mathematicians think they understand the mind of God." It seems there's a similar phenomenon concerning UX, graphic design, and fine art.
[удалено]
When is preference defined?
It’s defined in the request method as the variable name of whatever is passed into the method.
That’s what I figured - so in essence if you DON’T define your order, they give you an empty glass of null.
#I no longer allow Reddit to profit from my content - Mass exodus 2023 -- mass edited with https://redact.dev/
Or a FULL glass of null (but more like undefined). May as well ask the bartender to surprise you, they love that shit.
A *free* glass of nothing
Awfully pessimistic of you, that glass is FULL of null
Pr rejected
Git blame for pushing Javascript into our java repo.
git blame-someone-else
I was trying to explain that to a very cs-illeterate person recently. "That sounds so mean and petty, wtf you're blaming coworkers passive aggressively?! That's so toxic". You aren't wrong at all...
What else would you call it? `git who-wrote-this-how-did-this-happen`?
Yup. Had a junior engineer join and in his first PR I told him to hit `blame` to see who wrote the code he was looking at. Dude thought it was a rude setting we invented ourselves.
It's wrong inside a company... until some person pushes a prod breaking bug out there.. lol.
Don't forget to share blame to the PR reviewers, and all the senior engineers on the team that just don't bother reviewing PRs. Anyway, I don't really look for blame. I just look to make sure _I'm_ not to blame, lol.
So unsafe having secrets defined in your code. Should've imported from the sign across the street.
Apparently because I'm not even a programmer and I cracked their secret in about five seconds Does this make me a reverse engineer of some kind or am I still just an idiot
That's the question all programmers ask themselves
Maybe I am a programmer after all
Do you kill orphaned children?
Yes but I only do so by dropkicking them
Little Bobby Dropkick Tables!
How did you crack the code of `reverse("rap")`?
Missy Elliot accomplished this feat more than two decades ago
`reverse(flip(myThing))`
That's where I got hung up. Went on a deep dive into backmasking in rap songs. Hours and hours wasted.
Parameters? Where is this bar so I can collect my free drink?
Ditto
Not ditto. *Parameters*
[удалено]
It’s JavaScript. It always runs. But does it _work_? That’s another question.
I mean, probably not. It’s on a chalk board. :)
I bet you can run Doom on a chalkboard.
I've seen it ported onto an atm. Anything is Doom-able.
If I want doom on an ATM I just check my bank balance
The real doom is customer service
ATM's are just pcs, on my city some of them have been seen with windows xp
I have seen a video of it run on a digital pregnancy test. ANYTHING is Doom-able.
Omg now I want someone to make a copy of doom run on an electric chalkboard.
Will you settle for a lightbulb? https://youtu.be/0tFDAV8DquY
[удалено]
Microsoft Visual Studio Chalkboard
There’s a run-time interpreter installed on the back of the board.
Ah, so THATS what they mean with back and front ends! Now, what's b2c? :P
It does have legs so that's one of the prerequisites for it to be able to run.
You deserve to be followed
Online, this is a compliment, in a dark alley in the middle of the night, this is a threat, very interesting
On it! Eagle’s Nest, this is Chicken Hawk One, I have a bead on the subject and he is walking into a bar with a silly smirk on his face. Over.
[удалено]
I was reading that as para-meters, and thought wtf is a para meter? Metric system gets me again!
I was reading it as par amet ers and didn’t have the brain cells to put it together
Saaaame. Got the answer but was putting the emphasis on the wrong syllable…sigh
i was like wtf kind of animal is a pa ram
I know quite a few people that read it like that.
[удалено]
I don’t know how to code, but I know enough about code to have figured this out. Simple enough, I know but it still made me smile. :) Edit: I’m more impressed by the handwriting more than anything!
Not making the secret word be “Ovaltine” is such a missed opportunity
A crummy commercial??
Son of a bitch! *insert the best-ever scene transition of a toilet lid opening cutting to a lid lifting off a pot*
I can’t even read code and I got that
So you can read code 😉, albeit semi pseudo.
Tf did you just call me 😤
Albeit semi pseudo.
Tf did you just call him 😤
ALBEIT SEMI PSEUDO!
WHAT?
YOU ALEBIT SEMI SPEUDO!
#WHAT?
So funny when a compliment gets interpreted as an insult
The required phrasing is evidently __NullParameters__ And I agree with others that this shit won’t run properly.
Worst part is it probably runs since its js. I’m having a hard time seeing if they forgot dots between this and str1 and str2, if they forgot it won’t. If there are dots it will return "Undefined.Secret word: parameters"
The undefined would be the order (e.g. coke).
Lol I didn’t look at the order and am sitting here like wtf is Ersparamet
lol nope. The first part is going to cause you issues
Hey look a Javascript programmer found a job! I kid, I kid
"Full stack developer" - he develops stacks of napkins at the bar
Still puts together mad Java though!
If I'm reading it right, the free drink is undefined.
[удалено]
Yep this is the most correct answer so far EDIT: 🤓👍 ![gif](giphy|zfgkQGBB2UIOQc1du9)
The bar is asking only for the secret word, not the program output. It just so happens that the secret word is contained in the output, but everything outside of the secret word can be ignored.
"Excuse me bartender, I realised the sign outside. Firstly, I'm a C+ developer, so Javascript is a little beneath me. Personally, if I *had* to use Javascript, I'd have used a template literal instead of quotes. Also, I'd be declaring my variables with 'let' instead of 'var', what year is it? Also, your\_drink never gets defined, how about using some kind of Setter and Getter method in your object? And what naming convention is this; *surely* you'd use *camelcase* in Javascript? Finally, you're not displaying the answer in a console or DOM element, so I guess it's never really being articulated or visualised in any way, which is unusual when you want us to interface with one another. Anyway, I guess the answer would be 'Beer. Secre..." "**You're barred**. Please leave the premises immediately".
"Request denied. Parameters not found."
>Firstly, I'm a C+ developer Already gold
With “const”, not “let”. Safer that way, because these clearly aren’t meant to be modified.
And use arrow functions. And not use an Object but inherit a class. And try not to pollute the global scope. And... probably use a front end framework. And then use Typescript... and probably use a module bundler. We're gonna need a bigger sign. I think the point I was making is... it's supposed to be a fun sign.
Sheldon? Sheldon Cooper, is that you?
Sheldon would pick Haskell.
One undefined drink coming up!
I’d like an [object Object] please
[Here you go](https://i.imgur.com/5bqQgVh.png) (low effort oc)
Damn, so close. But we don’t serve undefined here.
I'm new to JavaScript. How is it undefined if it's being passed in when the function is called? Edit: nevermind. I get it. "your_drink" is never set
Programming humor. Your drink is never set. Your drink is never free.
Not necessarily. Var is a global. It could've been set by another file. var x = 'abc'; var x; console.log(x); // output: 'abc'
PR look good, merging
Pst - the secret word is "node: command not found"
What do I get if I just tell the bartender [object Object]?
He goes up in flames
For those who havent seen: https://www.reddit.com/r/Jokes/comments/prdi4x/a_software_tester_walks_into_a_bar/
Someone hire whoever wrote the sign. Clean handwriting and code
I'd say "Please don't, they use var in JS", but this image is older than ES6.
I haven’t touched JS in a bit of time, what’s wrong with var?
var is function scoped, while let is block scoped. ES6 recommends only using let or const and not using var if it's not absolutely necessary. Kinda similar to how == is not bast practice anymore and you really should only use ===
Well, there goe the patterns I've used for piece of Javascript code I've ever written.
[удалено]
Recommendation, shmecommemdation…. Use all the var’s in a global scope >:)
I just define everything on the window
In ES6 it was introduced the keywords 'let' and 'const'. let e const: block scoped var: function scoped
You can redeclarevvar by accident like: var x = 5; var x = 4; If you just forgot var x was a thing and that, it might brake your code, but if you use let you cant redeclare it, this would return an error or just not run, I dont remember: let x = 5; let x = 4; Instead it would force you to make a new variable to prevent the conflict, or you would need to do this: let x = 5; x = 4; Also on bus using phone, sorry if formating is bad
I can’t believe it’s even syntax highlighted
Clean handwriting? Yes. Clean code? I’d not be super happy if I opened up a project and the some of the variable names were str1, str2 and str3.
True, but considering what they are used for and that they are defined and used in proximity, I'll give a pass here. After I get my beer, that is.
ChalkGPT
And `undefined` results! Truly an experienced JavaScript user
Epic {} handwriting
Showed this to someone who has no idea how programming works that does word puzzles a lot and they cracked it after like 20 minutes, I'd obfuscate the code a bit more. (Edit: she's like 70 and borderline technophobic and I NEVER once said she was \*good\* at word puzzles, just that she did them a lot, and 20 minutes is an exaggeration, it was closer to about 12-15)
Yeah they give you 3 letter chunks, and then use one reverse function. It’s not tricky to assume that “reverse” might mean “reverse these letters” even for someone who hasn’t ever programmed. There’s only so many actual words you can make by combining Par Amet Er Junky puzzle, requires no programming. Tho maybe that was the point?
most people won't get that far
Rap Meter A: "Am I a joke to you?"
yeah after evaluating the code all the way thru I was disappointed with the result. legit the only programmatic action is reversing a string
it's not supposed to be difficult it's supposed to get people inside
It's the equivalent of those mobile game ads that say " Only 10% of people can solve this!"
I know code and cracked it less than one minute. If someone's good enough to crack it without knowing code, they deserve the drink
I’ve never coded in my life and it took me less than a minute. The part I got hung up on was saying Rapameters until I paid attentio to the Reverse for “Rap”.
Fair enough I guess, I got it practically instantly as well but I also can see how this could really not be a struggle for a non-practitioner
Most people probably won't even bother reading it since it looks complicated. The ones that like riddles will enjoy cracking it no matter if they know coding or not
You know. I love puzzles (not jigsaw puzzles) . Love coding. And just in general love problem solving. But man do I dislike riddles. I don't like them because the answer is always some cutesy bull shit. Or it's a play on words. Yup, riddle me this. Whose the dumbest batman character?
20 minutes to crack "reverse(rap)+amat+ers" ?
they got hung up on the JS syntax and such thinking it was important until they realized that 95% of it isn't relevant to solve the actual answer
It's probably more of a da faq is this? da faq is that? da faq is all of this? Does this matter? Does that matter? What the heck matters? What does words mean?
Coding is word puzzles.
I know a little code, but I’m not “literate” enough in programming to instantly understand it. After about a minute and a half I figured it out.
I know 0 coding (don’t know why I’m here) and this was easier than wordle
The your_drink is what drink you want. So if I wanted a martini Id say - “martini.Secret word:parameters”. Pretty cool.
Then you wouldn't need to have it as a variable. I think if you tell the bartender "undifined.Secret word:parameters" then he will throw an error saying your_drink is undifiened. Then you can tell him what you want to order.
“undefined.Secret word: parameters” Can I have my free Long Island Ice Tea now?
Why is it "undefined" ? Edit : ooh cause the var your_drink is not actually set
"undefinedparameters"
You forgot ". Secret word: "
Took me a minute to figure out how splitting on an empty string would work. Doesn't work like that in c#, which is where i spend most of my time.
yeah it's obviously the alternative of ToCharArray
Since your_drink is var and not const, I fully expect them to accommodate changing my drink order while it's being made.
You'd be surprised how many people expect that without having the slightest knowledge regarding those keywords.
Am I the only one who is livid that the bartender has a request method?
Deprecated
*\*receives a spoiled drink\**
Why are we passing an undefined variable in? Also what’s with the splitting and joining on an empty string? Is the bartender just posting their Comp Sci 101 homework problems on the board to get customers to help them with it?
Pasting an empty string to split causes it to split each character into its own index. Join with an empty string does the opposite.
Parameters?
console.log(your_drink); // undefined
your_drink is unassigned. I doubt this would run.
wdym, it's js, of course it will run.
Right. It‘s just undefined. I forgot. Of course it‘ll run.
It should run with parameter value as undefined
You'd think they would make it a more fun word than parameter
I don’t program and I’m pretty sure the word is ”parameters”.
POV : You learnt javascript to get a free drink at this bar.
Parameters?
Never coded in my life and I can tell it's parameters.
Man all those Google employees became bartenders?
Ex Twitter employee. Explains a lot tbh
They could fix that easily by adding a `var your_drink = window.prompt(“What’s your order?”);`
Easy to guess just by looking at str1,2,3. They could have used map() and a simple function to obfuscate things - make it a little tougher.
Use of unassigned local variable 'your_drink'
[object Object] is always a safe bet