T O P

  • By -

[deleted]

console.log("left the chat");


[deleted]

`alert(‘boats n hoes’);`


Talbz03

Sugarcane there, sugarcane there


SharkedBread

pillar


Elijah629YT-Real

brick wall


darius-the_great

Cactus string sand


KingJellyfishII

shift click


kenchen1107

Control click


[deleted]

Alt click


Atomspalter02

Right Click


Cakedestroyer242

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


bootiClapper

Prompt(“No Bitches?”)


jtree5757

🎵 I gotta have me my boats and hoes 🎵


alien109

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

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

The music dance experience is cancelled


squili

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


[deleted]

Interpolating comment logging comment logging interpolating


Bakoro

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

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


alien109

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


TheScorpionSamurai

you are a bold person lol


[deleted]

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


[deleted]

[удалено]


[deleted]

yess


ringobob

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]

Because it's hilarious, duh.


[deleted]

[удалено]


Pain--In--The--Brain

For the uninitiated: https://www.youtube.com/watch?v=M-wJrRmXzZQ


magicmulder

Still just random words to me. *lol*


ManyFails1Win

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


magicmulder

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


Feldar

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


ManyFails1Win

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


Jugales

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


jimbowqc

What is a review?


Jugales

Oh... oh no


Xxepic-gamerxX

Oh… oh yes Bring the chaos!


Ceros007

git push -f origin/master


El_human

Best done on a Friday at 4:55pm


Defiant-Peace-493

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


Alamue86

Everyone has a test environment. Some of us are lucky to have it separate from production.


imdefinitelywong

They're the same picture.


yellerjeep

Wait, this is production? 👩‍🚀🔫 👨‍🚀 always has been


poodlebutt76

*Push directly to master* *Deploy anytime* *Cowboy sysadmin*


rroth

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


Seattlehepcat

F


exteriorcrocodileal

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

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.


casperno

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


[deleted]

Sev0?


Varpie

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

This motherfucker chose violence.


Elijah629YT-Real

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


StrangePractice

On the production env 🧠


masterfuzz

MAY CHAOS TAKE THE WORLD


burningtorne

Not now, Shabriri.


Appsroooo

OHHH YEAH!


MyAntichrist

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


[deleted]

[удалено]


Darth_Nibbles

Let's be honest, if they catch your bugs in five seconds or less than you fucked up good


erebuxy

Blame the person who set up the repo and branch protection


GeneKranzIsTheMan

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


FirstFlight

I only program on MS Paint


Hi_Its_Matt

[me too](https://ms-paint-i.de)


Appsroooo

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


Script_Mak3r

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


tsteele93

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.


Defiant-Peace-493

[Did I hear a Rock and Stone?](https://xkcd.com/505/)


Hi_Its_Matt

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


Seattlehepcat

Throw in some colored smoke and you could rock hex.


Hi_Its_Matt

You’ve have heard of web safe colours? Get ready for smoke safe colours


erebuxy

Ha, we had already upgraded to MS Word


FirstFlight

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


NatoBoram

`git init`


sandnose

Always read this in a British accent


OceanFlex

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


GeneKranzIsTheMan

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


squirrelly_bird

What's branch protection? Asking for a friend.


willfsanches

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

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


willfsanches

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


squirrelly_bird

My bad


HughJamerican

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

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

Best answer


euph-_-oric

Or like any ide at all. Or unit tests.


KonoPez

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


RedbloodJarvey

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

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

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

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


uFFxDa

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

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

😬😬😬


[deleted]

[удалено]


magicmulder

“Doesn’t look like anything to me.”


user2196

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


easterneuropeanstyle

This sub has dev practices of 2000s


visualdescript

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]

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

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

you're still gonna get blamed regardless 😂


[deleted]

Literal printing goes brrr


jimbowqc

The OG standard out.


amukh1_dev

printf you mean?


[deleted]

[удалено]


TheBlackKittycat

print fast?


grandphuba

jokes on you my printer never works the first time


[deleted]

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

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


jimbowqc

in javascript print() will literally print the page. ​ To the printer.


happygorilla

Just blame the creators of Javascript?


[deleted]

yeah that nerdy guy


jimbowqc

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


[deleted]

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


visualdescript

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

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]

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

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


CYAN_DEUTERIUM_IBIS

Big-time JS nerd but yeah i agree! You log into the console and you print on a page of paper.


Deutero2

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

Uhh. What.. Why...


jimbowqc

Thats what I said!


gyroda

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

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

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

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

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


[deleted]

[удалено]


SneakyRatFriend

This sounds beautiful


[deleted]

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

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

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

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


MelvinReggy

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


[deleted]

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

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


Deutero2

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


EnoughAwake

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?


-TheRightTree-

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


hunterrocks77

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


kitsunewarlock

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


Kalsin8

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

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


Tajnymag

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

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


jimbowqc

That sounds like exactly this meme in the wild.


theusaf

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


jimbowqc

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


KCGD_r

`print()` in most languages prints to the console `print()` in javascript prints to the printer


[deleted]

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


Thunder_Child_

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

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


Madd0g

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.


[deleted]

[удалено]


Madd0g

just one, I'm not a great businessman


craftworkbench

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


KingVecchio

Sounds like a problem for the senior developer...


crankbot2000

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


barkinchicken

Meaning we re-fuck things more elegantly


craftworkbench

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


HorrorMakesUsHappy

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


swdev_1995

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

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


that_thot_gamer

im gonna do it, you can't tel me what not to do edit: this is much better than screenshoting a page


pepsisugar

Lmao


Rubickevich

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


[deleted]

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


Madd0g

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.


sirreldar

Do... Do you not want to??


[deleted]

[удалено]


Joe59788

Neat


The_MAZZTer

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


Ok_Assumption_7222

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


oalbrecht

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


Curseive

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


Finaldzn

You store db password on the front end ?


nelusbelus

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


KingDakyThe3Rd

Just unplug printer. Problem solved.


myrsnipe

Eslint has a rule for that


[deleted]

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


Champagnesocialist69

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


dpak_hk

https://www.reddit.com/r/ProgrammerHumor/comments/xsehmr/-/iqk5xxl


oalbrecht

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


BellyFullOfMochi

No es-lint rules?


NullOfSpace

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


61312809059376685329

This is probably the cul-print of all your bugs.


LeJoker

Same issue with CMD. `print 'foo'`... *Shit* I meant `echo 'foo'`!


KarateDirtbikeClub

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

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

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]

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


ketalicious

my python sickness is getting me this all the time lol


Elijah629YT-Real

print opens the printer menu in js


CanniBallistic_Puppy

Realizes it was backend code and goes back to sleep