Hacker News new | ask | show | jobs
by jacobdi 1777 days ago
Spreadsheets versus programmers is a war that can be much more peaceful. In my work, I have found that, especially in data science, the spreadsheet user and the programmers are often trying to accomplish similar tasks, but the “language barrier” between them leads to much more fragmented workflows. I also think this article does a good job of identifying spreadsheets as a low-code programming language — spreadsheets are immensely powerful pieces of software. Along these lines — I’ve been building Mito (https://trymito.io/), a spreadsheet GUI for Python. Every edit you make in the spreadsheet generates the equivalent Python code.
3 comments

Spreadsheet users are programmers. Shouldn't be a war.

But, the problem with spreadsheets is that they are an engine of shoddy programming. I don't think it's fundamental. All currently existing spreadsheet implementations hide their functions and make review difficult. If we had spreadsheets that somehow exposed the relations between the cells and made them easier to inspect, ideally minimizing selective interaction (obviously you can mouseover, but that is a far more selective interaction than scrolling a file), they would be less of a problem.

To some degree notebooks (matlab/mathematica/octave, jupyter, pluto, livebook) are solving this problem, and probably being "halfway-between" spreadsheets code, with being fully reviewable is a game-changer, why data scientists like them.

I think you could also improve on the spreadsheet in other ways by being more opinionated. You could have each table be a named entity not on an "infinite-plane of cells" (so you have to set the # of rows and columns, obviously should still be easy to insert/remove rows and columns). I am sure I am not alone in thinking for the last 3 decades that graphs just "hanging out in the middle of the cells" is really stupid.

I agree with the your statements. Would add that it is important to understand most developers of spreadsheets have never taken a programming class and do not fully understand many of the issues discussed in this thread.

Also, there is little motivation to the spreadsheet user to change. In the examples given by the author, the original creator of the spreadsheet is long gone by the time the problems surface.

The cynic in me says that sometimes there is business value to keeping formulae away from review. When the regulators come knocking you get plausible deniability for "mistakes" and at least avoid treble damages.
What is especially ironic is that excel is not so straighforward to use in my experience. If you want to do something in excel that you don't know how to do, you are best off finding a search engine and looking for a 5 minute article that explains everything. Now, programming is seen as toohard for some reason, but if you were to look for how to do that exact same merge or join or barplot or whatever in, say, python or R, I bet it would be another 5 minute article no longer than the excel one. It begs the question, why use excel at all when the learning curve isn't any easier than learning a few functions in python or R? The answer in my opinion is only that its entrenched and familiar, and you have entire companies basing everything on their excel spreadsheets since 1995 because they were told then by advertisers that this is how business should be done on computers. And now we have generations of accountants and business majors going through undergrad and spending braincells and tuition dollars for coursework on the shitware that is excel, rather than learning something like R or python that they could use to create an infinite number of innovative or creative things beyond just parsing a spreadsheet.
> "why use excel at all when the learning curve isn't any easier than learning a few functions in python or R?"

It has a GUI.

Click on a picture of a pie chart[1] is enormously easier than[2]:

    from matplotlib import pyplot as plt    
        
    # Pie chart, where the slices will be ordered and plotted counter-clockwise:    
    Aus_Players = 'Smith', 'Finch', 'Warner', 'Lumberchane'    
    Runs = [42, 32, 18, 24]    
    explode = (0.1, 0, 0, 0)  # it "explode" the 1st slice     
        
    fig1, ax1 = plt.subplots()    
    ax1.pie(Runs, explode=explode, labels=Aus_Players, autopct='%1.1f%%',    
            shadow=True, startangle=90)    
    ax1.axis('equal')  # Equal aspect ratio ensures that pie is drawn as a circle.    
        
    plt.show()
And (clicking a couple of times) includes: no strings, no integers, no method calls, no named parameters, no numeric formating domain-specific-languages, no libraries, no imports, no tuples, no lists, no braces, no parens, no case-sensitivity, no symbols, no text, no writing, no syntax errors, no saving and running cycle, no having to hold the cell order and positions in your head and count through them to get to Runs[2], no trying to get the image out of the show() popup.

And includes: previews of the available charts, recommended charts, all the styles of chart work through the same UX without having to care how they are named, they popup Wizard dialogs so you don't have to read in advance what parameters are required and what they mean, in-line editing by clicking and dragging to move and resize the whole thing or almost any part of it, change the chart style without having to rewrite code differently, rewrite e.g. axis labels without having to save/run, choosing colours and styles from visual dropdowns, having the chart redraw dynamically as you change the data in the source cells, works in Excel online, works with multiple people having the spreadsheet open, chart is inline with your data in the same worksheet saved with it.

[1] https://www.spreadsheetweb.com/wp-content/uploads/2019/04/pi...

[2] https://www.javatpoint.com/how-to-plot-a-graph-in-python

Mito looks very interesting. I couldn't find pricing info. Is this open source?