Stanford University Open Class: Programming methodology

Source: Internet
Author: User

This is the essay of Mehran Sahami, professor of Open Class: Programming Methodology at Stanford University, which is open to NetEase.

Currently only see the third class, "Karel and Java", my harvest has the following points:

1. Software engineering is different from normal writing code. Software should consider a lot of things, such as portability, easy to upgrade maintenance, and so on, not just write code to implement the function as simple.

2. The code is written to the machine, but more important is that people can understand it. (The amount of work or time spent in post-code maintenance and so on is 10 times times as much as writing code, so it's important to make the code more prescriptive and easier for people to read)

3. Define exactly the functions of a function, a class, a package. Good code, to high cohesion and low coupling.

4. Achieve the lowest level of functionality, through which you can achieve more functionality, solve the problem more universal, do not need to change the code frequently. (a bit of top-down meaning, start by considering all possible situations and be prepared)

5. In a class file, the main function is at the top, and the main function defines the approximate steps to implement the function. The specific implementation of each step is written in the following way. The code is written by us, so don't worry about undefined functions, we can write them out. (Learning should also be done in the same way as a question-and-answer.) All problems should be considered as problems, not the rationale.

      

Stanford University Open Class: Programming methodology

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.