Click here to Skip to main content
15,881,877 members

Survey Results

Do you do defensive programming?

Survey period: 14 May 2012 to 21 May 2012

"Defensive programming is ... intended to ensure the continuing function of a piece of software in spite of unforeseeable usage of said software". ie provide air-bags and ABS for your code. (suggested by the enigmatic V)

OptionVotes% 
Yes, I use defensive programming always19316.67
I use defensive programming mostly51044.04
I use defensive programming rarely19817.10
No, I don't use defensive programming design595.09
I have no idea of what you speak.19817.10



 
AnswerWhat? Pin
Eddy Vluggen20-May-12 4:56
professionalEddy Vluggen20-May-12 4:56 
GeneralRarely, only if it makes my code crash faster Pin
Nicolas Dorier18-May-12 12:06
professionalNicolas Dorier18-May-12 12:06 
GeneralI do offensive programming PinPopular
Xiangyang Liu 刘向阳16-May-12 8:22
Xiangyang Liu 刘向阳16-May-12 8:22 
GeneralOh you mean future proofing Pin
Mycroft Holmes15-May-12 21:38
professionalMycroft Holmes15-May-12 21:38 
Generalno Pin
Michael Bergman15-May-12 13:29
Michael Bergman15-May-12 13:29 
GeneralRe: no Pin
Pete O'Hanlon17-May-12 1:42
mvePete O'Hanlon17-May-12 1:42 
GeneralRe: no Pin
Michael Bergman18-May-12 9:56
Michael Bergman18-May-12 9:56 
GeneralGenerally, yes, but it isn't always necessary Pin
Gregory Gadow15-May-12 9:22
Gregory Gadow15-May-12 9:22 
GeneralShouldn't this be "Do you do sensible programming?" Pin
Eksith15-May-12 9:03
Eksith15-May-12 9:03 
GeneralKnow Thy Enemy Pin
W Balboos, GHB15-May-12 5:12
W Balboos, GHB15-May-12 5:12 
GeneralDebug.Assert Pin
Andy Missico15-May-12 3:41
Andy Missico15-May-12 3:41 
GeneralRe: Debug.Assert Pin
Philippe Mori17-May-12 3:04
Philippe Mori17-May-12 3:04 
GeneralSane amount of Defensive Programming Pin
Jyothikarthik_N15-May-12 3:12
Jyothikarthik_N15-May-12 3:12 
GeneralRe: Sane amount of Defensive Programming Pin
Gregory Gadow15-May-12 9:22
Gregory Gadow15-May-12 9:22 
GeneralRe: Sane amount of Defensive Programming Pin
Vivi Chellappa18-May-12 20:22
professionalVivi Chellappa18-May-12 20:22 
Jyothikarthik_N wrote:
Programming defensively for stupid users is just tiresome.


In India, you have people trying hard to break any system you give them.

Thay are not stupid. They are intelligent.

It is their way of rebelling against the system.

There are three kinds of systems: fool-proof, idiot-proof and elephant-up proof.

India is the world's laboratory for elephant-up proofing anything. Sort of like the Underwriters Laboratory in the US.

An example.

Here in Chennai, the Outsourcing Capital of the World, the Municipal Corporation computerized the property payment system.

Inexplicably, the computerized system assigned number 162-0000-025 to my friend's house. The previous number was 162-0000-000.

The guy who took in the payment of the property tax, struck out the 025 and put in 000 - the old number - and tried to apply the payment. The system moved it to "Suspense Account". This went on for 4 years. It has taken countless visits to an overcrowded central office to try to resolve the issue. My friend is out at least one tax payment.

It is a good thing that 000 was not assigned to someone else. Then my friend would have been paying somebody else's property tax and the Municipal Corporation would cheerfully have told her to contact the other person and get the money back!

modified 19-May-12 2:35am.

GeneralSometimes Pin
HaBiX14-May-12 23:41
HaBiX14-May-12 23:41 
GeneralWhat's defensive? Pin
RedSonja14-May-12 21:59
RedSonja14-May-12 21:59 
Generaldefensive programming only for production code Pin
embix14-May-12 21:27
embix14-May-12 21:27 
Generalwe do offensive programming (sounds better!) PinPopular
devvvy14-May-12 21:03
devvvy14-May-12 21:03 
GeneralRe: we do offensive programming (sounds better!) Pin
RedSonja14-May-12 21:52
RedSonja14-May-12 21:52 
GeneralBuilt-in vs Ad hoc Pin
Peter N Roth14-May-12 14:12
Peter N Roth14-May-12 14:12 
GeneralRe: Built-in vs Ad hoc Pin
Rob Grainger14-May-12 23:41
Rob Grainger14-May-12 23:41 
GeneralRe: Built-in vs Ad hoc Pin
Peter N Roth15-May-12 6:29
Peter N Roth15-May-12 6:29 
GeneralMessage Removed Pin
15-May-12 8:02
professionalN_tro_P15-May-12 8:02 
Generalfensive Pin
TinyRamsamy14-May-12 12:13
TinyRamsamy14-May-12 12:13 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.