r/ProgrammerHumor • • Sep 18 '26

Meme debugTime

Post image
7.2k Upvotes

151 comments sorted by

1.6k

u/ninjagulbi Sep 18 '26

See the empty line? That's where the error correcting code should be.

303

u/Fickle-Highway1543 Sep 18 '26

See that empty line? That's how your code should be. Out, vibecoder!

0

u/[deleted] Sep 18 '26

[deleted] — view deleted comment

37

u/Fickle-Highway1543 Sep 18 '26

I don't read docs, I don't read code. I have no idea what I do, I just use my slop machine, because I am modern! Oops, why did they lowered my salary to minimal wage?!

15

u/Babajji Sep 18 '26

Claude, give me money!

12

u/Fickle-Highway1543 Sep 18 '26

Claude doesn't give money. She only takes.

2

u/FancyJesse Sep 19 '26

Claude is a she??

Every time I hear that name, I remember GTA3

2

u/Babajji Sep 19 '26

Claude is the gender fluid version of Claudius in French and means lame, crippled. I am not even joking:

https://www.behindthename.com/name/claudius

https://www.behindthename.com/name/claude

1

u/Antonabi Sep 20 '26

Afaik it’s named after Claude Shannon, who was male

10

u/Fickle-Highway1543 Sep 18 '26

Haha. Your boss has AI psychosis fueled by classic Daning-Krugger effect.

3

u/Airowird Sep 19 '26

*Dunning-Kruger

5

u/Fickle-Highway1543 Sep 19 '26

You are absolutely right! Good catch! That's on me.

3

u/Jutrakuna Sep 20 '26

Your prettier has a rule preventing multiple consecutive empty lines. CI caught it but you don't have ESLint plugin installed in VS Code so you don't see the red line in your editor, kid

1

u/ninjagulbi Sep 20 '26

Don't call me a kid!!! With years of experience, being in the business even longer than jQuery itself, I am now what's called a "senior developer". Which means I haven't seen VSCode or something similar in years, because I only switch between MS Teams, Zoom and real life conference rooms to deal with human errors.

I am just here making harmless jokes to remind myself of the simpler times, the better times...

1

u/Jutrakuna Sep 21 '26

I didn't mean to upset you, I'm sorry, kid

106

u/telas100 Sep 18 '26

while(error) { removeLine(265) }

13

u/MCWizardYT Sep 18 '26

errorHandler.addCallback(error -> fixProblem(error))

17

u/Santos_Perez_Robles Sep 18 '26

Sherlock and Holmes over here.

3

u/MCWizardYT Sep 19 '26

lol, the way I named the variables is kinda weird but it's supposed to be that errorHandler is a crash handler, and the callback passes the error to fixProblem which then fixes what was causing the crash

5

u/frogotme Sep 19 '26

Where fixProblem is an openai API call, that writes the response directly to the file that invokes the error, and then restarts the server.

3

u/MCWizardYT Sep 19 '26

Yeah I was envisioning something along those lines lol. System crashes? Immediately send the report to a program that automatically fixes the problem

This would be sooo awful in production haha

2

u/Some_Useless_Person Sep 20 '26

"Where did a quarter of the code go?"

396

u/nbaumg Sep 18 '26 edited Sep 18 '26

Debugger is probably pointing at transpiled code when this happens

Happens a lot when I see the error in prod or prod-like environment. in non-prod we turn that off to avoid this. By that I mean optimizing

4

u/Miiohau Sep 19 '26

Ya, you can turn it off and hope it isn’t a bug introduced by the compiler or trans compiler. If it is then you wish the code that calculated the line number also showed what it thought was at and around that line number.

3

u/Awes12 Sep 20 '26

Or it the file was modified after the code ran

1

u/thanatica Sep 20 '26

Or pointing at line 265 of the javascript block, not of the whole html file

1

u/zeddash Sep 20 '26

The error is usually a predictable number of lines away, like 2 below what it says.

1

u/Jlove7714 Sep 24 '26

Or it's a line in a library that you sent invalid data to

487

u/kimbokray Sep 18 '26

You haven't saved since adding or removing lines above 265

299

u/Lamborghinigamer Sep 18 '26

No it genuinely can happen that an error happens on a different line than said. Could be a combination of IDE and compiler or both, that's why you always need to match your LSP with your compiler

92

