[Tutor] Planning a program with algorithm?

Alan G alan.gauld at freenet.co.uk
Wed Jun 1 00:08:16 CEST 2005

> And I'm doing chapter4. In the book it says it's recommended to plan
a prog.
> with pseudocode.
> Can i just ignore it?

No, pseudo code is a very powerful technique. But one of the
is that every line of pseudocode should correspond to 5-10 lines of
program code (which means that it depends on the language used of
course - one of its weaknesses since pseudocode intended for C
programmers is not of much benefit to a Python programmer!)

Since anything less than about 5-10 lines of pseudoccode is pretty
much pointless that means that pseudocode comes into its own when
your programs get to around 30 lines of Python or bigger.

Practice using psudocode in shorter programs by all means but it
won't be very useful unil you start to write bigger programs. By the
time your programs are several hundreds of lines long and spread
over several files psueudocode becomes a very powerful techniqie
of seeing the "big picture" of your programs structure.

Once you get above 500-1000 lines pseudo code starts to break down
again - you need pseudo code for your pseudo code!! At this point
you need to start looking at higher level design techniques
including diagramming tools.

Alan G.

More information about the Tutor mailing list