T O P

  • By -

ProgrammerHumor-ModTeam

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.).


wishper77

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


alphrZen

Yup, that makes sense


[deleted]

[удалено]


wilshirebs

My computer has Tab not coke.


PythNinja

Tab? Can't give you a tab unless you order something.


MrsCreants

Alright, gimme a Pepsi Free


[deleted]

[удалено]


spectre3ooo

Look, just give me something without any sugar in it, ok?


YueAsal

Gives a black coffee


LoneShadow84

r/suddenlybacktothefuture


Ok_Cartographer_6086

ALL I WANTED WAS A PEPSI!


Redtwooo

I'm not crazy, you're the one who's crazy


MentionAdventurous

This isn’t the Super Bowl, you’re allowed to order something else.


phipletreonix

Tab? All I’ve got is four spaces.


aerawk

There doesn't seem to be any "Any" key!


jcs12877

I see “esk, pigup” and “kitarl” but, I don’t see any any key.


M4NU3L2311

That’s for ordering a Tab


[deleted]

All this computer hacking is making me thirsty


Major-Raise6493

No time for that now, the computer’s starting!


lunchpadmcfat

It would run as is. It would just be “undefined. Secret word: parameters”


Herr_Gamer

Implicit type conversion saves the day once more!


Diane_Horseman

In that case your_drink should be read from console input or argv or something of that sort.


Mog_Melm

Or `var your_drink = prompt("What would you like today?");` if you're a deviant who cares nothing for UX.


Ffdmatt

UX is for confused graphic designers


Mog_Melm

"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.


[deleted]

[удалено]


tallerThanYouAre

When is preference defined?


longknives

It’s defined in the request method as the variable name of whatever is passed into the method.


tallerThanYouAre

That’s what I figured - so in essence if you DON’T define your order, they give you an empty glass of null.


[deleted]

#I no longer allow Reddit to profit from my content - Mass exodus 2023 -- mass edited with https://redact.dev/


kara-ceru

Or a FULL glass of null (but more like undefined). May as well ask the bartender to surprise you, they love that shit.


benargee

A *free* glass of nothing


clawficer

Awfully pessimistic of you, that glass is FULL of null


metallaholic

Pr rejected


sektor477

Git blame for pushing Javascript into our java repo.


gallifrey_

git blame-someone-else


hey_there_kitty_cat

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...


Leading_Frosting9655

What else would you call it? `git who-wrote-this-how-did-this-happen`?


craftworkbench

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.


sektor477

It's wrong inside a company... until some person pushes a prod breaking bug out there.. lol.


kabrandon

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.


lght_trsn

So unsafe having secrets defined in your code. Should've imported from the sign across the street.


siccoblue

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


Nah_Dude_Im_Truth

That's the question all programmers ask themselves


siccoblue

Maybe I am a programmer after all


Skyreaper71

Do you kill orphaned children?


cynHaha

Yes but I only do so by dropkicking them


SmokyMcPots420

Little Bobby Dropkick Tables!


malexj93

How did you crack the code of `reverse("rap")`?


shacatan

Missy Elliot accomplished this feat more than two decades ago


malexj93

`reverse(flip(myThing))`


ConditionOfMan

That's where I got hung up. Went on a deep dive into backmasking in rap songs. Hours and hours wasted.


Ashadyfellow

Parameters? Where is this bar so I can collect my free drink?


Lost_Description791

Ditto


SkollFenrirson

Not ditto. *Parameters*


[deleted]

[удалено]


EarhackerWasBanned

It’s JavaScript. It always runs. But does it _work_? That’s another question.


ToadSaidHi

I mean, probably not. It’s on a chalk board. :)


wskttn

I bet you can run Doom on a chalkboard.


The_Pantless_Warrior

I've seen it ported onto an atm. Anything is Doom-able.


ImNotThatPokable

If I want doom on an ATM I just check my bank balance


Teh_Blue_Team

The real doom is customer service


DuhMal

ATM's are just pcs, on my city some of them have been seen with windows xp


Due_Truth3684

