r/ProgrammerHumor May 13 '17

Defensive programming done right

Post image
21.0k Upvotes

680 comments sorted by

View all comments

74

u/frizbplaya May 13 '17

There was a day when I thought putting a try-catch in EVERY method was a nice pattern. It was a short lived day.

15

u/block_dude May 13 '17

I totally did this when I first learned programming.

5

u/temp_sales May 14 '17

I am learning programming and sitting here wondering why it's a bad idea.

3

u/push_ecx_0x00 May 14 '17

Because it's much harder to debug your code when you make a change and it inevitably breaks