r/shittyprogramming • • Oct 02 '13

Finally got my Java code to compile!

Post image
267 Upvotes

23 comments sorted by

82

u/segfaultzen Oct 02 '13

It compiles! Ship it!

61

u/Tmmrn Oct 02 '13

"Regression testing"? What's that? If it compiles, it is good; if it boots up, it is perfect.

Torvalds, Linus (1998-04-08).

17

u/galaktos Oct 02 '13

Great, now I spent an hour on Wikiquote:Linus Torvalds :)

14

u/gianhut Oct 03 '13

son of the bitch! gotta drag others down with you

2

u/MrSnare Dec 19 '13

Microsoft, is that you?

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

u/SolomonKull Oct 02 '13

With the right client, this may get you a small bonus...

6

u/segfaultzen Oct 02 '13

Performance evaluation: "Most effective bug-preventer per line of code on the planet."

0

u/[deleted] Oct 03 '13

[deleted]

10

u/[deleted] Oct 03 '13

There are no errors though. OP is a god.

16

u/[deleted] 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

u/SnowdensOfYesteryear Oct 03 '13

Two words better:

Cannot reprod.

2

u/_BearArms_ Oct 08 '13

Sounds like a PEBKAC issue.

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

u/ZXfrigginC Oct 03 '13

And then you kinda shove it in a corner and let it rot.

1

u/[deleted] 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

u/Jaimehrubiks Oct 03 '13

Aren´t you the gta online servers programmer are you?

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/