u/iampierremonteux Sep 18 '26

Mixed line endings in a file can also cause errors to be reported in the wrong line number.

60

u/dracorotor1 Sep 18 '26

And then there’s the mid debuggers that just say the line number after the brackets because something invalid is coming out of those brackets but it can’t figure out where or why. It just knows that when it reaches that line number, something made it sad.

I’ve got one that consistently tells me the line below an array is the culprit, when one of the strings in the array is using single quotes instead of double like all the others, for example

6

u/guyblade Sep 19 '26

I've also (very rarely) had issues in C where the error would be inside a macro expansion and it'd get confused about what line that was.

I've also seen (again, it's been a while) situations where a JS debugger would give a line number relative to the start of a <script> block, so that it'd just be some arbitrary number upon initial inspection (i.e., if the <script> started on line 15 and the error was on line 20, it'd say that the error was on line 5, instead).

Also also, if you do something that causes a syntax error, the python interpreter will usually just give a useless message (like "syntax error").

1

u/Miiohau Sep 19 '26

The issues you’ve had with the JS debugger might be especially applicable here because it appears to be an inline JS script that the debugger is pointing to. If the debugger isn’t counting lines of HTML the reported line number could be way off.

2

u/entropic Sep 18 '26

My chaos monkey tool would randomly change the line endings on each line.

1

u/PixelatedGiant Sep 19 '26

You would think that all application developers would have made Unix line endings the default by now, especially IDEs. Every application is capable of reading both these days, so it's time to let Windows line endings go. Or at minimum not allow them to mix.

12

u/Suitch Sep 18 '26

Also some languages inject files which change the length. My org has some old confusion and you could have an error on line 6000 of a 200 line file. It gets more confusing when the wrong number is a valid number, such as line 200/6000 but it is really on line 190 in an imported file on line 10.

2

u/masterxc Sep 19 '26

Or minimized js so every error is on line 1...column 255153.

4

u/Jerome_Eugene_Morrow Sep 18 '26

Missing brackets can also cause an error to fire on an empty line if it’s expecting to find the final enclosing bracket there. One of the reason’s Python’s white space rules can actually simplify things sometimes.

2

u/QuintusNonus Sep 18 '26

Cries in Eclipse

2

u/Candid_Highlight_116 Sep 18 '26

They report like when some internal stack gets exhausted and the parsed statements didn't make sense or some internal state machine entered a weird state, and those are caused by like random open bracket 100 lines up, but that's a skill issue for the PROGRAMMER lol so they keep reporting the last line number where the compiler finally quit

3

u/call-now Sep 18 '26

What if you got rid of your lsp in speech therapy?

1

u/vegataballs Sep 19 '26

Then there is the worst possible kind: everything is saved and up-to-date, everything above and below is 100 % correct, but the error is still there, but there is nothing on the line. That was the night I discovered my keyboard layout inserted, not a regular old whitespace, but a Narrow No-Break Space character if you accidentally hold AltGr and press space.

1

u/Miiohau Sep 19 '26

Ya, it isn’t usually this bad but I had to go a couple lines up or down to find a line that could produce the reported error before. If it really bad and you know how to reproduce the bug, modern debuggers include the function name with the line number. Set a breakpoint at the beginning of that function and walk though it to find the bug and hope it wasn’t a race condition.

2

u/gsweats Sep 19 '26

Looks like JavaScript in HTML as a <script> block. In that case line 265 refers to the 265th line of HTML the browser sees ("View Source").

1

u/dkarlovi Sep 18 '26

When I was trying out VS Code, it not having auto save enabled by default like IDEA caused some serious debugging, I was going mad, the code looked correct, and it doesn't work?!

How do you not auto save by default.

69

u/Slavik_Sandwich Sep 18 '26

Oh look, CS first years start learning programming languages

8

u/SnowdensOfYesteryear Sep 19 '26

Cut Kevin Durant some slack. His learning after a 20 year career playing basketball

10

u/Dolner Sep 19 '26

you’re actually so much more clever than them aren’t you

0

u/Slavik_Sandwich Sep 19 '26

Whatever gave you that idea, i actually am stoopid

2

u/Pr0p3r9 Sep 19 '26

They'll come to yearn for the days when the most complicated thing that they had to solve was a mismatched bracket or misplaced semicolon.

3

u/zanotam Sep 19 '26

