“RUBY INTERFACE” vs “FLOWSTONE RUBY INTERFACE”.
Posted: Tue Aug 15, 2017 9:44 am
“RUBY INTERFACE” vs “FLOWSTONE RUBY INTERFACE”.
Some would make you believe that there is absolutely no difference between the two, but I disagree to that. In "plain Ruby interface" I can construct a small program and save it in a *.rb file (which is a nuisance to do every time anyway, just to test your code), then call up that Ruby *.rb file BUT the code would AT LEAST run step-by-step exactly in the correct sequence as PREDICTED.
However, if you stuck that exact same code meant for the Ruby *.rb file into the "Flowstone Ruby interface", then you’ve got problems as it would not run because of certain differences which are not clearly spelled out neither even touched in the Flowstone Users Guide.
If Flowstone Admin would just provide a simple clear working example (which can be tested in the real world, not some obscure non-working Ruby code, but a complete working example) first for the "normal Ruby interface", and then show us by means of a corresponding example how it should be done in the “Flowstone Ruby interface” – that would be a great help to “Flowstone Ruby” noobs like myself.
Just to show what I mean, I provide the following “plain Ruby interface” example which works perfectly well when placed inside a Ruby *.rb file and saved and then called up from the plain “Ruby interface”:
def say_goodbye # (6) Program execution continue from here as instructed in item (4).
x = "Goodbye" # (7) Now, Ruby is instructed to assign to “x” a value of “Goodbye”.
puts x # (8) Ruby instructed to print out the value assigned to "x" i.e. "Goodbye".
end
def start_here # (2) Execution of the program thus starts from here.
x = "Hello" # (3) Then Ruby is instructed to assign to “x” a value of “Hello”.
puts x # (4) Next Ruby is told to print out the value assigned to “x” (valid for this method definition)
say_goodbye # (5) Next, Ruby is send back to the method defined as “say_goodbye”.
puts "Let's check whether x remained the same:" # (9) program execution proceeds, and it prints out this code.
puts x # (10) Ruby prints out the value assigned to "x" for this method definition.
end
start_here # (1) The call to the method defined as “start_here”.
And the output result from this plain Ruby *.rb program would be exactly in the correct sequence as predicted above (see items numbered (1) through (10)) in the program instructions:
Hello # (a)
Goodbye # (b)
Let's check whether x remained the same: # (c)
Hello # (d)
From the Ruby programming code meant for the “plain Ruby interface” above, every step of the program execution is absolutely clear to me – BUT, try and do THAT in the “Flowstone Ruby interface” and it becomes like spaghetti programming to me.
On a side note: A Ruby expert (however, not part of the Flowstone group, neither a member of the Flowstone Forum) referred in an article to non-OOP structured programming as “unclear spaghetti code”. Well, I differs from him with regard to that statement since if you have the block diagram available to that so-called “spaghetti code” then that code is just as clear to me. I can do in “spaghetti programming code” in clear step-by-step instructions exactly what I intend to do, and in many instances ten times faster than with the unclear “POOP structured programming code” (not a misspelled word).
But, really Flowstone Admin, PLEASE use my "plain Ruby Interface code" example above or something similar to explain to us “FLOWSTONE RUBY” noobs how things should be correctly done (as a recommendation: In your Flowstone Users Guide) in a clear concise manner. A short clear concise descriptive example is worth a thousand English words.
NOTE: Please keep in mind…opinions differ, and so does people and their working methods too.
Some would make you believe that there is absolutely no difference between the two, but I disagree to that. In "plain Ruby interface" I can construct a small program and save it in a *.rb file (which is a nuisance to do every time anyway, just to test your code), then call up that Ruby *.rb file BUT the code would AT LEAST run step-by-step exactly in the correct sequence as PREDICTED.
However, if you stuck that exact same code meant for the Ruby *.rb file into the "Flowstone Ruby interface", then you’ve got problems as it would not run because of certain differences which are not clearly spelled out neither even touched in the Flowstone Users Guide.
If Flowstone Admin would just provide a simple clear working example (which can be tested in the real world, not some obscure non-working Ruby code, but a complete working example) first for the "normal Ruby interface", and then show us by means of a corresponding example how it should be done in the “Flowstone Ruby interface” – that would be a great help to “Flowstone Ruby” noobs like myself.
Just to show what I mean, I provide the following “plain Ruby interface” example which works perfectly well when placed inside a Ruby *.rb file and saved and then called up from the plain “Ruby interface”:
def say_goodbye # (6) Program execution continue from here as instructed in item (4).
x = "Goodbye" # (7) Now, Ruby is instructed to assign to “x” a value of “Goodbye”.
puts x # (8) Ruby instructed to print out the value assigned to "x" i.e. "Goodbye".
end
def start_here # (2) Execution of the program thus starts from here.
x = "Hello" # (3) Then Ruby is instructed to assign to “x” a value of “Hello”.
puts x # (4) Next Ruby is told to print out the value assigned to “x” (valid for this method definition)
say_goodbye # (5) Next, Ruby is send back to the method defined as “say_goodbye”.
puts "Let's check whether x remained the same:" # (9) program execution proceeds, and it prints out this code.
puts x # (10) Ruby prints out the value assigned to "x" for this method definition.
end
start_here # (1) The call to the method defined as “start_here”.
And the output result from this plain Ruby *.rb program would be exactly in the correct sequence as predicted above (see items numbered (1) through (10)) in the program instructions:
Hello # (a)
Goodbye # (b)
Let's check whether x remained the same: # (c)
Hello # (d)
From the Ruby programming code meant for the “plain Ruby interface” above, every step of the program execution is absolutely clear to me – BUT, try and do THAT in the “Flowstone Ruby interface” and it becomes like spaghetti programming to me.
On a side note: A Ruby expert (however, not part of the Flowstone group, neither a member of the Flowstone Forum) referred in an article to non-OOP structured programming as “unclear spaghetti code”. Well, I differs from him with regard to that statement since if you have the block diagram available to that so-called “spaghetti code” then that code is just as clear to me. I can do in “spaghetti programming code” in clear step-by-step instructions exactly what I intend to do, and in many instances ten times faster than with the unclear “POOP structured programming code” (not a misspelled word).
But, really Flowstone Admin, PLEASE use my "plain Ruby Interface code" example above or something similar to explain to us “FLOWSTONE RUBY” noobs how things should be correctly done (as a recommendation: In your Flowstone Users Guide) in a clear concise manner. A short clear concise descriptive example is worth a thousand English words.
NOTE: Please keep in mind…opinions differ, and so does people and their working methods too.