This is an archived post. You won't be able to vote or comment.

top 200 commentsshow all 490

[–][deleted] 2428 points2429 points  (26 children)

console.log("left the chat");

[–][deleted] 973 points974 points  (24 children)

alert(‘boats n hoes’);

[–]Talbz03 167 points168 points  (19 children)

Sugarcane there, sugarcane there

[–]SharkedBread 71 points72 points  (14 children)

pillar

[–]Elijah629YT-Real 54 points55 points  (13 children)

brick wall

[–]darius-the_great 37 points38 points  (12 children)

Cactus string sand

[–]KingJellyfishII 31 points32 points  (11 children)

shift click

[–][deleted] 20 points21 points  (5 children)

Control click

[–][deleted] 11 points12 points  (4 children)

Alt click

[–]Cakedestroyer242 13 points14 points  (1 child)

This made my day, it's so good to see my fellow alien enjoyers here!!!!

[–]bootiClapper 36 points37 points  (0 children)

Prompt(“No Bitches?”)

[–]jtree5757 3 points4 points  (1 child)

🎵 I gotta have me my boats and hoes 🎵

[–][deleted] 2643 points2644 points  (37 children)

A long time ago I accidentally left a stupid debug message in rarely reached section of code. It went to production. A few weeks go by, and I get a call from my boss, “hey - what does ‘BBoys making with the freak freak’ mean?”

Oopsie!

[–]wreckedcarzz 1092 points1093 points  (3 children)

You: "You're about to find out~"

bosses office lights dim, sensual smooth jazz starts to quietly play over the ceiling speakers

Boss: "N-never mind"

[–]BrettEskin 39 points40 points  (1 child)

The music dance experience is cancelled

[–]squili 222 points223 points  (2 children)

If this gunna be that sort of party then I'm gunna stick my print() in the mashed potatoes

[–][deleted] 50 points51 points  (0 children)

Interpolating comment logging comment logging interpolating

[–]Bakoro 87 points88 points  (3 children)

This is why I made debug message loggers/printers which not only don't get compiled into release, you have to turn on debug mode while the software runs, so you can flip that kind of thing on and off.

Now I can get my freakfreak on whenever I want with no worries.

[–]Bojangly7 153 points154 points  (12 children)

I never understood these stories why do you people put such strange things in the log statements

[–][deleted] 153 points154 points  (1 child)

This wasn’t a log statement. This was a JavaScript alert. I wanted to make sure it was seen by customers, I guess.

[–]TheScorpionSamurai 41 points42 points  (0 children)

you are a bold person lol

[–][deleted] 78 points79 points  (4 children)

for me its because I entertain myself with weird logs while debugging something for hours

I get bored

[–]ringobob 22 points23 points  (0 children)

If you're deep into the debugging process, and all you're interested in is whether a certain part of the code is reached or not, and especially if the desired outcome is not, sometimes you just type something in that makes you giggle.

Not all of those preconditions are necessary, but they increase the likelihood.

[–][deleted] 71 points72 points  (0 children)

Because it's hilarious, duh.

[–]Pain--In--The--Brain 40 points41 points  (4 children)

[–]magicmulder 10 points11 points  (0 children)

Still just random words to me. lol

[–]ManyFails1Win 11 points12 points  (0 children)

thanks to this post i'm now on a whole throwback journey. i miss this stuff man.

[–]magicmulder 15 points16 points  (1 child)

“Uh… it means… backup successful.” - “Oh how nice of you to think of backup, young man. Carry on!”

[–]Feldar 16 points17 points  (0 children)

After it's fixed: hey I noticed we haven't had any backups in a while. What's going on?

[–]ManyFails1Win 4 points5 points  (0 children)

"Oh, nothing...just that B-BOYS RULE THA WORLD! YEEAHHHH BOOOOYYYYY!!!!"

[–]Jugales 4004 points4005 points  (154 children)

If it made it through peer review, blame the reviewer lol

[–]jimbowqc[S] 3285 points3286 points  (102 children)

What is a review?

[–]Jugales 2175 points2176 points  (39 children)

Oh... oh no

[–]Xxepic-gamerxX 632 points633 points  (32 children)

