• Is Pseudocode Actually Useful?
    47 replies, posted
I was just wondering, do any of you programmers out there actually use Pseudocode? Or is it an irrelevant thing that my Computing teacher keeps setting.
I only use pseudocode when stuck in a boring lecture. It allows me to doodle my code ideas out easily.
Pseudocode is kinda useful; If abstracted enough, it can be used to design interfaces to some extent, and it low-leve enough, it can fairly directly be turned into working code.
It's a way to record a general idea without working out every little detail. It can be very useful.
Thanks for the info, guys. I better get on with it
I tend to only use it when I'm working on a specific problem or explaining something in a non-language specific context.
Its great, exception on msdn. They don't understand what pseudo code is and will complain that it doesn't compile. I use it all the time when explaining a problem or thinking of a way to do something.
Only to work out a complicated algorithm, or something else too big to fit in my head all at once.
Well I think "pseudocode" makes it sound like more than it is, it's just an informal way to communicate a general programming procedure. If there was no word for pseudocode, we'd still communicate the ideas the same way; while(something is true) do some stuff Nothing really difficult or special about that, but it's "pseudocode"
[QUOTE=deano270;25270527]Thanks for the info, guys. I better get on with it[/QUOTE] ... what There's no specification for Pseudocode. It's not a real language, hence pseudo. It's just text, which usually looks like kinda valid code and might or might not compile, though gets the general idea of what it's meant to do across. It's nothing you can really learn. Whether or not you understand it depends on every specific Pseudocode.
I use pseudo-code occasionally. Unrelated: it's also a really cool word. :v:
[QUOTE=ZeekyHBomb;25270926]... what There's no specification for Pseudocode. It's not a real language, hence pseudo. It's just text, which usually looks like kinda valid code and might or might not compile, though gets the general idea of what it's meant to do across. It's nothing you can really learn. Whether or not you understand it depends on every specific Pseudocode.[/QUOTE] No, what I meant was: My Computing homework is to write up some Pseudocode, and I wondered if it was actually relevant. When i said "I better get on" I meant I should get off facepunch and start writing it
I use it for laying out what a function will do and how it will do it. Makes my code neater and also makes it so I know what I'm doing before I do it. It's usually more general statements about what needs to be done and not a conversion from C to English if you get what I mean. I guess you could compare it to an essay outline, you paraphrase what you're going to say in this paragraph and know how you are going to say it, but you're just paraphrasing because you want to look at it as a whole and make sure you have everything you need and to make sure everything is organized. And this makes it easier to actually start working on it because you know exactly what you need to do. I'm probably rambling.
On topic, a couple of years ago a student in one of my lectures pronounced pseudocode 'swaydo-code' while asking the lecturer a question. He also later explained the term 'overloading' to the lecturer as when you exceed the rated maximum weight of an item (I cant remember his exact words). It goes without saying that I don't see him around any more.
It certainly helps in the design stage, as you can lay out basic structure without writing in all your fiddly syntax and it needing to be totally correct.
Only for really big things that i can't just work out without forgetting where i started. And maybe when i don't have a computer around.
It's trying to convey a concept without conforming to a specific programming language syntax.
[QUOTE=r4nk_;25273807]On topic, a couple of years ago a student in one of my lectures pronounced pseudocode 'swaydo-code'[/QUOTE] Psuedocode. [img]http://anyhub.net/file/suedocode.jpg[/img]
[QUOTE=ZeekyHBomb;25270926]... what There's no specification for Pseudocode. It's not a real language, hence pseudo. It's just text, which usually looks like kinda valid code and might or might not compile, though gets the general idea of what it's meant to do across. It's nothing you can really learn. Whether or not you understand it depends on every specific Pseudocode.[/QUOTE] I had a professor that made you write out psuedocode and then took off points if you didn't do it his way. That kind of defeats the purpose. As for me, I usually just do everything in my head and then type it into code as I go along. If it something longer I'll make some scribbles and illegible notes on a piece of paper.
We actually had to learn "Structured English" pseudo code for my software class, that was utterly worthless. [code] BEGIN BubbleSort WITH some_variable -- or something relatedly retarded. REPEAT CASEWHERE some_variable == "a" -- switch is too confusing. PRINT "yo" ENDCASE CASEWHERE some_variable == "b" PRINT "im not even kidding" ENDCASE UNTIL NOT sane WHILE true DO PRINT "aofn" ENDWHILE RETURN 9 END [/code] And that is probably wrong too I always forgot the syntax for the loops because it was so god awfully retarded.
:psyduck: Why would anyone teach a strict form of pseudo-code? Wouldn't it just be easier to write out [i]real [/i]code at that point?
Having a rigid syntax for pseudocode defeats the purpose of it. Which retard thought this up? I write pseudocode to work out an algorithm on paper without being constrained by having to write perfect syntax. Plus the form of pseudocode they're teaching you is ugly.
That's honestly retarded... Pseduo code, useful. writing it out "structured", as above, is dumb... you may as well write the normal code...
Pseudocode is nice if you want to get something working without havning to worry about syntax. Sometimes I'll draw diagrams of objects with everything they contain and draw arrows between the objects and the objects it contains. It's also a nice way to share an idea with a programming team and not have to sit down and fiddle with getting the code written out properly and creating some sort of example program to go with it.
Pseudocode is useful when you give advice to someone and want them to figure out how the actual code looks like.
[QUOTE=ZeekyHBomb;25270926]... what There's no specification for Pseudocode. It's not a real language, hence pseudo. It's just text, which usually looks like kinda valid code and might or might not compile, though gets the general idea of what it's meant to do across. It's nothing you can really learn. Whether or not you understand it depends on every specific Pseudocode.[/QUOTE] You've got some pretty specific pseudo code if it actually compiles.
[QUOTE=MegaJohnny;25289189]You've got some pretty specific pseudo code if it actually compiles.[/QUOTE] The pseudocode I use might just happen to be <insert language here>-compatible. I might intend it to be, but not test it and label it pseudo-code as some assumptions about defined variables and functions may be made. The name pseudocode might not be entirely correct in this case though.
It's useful for writing algorithms, because then you can transfer that algorithm to almost any language.
[QUOTE=Randdalf;25292607]It's useful for writing algorithms, because then you can transfer that algorithm to almost any language.[/QUOTE] Agree with this a metric shit tonne. Anyhow I don't use it right now but I know it can be useful for writing code away from computers as the people I know told me. Another use can be to structure things quickly. Like you can pseudocode anything really it doesn't have to be a program. You can used diagrams and flowcharts to do much of the same thing though flowcharts seem to be more trouble for small things. if shoes_untied: tie_shoes() if milk == 0: goto store
As far as programing is concerned I don't think it would be more useful than actually going to your computer and doing it but it could be useful for explaining a code to someone.
Sorry, you need to Log In to post a reply to this thread.