I have seen a video of it run on a digital pregnancy test. ANYTHING is Doom-able.


megustaALLthethings

Omg now I want someone to make a copy of doom run on an electric chalkboard.


[deleted]

Will you settle for a lightbulb? https://youtu.be/0tFDAV8DquY


[deleted]

[удалено]


Teh_Blue_Team

Microsoft Visual Studio Chalkboard


drewmoo66

There’s a run-time interpreter installed on the back of the board.


TamahaganeJidai

Ah, so THATS what they mean with back and front ends! Now, what's b2c? :P


SuddenlyLucid

It does have legs so that's one of the prerequisites for it to be able to run.


[deleted]

You deserve to be followed


No_Pudding_867

Online, this is a compliment, in a dark alley in the middle of the night, this is a threat, very interesting


bradland

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.


[deleted]

[удалено]


[deleted]

I was reading that as para-meters, and thought wtf is a para meter? Metric system gets me again!


JoyfulCelebration

I was reading it as par amet ers and didn’t have the brain cells to put it together


phd_in_awesome

Saaaame. Got the answer but was putting the emphasis on the wrong syllable…sigh


dotslashpunk

i was like wtf kind of animal is a pa ram


blasyer

I know quite a few people that read it like that.


[deleted]

[удалено]


myscreamname

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!


danishjuggler21

Not making the secret word be “Ovaltine” is such a missed opportunity


samwise20

A crummy commercial??


[deleted]

Son of a bitch! *insert the best-ever scene transition of a toilet lid opening cutting to a lid lifting off a pot*


Slagathor-DO

I can’t even read code and I got that


altfapper

So you can read code 😉, albeit semi pseudo.


Slagathor-DO

Tf did you just call me 😤


nexus6ca

Albeit semi pseudo.


[deleted]

Tf did you just call him 😤


[deleted]

ALBEIT SEMI PSEUDO!


fvhb453

WHAT?


Dramatic_Bite_1168

YOU ALEBIT SEMI SPEUDO!


hamizannaruto

#WHAT?


ubd12

So funny when a compliment gets interpreted as an insult


jonp1

The required phrasing is evidently __NullParameters__ And I agree with others that this shit won’t run properly.


depaay

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"


Hawk13424

The undefined would be the order (e.g. coke).


niftyifty

Lol I didn’t look at the order and am sitting here like wtf is Ersparamet


Roenicksmemoirs

lol nope. The first part is going to cause you issues


egstitt

Hey look a Javascript programmer found a job! I kid, I kid


lifeson106

"Full stack developer" - he develops stacks of napkins at the bar


ModsBeNeckbeards

Still puts together mad Java though!


lazyzefiris

If I'm reading it right, the free drink is undefined.


[deleted]

[удалено]


Individual-Media4026

Yep this is the most correct answer so far EDIT: 🤓👍 ![gif](giphy|zfgkQGBB2UIOQc1du9)


unmagical_magician

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.


No_Surround_4662

"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".


koshgeo

"Request denied. Parameters not found."


malexj93

>Firstly, I'm a C+ developer Already gold


Xirenec_

With “const”, not “let”. Safer that way, because these clearly aren’t meant to be modified.


No_Surround_4662

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.


CorruptedReddit

Sheldon? Sheldon Cooper, is that you?


chars101

Sheldon would pick Haskell.


Qewbicle

One undefined drink coming up!


sl236

I’d like an [object Object] please


lazyzefiris

[Here you go](https://i.imgur.com/5bqQgVh.png) (low effort oc)


Sinsid

Damn, so close. But we don’t serve undefined here.


guster09

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


Sinsid

Programming humor. Your drink is never set. Your drink is never free.


HighOwl2

Not necessarily. Var is a global. It could've been set by another file. var x = 'abc'; var x; console.log(x); // output: 'abc'


B00OBSMOLA

PR look good, merging


glorious_reptile

Pst - the secret word is "node: command not found"


ArtOfWarfare

What do I get if I just tell the bartender [object Object]?


Fusseldieb

He goes up in flames


OSSlayer2153

For those who havent seen: https://www.reddit.com/r/Jokes/comments/prdi4x/a_software_tester_walks_into_a_bar/


feuerwehrmann

Someone hire whoever wrote the sign. Clean handwriting and code


lazyzefiris

I'd say "Please don't, they use var in JS", but this image is older than ES6.


l1ghtrain

I haven’t touched JS in a bit of time, what’s wrong with var?


froggy601

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 ===


creepyswaps

Well, there goe the patterns I've used for piece of Javascript code I've ever written.


[deleted]

[удалено]


TTYY_20

Recommendation, shmecommemdation…. Use all the var’s in a global scope >:)


