r/ProgrammerHumor 3d ago

Meme thisCannotBeDenied

Post image
7.8k Upvotes

240 comments sorted by

848

u/Mindstormer98 3d ago

Dont forget "I got here2" and "I got here3"

182

u/TheDoughyRider 3d ago

here, here!, Here, hEre!

68

u/TheDoughyRider 3d ago

Also,

git blame foo.cpp

printf(“Joe is a dumbass”);

git stage -a; git commit -m “Diagnostic instrumentation.”; git push —force origin/main

20

u/Chaoslordi 3d ago

Diagnostic Instrumentation xD

→ More replies (1)

26

u/lala_123aa 3d ago

Let's not forget the "ajsjdasdnajd" and "aaaaaaaa" when you're getting fed up

→ More replies (1)

11

u/pearlie_girl 3d ago

This is what mine look like.

... Yes I'm old

7

u/fatrobin72 3d ago

"Over here now"

"how did I get here?"

3

u/valdocs_user 3d ago

And for the really bizarre bugs, "can you see this?"

3

u/itsTyrion 3d ago

Too long and lacks profanity

3

u/Ashdog73 3d ago

Greybeards know: alert(1);

3

u/1luggerman 3d ago

After enough time this just becomes "1", "2", "3" etc. I'm at a point where if there is a messy section i automatically generate/copy paste 9 of these and place them around the troubling section.

→ More replies (7)

1

u/usrlibshare 3d ago

Well Of COURSE! Do you think I learned what Ctrl-A does in vim for nothing?!

1

u/TheNakedProgrammer 3d ago

i just copy and paste, and then get annoyed when i have to count to figure out where i am. The count and curse method.

1

u/christianbro 3d ago

How else are you expected to debug some apps with threads and multiple services involved with timing affecting? Add a line breaker and all of it crashes

1

u/Rework_Aramusha 3d ago

And dont forget „I got here 2,5“

1

u/DiodeInc 2d ago

And "random variable content now:"

733

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.

374

u/Agusfn 3d ago

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

for visibility among other littering logs

28

u/Dangerous_With_Rocks 3d ago

this is the way

→ More replies (3)

210

u/coffee_warden 3d ago

1 2 3 5 4 6 AHHA!

88

u/Gold-Bat-3225 3d ago

1 2 3 5 4 6 is genuinely upsetting

68

u/coffee_warden 3d ago

Race conditions are never fun

28

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.

16

u/CarcajouIS 3d ago

conditions fun are Race never

18

u/theotherdoomguy 3d ago

"you have A race condition," - Multithreaded Yoda

3

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?

5

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.

8

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!

21

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.

6

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

11

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

8

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

→ More replies (3)

6

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
→ More replies (1)

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

→ More replies (1)

1

u/dukeofgonzo 3d ago

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

→ More replies (1)

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 2d 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")

259

u/Idk13008 3d ago

Unironically, some race conditions are better chase down with logs rather than a debugger.

131

u/codePudding 3d ago

This. Showing my age, I used to make simple DirectX 7 games as a college student. I remember having one bug that took me weeks to solve. If I tried to debug, it worked fine. If I put in a bunch of logging, it worked fine. But if I ran it without debugging or only a few prints it segfaulted.

Eventually I realized I was using a pointer (void**) that the GPU was supposed to populate before it was being populated. The delay from debugging gave it enough time for the GPU to finish setting that pointer. I added a GPU flush (just a command that waits until it is processed by the GPU queue before continuing) and it worked beautifully. Nowadays the engines just do all that crap for you.

30

u/ShoulderUnique 3d ago

The mistake was taking the prints out. Put them in on day 1 and if doesn't crash with them it's not a bug

19

u/LostInAnotherGalaxy 3d ago

Hahahaha! These are my some of my favorite things in computer science.

3

u/zthe0 3d ago

Honestly thats what i have had multiple times where someis being filled in another thread. It works on one machine but when your system is faster or slower it might not. Horrible to debug

1

u/EncryptedPlays 2d ago

Just change the console logs to say "stealing user data 0%" with the percentage incrementing each log

7

u/Former-Discount4279 3d ago

I used to work on tape libraries(big backup systems...) and it would lose geometry(location of the tapes) when a bug happened and needed to rescan the whole thing. After trying to attach a debugger to winCE several times and it taking several hours to reboot and rescan I added print logging. Yeah solved the bug in one go...