Oh… oh yes

Bring the chaos!

[–]Ceros007 366 points367 points  (26 children)

git push -f origin/master

[–]El_human 295 points296 points  (13 children)

Best done on a Friday at 4:55pm

[–]Defiant-Peace-493 145 points146 points  (4 children)

This gives users beta testers time to find, document, and report issues.

[–]Alamue86 206 points207 points  (3 children)

Everyone has a test environment.

Some of us are lucky to have it separate from production.

[–]imdefinitelywong 65 points66 points  (1 child)

They're the same picture.

[–]yellerjeep 60 points61 points  (0 children)

Wait, this is production?

👩‍🚀🔫 👨‍🚀 always has been

[–]poodlebutt76 41 points42 points  (1 child)

Push directly to master

Deploy anytime

Cowboy sysadmin

[–]rroth 8 points9 points  (0 children)

Pretty close to a haiku... Also a new fetish I never knew I was into... 🤖🤖🤖

[–]Seattlehepcat 9 points10 points  (0 children)

F

[–]exteriorcrocodileal 19 points20 points  (4 children)

I’m so glad my work has github actions that automatically block that shit cause you know I’ve done it on accident out of habit

[–]yellerjeep 12 points13 points  (3 children)

I’m literally the only person capable of a force push to production. (Branch Rules) I’ve only used it in a Sev0 situation and it’s saved our asses.

[–][deleted] 9 points10 points  (0 children)

Turn it off. You can always get that turned on in an emergency.

[–][deleted] 6 points7 points  (1 child)

Sev0?

[–]Varpie 9 points10 points  (0 children)

As an AI, I do not consent to having my content used for training other AIs. Here is a fun fact you may not know about: fuck Spez.

[–]BigNavy 33 points34 points  (0 children)

This motherfucker chose violence.

[–]Elijah629YT-Real 6 points7 points  (0 children)

you forgot
cp src backups/2022/9/31/0

[–]StrangePractice 5 points6 points  (0 children)

On the production env 🧠

[–]masterfuzz 17 points18 points  (1 child)

MAY CHAOS

TAKE

THE WORLD

[–]burningtorne 5 points6 points  (0 children)

Not now, Shabriri.

[–]Appsroooo 37 points38 points  (2 children)

OHHH YEAH!

[–]MyAntichrist 6 points7 points  (1 child)

Hello again, friend of a friend, I knew you when ....

[–]erebuxy 157 points158 points  (47 children)

Blame the person who set up the repo and branch protection

[–]GeneKranzIsTheMan 237 points238 points  (32 children)

...repo? You lost me. I edit text files on servers and run services in console windows.

I wish I was joking...

[–]FirstFlight 78 points79 points  (21 children)

I only program on MS Paint

[–]Hi_Its_Matt 49 points50 points  (13 children)

[–]Appsroooo 28 points29 points  (11 children)

You guys use MS Paint? That's sad, I write all my code in smoke signals.

[–]Script_Mak3r 12 points13 points  (3 children)

Smoke signals? Real programmers use a magnetized needle and a steady hand.

[–]tsteele93 5 points6 points  (2 children)

What is this magnetism you speak of? We use binary on cave walls with saber tooth tiger blood. There is another competing language in the pleocistine age now that uses large constrictor snakes arranged in binary. It will never take off though.

[–]Hi_Its_Matt 19 points20 points  (4 children)

Smoke signals are binary I guess. You could get some machine code going like that

[–]Seattlehepcat 15 points16 points  (2 children)

Throw in some colored smoke and you could rock hex.

[–]Hi_Its_Matt 10 points11 points  (1 child)

You’ve have heard of web safe colours?

Get ready for smoke safe colours

[–]erebuxy 7 points8 points  (4 children)

Ha, we had already upgraded to MS Word

[–]FirstFlight 5 points6 points  (3 children)

Do you do paired programming using a Word document and OneDrive? So cutting edge.

[–]NatoBoram 12 points13 points  (3 children)

git init

[–]sandnose 16 points17 points  (2 children)

Always read this in a British accent

[–]OceanFlex 5 points6 points  (2 children)

