Why is design by contract considered an alternative to the pseudo programming process?

Posted by zoopp on Programmers See other posts from Programmers or by zoopp
Published on 2012-09-01T13:45:16Z Indexed on 2012/09/01 15:48 UTC
Read the original article Hit count: 430

Right now I'm reading Code Complete by Steve McConnell and in chapter 9 he talks about the Pseudo Programming Process (PPP).

From what I've understood, the PPP is a way of programming in which the programmer first writes the pseudo code for the routine he's working on, then refines it up to the point where pretty much each pseudo code line can be implemented in 1-3 lines of code, then writes the code in the designated programming language and finally the pseudo code is saved as comments for the purpose of documenting the routine.

In chapter 9.4 the author mentions alternatives to the PPP, one of which is 'design by contract'. In design by contract you basically assert preconditions and postconditions of each routine.

Now why would that be considered an alternative? To me it seems obvious that I should use both techniques at the same time and not chose one over the other.

© Programmers or respective owner

Related posts about pseudocode

Related posts about code-complete