Pseudocode advices

Stop by to discuss use cases, requirements, information architecture, flow diagraming, unit testing and usability.

Moderators: FourthWorld, Klaus

ginopaoli
Posts: 3
Joined: Mon Nov 07, 2022 7:19 pm

Pseudocode advices

Post by ginopaoli » Wed Nov 09, 2022 12:39 pm

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?
Attachments
psuedi.PNG

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9842
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Pseudocode advices

Post by FourthWorld » Wed Nov 09, 2022 1:04 pm

Hi Geno. What are you building with LiveCode?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9388
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Pseudocode advices

Post by richmond62 » Wed Nov 09, 2022 2:12 pm

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.

ginopaoli
Posts: 3
Joined: Mon Nov 07, 2022 7:19 pm

Re: Pseudocode advices

Post by ginopaoli » Wed Nov 09, 2022 2:17 pm

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?

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9388
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Pseudocode advices

Post by richmond62 » Wed Nov 09, 2022 3:11 pm

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)

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9388
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Pseudocode advices

Post by richmond62 » Wed Nov 09, 2022 3:17 pm

Oh, and does '==' mean does not equal ?

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9670
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Pseudocode advices

Post by dunbarx » Wed Nov 09, 2022 4:11 pm

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

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9388
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Pseudocode advices

Post by richmond62 » Wed Nov 09, 2022 4:26 pm

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.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9388
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Pseudocode advices

Post by richmond62 » Wed Nov 09, 2022 4:35 pm

Obviously, all the Mathematical operators such as the diaeresis I mentioned earlier will have to be expanded into LiveCode functions.

ginopaoli
Posts: 3
Joined: Mon Nov 07, 2022 7:19 pm

Re: Pseudocode advices

Post by ginopaoli » 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.

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9388
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Pseudocode advices

Post by richmond62 » Wed Nov 09, 2022 5:05 pm

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).

dunbarx
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9670
Joined: Wed May 06, 2009 2:28 pm
Location: New York, NY

Re: Pseudocode advices

Post by dunbarx » Wed Nov 09, 2022 5:32 pm

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

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9388
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Pseudocode advices

Post by richmond62 » Wed Nov 09, 2022 5:41 pm

And where, Craig, do you get the pendulum?

FourthWorld
VIP Livecode Opensource Backer
VIP Livecode Opensource Backer
Posts: 9842
Joined: Sat Apr 08, 2006 7:05 am
Location: Los Angeles
Contact:

Re: Pseudocode advices

Post by FourthWorld » Wed Nov 09, 2022 6:55 pm

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?
Richard Gaskin
LiveCode development, training, and consulting services: Fourth World Systems
LiveCode Group on Facebook
LiveCode Group on LinkedIn

richmond62
Livecode Opensource Backer
Livecode Opensource Backer
Posts: 9388
Joined: Fri Feb 19, 2010 10:17 am
Location: Bulgaria

Re: Pseudocode advices

Post by richmond62 » Wed Nov 09, 2022 7:09 pm

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?

Post Reply

Return to “Software Engineering”