this post was submitted on 02 Oct 2023
1101 points (98.8% liked)

Programmer Humor

37634 readers
724 users here now

Post funny things about programming here! (Or just rant about your favourite programming language.)

Rules:

founded 6 years ago
MODERATORS
 
you are viewing a single comment's thread
view the rest of the comments
[–] norgur@discuss.tchncs.de 154 points 2 years ago (5 children)

Instant PTSD. Only beaten by an error in, say, Line 84 in a file that has 72 lines only

[–] dinckelman@lemmy.world 72 points 2 years ago (2 children)

Debugging Typescript without proper tools, in a nutshell. The original file might have 72 lines, but the transpiled JS file it's debugging is like 3 times that many

[–] GamesRevolution@programming.dev 73 points 2 years ago (1 children)

That when the file isn't minified, no shit it's on line 1 there is only one line

[–] dinckelman@lemmy.world 25 points 2 years ago (1 children)

Production errors at their finest

[–] lord_ryvan@ttrpg.network 10 points 2 years ago (2 children)

Honestly, you don't want production to tell users what your exact errors are, and especially not what the source code looks like and where to find the problem exactly.

Production errors should mostly go “Well, this was on (y)our side, sorry about that” and nothing more.

[–] relevants@feddit.de 5 points 2 years ago (1 children)

If it's in the minified front end code it's already client side, of course you don't show it to the user but they could find out if they wanted to. Server side errors are where you really have to watch out not to give out any details, but then logging them is also easier since it's already on the server.

[–] lord_ryvan@ttrpg.network 4 points 2 years ago

Ah you're right, I'm thinking too much like a backend dev!

[–] bloubz@lemmygrad.ml 3 points 2 years ago (1 children)

No, not all error have security implications

[–] dinckelman@lemmy.world 6 points 2 years ago (1 children)

Not only that, but with JS you by definition have no code obfuscation. Minifying it just saves some bandwidth

[–] bellsDoSing@lemm.ee 1 points 2 years ago

Yeah, if one really wants obfuscation for JS, then it requires an extra build step. E.g. this: JavaScript-obfuscator

[–] shasta@lemm.ee 5 points 2 years ago

Enable sourcemaps

[–] xkforce@lemmy.world 25 points 2 years ago* (last edited 2 years ago) (1 children)

ugh... this reminds me of a compilation error I got that complained about an unknown character. Looked through the file, didnt notice anything, passed it around for other people to check and no one noticed anything until one person noticed that the quotes were being autocorrected to the straight quotes instead for some fucking reason. I didnt see it because 1) why would that even be a thing and 2) I am almost legally blind without my contacts.

[–] TastehWaffleZ@lemmy.world 22 points 2 years ago (1 children)

Yep. I use a piece of software that lets me drag components onto a stage and will auto generate code in the back end. We can then add our own code to customize the components.

I ran into a super cryptic error message while working on a time sensitive project and I was ripping my hair out trying to figure out what the hell was wrong. Turns out someone had pasted some code in from an email and the custom code editor displays the straight quotes and angles quotes exactly the same but the back end code generation fortunately displays them differently. The program didn't like the character set for the quotes used in Outlook but didn't give me the proper line number, the error made zero sense, and looking at the code didn't show that anything was wrong.

[–] uid0gid0@lemmy.world 10 points 2 years ago

Learned the hard way that anything copied from a MS product gets pasted to a plain text editor first. I especially love how SharePoint sprinkles "zero with space" characters liberally throughout.

[–] n3m37h@lemmy.dbzer0.com 3 points 2 years ago

So I took a Marlin firmware for my 3d printer and just changed values like the bed size and added a BL Touch by uncommenting the specified line and the Visual studio errors out. I don't get it

[–] YellowTraveller@lemm.ee 3 points 2 years ago

I've seen errors on line 0 in the past

[–] InvertedParallax@lemm.ee 2 points 2 years ago

Long inline assembler.

Might as well just delete it all and start again.