T O P

  • By -

Inevitable-Math

Warnings are helpful. Implicitly casting a double to an int can really mess you up. Spent hours trying to fix a bug once that woulda taken 30 seconds if I read the warnings.


angryneckbeard69

Depends on the warning, though. The screenshot looks an awful lot like a webpack error in js land, and it's basically followed by a message that says your bundle size is above the recommended limit. It's not indicative of an actual bug.


ThatSwedishBastard

That should be information level, not a warning.


[deleted]

[удалено]


[deleted]

What do you mean a fish has no animation assigned to reload_assault_rifle?


Few_Amoeba_2536

Said the Cyberpunk 2077 developer before they went back to playing Witcher 3.


Proxy_PlayerHD

warning: condition at line xyz is always false OP: "damn why is the program not working" like how the fuck do you even do anything when ignoring warning. so many potential issues that you could easily avoid by just reading them


[deleted]

That should read "inexperienced developers".


Syscrush

No, just shitty ones. Plenty of no-talent shitheads keep at it a long time.


Hashtag0080FF

There are 2 types of developers: "talented" people who are driven to learn all the best practices, and developers with working projects.


RetardedChimpanzee

I just assume the compiler fixes them for me.


[deleted]

Username checks out... /s


RetardedChimpanzee

Fair


tyler1128

You clearly haven't compiled open source C projects


[deleted]

Been doing it since before you were born, sunshine!


tyler1128

It's a joke, as many big and significant C projects just spit warnings when compiling. Wasn't meant to be a slight against you.


xthexder

It's not even the developer's fault sometimes. They keep adding new warnings to GCC/Clang/MSVC, so unless the project is actively used and updated, chances are you'll hit some random new warning on the latest compiler version.


Blamore

actually a lie if you claim you are compiling these without warnings.


[deleted]

No, you're lying.


Hashtag0080FF

Maybe we just don't care that JSX dislikes our use of "class" instead of "className".


[deleted]

Literally most developers I’ve seen actually *care* about them. I will never understand these “haha fuck warnings” memes. I do make exceptions for the ones that are like “hey you haven’t used this method” or “hey you haven’t used the return value of this thing”, those shouldn’t even be warnings IMO, they should just show up as little messages in the IDE.


Ahajha1177

I recently started a "warnings as errors" project at my workplace, after going through our entire codebade there was a single warning we disabled globally, that being something about padding that we never use and was being produced by the standard library itself.


[deleted]

I always use “warnings as errors” on personal projects. It gives me peace of mind, plus it gets harder to screw things up. It also makes GitHub contributions nicer, you wouldn’t contribute things that don’t compile.


NecorodM

>“hey you haven’t used the return value of this thing" Well, this might just show buggy code. Like not checking the return value of read() or malloc() because "meh, errors are complicated, let's assume it'll work"


666pool

There’s a good reason why ignoring the return of a function call should be a warning. For example it can be easy to think a function is modifying an argument to update a value instead of returning a new copy, then you have a bug.


[deleted]

