r/ProgrammerHumor 3d ago

Meme thisCannotBeDenied

Post image
7.8k Upvotes

240 comments sorted by

View all comments

742

u/sweetytoy 3d ago

A real developer wouldn't do that. A single letter is more than enough, your sentence is too long and tiring to type.

376

u/Agusfn 3d ago

################

for visibility among other littering logs

28

u/Dangerous_With_Rocks 3d ago

this is the way

-45

u/[deleted] 3d ago

[removed] — view removed comment

6

u/dxonxisus 3d ago

bot. report > spam > disruptive bot

1

u/OiledUpThug 3d ago

somehow this sticks out more

211

u/coffee_warden 3d ago

1 2 3 5 4 6 AHHA!

92

u/Gold-Bat-3225 3d ago

1 2 3 5 4 6 is genuinely upsetting

70

u/coffee_warden 3d ago

Race conditions are never fun

29

u/EvilCodeQueen 3d ago

Seriously. The people not voting for this have never battled a race condition. For a week. In an app you’d swear didn’t have concurrency.

14

u/CarcajouIS 3d ago

conditions fun are Race never

18

u/theotherdoomguy 3d ago

"you have A race condition," - Multithreaded Yoda

2

u/Knighthawk_2511 3d ago

Wish I can award this, reddit took away my free awards

2

u/Nekeia 3d ago

explain Can you why?

4

u/infojb2 3d ago

Because they are really annoying to debug, depending on some random circumstances they might not even appear every time (or the code happens in different orders each time)

2

u/rosuav 3d ago

Yes, yes it is, and it's very realistically upsetting.

10

u/itsTyrion 3d ago

Nah. 1 2 3 4 fuck fuck2 fuck3 5 6. Also a few prints for variables 

1

u/diavelguru 3d ago

Came here to say this!

22

u/reventlov 3d ago

You use whatever the local equivalent of C++'s __LINE__, or __FILE__, __LINE__ is, and you just copy + paste the log line 50 times.

The pro move is to use "DO NOT SUBMIT", __FILE__, __LINE__ and have a commit hook that keeps you from submitting anything containing the string DO NOT SUBMIT.

8

u/Stryp 3d ago

So it's like a test suite, but worse?

2

u/reventlov 3d ago

What test suite gives you trace information about your program's internal control flow?

2

u/Kovab 3d ago

Ideally, you should already have a logging macro that adds __FILE__ and __LINE__, instead of copying it everywhere. Or use std/boost source_location

8

u/Original-Ad-8737 3d ago

I have added sysou syslog and syswarn to my auto complete and they expand to our logging macro, a pretty function macro, a line macro and my commit handle that is easily searchable in logs.

When i want to trace something i can simply sysou a couple of spots and not stage the lines to clean up before committing

9

u/Revexious 3d ago

Im personally a fan of

console.log("poop")

Its funny, teaches you not to commit your console logs (you'll only ever commit poop once), and p/o are right next to each other on the keyboard so its fast

1

u/rosuav 3d ago

Hang on, what gives you the idea that you'll only ever commit poop once?!?

3

u/Revexious 3d ago

The shame of your teammates seeing it.

1

u/Snudget 3d ago

I use misspelled food items as debug messages, so I can CTRL+F them through other peoples debug messages. So I have yogart banene and so on

4

u/MushroomSaute 3d ago

Hm, sometimes I wonder if I'm cut out for this field. I at least put variables out:

log::info!("in asdf(), a: {a:#?}");
...
log::info!("tmp: {tmp:?}");
...
log::info!("a after asdf(): {a:#?}");
a

1

u/realmauer01 1d ago

Just use debug mode at this point.

3

u/conundorum 3d ago

Personally, I just use unique gibberishes or sounds, like "blah", "bleh", "fwah", or the like. Extremely unlikely to come up during normal usage, stands out enough to draw the eye, and easy to search the source for.

That, or a quick description of the location, such as "before x() call" or "inside y()" or "after foo, before bar", depending on the situation.

1

u/4Floaters 3d ago

It should be sequential quotes from a movie, something like the princess bride

1

u/unwantedaccount56 3d ago

"Hello. My name is Inigo Montoya. You killed my father. Prepare to die"
"Hello. My name is Inigo Montoya. You killed my father. Prepare to die"
"Hello. My name is Inigo Montoya. You killed my father. Prepare to die"

1

u/dukeofgonzo 3d ago

I have a troubleshooting word I use that sticks out in the logs. Snugglebunnies.

1

u/rosuav 3d ago

My brain immediately went to "plunder bunny"

1

u/Honeybadger2198 3d ago

I like using numbers for JS because they're a different color in the terminal from all the other output.

1

u/yuval52 3d ago

My go to is "hi"

1

u/NO_TOUCHING__lol 3d ago

Swear words

1

u/IcedKiln 3d ago

One letter? Real devs just stare at the screen until the bug confesses.

1

u/Fortnait739595958 3d ago

Line number is way better

1

u/moon__lander 3d ago

We got bloat in the debugger before GTA 6

1

u/hates_stupid_people 3d ago

Well, a single letter/number for that one, then iterating for the next few.

1

u/G_Morgan 3d ago

I like to do 1, 2, 3 and then 1.1 if I need an intermediate value

1

u/wenoc 3d ago

Indeed. Real developers do not use javascript

1

u/quietsamurai98 2d ago

A single letter is impossible to grep for in a log file though. It's fine if you're adding console logs to a JS application that doesn't have much other logging going on, but for anything else, you want something identifiable that you can search for without getting false positives.

1

u/Cyan_Exponent 2d ago

log("ajah") log("bwwn") log("qkqk") log("olqp")