966
Shiiieeettt....... (lemmy.world)
you are viewing a single comment's thread
view the rest of the comments
[-] sbv@sh.itjust.works 78 points 10 months ago

I feel like modern compilers would turn their nose up at that shit. "Dead code? Ewww! No way I'm letting that into my syntax tree!"

[-] ShortN0te@lemmy.ml 72 points 10 months ago

A lot of IDEs would probably throw a warning about unreachable code.

[-] bus_factor@lemmy.world 25 points 10 months ago

Golang won't even compile with dead code. Unfortunately that's too strict, you just end up commenting out the whole block instead. At least the commented out code is obvious in review, and some automated checks catch it if you have them.

[-] ramjambamalam@lemmy.ca 3 points 10 months ago

commenting out the whole block

var foo is declared but not used is such a pain in my asshole when doing this.

[-] Pyroglyph@lemmy.world 13 points 10 months ago

implying that any developer actually reads warnings

[-] vox@sopuli.xyz 14 points 10 months ago* (last edited 10 months ago)

most of my (rust) projects have zero (or maybe 1-2) warnings, unless I'm in the middle of working on a feature

[-] micka190@lemmy.world 24 points 10 months ago

First thing I do on my projects is enable warnings as errors and increase my warning levels when reasonable.

Unfortunately, the same can't be said on the projects I work on at work. Drives me crazy that we get likes 300+ warnings whenever we run the app and that we can't change it because "they're just warnings*.

[-] Alexstarfire@lemmy.world 8 points 10 months ago

🤢 Good lord.

Though, I say that as I was basically forced to accept code that was using something marked deprecated because it was unreasonable to refactoring the code in that project. And I know we're never going to change it unless it stops working. 😭 At least I marked it as an issue on the review.

[-] micka190@lemmy.world 9 points 10 months ago

Oh yeah, I'm genuinely about to hand-in my resignation as soon as I find another job over this kind of shit. I keep being told that the business is really trying to clean-up its act when it comes to coding practices, but they keep putting some of the most incompetent people I've ever worked with in charge of shit (because they do promotions based on years of experience instead of actual actionable experience). It's awful.

[-] PoolloverNathan@programming.dev 7 points 10 months ago

That's when you add #![deny(bad_code)], making sure that nobody notices.

[-] Potatos_are_not_friends@lemmy.world 5 points 10 months ago

It's not that we want to ignore warnings. It's just that most warnings take time to fix.

There's only so many hours in a day. And we have to accept technical debt in order to deliver, and then pay it off later.

My job does it well by doing a "spring" and "summer" cleaning where we can turn out 100+ warnings into the single digits. Then busy season happens again and we're back to 200+.

[-] micka190@lemmy.world 3 points 10 months ago

It’s not that we want to ignore warnings.

Speak for yourself, I promise you the team I work on actively ignores warnings and doesn't even want to solve them as they pop-up. Being told you can't compare doubles (because of precision loss) and ignoring it is on the developer and isn't even that hard to fix. Most of our warnings come from shit like that.

Like, I get it. It's probably not worth it to hunt down every "unused variable" warning (especially in an API where we used to have a variable for it and we don't use it anymore and we don't want to break the existing API so we just leave it there), but there's things that are just trivial to fix when you're working on code that's right next to it.

[-] MonkderZweite@feddit.ch 3 points 10 months ago

Drives me crazy that we get likes 300+ warnings whenever we run the app and that we can't change it because "they're just warnings*.

Laughs in Xamarin. Only 300?

Well, it was a year ago, is Xamarin now finally changed to the new thing (what was it's name)?

[-] SpookySnek@sh.itjust.works 2 points 10 months ago
[-] MonkderZweite@feddit.ch 1 points 10 months ago

Right, thanks. The KDE thing.

load more comments (15 replies)
this post was submitted on 25 Feb 2024
966 points (98.1% liked)

Programmer Humor

32706 readers
447 users here now

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

Rules:

founded 5 years ago
MODERATORS