Make new row as function of previous row

Newbie here. In a normal spreadsheet I can make each row depend on the one before. For example I can make a Fibonacci series by setting A1 = 1, A2 = 1, A3 = A1+A2, and then filling the rest of the A column with the formula – A4 = A2+A3, etc.

How would this be done in Glide? It’s probably quite easy but I haven’t found the way yet …

Thomas

no, is not possible in glide with native functions… you would have to create relations for a previous row, which is only possible when you are adding a new row, to copy the previous row ID

Is your use case also making a Fibonacci series or something else? Can you explain more to us about that?

Thanks Uzo. Pity.

ThinDinh:
TLDR: I wanted to compare a Glide solution of a benchmark to solutions in some other languages.

Long version: a while back (1989) I published a paper on ‘Cognitive Dimensions of Notations’ describing one way to assess usability of programming languages, spreadsheets, and other notations. In 1996 I co-authored a paper comparing two graphical programming languages of the day, LabView and Prograph, against Basic, a vanilla textual imperative language. We looked at various aspects, and later reported some empirical studies, comparing time taken to answer comprehension questions, time taken to modify a program, etc. The graphical languages had pros and cons, as was to be expected. Some of the comparisons used versions of a program to compute the path of a rocket, first used by Bill Curtis in a similar comparison of textual languages. Glide seems to have a slightly different set of pros and cons from the languages we studied and it would be interesting to make a more detailed comparison, using the equivalent materials. Of course thinking has moved on since then; for example we didn’t consider ‘liveness’, nor a few other concepts that have emerged since then.

Here is the rocket program in its basic version:

Mass = 10000
Fuel = 50
Force = 400000
Gravity = 32

WHILE Vdist >= 0
      IF Tim = 11 THEN Angle = .3941
      IF Tim > 100 THEN Force = 0 ELSE Mass = Mass – Fuel

      Vaccel = Force*COS(Angle)/Mass – Gravity
      Vveloc = Vveloc + Vaccel
      Vdist = Vdist + Vveloc

      Haccel = Force*SIN(Angle)/Mass
      Hveloc = Hveloc + Haccel
      Hdist = Hdist + Hveloc

      PRINT Tim, Vdist, Hdist
      Tim = Tim + 1

WEND
STOP

Green, T. R. G. and Petre, M. (1996) Usability analysis of visual programming environments: a cognitive dimensions framework. J. Visual Languages and Visual Computing 7, 131-174.

I would be interested to hear your thoughts.


PS I do realise that mathematical programming is not where Glide’s main interests lie, at least at present, and that any usability analysis should also consider domains where it shines, such as the ‘DIY Project Management App’.

And I’d also like to make it clear that I’m very impressed with Glide.

1 Like

So in short you’re assessing the usability of Glide? Do you have questions that we can help you to answer?

you can combine some other tools with glide to make your project better…

  1. formulas in GS
  2. CSS in the rich text component
  3. Google Scripts
  4. code columns in glide editor
  5. Integromat
  6. Zapier

So with these options, you are almost limitless. The code in your example above is perfect for the Google Script… not much of the difference:

myFunction(){
var Mass = 10000;
var Fuel = 50;
var Force = 400000;
var Gravity = 32;

for ( Vdist >= 0){
      IF (Tim == 11 ){var Angle = .3941}
      IF (Tim > 100 ){var Force = 0 ELSE Mass = Mass – Fuel}

     var Vaccel = Force*COS(Angle)/Mass – Gravity;
     var  Vveloc = Vveloc + Vaccel;
     var  Vdist = Vdist + Vveloc;

    var  Haccel = Force*SIN(Angle)/Mass;
    var  Hveloc = Hveloc + Haccel;
    var  Hdist = Hdist + Hveloc;

      return ( Tim, Vdist, Hdist);
     var Tim = Tim + 1;
}
}

Thanks ThinDinh. I appreciate the offer to answer questions. I do have one or two, but I’ll raise them as new threads.

I’m not looking to give Glide something crude like thumbs-up or thumbs-down, but to pick out what seem to be possible strengths and weaknesses. Maybe when I’ve got some conclusions I could ask someone more experienced to look it over.

Thanks Uzo. Glide’s ability to work with other systems is indeed one of its strengths. But what I’m interested in at the moment is forming some conclusions about the Glide approach on its own. With luck I’ll try some combinations of Glide and other tools later. I appreciate your willingness to help. This seems to be a good community.

2 Likes

you can achieve most of the functionalities, using only Glide native functions and components… the code above can be easily recreated in glide editor, using if-else and math columns