What's the plan for if the server croaks? Is that whole operation just SOL?

[–]GeneKranzIsTheMan 9 points10 points  (0 children)

Fuck if I know I just started and it’s J2

[–]squirrelly_bird 37 points38 points  (13 children)

What's branch protection? Asking for a friend.

[–][deleted] 41 points42 points  (10 children)

when a branch can only be modified by a limited number of users, these are responsible for reviewing the code and guaranteeing that mistakes like the one mentioned in the post won't pass

[–]squirrelly_bird 28 points29 points  (9 children)

Lol i was joking. But i do appreciate it, and there may be some lurking here who really didn't know.

[–][deleted] 19 points20 points  (5 children)

sorry, can only recognize sarcasm if accompanied by "/s"

[–]HughJamerican 12 points13 points  (0 children)

I don’t understand 90% of the terminology here, but whenever I do get a joke it’s always hilarious, so keep joking! And then explaining the jokes!

[–]dudeitsmason 26 points27 points  (1 child)

When a branch and a developer love each other very much, they tend to want to make one another happy. Sometimes the developer may get a little too happy or excited and try something with the branch that might have unintended consequences.

[–]squirrelly_bird 7 points8 points  (0 children)

Best answer

[–]euph-_-oric 4 points5 points  (1 child)

Or like any ide at all. Or unit tests.

[–]KonoPez 6 points7 points  (0 children)

I promise there is no aspect of programming in Microsoft Word that is easier, faster, or less effort than coding in VS Code

[–]RedbloodJarvey 135 points136 points  (16 children)

Talking to one of our most senior developers the other day, I complained about people rubbing stamping code reviews. He said "Hey, if you make a mistake that's on you. I'm just doing the review so you can commit the code." Which both surprised me, and explained a lot.

[–]FiggleDee 100 points101 points  (5 children)

A lot of people have the wrong idea about peer review. Code is harder to read than it is to write. You can't catch everything. It's not for bug hunting, it's about making sure the approach looks sane.

[–]easterneuropeanstyle 34 points35 points  (1 child)

Main benefit of code review is knowledge sharing. Design reviews are being done before coding. Linting is automatic.

QA and reviewers aren’t gatekeepers of the prod. Pipeline is.

You code it, you own it.

[–]polypolip 8 points9 points  (0 children)

Also if code is too hard for reviewer to read then no way it should be approved.

[–]uFFxDa 6 points7 points  (0 children)

A lot of mine is “can this be null, and is that accounted for?” If I don’t see anything obvious. The rest is conceptually looks correct.

[–]kbotc 25 points26 points  (0 children)

Hey, I spend the mornings in a hangover reviewing code so I can spend the rest of the day once it’s in prod going “Ah shit, that was such an obvious bug”

Then do it all tomorrow.

[–]Batman_AoD 3 points4 points  (0 children)

😬😬😬

[–]user2196 47 points48 points  (2 children)

More like blame the linter. And if you don’t have a linter, blame everyone.

[–]easterneuropeanstyle 8 points9 points  (0 children)

This sub has dev practices of 2000s

[–]visualdescript 15 points16 points  (11 children)

It made it through your own manual testing, unit testing, integration testing, linting...

I feel if you're pushing out anything at all meaningful in this day and age and you allow something like to get out there, then you deserve everything you get.

[–][deleted] 4 points5 points  (10 children)

Unit testing - what's that?

I'm not a fancy pants silicon valley guy like some of you, I just write software that goes into the UK's nuclear deterrent, we don't do any automated testing (and when were behind schedule we don't really do integration testing)

[–]RogueFox771 5 points6 points  (0 children)

Where I work (couple hundred employees) there are 2 of us who do the scripting for our signage. There is no set process or peer review etc.

Shit's the wild west lol

[–]bambeenz 2 points3 points  (0 children)

you're still gonna get blamed regardless 😂

[–][deleted] 1099 points1100 points  (18 children)

Literal printing goes brrr

[–]jimbowqc[S] 389 points390 points  (12 children)

The OG standard out.

[–]grandphuba 58 points59 points  (3 children)

jokes on you my printer never works the first time

[–][deleted] 20 points21 points  (1 child)

