Software Engineering discussion
Code Complete
>
The Pseudocode Programming Process
date
newest »
newest »
I’ve seen pseudo code in action in situations where language limitations make it very challenging or even impossible to get through routine construction without using it. I agree with Mr. McConnell that pseudo code, if properly used, after construction can make great comments. The way he explains the process makes a lot of sense and probably implies very good engineering approach for routine construction, but I would use it only in 5 to 10% of the time in situation where I know that routine involves tons of calculation using abbreviated data, and may take hours to construct or may require many revisions later on by myself or other developers. Otherwise, I agree with Brad – if good comments or language can do the job, I would avoid using anything else that brings redundancy or overhead to the process. Sometimes, when I create a function, I put a little plan – one or two steps including my thoughts (at that time) on implementation, so when I come back later, I have something for quick start.
I'm generally against pseudo code that tries to have ridgit syntax (like the example on page 244 with the "Endif"). With that said, I do try make my code comments use alot of "if-then" English statements. I'm not sure if these two previous sentences are contradictory or not.Circa 2001, I used some C code as pseudo code comments when optimizing to assembly code. I found that to be useful. Although, I'm not sure if C code really counts as pseudo code.


I would really be interested in other opinions on the use of pseudocode... maybe I am in the minority here!