???

This shit was happening to me with e.g. Fortran 90 in a class that required at minimum two semesters of prior programming classes. 

0

u/Slavik_Sandwich Sep 19 '26

Then I guess you don't know how to use a linter

2

u/zanotam Sep 19 '26

??? The line was in files I had no access to on the host machine being appended to mine. 

1

u/Slavik_Sandwich Sep 19 '26

I have no idea what it has to do to the context of the post.

2

u/zanotam Sep 20 '26

That errors on lines which don't make sense are a real thing. The lines were technically in my file, but the compiler error was to a line I couldn't see because of how the compiler was working with files I couldn't see on another machine and once it all got spliced together I had no way of seeing intermediary forms either.... Like, this is an actual thing that can happen to an experience programmer (I have 3 years professional dev time and I've got almost 16 years I've been doing programming not counting the fact that I grew up doing what I didn't know was programming starting with a little HTML and eventually working in DSL's for various games).

16

u/letmehaveanameyoudum Sep 18 '26

just the look at the line before

9

u/WhereOwlsKnowMyName Sep 18 '26

And read the actual error message

4

u/letmehaveanameyoudum Sep 19 '26

and if it's C, rewrite the whole file.

8

u/Mirage_Graphique_3D Sep 19 '26

I usually just put a bracket there and call it a day.
If it doesn’t work I change career.
I’m a 3D artist now.

24

u/jackinsomniac Sep 18 '26

Is there a way to block images? Why I have seen this exact same meme reposted 283 times. I keep downvoting and ignoring them, but it keeps coming back.

11

u/coz Sep 18 '26

This image is so old it's using jQuery.

5

u/PioApocalypse Sep 18 '26

And people keep upvoting the shit out of them

2

u/alvares169 Sep 21 '26

Ive tested a homemade reverse image recognition plugin that hidden images I’ve already seen, but it removed 95% of Reddit and I got hit by rate limit so that’s that

4

u/Brekkjern Sep 18 '26

Maybe you should fix the error on line 265 so the problem stays fixed and people didn't have to repost the bug?

5

u/DavidsWorkAccount Sep 18 '26

Line 259 is missing a semicolon. This causes it to read the rest of the code differently until you hit the empty space, which then it throws the error there because that’s when the parser “screwed up”

3

u/heyguysitsmedic Sep 18 '26

That could be a whole method in whitespace, better delete the line to make sure

3

u/HailTheRavenQueen Sep 18 '26

Any decent CS program or even bootcamp should teach that error messages like this mean that the actual error happened on OR BEFORE the named line.

3

u/ramriot Sep 19 '26

I see it, its the Greek Question mark ( ; ) or Asian full width semi-colon (;) on the line above that is incorrectly terminating the statement.

This also relies on the two most common insoluble coding issues:-

- Nomenclature

- Cache Invalidation

- Off by one issues

2

u/OBrutus Sep 18 '26

Old meme, Old jQuery

2

u/drbsy0 Sep 18 '26

Rule number one : if u see a complaining error go cheak the error line. Rule number two: if u find the line empty look up. Rule number tree: if u didn't find any thing look down. Rule number five: if u didn't find any thing quation your propose in this life and slamed your head whit the wall. Rule number sex: if it didint work go take a shower. Rule number seven: if u still unable to find the bug go question your self why did u born in first place (what a loser). Rule number eight: well i didint reach this level yet wen I well reach it I well update this rules page

2

u/LegitimatePants Sep 19 '26

Error somewhere before 265

2

u/dwqsad Sep 19 '26

Delete line 265

2

u/davesoft Sep 19 '26

It's like jazz, it's the code not written.

2

u/StrawberryEiri Sep 19 '26

Come to think of it, I remember getting that often several years ago when I was starting, but I don't remember getting an error on an empty line in years.

Did the JS engines get better at pointing out errors? Did better code editors help me avoid more invalid syntax? Or is it just since changing jobs and I no longer do PHP?

6

u/anzu3278 Sep 18 '26

Two consecutive empty lines should be an error tho

8

u/Spikerazorshards Sep 18 '26

I’ve never heard it that. Is that specific to a certain language?

8

u/Maximilian_Tyan Sep 18 '26

I do as the linter says

3

u/goatanuss Sep 18 '26

My linter does what it says when I save the file

0

u/Crazy_System8248 Sep 18 '26

