this post was submitted on 29 Jul 2024
36 points (92.9% liked)

Programming

17020 readers
240 users here now

Welcome to the main community in programming.dev! Feel free to post anything relating to programming here!

Cross posting is strongly encouraged in the instance. If you feel your post or another person's post makes sense in another community cross post into it.

Hope you enjoy the instance!

Rules

Rules

  • Follow the programming.dev instance rules
  • Keep content related to programming in some way
  • If you're posting long videos try to add in some form of tldr for those who don't want to watch videos

Wormhole

Follow the wormhole through a path of communities !webdev@programming.dev



founded 1 year ago
MODERATORS
you are viewing a single comment's thread
view the rest of the comments
[–] notnotmike@programming.dev 18 points 1 month ago (4 children)

The paper doesn't use psuedocode as I know it. In my experience pseudocode looks much more similar to real code. (According to Wikipedia I'm more used to mathematical pseudocode)

I've never been a fan because writing some simplified Python seems better. Or even better, writing Python that doesn't necessarily follow every syntax rule to a T and takes liberties where necessary to improve readability

[–] mipadaitu@lemmy.world 9 points 1 month ago

It probably depends on when you were taught to code, and what language you learned on/most familiar with.

This is exactly how I learned to write psudo code in the 80's.... We were also diagramming our code back then, with a pencil and paper, using a template.
https://www.ebay.com/itm/294862492558
Kind of like with this thing.

Now I usually do a bit of a hybrid, but it also depends on how complicated the programs are. I'll do some python/comment-psudo-code.

It doesn't really matter what the process is, as long as it works for you, and doesn't interfere with collaborating with anyone you work with.

[–] expr@programming.dev 6 points 1 month ago

I definitely write pseudocode like this, albeit perhaps with some more shorthand. It's commonly taught this way too.

[–] monomon@programming.dev 2 points 1 month ago* (last edited 1 month ago)

I started doing exactly this. Write a bunch of functions, that may end up in different systems, on different machines, even. This allows you to define the interfaces, figure out data dependencies, and so on.

The code may be runnable, just printing out some statements. Then I copy blocks of it to the place where it will belong.

It's more of a thinking tool, than "actual code".

[–] Asudox@ani.social 1 points 1 month ago

I agree. Instead of pseudocode, using a simple language like Python that is pretty understandable seems to be a better way of representing your idea.