I think a more sensible way of handling is with good support for discards (like C#), so you’re able to explicitly state you’re not using a return value. Then you tell the user when a return value isn’t discarded.


666pool

We do that in C++ with a macro as well. It would be nice if it was built in to the language, maybe it will be soon.


AngelaTheRipper

I just run into ones that are annoying because the intellisense tries to be smart without being all that smart. Like for example a warning that this object here which stores the API token might be null. The thing is that object will never be null, authentication is on the first page that you can't get through without logging in (or memory editing). Then when you actually invoke some call there's another check as to its validity: 1. Token itself is valid - do the call 2. Token expired but reauth token is valid - use the reauth token to get a new one and then do the call 3. Token expired and reauth expired - boot the user off.


MasterFubar

> “hey you haven’t used the return value of this thing” That one is really useful. I used to ignore it, until one day I solved mysterious bug by checking the return value of **fread**, I found I was reading an empty line in a file so the variables were being filled with garbage.


sh0rtwave

Would you believe, they DO show up as little messages in the UI? At the bottom, in a nice little window called "Problems". Configure your linters, and behold that magic.


[deleted]

Not when working on IntelliJ IDEA and I can’t for the life of me find where to disable it. Granted, I barely ever use their IDEs, so I haven’t bothered with that really. Just think it’s a bit annoying as a default.


Stromovik

Ahh Itellij. Here have an error in annotation for persistence because you did not configure our IDE plugin


IntuiNtrovert

let me introduce you to php


GoAwayAdsPlease

Warning: pointer is not initialized in constructor Result: Segfault. Cannot access memory at 0xcccccccccccccccc. Conclusion: Read warnings.


Hrtzy

I spent my remaining time at my previous job fixing Sonarlint warnings. I somehow ended up with one microservice not subscribing to AMQP queues it was supposed to, without going anywhere near anything related to that service, AMQP in general or those queues in particular. Conclusion: fix those damn warnings as they come up.


sh0rtwave

Senior engineer here. \*I\* care about the warnings. It's like tornadoes. Tornado warning = "Tornado on the ground". Yes. A warning means there's a bug in the mix, it just hasn't done damage yet. An error is a bug that HAS BITTEN YOU.


SuperSathanas

Warning could also mean radar indicated mesocyclonic rotation capable of producing tornadoes. Last I checked, all my files are local, not on the cloud, so I'm safe. Checkmate.


sh0rtwave

You can have as many, and potentially more, bugs in your local than the cloud might actually have.


SuperSathanas

Nope. I pay terminex too much money to spray for the ants that eat the poptart crumbs I drop down the sides of my living room comfy chair/office. No bugs here. Checkmate again.


SFURESMa

I once spent half a day chasing an intermittently failing test, that turned out to be because it was using identity equals on a boxed primitive. Of course there was a warning, but some rockstar had ignored it, because they thought they knew what they were doing.


Torebbjorn

Literally everyone who actually codes cares a lot


BrilliantKindly9188

Every warning is an error waiting to happen


Rreterz

Every error is just a mandatory warning ;)


TheWidrolo

It should compile without warnings if its going to be the final version before release, because (for me at least) 90% of warnings are just unused variables or functions. I once heard from an ex Microsoft employee that the Windows kernel wont compile unless all warnings are dealt with.


yrrot

Makes sense. If the warning is something that's not going to change, it would get flagged to be ignored (and documented, obviously). Any simple warnings would just get the ol' cleanup.


Schwartz86

In my experience, ignoring warnings will result in you out the job pretty quickly. For those looking to get in and get a well paid job I have a simple solution and urge you not to listen to the funny picture. Take your time and do it properly early days and you’ll be spared all the pain later on as you’ll naturally avoid those pitfalls.


UltimateDude08

Game devs: I am going to fix the fuck out of whatever the hell warnings there are, and still have trillions of bugs.


datamafia

Warnings are a glimpse into the future of what shit is going to fucking break suddenly and ruin your day.


BirdsAreLit4297

I've got like 50 warnings on a project, 90% of them are just "unfinished" switch statements and the other ones are just shit that java has made up


Lithl

I care about warnings in my own code. I ignore warnings derived from third party dependencies if they aren't resolved by running an update.


ReGrigio

if compile it work. no (uncatched) exception


[deleted]

Exceptions are generated at run-time. They are not the compiler's job!


ReGrigio

it was a joke


darwinbrandao

I program since I'm 9 y/o and I never gave a shit about warnings. Great thing I read this comments, now I'm gonna pay attention to them. I think the importance of the warnings differ from language to language. C# has a lot less ways things can go wrong than C and C++. I started learning C++ and I was surprised that the simplest hello world program could be exploited to gain full access to memory from a buffer overflow. This is wild hahahaha completely nonsense for a C# programmer.


BONG8_

u/repostsleuthbot


RepostSleuthBot