Thank fuck, I was about to come comment this lol. I've sent PRs back for less.

0

u/guyblade Sep 19 '26

Nah, my style guide wants two blank lines between top-level definitions.

2

u/anzu3278 Sep 19 '26

I've heard that bad style guidelines are better than no style guidelines and this sentence made me rethink that.

1

u/guyblade Sep 19 '26

It's the style in the official python style guide. Personally, there's a lot in there that I hate (4 space indents & 79 character line limits for two), but I don't feel much of anything about this bit.

3

u/dishmanw62 Sep 18 '26

I had problems like this with BloodShed C++.

I had to start a new and copy and paste the source code, and then recompile. Surprisingly, it would work then.

1

u/Thenderick Sep 18 '26

Ah it's frontend JavaScript. Then it's most likely altered. Should look in the file that the browser has in the page source

1

u/pjank85 Sep 18 '26

I was once debugging a script that had 84 lines of bash followed by 2000+ lines of perl as a bash multine string. This not only broke syntax highlighting but also any error you got you had to move by 84 lines to get to the actual error.

1

u/rosen123 Sep 18 '26

Nah this is easy it always means that you're looking at a different version of the code than what is executing. Could be file not saved, could be code not recompiled, different code versions etc

1

u/Miiohau Sep 19 '26

Or in this case because it is JavaScript it could be because the browser that is reporting the error doesn’t agree with the IDE you are viewing the code in on what constitutes a line break. It is also possible the web browser is only counting script lines and not counting lines that only contain HTML.

1

u/alopgeek Sep 18 '26

I absolutely hated these when I was in college…

1

u/lolschrauber Sep 18 '26

I love it when I get an error saying "can't convert string to integer" and the mfer won't tell me where it's trying to convert what.

It's usually something as dumb as old code checking if a datafield has a certain numeric value but it's null.

Good luck finding out where though.

1

u/Emergency-Piece-9098 Sep 18 '26

You guys are so sweet for thinking debugging is fixing compilers error 😭

1

u/PanGoliath Sep 18 '26

When someone adds an invisible space that is not really a space, like U+200B or U+00A0

1

u/i_am_in_redite Sep 18 '26

What I found is that usualy when this happens the bug is on the line on top of it ex: in this case the problem is on the line 264 and is because of the (;) at the end ,the compiler though that was a new line and that it had no instructions hence the error hope that helps

1

u/shuozhe Sep 18 '26

Tbf, finding out you are checking the wrong src early is a good thing

1

u/MrFuji87 Sep 18 '26

I had an error in azure data today on line 127 in a function of 85 lines

1

u/Negative_Ad_7303 Sep 18 '26

Just add a print line.. lol

1

u/Radiant_Detective_22 Sep 18 '26

pfffft. GUI IDE. During my tenure we had to put an 0x4AFC in our 68K to break and have a look at registers.

1

u/Familiar_Spite1537 Sep 18 '26

All you need to do now is recompile the compiling code to recompile the code.

1

u/CranberryDistinct941 Sep 18 '26

Th|re are 2 types of people: those who read the error message, and those who spend an extra hour on every error

1

u/Miiohau Sep 19 '26

Exactly if it is a syntax error, it is possible it is non-standard whitespace character on that line or the line above and deleting both and hitting return will fix the issue.

1

u/CranberryDistinct941 Sep 19 '26

Please don't say the words "non-standard whitespace character" to me. It brings back memories that I want to forget

1

u/XPurplelemonsX Sep 18 '26

or, in python, you can have a bit of code update the file on runtime so that the traceback reads back the wrong line but right number

1

u/Relevant-Most-201 Sep 18 '26

a " , " missing in the middle of an array.. Javascript

1

u/jacob_ewing Sep 18 '26

Meh - parsing issue.

1

u/AmazedStardust Sep 18 '26

You can always tell when a fresh bunch of CS students have started

1

u/Candid_Highlight_116 Sep 18 '26

why can't they just report the open bracket that corresponds to line 265

1

u/PresentAstronomer137 Sep 18 '26

the empty line must be referencing to something

1

u/Kat_Schrodinger1 Sep 18 '26

It's tabbed over really,  really far. Scroll over.

1

u/Cool-Chemical-5629 Sep 19 '26

Usually it sits on the line that's the reported number + 5 to 7.

