Date: Fri, 20 May 2016 19:46:42 -0700
From: Glen Chiacchieri
Subject: Flowsheets updates
Hello!

Yesterday I opened Flowsheets and made a program.


​All this program does is change around some field names in a JSON document. It should be the simplest program in the world to write and understand, but it felt kind of painful to do both.

For writing it felt painful because Flowsheets was working really slowly (not sure why), and the map operation is slow to do because of all the blocks you have to use (which we know well at this point).

For reading it feels painful because the spatial layout of the data doesn't properly convey cause and effect relationships well ("this piece of data turned into this piece of data turned into this etc"). Instead the data is scattered vertically in a way that's hard to trace with your eyes.

I ended up writing another quick program in python because I thought it would be less painful, but to my delight I discovered that it was even more painful to do it in python because I couldn't see the data I was working with! I had to put print statements everywhere and kept getting random exceptions because API calls didn't work like I expected. This is actually pretty validating! I want to use a crappy prototype more than a production-ready system. Hopefully we can get the prototype to a point where other people besides me feel that way, too. :)

--

Last night I realized that because seeing data is the main point of writing a program in Flowsheets, the spatial layout and representation of that data should be one of the most important features. Spreadsheets can support this mode really well. Imagine this as a `map` from B to C:


Even if it isn't totally clear what "B" or "C" are, you can visually match them up. Duh, that's what tables are for, but I'm now more convinced that these kinds of table-like operations should be built in to Flowsheets.

I had some ideas last night before falling asleep about how this might be done that seems promising. Hopefully I'll have some redesigns of programs to show y'all in the coming weeks.

<3,
Glen

P.S. here is a module for js/python communication that might be helpful for development: https://github.com/tsim0/pytalk.js