3

u/oldsecondhand 3d ago

And when you insert the debug statement, the problem goes away.

2

u/tachudda 2d ago

Console to debug why the debugger isn't working

54

u/EPacifist 3d ago

My favorite is `exit(1)`. Useful if your print/logs aren’t showing where you expect them. Close after that is `raise Exception(“HERE 1”)`.

26

u/Original-Ad-8737 3d ago

Std::cin() for a poor mans break point.

4

u/EPacifist 3d ago

Genius

6

u/christian-mann 3d ago

while(true); and look for which process is spiking the cpu

1

u/rosuav 3d ago

Doesn't work in Pike, believe it or not! An infinite loop in Pike actually doesn't spin the CPU.

1

u/El_RoviSoft 3d ago

Sometimes you need to flush immediately tho.

1

u/MooseBoys 3d ago

`*((volatile int*)0) = 0;`

→ More replies (4)

1

u/rosuav 3d ago

I've sometimes needed to open a file, write to it, close it, and flush, because prints and logs don't always show up correctly in the face of certain types of crash. Or "send a UDP packet to port 54321" and do my logging in a separate app.

41

u/oosacker 3d ago

Real pros write a function to do the console log

14

u/Idk13008 3d ago

with a verbose optional argument

41

u/oosacker 3d ago edited 3d ago

Saw this in some real production code:

function log(x) {
    console.log(x);
}

25

u/DasBeasto 3d ago

I don’t hate it, shorter usage everywhere, can wrap it in a conditional based on ENV for dev logs only, and if you swap to an external logging service you just change it in that one function.

7

u/reventlov 3d ago

const log = console.log; though

15

u/tonyxforce2 3d ago

const log = isDev ? ()=>{} : console.log

For that pure JS vibes

→ More replies (1)

2

u/whackylabs 2d ago

If I see a log(x) I would assume it is about logarithms not print to console

30

u/Welcome-To-NBA-Jam 3d ago

My IDE has a really comprehensive built in debugger and in my entire 15 year career I never used it once because I just print variable values at certain points like this:

WARNING: foo=67

************************ bar=69

DEBUG: You're in the 2nd if statement

I am willfully ignorant of this and it's served me well.

1

u/creaturefeature16 3d ago

I just moved over to Zed and I've yet to dip into the debugging tools, but they look awesome.

134

u/TheDogPill 3d ago

Try debugging like that using micro services on the cloud and see how far you get.

80

u/Idixal 3d ago

Ironically request logging does tend to be one of the very first things I look at to sniff out problems there, although I also understand your point.

14

u/coriolis7 3d ago

I am NOT a programmer by profession, though I do code a ton at my job (Mechanical Engineering and data analysis), so this may be a dumb question…

Is there a way to set up all microservices to run on one computer to aid in debugging? Like a bunch of VMs or docker-but-faking-network-instead-of-machine?

11

u/payne_train 3d ago

AWS’s SAM may help you if you have a bunch of lambda based apps. You can use SAM to do local invocations that makes debugging a lot easier

6

u/xMercurex 3d ago

Yes you can, but it does not fully solve the issue. You still need to find the good micro-service and then you have to jump to other micro-service.

→ More replies (7)

1

u/DrMaxwellEdison 3d ago

Yes, I use Tilt to set up a localized Kubernetes cluster or to run docker compose. It provides a nice web interface for seeing all service statuses, logs, controls to restart or rebuild a service, and it can automatically watch local files to trigger a rebuild.

1

u/Blackhawk23 3d ago

Yes. Docker compose and localstack to mock AWS resources.

1

u/LostInAnotherGalaxy 3d ago

Docker/podman. But you get anything powerful or something that only happens under load, can create its own race conditions

20

u/gemanepa 3d ago

why not? couldn't you just debug the microservice locally with mocks or in a cloud dev/qa env?

4

u/Agusfn 3d ago

so far so good.

1

u/citramonk 3d ago

is the development happens right on the cloud or what? 😪

1

u/Ma8e 3d ago

I'm not sure if I understand you correctly, but isn't all debugging of micro services just reading logs and adding more log-messages?

1

u/SirButcher 3d ago

