News for hackers. Stuff that matters.
Re:Ditching Excel for Python in a legacy industry by sam_bristow on Wednesday December 30, 2020 @10:06PM (#25589152)
Funny story about Excel on corporate machines. A couple of years ago the company I work for got boight by an Italian company. When we finally migrated the Windows users over to the corporate Office installs a bunch of people found that Excel wouldn't work for them. Things like sum(A1:A20) were syntax errors.

After a bunch of digging i worked out that the localisation from corporate meant they suddenly had Italian function names not English. Very confusing.

Excel is a program that is both incredible and terrifying to me. There are ways of building spreadsheets that are reliable and auditable. Then there's how 95% of people do it.

You can start out really quickly and make great progress. But it tends to grow and metastasize before you know it.

Re:Ditching Excel for Python in a legacy industry by etothepii on Wednesday December 30, 2020 @11:48PM (#25589691)
It must be easier to build an auditable and reliable solution using a high-level language programming language and concepts like source control and automated testing.

Excel is only easier if you aren't interested in building something auditable and reliable solution that might have some hope of being maintained after you have left the company.

Re:Ditching Excel for Python in a legacy industry by sam_bristow on Thursday December 31, 2020 @12:07AM (#25589795)
That's the thing, most Excel workbooks start out as a one-off then gradually get adapted and extended until they're load-bearing.

They're often built by specialists in another dept who definitely wouldn't consider themselves programmers.

Doing it 'properly' would probably mean having to spec put the problem, get a budget, maybe wait a few months for someone to look at it. And the same thing every time the requirements change.

Excel is available today and they can get started solving their immediate problem straight away.

After it's been in use for a couple of years and shown value someone takes a look and sees the Lovecraftian horror it's become.

Re:Ditching Excel for Python in a legacy industry by tomnipotent on Thursday December 31, 2020 @02:04AM (#25590308)
> until they're load-bearing

This cannot be stressed enough. I've outlived generations of finance teams at many startups, and I've seen firsthand the masterpieces/abominations left behind in Excel. Imagine a dozen sheets with ad-hoc queried data copy/pasted from System A/B/C/D into Excel, with formulas that feed formulas that feed formulas. Sometimes columns are inputs (seasonality adjustments for monthly forecasts), sometimes their outputs (modeled growth * last year * seasonality adjustment) and more often than not their right next to each other and maybe they have different cell background colors or a black separator line. Maybe.

And this is just finance. For many e-commerce businesses, planning is done in Excel with equal zeal.

Re:Ditching Excel for Python in a legacy industry by sam_bristow on Thursday December 31, 2020 @02:41AM (#25590515)
I remember hearing about a mythical spreadsheet floating around for modelling something to do with our national grid a few years back.

It would take about 12 hours to calculate, and would error out before finishing about 30% of the time. It needed to be run once a day for something reasonably important.

I don't use Excel much these days, but I do point people to a video if they do plan on doing anything:

* [You suck at excel - Joel Spolsky](https://m.youtube.com/watch?v=0nbkaYsR94c)

Re:Ditching Excel for Python in a legacy industry by rvba on Thursday December 31, 2020 @08:36AM (#25592527)
Someone who does not use Excel nice will probably make spaghetti code as well.
Re:Ditching Excel for Python in a legacy industry by larrywright on Friday January 01, 2021 @02:22PM (#25605900)
I'd rather reverse engineer spaghetti code than a spaghetti Excel spreadsheet.
Re:Ditching Excel for Python in a legacy industry by JackoM on Monday January 04, 2021 @11:46PM (#25642219)
Most probably because you do not know Excel !? But for someone who do know well Excel and understand finance concept it'd be easier to understand the spaghetti Excel spreadsheet and find where it doesn't work properly !
Re:Ditching Excel for Python in a legacy industry by empthought on Saturday January 02, 2021 @06:57AM (#25612189)
You’ve been lucky with your spaghetti code experiences, then.
Re:Ditching Excel for Python in a legacy industry by larrywright on Saturday January 02, 2021 @06:17PM (#25617589)
At least with spaghetti code I can set a breakpoint or add print statements and get an understanding of the execution path.
Re:Ditching Excel for Python in a legacy industry by Mauricebranagh on Thursday December 31, 2020 @04:56AM (#25591243)
And you find a bug that costs you $$$$,

I worked for a company that used an opaque excel spread sheet as a part of its accounting system - turns out there where bugs and we found a massive short fall one of the contributing factors in the collapse of the company.

Re:Ditching Excel for Python in a legacy industry by etothepii on Thursday December 31, 2020 @05:08AM (#25591310)
This is the real problem. It's not with excel per se, but the complete lack of automated testing and source control.
Re:Ditching Excel for Python in a legacy industry by fnord123 on Thursday December 31, 2020 @06:00AM (#25591589)
Python works with source control and tests so this would indeed be a problem with Excel per se.
Re:Ditching Excel for Python in a legacy industry by etothepii on Thursday December 31, 2020 @08:14AM (#25592332)
But Python doesn't have to, I've seen plenty of python with 1000 line functions, no tests and no source control. It's particularly common in Jupyter Notebooks.
Re:Ditching Excel for Python in a legacy industry by mehrdadn on Thursday December 31, 2020 @02:13AM (#25590353)
> There are ways of building spreadsheets that are reliable and auditable. Then there's how 95% of people do it

Do you have any pointers to learning materials on how to do this? Would be interested in reading more on it.

Re:Ditching Excel for Python in a legacy industry by sam_bristow on Thursday December 31, 2020 @02:53AM (#25590574)
This Twitter thread is a good start: https://mobile.twitter.com/keith_ng/status/13079610874515251...

There also Joel Spolsky video I linked in another comment: https://youtu.be/0nbkaYsR94c

I don't actually use Excel much so others might have better resources.

Re:Ditching Excel for Python in a legacy industry by mehrdadn on Thursday December 31, 2020 @07:00AM (#25591887)
Oh I've already seen the Spolsky video, but I seem to recall for the most part (except for using tables, which is great) it's about how to use Excel effectively, not about how to produce maintainable sheets. The Twitter thread looks good though. Thanks!
Re:Ditching Excel for Python in a legacy industry by unixhero on Thursday December 31, 2020 @06:12AM (#25591640)
Localisation is where you first have to debug Excel formula errors. Is it colon, or semicolon; it responds to, is my goto method to approach the issue.
Re:Ditching Excel for Python in a legacy industry by HALtheWise on Thursday December 31, 2020 @09:15AM (#25592826)
This brings up a good point, which is that Excel supports localization, while Python just assumed you know English.