View Full Version : do you really use pseudo-code?

04-02-2002, 12:29 AM
? i read about people using it all the time, but i just skip right over and start coding. am i in for problems down the line?

04-02-2002, 12:32 AM
On big projects you get screwed up the butthole if you don't use it beforehand. I'm experiencing that right now. You really should use it, but it's sorta like documenting. You have to do it sometimes even though you hate to, but you are glad you did it a week later. My psuedocode is pretty much a tentative structure of my program. It seems to help when I actually do it.

04-02-2002, 12:46 AM
I psuedocode particularly nasty parts of my app to make sure i have the logic down right before i start tearing things apart to implement something i may have to tear back out again because it doesnt work. It can save time and it can waste time. IMO you can spend too much time on pre-code stuff. Its really a judgement call... you'll rapidly gain the know-how.

04-02-2002, 12:55 AM
I'm a firm believer in having a good design document before you write your first line of code (notice I didn't say "complete" design document, not sure there is such a thing :) ).

I don't pseudo code generic simple algorithms but anything that's going to take some time to code is worth going through it with a pen/paper first. I find it saves me tons of headaches when I plan it all out first.

04-02-2002, 01:14 AM
>am i in for problems down the line
Yes, without a well documented structure the coding process will be longer and harder because you have to solve problems on the fly, problems that should have been taken care of in pseudocode or flowcharts. The only problems you should be dealing with when actually writing the program are syntactic and semantic errors of the language ( which start to go away with time and experience ), not algorithms and structure. You want to know exactly how the program should flow before you even type one character.


04-02-2002, 11:39 AM
I've never used pseudo-code. When designing algorithms I'll use a visual design language or, only when really necessary, the language of mathematical logic (quantors etc.).

04-02-2002, 11:54 AM
What exactly IS pseudocode?

04-02-2002, 12:12 PM
Nah pseudo code is over rated. Me and most "real" programmers I know make a flow chart writing in what should be passed inbtween functions and classes. My opinion is that the method they teach in scool is much to involved to be efficient. The requirments for a comercial apps usally change 2-n times before the first RC.

04-02-2002, 12:26 PM
>The requirments for a comercial apps usally change 2-n times
>before the first RC.

Yep, I recognise that. One of our clients decided to do some changes to the user requirements at almost the end of the project.

04-02-2002, 12:39 PM
Pseudo-code is just a way of mapping out what you're going to do before you do it. A plan of the program in effect.

I use for larger programs but I tend to generalise it.

04-02-2002, 12:42 PM
If you're using an abstract level of your program, there is no need for pseudo code (your code IS kind of a pseudo code then :)).

04-02-2002, 12:45 PM
>>Nah pseudo code is over rated.

Seconded. There is a stage in your programming life where its good to plan all this stuff out but i find when things get *really* involved i just dig in and wing it. When there's 100,000 different classes that all interact with one-another and you need to add another feature you're never going to be able to psuedocode every possability. Its just a waste of time. Just start typing and it all becomes apparent. Take it as it comes.

04-02-2002, 09:32 PM
(your code IS kind of a pseudo code then ).

that's kinda the thing i'm taking about: when i force myself to write pseudo i find that i'm working from the code in my head back to english.

what about on the job? say you have to write a functin or class, does your boss/client want to see the pseudo/chart before you code?

04-02-2002, 09:37 PM
if the problem requires a nice in depth algorithm that i have to put into code...

pseudocode here i come...

04-02-2002, 10:32 PM
Originally posted by blight2c
what about on the job? say you have to write a functin or class, does your boss/client want to see the pseudo/chart before you code?

My boss is the person who got me of pseudo-coding, etc. I'll admit we don't pseudo-code as much as we map out the logic flow with charts. His biggest thing is having a good design doc.