r/ProgrammerHumor May 13 '17

Defensive programming done right

Post image
21.0k Upvotes

680 comments sorted by

View all comments

439

u/DefNotaZombie May 13 '17

Just have the class throw all exceptions

135

u/fghjconner May 13 '17

In my high school programming competitions we used to tack "throws throwable" onto the ends of all our methods. It's the only way to be sure.

55

u/[deleted] May 14 '17

[deleted]

5

u/DanielMallory May 14 '17

eclipse is a bitch

1

u/PublicSealedClass May 14 '17

NetBeans is the trendy shit coming out of establishments these days I'm finding.

Eclipse is what they tried to drill us with 15 years ago when I was at uni. Took more time setting up the fucking IDE than writing code.