2,469 karma · joined December 7, 2014
To be clear, though, you don't necessarily have parity of outputs.
It seems strange to me to sacrifice correctness for readable output. I would prefer a deterministic strategy that is always correct and sometimes readable. You could do that by generating an intermediate structure A1=... A2=..., then applying heuristics to say "hey, this enormous column of VLOOKUPs is actually a join", and so on. Maybe LLMs could advise on that, but I'm not sure how you'd check their work...
... Anyway you're the person "in the arena", having actually created something, so well done!
Just looking at a cell, it's not trivial to see if it's the number 1 or the string 1 (you can enter text by using a leading apostrophe, but that's not the only way to get text in a cell!). Numbers and strings have different alignments by default, but that can be overridden. The numeric value of the string 1 is 0 if you're using the SUM formula, but it's 1 if you use +. In other words, =A1+A2 does not necessarily equal =SUM(A1:A2)
Then you can format numbers however you like. For example, dates are stored in spreadsheets as days since an epoch (not the Unix epoch). So you can have the number 2 in a spreadsheet cell, then format it as a date, but just the day of the month, and it can appear as 1.
There's rounding, which bit you. 0.95 can appear as 1 if you display fewer decimal places.
Finally, there's the fact that the calculation is done like IEEE 754. Programmers are used to floating point numbers and the fact that properties like associativity don't apply, but that's not obvious to everyone.
I remember this came up a lot in late-aughts functional programming discussions. But is there any language where this actually works? Where map is just parallel because of course it is?
Does anyone have a sketch of how this works? My understanding of complexity classes is that they consider worst case performance. Even if you have a great pseudorandom number generator and a great randomized algorithm, how do you prove that no instance of RNG + seed + problem instance takes exponential time?
"Often in the evening or at weekends I would bring my young daughter, Lauren, into work with me. One day, she was with me when I was doing a simulation of a mission to the moon. She liked to imitate me – playing astronaut. She started hitting keys and all of a sudden, the simulation started. Then she pressed other keys and the simulation crashed. She had selected a program which was supposed to be run prior to launch – when she was already 'on the way' to the moon. The computer had so little space, it had wiped the navigation data taking her to the moon. I thought: my God – this could inadvertently happen in a real mission. I suggested a program change to prevent a prelaunch program being selected during flight. But the higher-ups at MIT and Nasa said the astronauts were too well trained to make such a mistake. Midcourse on the very next mission – Apollo 8 – one of the astronauts on board accidentally did exactly what Lauren had done. The Lauren bug! It created much havoc and required the mission to be reconfigured. After that, they let me put the program change in, all right."
https://www.theguardian.com/technology/2019/jul/13/margaret-...
... but I love to contrast this view with the behavior that Joel Spolsky observed: "... We visited dozens of Excel customers, and did not see anyone using Excel to actually perform what you would call 'calculations.' Almost all of them were using Excel because it was a convenient way to create a table. [snip] Suddenly we understood why Lotus Improv, which was this fancy futuristic spreadsheet that was going to make Excel obsolete, had failed completely: because it was great at calculations, but terrible at creating tables, and everyone was using Excel for tables, not calculations." https://www.joelonsoftware.com/2012/01/06/how-trello-is-diff...
Just like Excel for tabular data, it would support RAM-sized data (enough to require a computer, but not so much that you need a data center), implement lots of algorithms and visualizations "well enough", and require no programming skill to operate.
As the article says, a lot of our real-world problems are graph problems - why are programmers the only ones who should have the tools to solve them?
Instead, right click A1 and click "insert row above".
Google Sheets (and, I'm 99.99% sure, Excel) adjust the range inside the SUM to be three rows high.
I've put quite some time into this sort of thing too :)
Expected: A3 should become =SUM(A0:A2)+A0+A2 and evaluate to 4
Actual: A3 becomes =SUM(A0:A1)+A0+A2 and remains 4 until it is edited, at which point it evaluates to 3.
That's an engineering fact. It would be good if it weren't true, just as it would be good if virtual memory were indistinguishable from RAM, but it just ain't so.
To be a responsible engineer, you've got to design and build for the real world, and that means not relying solely on username and password for extremely sensitive data.
I can't speak to 2004, but these days "bisect" is the standard term in my circles (even when we're not actually using git and its bisect command).
It would be interesting to know whether git was the first to associate that word with this activity... especially given it's atrocious naming of everything else :P
I think this is the relevant paper (pdf): https://cpsc.yale.edu/sites/default/files/files/tr63.pdf