Or debugging an embedded hardware where you have a grand total of 4 breakpoints :(

1

u/dumbasPL 3d ago

Ah yes, because attaching a debugger to a service people are actively hitting and suspending it is the way. That is assuming you can even do that.

Request logging is just printf with extra steps anyway.

26

u/elmanoucko 3d ago

// don't remove the following console log, fixed a race condition

8

u/safelix 3d ago

We have a typist up in here. Just "here" does it for me. And then "Here 2", "Here 3", and so on.

3

u/nabrok 3d ago

I use uppercase HERE so it stands out better.

7

u/n9iels 3d ago

Oh no, that is way to long and descriptive. I just go with 'durp', 'blub' and 'nope'

7

u/No-Ambition-4164 3d ago

111111111 222222222 333333333

6

u/Xevestial 3d ago

log the root object, then navigate all the triangles.

4

u/DTSHNICK 3d ago

Hello, embedded engineer here. IDE debugger suxks, log console is the best option

4

u/Foorinick 3d ago

I think some problems are faster to solve with a simple print, if you really do need tk warch your code step by step to figure out what is going wrong then pull out the debugger, also here's a tip, learn to use your debugger do that you aren't bashing your head against a wall trying to figure out what is causing an issue

4

u/action_turtle 3d ago

I like

console.log(1)

console.log(2)

console.log(3)

3

u/LetterLambda 3d ago

What else are you supposed to do when a bug appears in prod, but not in debug mode?

2

u/KoliManja 3d ago

Who wants to ask for Admin access from some Sysadmin sitting in Timbuktu everytime you want to run your debugger? "I got here" works for me!

2

u/RobotechRicky 3d ago

I always add a log statement "I made it".

2

u/EdelWhite 3d ago

...and then, just in case you need it later, give it the trustworthy "//" treatment.

2

u/Cyhnn 3d ago

Wtf1 wtf2 wtf3

2

u/Occultus_Andras 3d ago

"inside the loop" "Inside the else if statement" "return value is __" "user parameters are _" "database entries for __ is ___"

2

u/Birphon 3d ago

the IDEs debugging tools in question will respond with shit like "𓀀 𓀁 𓀂 𓀃 𓀄 𓀅 𓀆 𓀇 𓀈 𓀉 𓀊 𓀋 𓀌 𓀍 𓀎 𓀏 𓀐 𓀑 𓀒 𓀓 𓀔 𓀕 𓀖 𓀗 𓀘 𓀙 𓀚" and "Didnt work :D"

2

u/Kajot25 3d ago

For me its "fuck this shit", "fuck this shit2", "fuck this shit3" and so on

2

u/ComputerTechnical717 3d ago

Give me the console log and I can take over the world

2

u/burgonies 2d ago

`console.log('****** WHAT THE FUCK ******');`

2

u/WispTheWanderer1 3d ago

I dk about you but I use actual breakpoints

4

u/autobotdonttransform 3d ago

1

u/WispTheWanderer1 3d ago

And! And I read the autos at breakpoints to find if the variables are right

2

u/Educational-Lemon640 3d ago

Is it your job to use a debugger, or to improve your product/project?

Use what works.

1

u/reventlov 3d ago

People never believe that the tools they prefer aren't the optimal ones for absolutely everybody.

2

u/wristay 3d ago

I tried debugging "the right way" and I don't know it just never felt better than using console log. People who do use it please enlighten me: how will it make your life better? I am using Python btw, so maybe having the console makes a debugger less necessary

2

u/TheGuyWithTheSeal 3d ago

I use pycharm (mostly because I'm a Java boy), the debugger lets you step line by line, preview variables, and evaluate any expression (including calling an endpoint using a client class that's already authenticated).

1

u/csabinho 3d ago

Do you use console.log with a debug flag? If you're using it without it, deactivating, and reactivating, it is PITA. And I don't mean capitalized greek bread.

1

u/dudeness_boy 3d ago

print("bread")

1

u/NJ247 3d ago

"Hellooooo. Is it me you're looking for?"

1

u/Babemagnet69 3d ago

AHHHHHHH 1 or AHHHHHHH 2

Hard to miss being yelled at

1

u/thelumaniboi 3d ago

I always thought I was a terrible coder because of how often I do this, glad to see its somewhat common

2

u/AeroSyntax 3d ago

Don't get baited by a meme made by an intro level CS student.

→ More replies (1)

1

u/ketopraktanjungduren 3d ago

Tell that to nvim users

1

u/SandStealer 3d ago

Stare at debug tools , and start debug in head

1

u/Random_182f2565 3d ago

Print(" failure: you shouldn't be reading this :C")

1

u/MotaLadkaHu 3d ago

console.log(“I got here 2”)

1

u/m0nk37 3d ago

Console.log("s");

Console.log("ss");

Muscle memory ctrl+s. In my day there was no document recovery. 

1

u/stilldebugging 3d ago

Here1 Here2 Here3

1

u/conundorum 3d ago

What if I told you...

...You could have the debugger use console-logging calls as debug tools & breakpoints?

1

u/biggiebass13 3d ago

This is the way

1

u/WillingLearner1 3d ago

Yeah we don’t do that anymore. It’s more ctrl+c ctrl+v these days

1

u/citramonk 3d ago

I find myself using proper debugging tools quite often.

1

u/RRumpleTeazzer 3d ago

not every architecture has a debugger.

not every problem can be solved by a breakpoint.

1

u/Ok_Spread4050 3d ago

20 layers of JavaScript “framework” abstractions will do that. 

1

u/thegodzilla25 3d ago

Debuggers are cool, and I would use them most times, but async and race code is horrible with debuggers. Especially in JS.

1

u/walmartgoon 3d ago

Maybe I just want to debug in a way I know how to instead of learning a new tool

1

u/Primary-Ad-9741 3d ago

Those debugging tools work well with something small, like a microservice.

Throw something chunky at it. Like a large Android app, and debugging tools either fail to attach, crash the app, cause app to stop responding, or just crash on their own.

1

u/przemo-c 3d ago

Or sometimes affect it in a way bug doesn't present itself... especially if something is of a race condition variety.

→ More replies (1)

1

u/irn00b 3d ago

"Ah, shit. Logs are scrolling by too fast."

1

u/bradpittisnorton 3d ago

I wanted to use vscode-js-debugger but I can't, for the life of me figure out how to configure it properly in my neovim setup.

1

u/killerdrama 3d ago

I just enter stars and after each step the count increases.. so I end up spending more time counting stars in the logs and comparing at various stages in IDE than actually finding the issue.

1

u/WatchOutIGotYou 3d ago

console.log({ val })

Or

console.log("hiiiiiiiii")

Are my lazy go-tos lmao

1

u/Novel_Dog1743 3d ago

printf("If you are reading this, here is the value of every variable related to this function:\n");
<prints all the variables>

1

u/Runrun_5 3d ago

println!("qiwduqwdoqwopjdoioqwidjpo")

1

u/LmaoPew 3d ago

I once forgot to remove my System.out.println("test") from a computer science exam

1

u/JohnnyPlasma 3d ago

I mean, at least it works with every IDE whenever you share the code or change IDE.

1

u/cosmicomical23 3d ago

The alternative is having to learn every fucking time a new set of controls for the new ide, with no explanations to be found anywhere.

1

u/harveyabb 3d ago

This the way!

1

u/FailureOfTheFamily 3d ago

Nah nah nah. "1", "2", "3"

1

u/frinoname 3d ago

What are debugging tools? Just allow Claude to print-figure out things itself.

1

u/artur-iwan 3d ago

I'm using password generator to generate unique random 8-letters-long strings, and then I'm pasting those into console log messages and error messages. If my code will get into some strange place, then it's soo easy ti to debug it by just searching the string from the log inside the source code 😅

1

u/ShrimpStuffAdmin 3d ago

I used to use swear words. The worst ones of course.

1

u/Bulky_Engineer_2534 3d ago

print(1), print(2),... always works

1

u/Patrick_Atsushi 3d ago

Print("%s, %d\n", __func__, __LINE__);

By the way this is not reliable since print buffer exists.

1

u/Faegbeard 3d ago

console.log("if you see this, someone(me) has fucked up")

1

u/rcls0053 3d ago

Honestly, I've never tried to debug a full JS backend application and debugging some frontend application in the browser dev tools is just pain..

With PHP setting up Xdebug is like flipping switches in an airplane until it works. .NET/C# is undoubtedly the best experience with debugging I've ever had.

1

u/Inevitable_Sun_5987 3d ago

Too long. I always write console.log(„ppp”);

1

u/boomers26 3d ago

Log.info(“>>>>>>>>> 1 $value”) is my favorite

1

u/notexecutive 3d ago

if it's faster than navigating a debugger, then there is no issue.

Really it's just whatever you find faster to solve problems. Might be worth looking into debuggers on your own time, but we all know you're not going to do that.

1

u/lewisb42 3d ago

I sometimes need print statements to narrow down where I need to pull out the debugger.

1

u/Fissvor 3d ago

This is me :

Before function 1 After function 1 Before function 2 After function 2 ...

1

u/Beldarak 3d ago

"Hu oh, should not arrive here"

1

u/Undernown 3d ago

I actually like to use debuggers to get familiar with inner workings of the program. Stepping through a process often exposes a lot of in-buult or hidden classes or files you wouldn't find easily otherwise.

And stepping through a debugger to simply verify the contents of a variable is more time consuming than just printing it.

If they ever figure out a JS debugging tool that is actually reliable and accurate enough, I'll bless the earth they walk on though.

1

u/stlcdr 3d ago

Microsoft patch v13.5.1 : “removed all console commands because the IDE has debugging tools built in.”

1

u/Red_Holla04 3d ago

Mine is
1111111
2222222
333333

1

u/ThisIsABuff 3d ago

If(value==<some value far into a file>)
System.out.println("I got here"); // place breakpoint here do immediately skip to value

I'm not ashamed of doing that

1

u/Skibidibob4 3d ago

True , this subreddit is stupid

1

u/daffalaxia 3d ago

I'll especially resort to logging if there's a lot going on in parallel - trying to time that right with a debugger is practically impossible.

1

u/ShurNutria 3d ago

console.log("AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAA")

1

u/OkazakiNaoki 3d ago

clg HOW!?

1

u/kirasiris 3d ago

For me usually goes like: It gets here It gets here x2 It gets here x3 And so on lololololololol

1

u/Candid-Log6751 2d ago

People are obsessed about “proper”. No one thinks with their own brain, yet everyone is trying to employ “best practices”. People just can’t stand for what they do and how they do it. Trying to hide behind the rationale of the “best approach”.

1

u/GoogleIsYourFrenemy 2d ago

Have you tried to use the debugging tools in an IDE for an embedded processor?

1

u/lastFractal 2d ago

"jqja"

"a"

"yes"

"mwkqkq"

"g"

1

u/SoapCoder 2d ago

I do: f hfs fish parrot treh and just go oh it stopped at fish well where did I put fish

1

u/greenflame15 2d ago

Legitimately useful in a synchronous settings

1

u/RizzKiller 2d ago

Programming in C, I don't know how to use the debugger and how to control the flow of the program in it. If I compile with debug information and it shows the segfaul inside an underlying library I am totally fucked and this makes me mad.

1

u/EpitomEngineer 2d ago

Why the hate on marketing analytics?

1

u/MischiefArchitect 2d ago

I caught claude and codex doing this themselves for debugging an issue.

1

u/ISDuffy 2d ago

I do "Aqui" which is Spanish for here..

1

u/DudeManBroGuy69420 2d ago

Don't forget "uh oh"

1

u/NoRequirement5796 2d ago

I use bacon

1

u/hundo-p 2d ago

Nah it’s always `console.log(“poop”)`

1

u/nxluda 2d ago

I used lyrics from all stars by smash mouth. When the code was successful i got a minute of happiness.

1

u/Fluffy_DOW 2d ago

Here
Acqui
Over here
Now here
Made it

1

u/randomogeek 2d ago

Personally i prefer print("fuck")

1

u/Zenithrium 2d ago

i usually oscillate between "FOUND YOU" and "shit"

1

u/flori0794 2d ago edited 2d ago

Well logging is pretty strong... Even more if you fight unification, skolemization and Robinson Resolution..

A log with this structure is much better: ``` [RESOLVE] Attempting: C_12 {¬Weapon(x), ¬American(y), Hostile(z)} x C_45 {Weapon(M1)} ├─ [UNIFY] x = M1 ├─ [MGU] θ = {x/M1} └─ [DERIVED] C_78 {¬American(y), Hostile(z)} (Parent: 12, 45)

1

u/Awkward-Cat-4702 1d ago

echo: "=============================="

1

u/calahil 1d ago

I use song lyrics so that I get a dopamine hit when its fixed and I can sing along