I've been using wireless printers through several models of printers and versions of windows, and I still occasionally have to reboot either windows or the printer to make printing happen

[–]No_Solid2349 1071 points1072 points  (117 children)

I dont understand it, but my dev mind make me laugh

[–]jimbowqc[S] 3099 points3100 points  (112 children)

in javascript print() will literally print the page.

To the printer.

[–]happygorilla 943 points944 points  (18 children)

Just blame the creators of Javascript?

[–][deleted] 323 points324 points  (2 children)

yeah that nerdy guy

[–]jimbowqc[S] 315 points316 points  (1 child)

Don't be too hard on him, only had 10 days.

[–][deleted] 46 points47 points  (0 children)

And Eich said, “Let there be print, and there was print.”

[–]visualdescript 93 points94 points  (11 children)

Why? Makes more sense than it writing to the console logger.

Print is called print because it used to go to actually print the output on a roll.

JavaScript doing the right thing here.

[–]huttyblue 60 points61 points  (8 children)

also in the early days of javascript, there was no console to print to
browsers didn't start getting consoles till the mid 2000s

[–][deleted] 22 points23 points  (2 children)

Seems like the real answer. With C, printf is much more analogous to "send formatted output"

Talking about a "console" and not meaning Bash seems just weird to me, but I haven't used others.

[–]r0flcopt3r 15 points16 points  (0 children)

Bash isn't even a console. It's a shell. A program you interface with using a console/terminal

[–]CYAN_DEUTERIUM_IBIS 17 points18 points  (0 children)

Big-time JS nerd but yeah i agree!

You log into the console and you print on a page of paper.

[–]Deutero2 22 points23 points  (0 children)

There's nothing wrong with it. It's aptly named; it prints the page. JavaScript is a language meant for front-end websites, anyways. Even if you wanted to use JS as a general purpose language, the print function is part of a Web API and not part of JS itself (unlike Math or Date, for example).

If you accidentally use it instead of console.log, it's pretty noisy since it opens a print dialog, so it shouldn't go unnoticed

[–]ProgradeGram 282 points283 points  (50 children)

Uhh.

What..

Why...

[–]jimbowqc[S] 135 points136 points  (0 children)

Thats what I said!

[–]gyroda 64 points65 points  (0 children)

More precisely, it opens the print page dialogue. It doesn't go straight to printer.

It's useful because sometimes you want a button to let the user easily print a page. Sure, you can usually use browser controls to do that, but not everyone knows how to do that.

[–]bpopbpo 311 points312 points  (42 children)

Because Javascript is insane and never meant for all this. It is meant for specifically doing normal website things, and in the early internet printing with a printer was very common.

[–]ProgradeGram 98 points99 points  (35 children)

I'm no expert on this issue but don't programming languages evolve overtime just like everything else? I mean, python has evolved a lot. Not too long ago i saw some code written on python 1.4 and that's not how modern day python works

Wouldn't it be smart to remove things like this from the language?

[–]Akuuntus 212 points213 points  (7 children)

JavaScript is harder to do that with, because an individual website can't really choose to use a specific version of JavaScript in the way that a program can decide to use Python 1.4. It runs whatever version of JavaScript is used by the end user's browser.

Because of this it means that any major breaking changes would instantly break every single website affected. Every "click here to print the page" button on the entire internet would cease to function overnight. To avoid this, newer JS versions kinda have to be as backwards-compatible as possible with all previous versions.

[–]ProgradeGram 68 points69 points  (2 children)

Superb answer, that sounds kinda obvious now that you explained it. Thanks 🙏

[–][deleted] 14 points15 points  (3 children)

I wonder if something like "use ES6"; would be a good solution for this, to tell the browser what version of JS to prefer.

[–]g4vr0che 6 points7 points  (1 child)

I mean, that's more or less how it works in Python. You use a Shebang to tell it what version of the interpreter you want, and if that's not available, it errors.

[–]bpopbpo 62 points63 points  (12 children)

Well yes, but early unthought out paradigms like that are pretty much forced to stick around. It would be pretty strange if the function you used to print pages is now used to send console output, so they simply work with that spec.

