Pseudocode Programming Process

原创 2004年09月28日 23:44:00

Guidelines for using pseudocode
1. Use English-like statements that precisely describe specific operations.
2. Avoid syntactic elements from the target programming language.
3. Write pseudocode at the level of intent, rather than how the approach will be implemnet in the target language.
4. Write pseudocode at a low enough level that generating code from it will nearly automatica.
Once the pseudocode is written, you build the code around it and the pseudoccode turns into programming-language comments.

Benefits you can expect from using this style of pseudocode
1. Pseudocode makes reviews easier.
2. Pseudocode supports the idea of iterative refinement.
You start with a high level design, refine the design to pseudocode, and then refine the pseudocode to source code.
3. Pseudocode makes changes easier.
A few lines of pseudocode are easier to change than a page of code.
4. Pseudocode minimizes commenting effort.
5. Pseudocode is easier to maintain than other forms of design documentation.
With other approaches, design is separated from the code, and when one changes, the two fall out of agreement.

Design the Routine
1. Check the prerequisties.
Check to be sure that the routine is actually called for, at the very least indirectly, by the project's requirements.
2. Define the problem the routine will solve.
       The information the routine will hide
       Input to the routine
       Output from the routine
       Precondition that are guaranteed to be true.
       Post condition that the routine guarantees will be true.
3. Name the routine
4. Decide how to test the routine.
5. Think about error handling.
6. Think about efficiency.
7. Research functionality available in the standard libraries.
8. Research the algorighms and data types.
9. Write the pseudocode.
10. Think about the data.
Definitions of key data types are useful to have when you design the logic of a routine.
11. Check the pseudocode.
12. Try a few ideas in pseudocode, and keep the best.
13. Turn the pseudocode into high-level comments.
14. Fill in the code below each comment.
15. Check whether code should be further factored.

Pseudocode Programming Process

Guidelines for using pseudocode1. Use English-like statements that precisely describe specific opera...
  • Softeer
  • Softeer
  • 2005年08月01日 11:46
  • 763


  • DerryYan
  • DerryYan
  • 2016年11月23日 19:49
  • 149


伪代码(Pseudocode)原文:《Pseudocode 》by Naomi Nishimura刘建文略译( In the text an...
  • keminlau
  • keminlau
  • 2008年11月21日 11:27
  • 3137

View Controller Programming Guide for iOS摘要

View Controller Programming Guide for iOS View Controllers分类 View Controller的内容可以通过多种方式来展示: 把view ...
  • u014084081
  • u014084081
  • 2015年04月22日 16:42
  • 820

代码大全学习-12-伪码编程(The Pseudocode Programming Process)

伪码编程的概念相信大家都知道,就是用伪代码,也就是描述性的语句来表示一个程序的实现过程。遗憾的是,包括我自己在内,用的人不多,就算是用,用得也不好。看完这一章之后觉得,以后还是要好好用这个工具。  ...
  • tyst08
  • tyst08
  • 2012年07月22日 20:50
  • 529


MANAGER Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 3060   Accept...
  • tigerisland45
  • tigerisland45
  • 2018年01月14日 00:44
  • 171


if(Condition) stmt else stmt //if-else while(Condition) stmt //while for(i=1 to...
  • lsppow2oo9
  • lsppow2oo9
  • 2010年06月16日 01:35
  • 748


反编译是IDA最让人振奋的功能,它的本质是IDA的一个插件,不过会被当做hex-rays的另一个产品。既然是产品,那当然就另外收费,demo版是没有的。反编译的快捷键是F5,菜单位置在 顶部菜单Vie...
  • hursing
  • hursing
  • 2013年05月16日 17:20
  • 17333

Usage of Pseudocode

伪代码的使用 Usage of Pseudocode伪代码(Pseudocode)是一种算法描述语言。使用为代码的目的是为了使被描述的算法可以容易地以任何一种编程语言(Pascal, C, Java,...
  • Softeer
  • Softeer
  • 2005年08月01日 11:30
  • 747

Gaussian Process dynamic programming笔记

该论文于2009年发表在Neurocomputing上,论文作者Marc Peter Deisneroth 摘要部分:主要介绍了RL与Optimal Control的区别:针对Optimal Con...
  • imagef
  • imagef
  • 2016年11月24日 08:26
  • 176
您举报文章:Pseudocode Programming Process