After several years of testing other people’s statistical code at the QJPS, Nick Eubank blogs:
I myself once firmly believed the fallacy that the key to preventing errors was “to be more careful.” Indeed, I fear this belief may have colored the tone of of my past work on this subject in unproductive ways. Over the last few years, however, my research has brought me into close contact with computer scientists, and I discovered that computer scientists’ mentality about programming is fundamentally different from the mental model I had been carrying around. Computer scientists assume programmers will make mistakes, and instead of chiding people to “just be careful,” they have developed a battery of practices to address the problem. These practices — often referred to as “defensive programming” — are designed to (a) minimize the probability mistakes occur and (b) maximize the probability that mistakes that do occur are caught.
He suggests a number of basic defensive programming skills: (1) building formal tests into the code; (2) never manually transcribe numbers into your article text; (4) improve your style through indenting, commenting and spacing; and (5) never manually duplicating information. This seems helpful, but I’d like to see the more advanced suggestions too.
There was no point 3, which is either subversive or ironic. There are no cures for fallibility in blogging.
Update: Several readers point me to Matt Gentzkow and Jesse Shapiro’s Code and Data for the Social Sciences: A Practitioner’s Guide.
32 Responses
Wow, these intellectually @#$%#@% people sum up nothing but are able to over emphasize the obvious. You people are frightening. You know Soooo much yet lack , duh. We knew that Common fill know more of what is important in life. You brain kids over analyze everything. You’re trying to run the world when the world was designed to run you. Astro physicist. That one kills me. PH, You can tell us about the CosmoS BUT YOU can’t figure out we need food and clean water, which ch being ruined by scientic research. Maybe u people need to lighten up and live with an Amish community for a month. You idiots will b amazed.OH, OH OH, THIS GUY STUSIES PIOR PEOPLE. STAND IN LINE FOR GOVERMENT FOOD WHEN YOUR DAMNED GRANTS RUN OUT. YOU’LL GET MORE DATA FOR SURE, YOU POMPSES SCHMUCK. I have had to resort to churches kindness to feed my family. U educated just will never know about real people because u r afraid of real people. I’m guessing u wouldn’t last 10 minutes on a bus.
I myself once firmly believed the fallacy that the key to preventing errors was “to be more careful.” Indeed, I fear this belief may have colored the tone of of my past work on this subject in unproductive ways
golu dolls
golu dolls
Something to keep in mind: The solution to bad statistical code isn’t care, it’s standardized practice https://t.co/bXdrsUSB3U
@johnjhorton @cblatts It’s less comprehensive, but @hadleywickham has a style guide for #rstats https://t.co/MebfUfMbD5
RT @sanneblauw: The solution to bad statistical code isn’t care, it’s standardized practice https://t.co/FH2BfEtZVI
The solution to bad statistical code isn’t care, it’s standardized practice https://t.co/FH2BfEtZVI
The solution to bad statistical code isn’t care, it’s standardized practice https://t.co/L2Kq7lNmMJ
The solution to bad statistical code isn’t care, it’s standardized practice: After several years of testing o… https://t.co/GdLPk05kDI
RT @cblatts: The solution to bad statistical code isn’t care, it’s standardized practice https://t.co/9CNG1X2SrQ
RT @YohannaLoucheur: Useful for lots of us in #opendata sphere – Solution to bad statistical code isn’t care, it’s standardized practice ht…
RT @YohannaLoucheur: Useful for lots of us in #opendata sphere – Solution to bad statistical code isn’t care, it’s standardized practice ht…
Useful for lots of us in #opendata sphere – Solution to bad statistical code isn’t care, it’s standardized practice https://t.co/IeJwTRZP5D
@cblatts do ppl not know about this? https://t.co/hcGeU1GyCw it’s fantastic and covers most of what social scientists need
RT @cblatts: The solution to bad statistical code isn’t care, it’s standardized practice https://t.co/9CNG1X2SrQ
RT @cblatts: The solution to bad statistical code isn’t care, it’s standardized practice https://t.co/9CNG1X2SrQ
RT @cblatts: The solution to bad statistical code isn’t care, it’s standardized practice https://t.co/9CNG1X2SrQ
RT @cblatts: The solution to bad statistical code isn’t care, it’s standardized practice https://t.co/9CNG1X2SrQ
RT @cblatts: The solution to bad statistical code isn’t care, it’s standardized practice https://t.co/9CNG1X2SrQ
RT @cblatts: The solution to bad statistical code isn’t care, it’s standardized practice https://t.co/9CNG1X2SrQ
RT @cblatts: The solution to bad statistical code isn’t care, it’s standardized practice https://t.co/9CNG1X2SrQ
RT @cblatts: The solution to bad statistical code isn’t care, it’s standardized practice https://t.co/9CNG1X2SrQ
RT @cblatts: The solution to bad statistical code isn’t care, it’s standardized practice https://t.co/9CNG1X2SrQ
RT @cblatts: The solution to bad statistical code isn’t care, it’s standardized practice https://t.co/9CNG1X2SrQ
RT @cblatts: The solution to bad statistical code isn’t care, it’s standardized practice https://t.co/9CNG1X2SrQ
The solution to bad statistical code isn’t care, it’s standardized practice https://t.co/MN9raBxDrk
RT @cblatts: The solution to bad statistical code isn’t care, it’s standardized practice https://t.co/9CNG1X2SrQ
RT @cblatts: The solution to bad statistical code isn’t care, it’s standardized practice https://t.co/9CNG1X2SrQ
RT @cblatts: The solution to bad statistical code isn’t care, it’s standardized practice https://t.co/9CNG1X2SrQ
RT @cblatts: The solution to bad statistical code isn’t care, it’s standardized practice https://t.co/9CNG1X2SrQ
RT @cblatts: The solution to bad statistical code isn’t care, it’s standardized practice https://t.co/9CNG1X2SrQ
RT @cblatts: The solution to bad statistical code isn’t care, it’s standardized practice https://t.co/9CNG1X2SrQ
RT @cblatts: The solution to bad statistical code isn’t care, it’s standardized practice https://t.co/9CNG1X2SrQ