Software Engineering discussion

20 views
Code Complete > The Pseudocode Programming Process

Comments Showing 1-3 of 3 (3 new)    post a comment »
dateUp arrow    newest »

message 1: by [deleted user] (new)

Wow, I really disagree with the advice in this chapter. To me, the language and its use by the programmer should be expressive enough to write in and read from directly, without the need for a pseudocode first step. It seems to me that this just subtracts from productivity and results in another artifact to dually maintain and review. I am all in favor of good comments when the code doesn't speak for itself, but I think that it usually does. In fact, I write code first without comments, and then go back and clean up the code and add comments where helpful during a 2nd pass... directly the inverse of the approach recommended here.

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


message 2: by Aleksander (new)

Aleksander Shtuk | 84 comments 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.


message 3: by Erik (new)

Erik | 165 comments 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.


back to top