Hacker News new | ask | show | jobs
by mvclark 3884 days ago
Thanks for this great question. To answer it, a good place to start is with why we wanted to build Blabr.

Some months ago, we were working with interactive spreadsheets from the Space Math @ NASA website: http://spacemath.gsfc.nasa.gov/ILabs.html. These are all Excel spreadsheets, with interactive 'sliders' that let students experiment with a variety of mathematical models for planetary structure, heat flow and rotation among other modeled properties.

The author of the spreadsheets (Dr Sten Odenwald, NASA) wanted to create online versions of these modules. He wanted a way for students to easily access and interact with the modules directly in a browser, on a range of devices used in today's classrooms (e.g., Chromebook, iPad). Using Google Docs (Sheets) was a possibility, but it didn't have support for the kind of sliders and plots that the modules required.

But there was a more fundamental issue with spreadsheets: it's hard to understand the math. Mathematical formulas are cryptic because they (usually) use cell references, and are buried behind the results in cells. Consider, for example, the Excel file for the module "Basic Properties of Mars as a Planetary Body" (ILab11marsmodel.xlsx on the ILabs page above). It includes this formula for modeled center distance:

  =($J$5+$J$8*COS(6.242*(B8+16)/$J$11))
It isn't straightforward to understand the math behind that computation. And for the Space Math educational spreadsheets, math is a key part of the learning.

Something like this would be clearer:

  m = r + a*cos(6.242*(t+16)/p)
where

  r = slider "radius"
  a = slider "amplitude"
  p = slider "orbital-period"
and t is a specified time vector (array).

Note also that m is a vector dependent on the time vector t. In the Excel spreadsheet, this is accomplished by:

1. specifying t values (17 of them) in column B.

2. specifying the formula in a cell of another column.

3. copying the formula (16 times) in the new column.

But how does the student know that the formula is the same for each row? That's very tedious to do by inspection. Typically, you look at the copied formulas and--based on a quick perusal of formulas and cell references--you assume that they are all the same formula. But this can be dangerous. We found that sometimes the formulas do differ as you move down a column. But what's worse, sometimes that's what the spreadsheet author intended, and other times it's a bug! For example, the spreadsheet author might have edited a formula and forgotten to copy it over all cells in a column.

We felt that there's got to be a better way for these kinds of science/engineering/math spreadsheets. And that was the focus of the Blabr design. For the Mars spreadsheet, here's the blab equivalent we came up with: http://blabr.io/?3df6e2368e89a8c3f780. (More examples: http://spacemath.github.io) The math is much easier to follow than it is in the Excel spreadsheet. Moreover, a vector formula is specified in one place, rather than copied across a column of cells.

In summary, we'd say that the following are reasonable criteria for using Blabr, rather than using a spreadsheet:

1. You want to create an online, interactive computational worksheet (web page) with sliders, tables, and plots.

2. A key focus of the worksheet is the math itself. You want the math to be easy to follow, and to edit.

These are typical criteria for a range of scientific computing applications (especially for education and mathematical modeling), which is why we're focusing Blabr (for now) on the notion of "scientific computing for the web".

Clearly there will be many use cases where a spreadsheet is more suitable than a blab. We'll give that part of the question more thought, and reply soon.

1 comments

Thank you very much for a very detailed answer. It is much clearer to me what are the strengths of the project now.

Something I wonder is if there are any plans to make blabs capable of dealing with the heavy computations needed in scientific applications (obviously using some sort of FFI or external solvers), or are they only intended for "interactive exploration"?

I don't see Blabr as a tool for problems that take a long time to run.

On the other hand, that doesn't mean that we can only aspire to minor problems in the browser. For instance, [0] solves a famous nonlinear PDE (which was a heavy computation not that long ago).

So, yes, Blabr is for "interactive exploration". But, I believe that allows a large (and increasing) range of interesting problems.

[0] http://blabr.io/?37642ee8c920dcb69ac1