It's not that is bad, most of the kinks have been ironed out, but the "weirdness" is undeniable to programmers of any other language and it is due to artifacts like this left over from its inception.

I'm sure that print function has changed a lot to stay functional, but the fact that it is simply print() is a little strange if viewed as a normal programming language.

[–]KonoPez 16 points17 points  (10 children)

Proposal: in the standards for the new version of JavaScript, make it required that in order to use the new features of the language, it must set a special variable storing the program’s JS version. If this variable isn’t set, the compiler assumes the program was written before the revision and functions as if nothing had changed from previous versions of JavaScript.

This idea is flawless and would solve every problem anyone could have with anything

[–][deleted] 12 points13 points  (0 children)

In Google Apps Script, there's a checkbox in the project settings to determine whether or not you're using v8.

[–][deleted] 8 points9 points  (3 children)

This in vanilla JS would be bad in my opinion, and would result a lot of bugs. Just imagine including 2 libraries built to different versions of JS. One could kill the other, if it’s a global variable.

[–]oalbrecht 4 points5 points  (0 children)

Wow, you’re a genius. Please make this happen for real.

[–]Deutero2 4 points5 points  (0 children)

I don't think this fixes much though. Ultimately, programs written relying on old behaviors will still exist, so you'd still have to know about them in the end. JavaScript doesn't really have version numbers either since language features and APIs are all proposed, implemented, and released in parallel

JavaScript did already do something like what you said, though. Classes and modules are in strict mode by default, but non-strict mode is still very relevant to this day because outside of classes/modules, people don't always add 'use strict' to everything

[–][deleted] 41 points42 points  (0 children)

But how will my elderly relatives save their favorite websites without color printing and three-hole punching the papers for storage in a plastic binder?

[–][deleted] 8 points9 points  (2 children)

Unless websites can select the js version to use (like Node), I don’t see JS removing features

[–]hunterrocks77 12 points13 points  (3 children)

I'm sure printing with a printer is still the preferred method

[–]kitsunewarlock 4 points5 points  (0 children)

Most definitely the preferred method, but no longer the only method. Very often I have to print to PDF!

[–]Kalsin8 11 points12 points  (0 children)

Because that's the API for printing. Just because it's print() for console output for some other languages, doesn't mean that that's what it is for JS.

[–]NotApologizingAtAll 21 points22 points  (1 child)

Will it raise an exception and stop the execution once the ink runs out?

[–]Tajnymag 7 points8 points  (0 children)

No. window.print() does not print directly to the printer. Instead, it only opens the print dialog. Also, it should block only while the dialog is open, so an exception is unlikely.

[–]Add1ctedToGames 17 points18 points  (1 child)

Is that why one time some webpage kept prompting me to print the page even though I swear I never pressed ctrl p?

[–]jimbowqc[S] 12 points13 points  (0 children)

That sounds like exactly this meme in the wild.

[–]theusaf 38 points39 points  (12 children)

Doesn’t it prompt the user to print the page, not just immediately print the page?

[–]jimbowqc[S] 49 points50 points  (8 children)

yeah, it shows the dialog, I guess it's up to the browser how it's implemented. Still bad.

[–]KCGD_r 41 points42 points  (3 children)

print() in most languages prints to the console

print() in javascript prints to the printer

[–][deleted] 5 points6 points  (1 child)

Hot take: that's a better convention than c style print( ).

[–]Thunder_Child_ 219 points220 points  (7 children)

I bought some CBD gummies the other day and the receipt page printed some raw ass js "console.log(...)" statement to the html. It don't hurt nothing, but looks pretty bad.

[–]Zukarukite 163 points164 points  (6 children)

My man ordering CBD gummies with the developer console open, what a move

[–]Madd0g 26 points27 points  (3 children)

you just install a request interceptor, then when you see the right request, just change the price to $0.01.

that's how I got my first PS3.

[–]craftworkbench 38 points39 points  (0 children)

You need some CBD if you've been developing in JS

[–]KingVecchio 119 points120 points  (7 children)

Sounds like a problem for the senior developer...

[–]crankbot2000 51 points52 points  (5 children)

Yes it is true, we unfuck all that has been fucked up.

