79
u/UnspeakableEvil Oct 02 '13
As a suggestion, just add this to the top of your class:
@SuppressWarnings("all")You can then factually state that you fixed 34,915 potential issues in one fell swoop, helping you to nail a pay rise.
16
u/art0rz Oct 03 '13
I had a coworker who did this (in PHP). Why is this even a feature?!
27
u/r4and0muser9482 Oct 03 '13
Cause not all warnings make sense. That is why they're warnings and not errors.
8
6
u/segfaultzen Oct 02 '13
Performance evaluation: "Most effective bug-preventer per line of code on the planet."
0
16
Oct 02 '13
Do warnings affect the quality of the code?? I usually have warning like "initialization redundant..." Because I always initialize my primitive variables to their corresponding data. Like into b = 0;.
54
u/Lost4468 Oct 02 '13
Do warnings affect the quality of the code??
Quality is a boolean mate, either it compiles (good) or it doesn't (bad).
23
u/okmkz Oct 02 '13
QA would like a word with you...
51
u/beerSnobbery Oct 03 '13
I have 4 words for QA:
Works on my machine.
29
21
u/segfaultzen Oct 02 '13
They don't affect the quality of the code, they are a reflection of the quality of the code.
I see warnings as the compiler saying, "Hey dude, I'm gonna let you pass, but you might want to check out this stuff over here. It kinda smells."
25
1
Oct 06 '13
As an experienced developer you should know the most common causes of your bugs. Eclipse gives a bunch of suggestions, but you can modify the things that give you warnings/errors. Not all of them are enabled by default so you might find useful warnings you didn't know about.
Leaving on too many warnings you don't care about makes you ignore them, so be economical.
1
u/jakes_on_you Oct 08 '13
Sometimes warnings will indicate things that are deprecated and may be removed or changed in future versions. Also non-standard statements that will compile on that compiler and may not be standard for all compilers.
13
11
u/serendipitybot Oct 05 '13
This submission has been randomly featured in /r/serendipity, a bot-driven subreddit discovery engine. More here: http://www.reddit.com/r/Serendipity/comments/1nt396/finally_got_my_java_code_to_compile_xpost_from/
82
u/segfaultzen Oct 02 '13
It compiles! Ship it!