A bit meta, but yes, spreadsheets can definitely be used for the equivalent of what "unit tests" are in code.
Interestingly, we also have "integration tests" in our spreadsheets, but this has more to do with the fact that MintData spreadsheets have native API calling ability, so we can test with external services end-to-end.
[1] MintData, https://mintdata.com
Actually even paying $1140 ($95 * 12 months) for the on-premise version is better.
This one is kinda buried in the list. This is what motivated the harsh austerity measures in Greece. So an entire country was punished because of a bug in a spreadsheet.
http://theconversation.com/the-reinhart-rogoff-error-or-how-not-to-excel-at-economics-13646
https://prospect.org/culture/books/the-crash-of-austerity-economics/
https://www.theguardian.com/business/ng-interactive/2015/apr/29/the-austerity-delusion
https://www.thestranger.com/slog/archives/2013/04/17/how-microsoft-excel-tanked-the-global-economy
http://www.cc.com/video-clips/dcyvro/the-colbert-report-austerity-s-spreadsheet-error
interview with herndon http://www.cc.com/video-clips/kbgnf0/the-colbert-report-austerity-s-spreadsheet-error---thomas-herndon
Not really, the Authors of the spreadsheet made one or more errors, AND they did not double check results, NOR any of the top-level economists criticized the results.
In other words an entire country was (severely) punished because of a wrong theory (based on erroneous data) that all the establishment accepted because it came from Harvard.
Still the main responsability sits on the economists and their peers.
I mean, not that I want in any way to absolve the politicians, mind you, but what can they do - not being economists or more generally technically experts in this or that field - if not choosing the theories from people qualified by notorious universities?
In my experience what matters in this is reputation (and network), which in itself is not "bad" in an absolute sense, but I see a lot of sloppy or downright "wrong" works (even if rarely with such severe consequences) coming from these people lately.
It seems to me like there are not (or not enough) critical reviews/checkings/etc. in some (scientific or pseudo-scientific) circles.
The Reinhart and Rogoff paper was more like factoid of a theory - no complicated model, just a dubious claim that trips off the tongue - "Studies have shown that when debt reach X level, growth tanks"
The thing about this is when the shoddy quality of the study became obvious, people could act that was what drove all the horrible things coming under austerity, as if these weren't the consensus of a large group, study-or-not-study.
https://www.ft.com/content/01fc06b8-fb6e-3e36-acb0-a1f8b47a7271
It remains true that high debt ratios hamper growth.
[1] https://scholar.harvard.edu/files/rogoff/files/response_to_herndon_ash_and_pollin.pdf
And people claim to wonder why Greece is friendly with China...
That isn't true. This paper indicated that moderately high levels of public debt constrained economic growth. As you have pointed out, the paper was riddled with errors and the evidence that moderately high levels of public debt slow economic growth isn't really there.
What happened in Greece is quite different. Lenders lost confidence in the Greek government's ability to repay their debt. Partially because there was re-statement of public debt that increased the debt level by 11% overnight.
What the Greek government did after that to get out from under this was to cut spending (austerity). Economists have always been sceptical that this would work since during a recession is the very worst time to cut spending since it reduces cumulative demand at a time when it is already down.
Indeed it did not work as we all know, but Eurozone lenders were not willing to allow a partial default which is what should have happened and being in the Euro means that there is no possibility for a devaluation.
Investors understood the rescue of Greece exactly like that anyway if you ask me. But maybe the EU had to maintain the public impression of austerity. Or rather the Germans.
Spending on services has been drastically cut, but the country has been borrowing vastly more money. The only way I see that working is if taxes have plummeted (but taxes for ordinary folk have risen slightly if anything) or if the money is being syphoned off somewhere ... but we're talking GDP levels of cash here.
Anyone explain it to me?
[1] A. Alesina, C. A. Favero, and F. Giavazzi, Austerity: when it works and when it doesnt. Princeton (New Jersey): Princeton University Press, 2019.
[2] C. D. Romer and D. H. Romer, “The Macroeconomic Effects of Tax Changes: Estimates Based on a New Measure of Fiscal Shocks,” American Economic Review, vol. 100, no. 3, pp. 763–801, 2010.
[1] Implementations of MintData spreadsheets for internal tooling & line of business applications.
The transparency of 'it's all in this workbook and you can trace it yourself' means finding mistakes (and there are always going to be mistakes) and finding the logic behind the conclusions (because there is always going to be debate about methodology and cleaning practices) is a million times easier than if the analysis was done in code.
It may be the case that you get more errors per hour in a spreadsheet than in code, but I'd bet 5:1 that errors in code based systems persist much longer, due to the lack of transparency in what the machine is thinking.
While there are lots of good tools to version code (git etc), and lots of tools to version control data (bitemporality being the usual requirement), does anyone know a tool which allows you to do both, at the same time?
You build them yourself.
The fallacy that you're bringing to Excel is pretending that it's a "all-and-be-all" in a package.
It's a tool with an embedded programming environment. Much like you'd take a basic Python install, and add on additional tools, the same applies to Excel.
The embedded programming language (VBA) is a fantastic language--it has absolutely no libraries out of the box which makes it a poor development /environment/.
To directly address your question:
- include a "version" cell on a "Config" worksheet (optionally include values for "audited by", "audited date", "audit version", "audit type", note this could be a multirow, so you could actually specify "full" audits, and mini audits)
- build a function that maps all formulas to an "Audit" worksheet
- build a function to export to CSV with the date and version tagged
- build a function to export all code modules to text files
- create whatever release-versioning you want around this: zip of exports + "deployment" XLS, GIT repo with tagged version and exports and a binary blob of the XLS, etc, etc.
(Edit: workbook vs worksheet; each tab in a workbook is a worksheet.)
Debugging a larger sheet seems really tough.
Excel gets almost as much grieve as PowerPoint does. But I’ve met 80-year old booksellers running their own demand-forecasting spreadsheets, which were more sophisticated and accurate than quite a few „business intelligence“ portals I’ve seen over the years. And isn’t that awesome?
But at a higher level, what strikes me is that spreadsheets don't get checked if they tell you what you want to hear. These stories are generally about afflicting the afflicted (Reinhart and Rogoff) and banks and traders taking on too much global risk in pursuit of local reward (the London Whale).
This is a problem with the intersection of software and society in general, and I don't have an answer.
https://dilbert.com/strip/2016-01-07
Further: https://dilbert.com/search_results?terms=spreadsheet
It did not have a "sure you want to exit?" nor any form of intelligent saving.
One of the guys worked on a spreadsheet all night without saving it along the way and hit exit, and it did.
https://www.researchgate.net/profile/Ray_Panko
https://web.archive.org/web/20070617035246/http://panko.shidler.hawaii.edu/index.htm
Purely from a SQLi point of view we have: https://codecurmudgeon.com/wp/sql-injection-hall-of-shame/
Assigning "human error" and declaring the analysis done, not considering design may be at fault.
Just Ctrl+F the keywords, the exact phrase is used three times and paraphrased a dozen time more. My favorite is “It was basically human error… there’s nothing wrong with our accounting systems”. If your spreadsheet has billion-dollar impact, why is there no 4-eyes-principle? Why do humans even have a hand in data transfer? No sanity checks? No automation? Stop blaming the user!
If it is usually some audit firm, seems like it is working somewhat as intended, at least in the business related ones. - in other cases like research it might be important enough to hire an audit firm to verify your spreadsheet model/data provenance.