Fog Creek Software
g
Discussion Board




Anyone use PDL?

Code Complete, by Steve McConnell, recommends the use of a meta language called PDL when designing functions. My question is, do any of you JOS people use PDL on a regular basis? If so, what's your experience with it? Do you find it helpful? Do you find it invaluable? Do you find it a waste of time forced upon you by your overbaring manager?

Is PDL more useful with some programming languages than it is with others? Can a flexible, expressive, often terse language like Perl benefit from PDL design as much as, say, C or Java?

MM Willis.
Tuesday, March 2, 2004

I do, but not as much as in the dark days of structured programming, mostly as a revolt against the horrors of Jackson.

But in the end using pseudo code or pdl is just code without syntax checking and object code at the end of it so I only really find it useful when thinking about solving problems where the language or platform hasn't yet been chosen. since the actual language can change the nature of the algorithm.

Simon Lucy
Tuesday, March 2, 2004

An ex-colleague of mine had an interesting technique. He wrote high level pseudo code (not PDL) explaining how the problem was to be solved, added comment characters (e.g. // or /* ... */) and then wrote his code in the same file. Not only did he achieve whatever clarity of thinking he was aiming for with his pseudo code he also documented his code at the same time.


Tuesday, March 2, 2004

It's been a while since I read Code Complete, but my memory of PDL is simply that it eventually acts as comments in the code; for example:

void onDisplayModeUpdated()
{
    //determine current size of client area on this form
    ....
    //position each of the controls
    ....
    //add the controls to the form
    ....
    //make the controls auto-size with the form
    ....
}

Following the Socratic dialog in Code Complete about the vaue of comments in the code, I do that all the time.

Christopher Wells
Tuesday, March 2, 2004

*  Recent Topics

*  Fog Creek Home