Research Findings:
1. Pseudocode is an informal high-level description of the operating principle of a computer program or other algorithm.
2. There are many opportunities for developers to make mistakes, create unintentional complexity, or simply lose their way. Pseudocode is an incredibly useful tool in the developer's toolbox, helping her avoid many of the pitfalls that plague such a complex undertaking.
3. Developers can look at the whole picture rather than the specific elements that make up that picture. They can be sure they have adequately defined the problem before they get too deep into the actual prototyping phase and realize they have forgotten something important. The prototyping phase can then move along more quickly, simply because there is no need to keep correcting code that has already been written.
4. The output of design is Pseudocode.
5. Pseudocode is logic without syntax. Architect needs to write readable pseudocode
6. A workable solution is a solution that step by step logically considers and eliminates options.
7. Pseudocode helps the developer stop thinking about syntax, start thinking about "is my logic logical? Am I making sense solving this problem? Is this solution step by step ?"
8. Pseudocode bridges the gap between logic and syntax of building perfect statements.
9. Pseudocode does not have to be perfect computer code, but it should make perfect logic.
10. Pseudocode is an informal, high-level description of the operating procedure of a computer program or other algorithm. It uses the structural conventions of a programming language, but is intended for human reading rather than machine reading
Rule:
1. Concentrate on logic first, build perfect statements later. [Golden Rule.]
Benefits:
1. Focus on the big picture, instead of detailed level pointer manipulation.
2. There is no standardised style or format, so one pseudocode may be different from another.
3. To improve concentration, pseudocode helps.
4. Programmer does not have to think about syntax. Programmer can concentrate on logic.
5. Pseudocode can be reviewed by groups more easily than real code.
6. Pseudocode allows programmers who work in different computer language to talk to each other.
Disadvantage:
1. We do not get a picture of the design.
Goals:
1. Very brief,
2. Let other people understand the high level design of the algorithm
Code:
1. Clean
2. Executable and give right results.
Recommendations:
1. For middle and hard level problems, need to write Pseudocode for communication and reduce defects.
2. For very simple problem, don't need to write Pseudocode.
3. I have written some pseudocode to help solve some middle problem, like parsing expression.
4. Only use Pseudocode as high level design. And then write code to implement it.
References:
https://en.wikipedia.org/wiki/Pseudocode
http://www.ehow.com/info_10060077_advantages-using-pseudocode.html
http://www.cs.iit.edu/~cs561/cs105/pseudocode1/sld001.htm
http://formaldesign-techniques.blogspot.com/2009/03/advantages-and-disadvantages-of_20.html
https://docs.google.com/document/d/14x2S42cQ4J20uKRc_2LxrM-u39LE6j3M5FVCdQx5Jg8/edit
https://www.reddit.com/r/programming/comments/1250eg/how_to_crack_the_toughest_coding_interviews_by/
No comments:
Post a Comment