PDA

View Full Version : Pseudocode preferences



huff2
April 7th, 2019, 09:40 PM
Hi everyone!

I just wanted to hear everyone's thoughts on this. I personally love working out problems and structures with a combination of flow charting, mind mapping, straight pseudo-code-like-thing (ha) in a text editor. My creative process is always changing and I love this part more than anything. To me, the actual programming is just my way of telling the computer what I want it to do to solve my problem. Whichever is simplest is best, for me.

I would LOVE to hear from everyone what their process is like for them, regardless of your current working field. Programming use/experience or not. Pictures of charts you like to make or examples of how you style pseudo code and general suggestions are all welcome.

Can't wait to hear from you guys!

RedDirtDog
April 8th, 2019, 01:02 AM
I've played with mind-mapping tools a while back - wanted to see if they helped in the analysis phase. Interesting, and can be useful, depending on the project.

Beyond that, I believe that all code is self-documenting :p

huff2
April 8th, 2019, 01:06 AM
"Beyond that, I believe that all code is self-documenting" - I like that! Thanks for the reply!

QIII
April 8th, 2019, 02:20 AM
If you believe that all code is self documenting, then you will get a rude awakening when you have to refactor someone else's year-old code and you have absolutely no idea why they did what they did or why design decisions were made.

huff2
April 8th, 2019, 03:03 AM
Qlll - I do agree that someone else's code could be unreadable, unorganized, out of date or all of the above. I like the "self-documenting" comment because it's an idea that we should strive for, like having a program document important aspects about itself when running in logs. Providing someone with your pseudo-code is a great way to show them how your program is structured and what it does without causing them to have a nose bleed trying to read their code. That's what I was trying to get out of this thread. We should always try to make more standard, with room for flexibility, not just our code but also the simple pseudo-code in say a readme.txt file.

How do you like to structure your pseudo-code? Are there symbols you use on a regular basis? Is your "pre-coding-phase" process structured or do you prefer to whip out a sheet of paper and start jotting things down? Do you think we should have a standard style guide for this? Other than simply commenting inside the code.

lisati
April 8th, 2019, 07:01 AM
Self documenting, huh? The expression could mean almost anything. Are we talk comments in the code or are we talking about the code itself?

The nearest thig I've seen to self documenting code in a real-world project was something written in COBOL many many years ago, before all the kerfuffle about Y2K.

RedDirtDog
April 9th, 2019, 02:33 AM
I didn't anticipate my "self documenting" comment becoming the focus of the thread :D

I'm currently having to figure out some Android code that was written a year ago with no doc so we can make some changes to it, so I am living the dream @QIII :D :D

Of course, no code is self-documenting. I've seen undocumented code/systems being used as job security for the programmers/teams responsible for them. It's also such a pain to document stuff when you can just write it, run it, and then forget about it until it breaks 6 months later and you can't remember what you were thinking at the time and why on earth you made such weird decisions :)

Chucking a comment or 3 in the code is a double edged sword (in my experience) due to future code changes being made without corresponding comment updates. This then leads to misleading comments, which are worse than nothing at all...

huff2
April 9th, 2019, 04:16 AM
RedDirtDog - That must be a real headache going through that old code. How do you like to work through something like that? Do you try to get a basic feel for the structure first? Does it even run in its old form?

I didn't anticipate your comment becoming the focus either :) You became pretty popular, pretty quick lol.

Thanks for commenting back!