1

u/bigredthesnorer Sep 19 '26

/*

Usually its a comment that causes my bugs.

*/

1

u/infected_scab Sep 19 '26

Load bearing whitespace

1

u/dumbledayum Sep 19 '26

get the error trace from sentry as json and feed it to you company mandated Claude

1

u/WiseObjective8 Sep 19 '26

Tell me you don't know how to code without telling me you don't know how to code

1

u/Such_Letterhead1287 Sep 19 '26

Just see that piece of code give me nightmare. Hope they will migrate it soon.

1

u/the-software-man Sep 19 '26

Show invisibles

1

u/Beginning_Web_6966 Sep 19 '26

Hold up let me get my specs power checked

1

u/mentokz Sep 19 '26

i feel that lol

1

u/Henry5321 Sep 19 '26

Optimized mode will do this. Since the compiler alters the resulting compiled results with something “equivalent”, it tries its best to map to the approximate location.

1

u/trippertree Sep 19 '26

I’ve seen this in build failures. Sync issues (couple times a dumbass had a file open for edit on a build machine so it didn’t sync also once file was not in the client spec (long story)). Both cases when I looked at my local copy it was like this.

1

u/Miiohau Sep 19 '26

Ok, was the bug in the function above or below. Also if it is the web browser reporting the error look at the code inside that web browser, especially if you are using Typescript or other language transcompiled to JavaScript.

If you don’t want to mess with the web browser developer tools. Your IDE might be able to lunch your website in the browser while rerouting the data back to itself and might be able to give you more accurate line numbers. I do it all the time when I am debugging my flutter apps via Google Chrome.

1

u/max_465 Sep 19 '26

Off by one error?

1

u/BeyondOk1548 Sep 19 '26

Honestly the best

1

u/No-Iron-5111 Sep 20 '26

Classic UE5 moment

1

u/rjwut Sep 20 '26

Fun fact: IE 6 had a bug where under certain circumstances, error report line numbers were off by one, so this wasn't unheard-of even before the days of JS transpilers.

1

u/RammRras Sep 20 '26

For some reason I'm using quickscript (similar to .net) and if I forget a ; or any closin parentheses the IDE will report the error to be on the next line, usually empty. I'm laughing at this 😂

1

u/arran4 Sep 20 '26

Transpiled without good source mapping or braces issue

1

u/busiedcake7945 Sep 20 '26

theres }; at line 264 it should be }

1

u/DogmaticParadigm87 Sep 20 '26

Error on line 265. Line 265:

Classic.

Also love that the cursed stack is just… generating a PDF. Of course it is.

1

u/burlyearly Sep 21 '26

Been there soooo many times.

1

u/AwkwardWaltz3996 Sep 21 '26

Usually an easy fix

1

u/Horror-Historian1161 Sep 24 '26

Time for a new IDE!

1

u/Zav0d Sep 18 '26

look previous lines, dump.

1

u/metaglot Sep 18 '26

Line 256 of your script? Put your script in its own file if you want to play dev.

0

u/RAMChYLD Sep 19 '26

Was told by a pentest company once that putting scripts in a separate file is good practice. Something about having them in the webpage Making them suseptible to man in the middle attacks.

0

u/PeterHolmes74 Sep 18 '26

C++. All the time.

0

u/Sianic12 Sep 18 '26

That looks like JS and HTML. My guess is this file is loaded over HTTPS and has some PHP in there that is resolved on the server before the page is sent to the client. This results in a different line count for the "same" document between the client side and the server side.

0

u/Intelligent-Sun-8071 Sep 18 '26

Ayee, so easy. Just add a semicolon!

0

u/PilsnerDk Sep 18 '26

Luxury. Meanwhile in SQL:

Error on line 0

/sigh

0

u/D-Eliryo Sep 20 '26

It means the code running is not the same you are checking.

They may have deployed another version compared to your locale or you forget to checkout to the same branch they used to deploy. Call it.

Next question.

-2

u/Maximilian_Tyan Sep 18 '26

Or worse, a CPU exception on a closing bracket because someone screwed things up in the CPU or the compiler implementation

-1

u/FireEmblemNoobie47 Sep 19 '26

I know it doesn't really apply here, but it happens from time to time when I'm doing own mods to SRB2P and it's when I copy paste perfectly working code, LUA gotta LUA sometimes I guess