Poll: Is pseudocode really needed? How often do people use
pseudocode before writing their programs?
Every time
Sometimes (depends...)
Never
Poll: Is pseudocode really needed? How often do people use
pseudocode before writing their programs?
It depends. I do at times, but not every time. Often though. It's helpful as a quick outline to just throw together so you know what you want the program to do:
And now you have the pseudo code for a small telnet server...Code:initialize port bind port listen on port while ! shutdown listen for new connection accept new connection call select for each connection read input parse input execute command send output
Quzah.
Last edited by quzah; 01-07-2002 at 09:46 PM.
Hope is the first step on the road to disappointment.
Practicing it is much better for being a good programmer as I have learned.
Even I do not do it everytime but trying to make is a habit. It saves time from possibility of wasting it.
Last edited by zahid; 01-08-2002 at 03:33 AM.
[ Never code before desk work ]
-------------------------------------:-->
A man who fears Nothing is the man who Loves Nothing
If you Love Nothing, what joy is there in your life.
=------------------------------------------------------= - I may be wrong.
Yeah.. Birds eye view.Originally posted by quzah
And now you have the pseudo code for a small telnet server...
Which is must
to never be lost.
[ Never code before desk work ]
-------------------------------------:-->
A man who fears Nothing is the man who Loves Nothing
If you Love Nothing, what joy is there in your life.
=------------------------------------------------------= - I may be wrong.
Unless I already know how to code what I am going to be coding, then yes... definately yes. How much I get into the pseudocode really depends on how big whatever I'm doing is, although generally it just amounts to C code, with incorrect syntax. I've had the best experience with this sort of pseudocode since it's rigorous enough to be correct, translating it into real code is pretty simple, and it keeps my functions small.
Basically, pseudocode stops you from coding monolithic programs.
Callou collei we'll code the way
Of prime numbers and pings!
Moved because I think it's more appropriate here...
Oh, and I use pseudocode whenever I write any program longer than a few lines.
-Govtcheez
[email protected]
Well, I'll break the mold and mention that there are a lot of other ways to design your program, and many of them work better in my opinion. I think pseudo code is a pretty worthless way to design an object oriented project, for instance..
Design before coding is a must, however.
Allegro precompiled Installer for Dev-C++, MSVC, and Borland: http://galileo.spaceports.com/~springs/
I have used pseudocode for many years almost everytime i code and will continue to do so for many more years.
Free the weed!! Class B to class C is not good enough!!
And the FAQ is here :- http://faq.cprogramming.com/cgi-bin/smartfaq.cgi
I never use pseudo code. In my opinion there are much better ways to design software. Mostly I use flow charts, or for larger designs UML. They give a much better overview of the software to be developed.
For designing algorithms use psudocode, for programs it's too time consuming.
I use pseodocode on occasion. Usually when i'm away from home and inpiration strikes me and i have to write out the genius solution to something-or-other. Unfortunatly sometimes it comes on such a basic level that it tends to look something like this (slightly exaggerated, maybe... a little...):
Which is the real drawback of pseodocode... Its not code. It doesnt encompass all the issues you're going to get into. A lot of times something looks simple in pseodocode but then you realize that its not going to work out that way in real code. Its still handy for getting your thoughts straight though. I tend to plan stuff out in my head while i eat lunch or something. Or wander around the house looking like a crazy-man as i hold a one man conference out loud to myself.Code:startgame(); setupgameparameters(); while (still_playgame) { check_player(); do_actions(); show_map(); }
One things for sure though. You cant go wrong with planning things out. But if my masses of paper recycling is any indication then i should never run into an unforseen catch... hya! right!
"There's always another way"
-lightatdawn (lightatdawn.cprogramming.com)
We are required to submit flowcharts and pseudocode for every project at my college. I think it's good to plan out your logic. Just because your syntax is correct doesn't mean your program is doing what it is intended to do and good planning can help you to avoid this.
Many people at school never do the flowcharting/pseudocode before coding the program. They stuggle to complete the program and then create the flowcharts/psuedocode from their completed source for submission. I find this funny because this is the exact opposite of what we are taught.
for the most part, i think that it shouldn't need to be used since it's my practice to minimize a function's scope. however if organizing a project's functions does not hint at the program's overall functionality, pseudocode is helpful indeed!
also for describing a program, we should all use pseudocode! also, if you are describing something to a newbie, use pseudocode! it'll give them the answer, but force them to think. talk in generals
hasafraggin shizigishin oppashigger...
I try to, but every time I do a project, I'm always too lazy.
What will people say if they hear that I'm a Jesus freak?
What will people do if they find that it's true?
I don't really care if they label me a Jesus freak, there is no disguising the truth!
Jesus Freak, D.C. Talk
-gnu-ehacks