Hacker News new | ask | show | jobs
by wruza 1906 days ago
To add to (usual/frequent) spreadsheet software as a database cons:

  - No formula/value separation
    - Only trees, no cycles
  - No named references 
  - No (easy) functions
  - No (easy) SQL-like
    - Views
    - Triggers
    - Default values
    - Constraints
      - Advisory at least
        - No linter
  - No birdeye for a schema
  - Shit typed
    - Even if you insist
  - No who when what
One could add to this more and more, but the biggest issue with SSAAD is that a seasoned developer can’t even help a user to maintain its sanity or find errors. Users will break every rule because a software development is full of unspoken practice but it didn’t bite them yet. And when it finally does, when a user feels an overwhelming complexity and that lack of control kills their operation, it already costs a small fortune to reveal and reimplement all nuances and edge cases into software requirements. I’ve seen a few businesses that became a function of what they can do with Excel and what Excel can do with them.
4 comments

Theoretically these are all problems with Excel, not with spreadsheets in general.

Also Excel does support circular references; I once worked for a guy who used them to iteratively fit a model!

I'm waiting for "the programmer's spreadsheet" where you have functions, clean separation of "data" and "display", proper types, and some kind of sensible version control.

I am working on a product which is pretty much exactly what you describe. I love spreadsheets but I wanted something that I wanted to actually program in right from the beginning to the end of my work process.

It’s called Inflex: https://inflex.io/

And it is a pure functional programming language, with cells, which are reactive, and with real data structures like lists and records. We have a work in progress beta. Sign up requires a paid subscription, but only because I wanted to make sure that the infrastructure was working. To try the work in progress product, you can just hit Try which lets you play in a sandbox. It doesn’t save or remember any of your work, and also doesn’t even hit our databases. (Safe from the hug of death.)

It’s pretty bare-bones right now but it’s based on ideas from Haskell, and Unison which is a content addressable language. (Every cell has a SHA512 hash of its content.) That makes versioning very easy, but this is not seen in the UI yet.

The table editing and what not is a little cumbersome right now, as there are a lot of things to come together and I wanted to demonstrate at least some of them.

Speaking of clean separation between data and display, The plan is to build for example reports using a simple HTML like DSL. Also, things like time and external data sources will be treated in the type system as explicit streams, which is an architecture that has been fully explored in Haskell under the guise of FRP.

But I’m working on this in my spare time and therefore progress is turtle pace rather than silicon valley pace. :)

Maybe something like Observable (the product not the pattern) + TypeScript?

I’ve been thinking recently that TypeScript, when considered by itself (ie, just the type system), is quickly becoming a kind of flexible type database around a very loose language.

You can force TypeScript to figure things like:

type One = 1; type Two = 2; type addOneAndTwo = One + Two;

But its very brittle and difficult to accomplish, especially if you wish to couple this back to the runtime values.

If these ever become language features, I can see this powering the thing you’re describing: a capability that gives you flexible loose JavaScript for the non-programmers that can also be iteratively tightened, possibly with a reactive view fronting all of it.

I couldn't agree more with the notion of "the programmer's spreadsheet"; I've often wondered what it would take to get something like R/Python notebooks up and running with some more spreadsheet features.
I'm not sure if you described usage or capabilities, but if the latter, these can be done in excel:

- named references - set a range name and you can use it in formulas

- functions - macros can export functions

- sql-like views - power query

It's still all pretty shit, but unless you need to support old versions or Mac Office, there are workarounds for some stuff.

Excel is a nice job-creation measure for freelancers. Re-implementing such sheet in C# was a full time job for several years for me. Modern development tools (in contrast to C or Assembler) help the user to maintain its sanity by preventing him from hurting himself. You need much less of unspoken practices to develop in Java then in C. And you will hurt yourself much later. The same goes for databases. You need much less foresight when you write SQL, but the optimizer will be overwhelmed sooner or later, if you are doing something complex. I would say that CubeWeaver prevents the user from shooting himself in the foot for much longer than Excel.
Sure, it wasn’t a criticism for $subj, just mere observations from the first part of my “career”, cause it feels like I spent a good half of it trying to unfuck xls and its consequences for orgs.
There are calculated columns in SQL, which means there's no formula/value separation there either.

Therefore also spreadsheets do offer "views": all the cells are formulas.

Regarding "shit typed", so is SQLite, but it works well.

SQL dbs vary.

You can write

  select a from b where 1
in MySQL and Oracle, because those db's treat true and false as 1 and 0, you can write

  select sum(a=1), sum(a=2) from b
others like microsoft sql and postgresql enforce a separate boolean type which means you have to put the ternary operator into the sum.
By shit typed I meant entering or pasting 1.200 into a numeric field and getting -600,000 something. This is exclusive to excel, which is “smart” enough to detect patterns in input, but not smart enough to introduce/look at the cell affinity, at locale settings or at common sense.