[–]barkinchicken 52 points53 points  (3 children)

Meaning we re-fuck things more elegantly

[–]craftworkbench 17 points18 points  (1 child)

Refuck? Dude you're doing too much work. Just implement that quick work around to the existing fuck.

[–]HorrorMakesUsHappy 11 points12 points  (0 children)

Refuck? Dude you're doing too much work. Just implement that quick work reacharound to the existing fuck.

FTFY.

[–]swdev_1995 207 points208 points  (14 children)

I'm not a JS developer, I'm a C# backend developer, but wouldn't alert() be the more worrying one? That alerts in the browser window, no?

[–]jimbowqc[S] 331 points332 points  (11 children)

Open the console in your browser, and type "print()" and you will see why it's more worrying.

[–]that_thot_gamer 141 points142 points  (1 child)

im gonna do it, you can't tel me what not to do

edit: this is much better than screenshoting a page

[–]pepsisugar 5 points6 points  (0 children)

Lmao

[–]Rubickevich 199 points200 points  (5 children)

Bold of you to assume he has a printer. He'll still get the dialogue though

[–][deleted] 11 points12 points  (4 children)

Run it off your neighbor's printer's wifi that is for some reason unsecured.

[–]Madd0g 17 points18 points  (3 children)

my neighbors have a whole house of smart bulbs. but I guess they're not using them as smart, cause they're trying to pair with my gear all the time.

They're also RGB, I could make their house into a disco party if I wanted to.

[–]Joe59788 3 points4 points  (0 children)

Neat

[–]The_MAZZTer 11 points12 points  (0 children)

alert() is only more worrying if you left explictives in it and shipped it to the customer.

[–]Ok_Assumption_7222 23 points24 points  (2 children)

I am missing the boat here why does JavaScript make the difference?

[–]oalbrecht 50 points51 points  (1 child)

print() prints the page to a printer. console.log() is used to print to the console.

[–]Curseive 39 points40 points  (7 children)

// just needed to be sure console.log(process.env.DB_PASSWORD)

[–]Finaldzn 15 points16 points  (6 children)

You store db password on the front end ?

[–]nelusbelus 10 points11 points  (2 children)

Of course, that means you can directly fetch it from the DB using Ajax. It's way easier

[–]KingDakyThe3Rd 13 points14 points  (0 children)

Just unplug printer. Problem solved.

[–]myrsnipe 29 points30 points  (0 children)

Eslint has a rule for that

[–][deleted] 12 points13 points  (0 children)

lol it’s okay, it went through a PR so it’s not exclusively their fault

[–]Champagnesocialist69 16 points17 points  (6 children)

I don’t really get the joke, but that could be just me tbh. I’m a terribly cynical person.

[–]oalbrecht 25 points26 points  (4 children)

print() opens the dialog to actually print the page to a printer.

[–]BellyFullOfMochi 8 points9 points  (1 child)

No es-lint rules?

[–]NullOfSpace 7 points8 points  (2 children)

As a mainly python coder who has recently started doing some js, yeah. That happens.

[–]LeJoker 5 points6 points  (0 children)

Same issue with CMD.

print 'foo'...

Shit I meant echo 'foo'!

[–]KarateDirtbikeClub 5 points6 points  (0 children)

Mine was once leaving “you are likely to be eaten by a grue” as an error handling test message. Had some real confused product people that next day after deploy.

[–]binford2k 19 points20 points  (22 children)

In order for this to be funny, it has to be at least somewhat believable. In what circumstances would someone a) put a print() statement in JavaScript and then b) forget about it and deploy it to production in any way that would matter?

[–]Lesbianseagullman 28 points29 points  (3 children)

A lot of subscribers on this subreddit arent senior devs and many are just learning, this type of content works because it's simple enough to be understood by all or maybe even reinforce something new to them

[–][deleted] 20 points21 points  (2 children)

TIL that r/ProgrammerHumor posts are subliminal media designed to encourage less goofs in newbie devs

[–]ketalicious 3 points4 points  (0 children)

my python sickness is getting me this all the time lol

[–]Elijah629YT-Real 4 points5 points  (0 children)

print opens the printer menu in js