Slashdot is powered by your submissions, so send in your scoop


Forgot your password?
Math Software Programming The Almighty Buck

Why You Shouldn't Use Spreadsheets For Important Work 422

An anonymous reader writes "Computer science professor Daniel Lemire explains why spreadsheets shouldn't be used for important work, especially where dedicated software could do a better job. His post comes in response to evaluations of a new economics tome by Thomas Piketty, a book that is likely to be influential for years to come. Lemire writes, 'Unfortunately, like too many people, Piketty used spreadsheets instead of writing sane software. On the plus side, he published his code ... on the negative side, it appears that Piketty's code contains mistakes, fudging and other problems. ... Simply put, spreadsheets are good for quick and dirty work, but they are not designed for serious and reliable work. ... Spreadsheets make code review difficult. The code is hidden away in dozens if not hundreds of little cells If you are not reviewing your code carefully and if you make it difficult for others to review it, how do expect it to be reliable?'"
This discussion has been archived. No new comments can be posted.

Why You Shouldn't Use Spreadsheets For Important Work

Comments Filter:
  • by plover ( 150551 ) on Tuesday May 27, 2014 @08:36PM (#47103835) Homepage Journal

    What people fail to realize is that spreadsheets are like any other form of programming, and therefore should be treated as such. Write tests. Break complex formulas down into named cells. Use references to carry concepts. Beware of globals. Keep small concepts small, simple, and modular. Write more tests.

    Does anybody do that with every spreadsheet they write? Doubtful. I know I only go to all that trouble myself when I have a boatload of inputs that have to get put together. I usually discover about part way in that the sheet is going to be complex enough to need tests. When I do, it's time to start refactoring it, and these are my general steps:

    1. Give cells and ranges meaningful names
    2. Break complex formulas down to several small formulas
    3. Add tests for the formulas
    4. Factor out duplicates

    Of all of these, giving cells and ranges names is the most important, because it makes the sheets readable. I can then usually understand the results well enough to know if my formulas are working, but a complex formula often needs an independent set of tests to prove the discontinuities in the functions are actually where I think they should be.

  • Some things stick (Score:5, Informative)

    by TapeCutter ( 624760 ) on Tuesday May 27, 2014 @08:54PM (#47103927) Journal
    I recall a survey of (non-trivial) corporate spreadsheets in the mid-90's, it went something like 95% had a maths bug, in 80% of cases the bug made the sheet useless, 50% of the spreadsheets were used to make (incorrect) financial decisions. The reason why corporations coffers don't evaporate is that they use thousands of them so the +/-ve affect on the money buffer has a central limit of zero. It's a much more precarious situation if you using a single homespun spreadsheet to run a corner store
  • by Anonymous Coward on Tuesday May 27, 2014 @09:32PM (#47104159)

    Yeeaaahhhh you lose.

    Krugman was joined by economists Justin Wolfers, James Hamilton, Gabriel Zucman, frequent Piketty critic Scott Winship and others, along with The Economist's Ryan Avent, The Washington Post's Matthew O'Brien, and The New York Times' Neil Irwin, to name a few.

  • by Capsaicin ( 412918 ) * on Tuesday May 27, 2014 @10:47PM (#47104635)

    "Oh, that's just a right-wing smear from EVUL RETHUGLICANS!!!"?

    Well the part about figures being constructed "out of thin air" is a smear (whoever it may be who claims it), as becomes clear when one reads the rest of the article you cite. The most balanced assessment of the Giles vs Picketty dispute is perhaps the piece Inequality: A Piketty problem? [] from The Economist.

  • by Anonymous Coward on Tuesday May 27, 2014 @11:05PM (#47104745)

    Or OpenOffice or LibreOffice or Symphony or about a dozen more applications for office work including apps for Android and iPhone...

  • Re:Some things stick (Score:4, Informative)

    by timeOday ( 582209 ) on Tuesday May 27, 2014 @11:55PM (#47104945)
    Basically impossible to audit? This article is about the Financial Times' audit of the spreadsheet.
  • Re:Some things stick (Score:5, Informative)

    by Sarten-X ( 1102295 ) on Wednesday May 28, 2014 @12:24AM (#47105063) Homepage

    I've done audits on spreadsheets. They're not terribly difficult, and I dare say they're easier than many of the code reviews I've been through.

    The most important thing is to understand how to use the spreadsheets. Either use separate worksheets for each major step in the calculation, or at least separate the computations using extra blank space. That serves the same function as code blocks, breaking up the computation into smaller, more manageable, pieces. Each small piece can be audited separately, and it provides a clear trail of how one number becomes another.

    Next, use your formatting, even if it's not in a worksheet ever intended for public viewing. I'm particularly a fan of using conditional formatting to highlight the cells in a sheet (especially minimums and maximums) that will be passed on to the next worksheet. Then it's easy to check that the correct values are being passed, and the intermediate values all make sense.

    Finally, use your fill tools correctly to ensure that the same computation is being applied to all cells. You should be able to audit the top of your worksheet and fill down to the bottom, without any formatting or visual elements getting in the way, and know that the whole worksheet is correct. When reviewing an old worksheet, note that Excel will highlight (with a green corner mark, as I recall) cells that don't fit the pattern.

    Finally, remember that writing an algorithm for a spreadsheet has some of the same pitfalls as any other implementation. Double-check any function of which you're not certain the parameters. Put comments in non-obvious areas. Don't be too clever, and of course, if someone else can't understand your brilliance, you're not being brilliant.

  • by meglon ( 1001833 ) on Wednesday May 28, 2014 @04:04AM (#47105955)

    There is nothing worse than trying to get a spreadsheet person up and running on relational databases. They argue with you about every point, then they freak.

    Sure there is... there's trying to get a db user to understand spreadsheets. How many times have i told you, the right tool for the right job (watch out for that low hanging pipe! ..... nevermind....).

e-credibility: the non-guaranteeable likelihood that the electronic data you're seeing is genuine rather than somebody's made-up crap. - Karl Lehenbauer