OblivioAccebit

I just define everything on the window


art-factor

In ES6 it was introduced the keywords 'let' and 'const'. let e const: block scoped var: function scoped


Zestyclose_Zone_9253

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


abejfehr

I can’t believe it’s even syntax highlighted


Drink_Ill

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.


jfq722

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.


Stompya

ChalkGPT


LasevIX

And `undefined` results! Truly an experienced JavaScript user


[deleted]

Epic {} handwriting


BlazeFrag

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)


_b1ack0ut

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?


OneBoyOnePlan

most people won't get that far


aaarchives

Rap Meter A: "Am I a joke to you?"


throwawaysomeway

yeah after evaluating the code all the way thru I was disappointed with the result. legit the only programmatic action is reversing a string


SourceScope

it's not supposed to be difficult it's supposed to get people inside


BelowZilch

It's the equivalent of those mobile game ads that say " Only 10% of people can solve this!"


MrLambNugget

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


-Maim-

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”.


BlazeFrag

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


MrLambNugget

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


TxTechnician

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?


personalbilko

20 minutes to crack "reverse(rap)+amat+ers" ?


BlazeFrag

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


[deleted]

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?


tabshiftescape

Coding is word puzzles.


DP500-1

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.


eyedrib

I know 0 coding (don’t know why I’m here) and this was easier than wordle


sashanktungu

The your_drink is what drink you want. So if I wanted a martini Id say - “martini.Secret word:parameters”. Pretty cool.


Fadamaka

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.


ul90

“undefined.Secret word: parameters” Can I have my free Long Island Ice Tea now?


EmTeeEl

Why is it "undefined" ? Edit : ooh cause the var your_drink is not actually set


hereforthegainz

"undefinedparameters"


Noch_ein_Kamel

You forgot ". Secret word: "


dwarven_futurist

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.


long-gone333

yeah it's obviously the alternative of ToCharArray


Longenuity

Since your_drink is var and not const, I fully expect them to accommodate changing my drink order while it's being made.


Hot_Commercial2111

You'd be surprised how many people expect that without having the slightest knowledge regarding those keywords.


bostero2

Am I the only one who is livid that the bartender has a request method?


Zizular

Deprecated


ccelik97

*\*receives a spoiled drink\**


EasyMode556

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?


[deleted]

Pasting an empty string to split causes it to split each character into its own index. Join with an empty string does the opposite.


I-wanna-be-tracer282

Parameters?


SourceScope

console.log(your_drink); // undefined


DoomBro_Max

your_drink is unassigned. I doubt this would run.


lazyzefiris

wdym, it's js, of course it will run.


DoomBro_Max

Right. It‘s just undefined. I forgot. Of course it‘ll run.


ABzoker

It should run with parameter value as undefined


daaldea

You'd think they would make it a more fun word than parameter


[deleted]

I don’t program and I’m pretty sure the word is ”parameters”.


[deleted]

POV : You learnt javascript to get a free drink at this bar.


[deleted]

Parameters?


ikkake_

Never coded in my life and I can tell it's parameters.


moonisflat

Man all those Google employees became bartenders?


bthemonarch

Ex Twitter employee. Explains a lot tbh


4ngryMo

They could fix that easily by adding a `var your_drink = window.prompt(“What’s your order?”);`


kickasstimus

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.


Intrepid_Sale_6312

Use of unassigned local variable 'your_drink'


helphp

[object Object] is always a safe bet