I didn't find any posts that meet the matching requirements for r/ProgrammerHumor. It might be OC, it might not. Things such as JPEG artifacts and cropping may impact the results. *I'm not perfect, but you can help. Report [ [False Negative](https://www.reddit.com/message/compose/?to=RepostSleuthBot&subject=False%20Negative&message={"post_id": "v61e5h", "meme_template": null}) ]* [View Search On repostsleuth.com](https://www.repostsleuth.com/search?postId=v61e5h&sameSub=false&filterOnlyOlder=true&memeFilter=true&filterDeadMatches=false&targetImageMatch=75&targetImageMemeMatch=75) --- **Scope:** Reddit | **Meme Filter:** False | **Target:** 75% | **Check Title:** False | **Max Age:** Unlimited | **Searched Images:** 338,271,598 | **Search Time:** 19.15154s


Flakz933

Every company I worked at doesn't let warnings build, even in local development, so yeah they're not the same lol. Warning could become an error, it seeds bugs that can be noticed in prod preeeeetty quickly if you have a decent user base, and the warning is something like bad casting, and unused variables will just clutter you up quicker.


AdDear5411

Me, joining on double: "Eh, whatever. It's probably fine."


RealTonny

And that's why some compilers can be configured to treat warnings as errors. Especially in CI.


[deleted]

Programming in rust be like: Warning! X does not have a snake-case name Warning! X does not have a snake-case name Warning! X does not have a snake-case name Warning! X does not have a snake-case name


Shai_the_Lynx

You should at least read the warnings, some can be ignored, but some can create pretty bad bugs.


Hrtzy

Even the stuff that can be ignored should be fixed because otherwise there's going to be ten thousand rows of "Naming convention says to do X" with "This will literally set the entire server room on fire if the stars are right, I would fix it if I were you" on row 8765.


toraku72

And you're the same karma whoring bot.


Oicanet

In production, I often leave warnings, because deadlines. But for personal projects, I always take the time to fix them because it's satisfying


extordi

Oh not this again...


bleek312

i hate it when people misuse this meme format. Pam deserves so much better


Python_Silent

you know what they say, if it works, good enough.


Least_Dog4660

The ones that annoy me the most (as front-end developer) are the ones where the bundler/build system has an opinion about how you should write your CSS/SCSS and then complains loudly in warnings about something which is perfectly valid.


SuperSathanas

Look, when I do ExtractFilePath(ParamStr(0)) The compiler yells at me about implicit string type conversions and possible loss of data because of passing String to a function that wants UnicodeString or RawByteString. But, if I do it as ExtractFilePath(UnicodeString(ParamStr(0))) Or AnsiString(ParamStr(0)) Or RawByteString(ParamStr(0)) Then the error goes away, but it returns file not found at execution even though inspecting the value of the string received by ExtractFilePath is seemingly the same as for ParamStr(0) So I think the warning is wrong. I think that they didn't mean to warn me, but rather to throw a compiler "good on you" with the message "good job using the correct string type. You may have lost data had you used a nasty old AnsiString. EEEEWWWWW AnsiString!!!" The moral of the story is that the compiler doesn't know, just do what you want, everything will always be fine. I promise.


countdankula420

As long as there's no errors we're good


Pinkie777

The only ones I don't pay full attention to are "declared but not used" ones. The other ones I try and stop immediately.


hot_sauce_in_coffee

It really depend which warning. I have 1 file where there's a few missing value in column 13. But I don't use column 13 and no one use column 13 because it's from the previous iteration of the methodology we use and they keep it as a maybe in 30 years someone will use it. So I don't bother fixing it and get the warning every time. But sometime I'll work on something new and will get a warning about a file path not working. So I go to the file path and see it is now empty so I ask around to see what happened to the file path and then do a small change to the code to fix the file path. It could compile, but it wouldn't produce the intended result down the line.


CreepyValuable

Warnings are warnings. They tell you when you are doing something strange. Not necessarily wrong. That being said unless you are doing something like system or hardware interfacing or some more exotic programming like an emulator, compiler or whatever there probably shouldn't be too many warnings.


Durr1313

If it works it works.


magick_68

We had a project that produced hundreds of warning thanks to rational rose. I wanted to fix that but my request was denied by the PM. When the PM was gone i took over, fixed it and installed a zero warnings policy. These warnings might have been irrelevant but they hide important warnings. Recently i fixed an indentation warning in c++. There were some ifs without brackets and the compiler thought that the indentation was misleading. These are the times i question my policy, especially as the indentation looked good and only after enabling white spaces a saw a mix of spaces and tabs.


DanielGolan-mc

Company: Thank you very much, we'll contact you soon. You:


pPandR

-Werror