Page 1 of 2

Pseudocode advices

Posted: Wed Nov 09, 2022 12:39 pm
by ginopaoli
hi guys, do you have some specific suggestions about pseudocode (maybe some guidelines)?

I am trying to write the pseudocode of a software i did (attached), do you have any advice?

Re: Pseudocode advices

Posted: Wed Nov 09, 2022 1:04 pm
by FourthWorld
Hi Geno. What are you building with LiveCode?

Re: Pseudocode advices

Posted: Wed Nov 09, 2022 2:12 pm
by richmond62
To me that does not look like pseudocode, it looks a bit
like Python.

Of course (Richmond's Delusional Fever) it would be 'fun' if one had a Python-to-LiveCode-do-not-pass-Go stack . . . as a plug-in or somesuch.

Re: Pseudocode advices

Posted: Wed Nov 09, 2022 2:17 pm
by ginopaoli
hey guys,

Basically it is a software to study the dynamic response or rigid blocks that are rocking. I programmed it in Matlab actually, but i wanted to show it in a simplify way like pseudocode instead of using a flowchart.

What do you think i should do to clarify the process?

Re: Pseudocode advices

Posted: Wed Nov 09, 2022 3:11 pm
by richmond62
Writing as a very stupid person I would like to know what:

1. rigid blocks

and

2. blocks that are rocking refer to, where?

AND, what that ẍ means [by the way, any Unicode hop-pickers round these parts: ẍ is numToCodePoint(0x1E8D)] ?

Sorry, while I may be reasonably nifty with computer programming, I "fudged-up BIG" in High School Maths. 8)

Re: Pseudocode advices

Posted: Wed Nov 09, 2022 3:17 pm
by richmond62
Oh, and does '==' mean does not equal ?

Re: Pseudocode advices

Posted: Wed Nov 09, 2022 4:11 pm
by dunbarx
ginopaoli.

Typically, we use the word "pseudo" in LC to refer to a code sample that will not actually compile, but illustrates a method or a concept.

So is that what you are seeking? A theoretical procedure to emulate these pendulum hung blocks? Any pendulum should be valid...

Craig

Re: Pseudocode advices

Posted: Wed Nov 09, 2022 4:26 pm
by richmond62
My advice would be to convert that 'code' into LiveCode.

Then there will be an opportunity to see what results it produces.

So, the first thing might be to start learning the ways of setting up conditional loops in LiveCode.

For instance, where you have while + condition, in LiveCode there is repeat until + condition.

Re: Pseudocode advices

Posted: Wed Nov 09, 2022 4:35 pm
by richmond62
Obviously, all the Mathematical operators such as the diaeresis I mentioned earlier will have to be expanded into LiveCode functions.

Re: Pseudocode advices

Posted: Wed Nov 09, 2022 4:46 pm
by ginopaoli
Thank you all for the reply.

This "pseudocode" i want to show is an extremely simplified representation of the actual code. The actual code requires the integration of non linear differential equations.

i would like to express the code in a simplify manner, in order to make it comprehensible for more people.

Re: Pseudocode advices

Posted: Wed Nov 09, 2022 5:05 pm
by richmond62
The actual code requires the integration of non linear differential equations.

i would like to express the code in a simplify manner, in order to make it comprehensible for more people.
It would be lovely is you could . . .

I got top marks in Maths until I was 16: then we started on Calculus and
I got in serious trouble and just avoided failing my Maths
exam at 18 (bottom mark).

Re: Pseudocode advices

Posted: Wed Nov 09, 2022 5:32 pm
by dunbarx
Hi.

The period "T" of a pendulum is;

T = 2 * pi * (L/g)^-2.

You can see that the only variable here (at least on the earth) is "L", the length. What is the actual task at hand?

Craig

Re: Pseudocode advices

Posted: Wed Nov 09, 2022 5:41 pm
by richmond62
And where, Craig, do you get the pendulum?

Re: Pseudocode advices

Posted: Wed Nov 09, 2022 6:55 pm
by FourthWorld
ginopaoli wrote:
Wed Nov 09, 2022 4:46 pm
Thank you all for the reply.

This "pseudocode" i want to show is an extremely simplified representation of the actual code. The actual code requires the integration of non linear differential equations.

i would like to express the code in a simplify manner, in order to make it comprehensible for more people.
Have you noticed that you posted this exercise into a forum for the LiveCode programming language?

If this has nothing to do with LiveCode, perhaps you'd meant to post it somewhere else?

Re: Pseudocode advices

Posted: Wed Nov 09, 2022 7:09 pm
by richmond62
Yes, and silly Richmond thought the OP wanted to convert whatever that was into LiveCode . . .

It does seem that, for some reason, quite a few people are reading 'LiveCode' as 'live code' as in 'here we help people with their coding irrespective of which programming language is being aimed at', I wonder why. Could it be the name, LiveCode?