←back to thread

61 points scolby33 | 1 comments | | HN request time: 0.199s | source
Show context
theamk ◴[] No.46195792[source]
Deprecations via warnings don't reliably work anywhere, in general.

If you are a good developer, you'll have extensive unit test coverage and CI. You never see the unit test output (unless they fail) - so warnings go unnoticed.

If you are a bad developer, you have no idea what you are doing and you ignore all warnings unless program crashes.

replies(8): >>46196064 #>>46197215 #>>46203939 #>>46220846 #>>46221176 #>>46221435 #>>46221650 #>>46221723 #
Hizonner ◴[] No.46221435[source]
If you are a good developer, you consider warnings to be errors until proven otherwise.
replies(1): >>46221912 #
hiq ◴[] No.46221912[source]
What does a good developer do when working in a codebase with hundreds of warnings?

Or are you only considering a certain warnings?

replies(1): >>46222489 #
Hizonner ◴[] No.46222489[source]
Why does your codebase generate hundreds of warnings, given that every time one initially appeared, you should have stamped it out (or specifically marked that one warning to be ignored)? Start with one line of code that doesn't generate a warning. Add a second line of code that doesn't generate a warning...
replies(3): >>46224192 #>>46224495 #>>46224683 #
hiq ◴[] No.46224495[source]
It's rare that I work on a project I myself started. If I start working on an existing codebase, the warnings might be there already. Then what do I do?

I'm also referring to all the warnings you might get if you use an existing library. If the requirements entail that I use this library, should I just silence them all?

But I'm guessing you might be talking about more specific warnings. Yes I do fix lints specific to my new code before I commit it, but a lot of warnings might still be logged at runtime, and I may have no control over them.

replies(1): >>46227361 #
Hizonner ◴[] No.46227361[source]
> If I start working on an existing codebase, the warnings might be there already. Then what do I do?

What would you do if the code you inherited crashed all the time?

Come up with a strategy for fixing them steadily until they're gone.

replies(1): >>46229239 #
1. hiq ◴[] No.46229239[source]
If this code crashed all the time there'd be a business need to fix it and I could justify spending time on this.

But that's not what we're discussing here, we're discussing warnings that have been ignored in the past, and all of a sudden I'm supposed to take the political risk to fix them all somehow, even though there's no new crash, no new information.

I don't know how much freedom you have at your job; but I definitely can't just go to my manager and say: "I'm spending the next few weeks working on warnings nobody else cared about but that for some reason I care about".