"Introduction to Programming (Java)" Maxim

Source: Internet
Author: User

★ The following important remarks/suggestions/maxims ...


★ The core of computer software development has two:Organization of the program (object-oriented technology), problem Solving (algorithm)。
Plato's Law : The world of classes exists independently, and the object world is created by classes.
★ Object-oriented technology simulates the real world of materialism by reversing the world of ideas.
★ I serve therefore I am in.

★learning by doing.

★ Calculation is simulation--Alan Kay (Alan Curtis Kay)

★ Program must be written for people to read, only occasionally let the machine execute--abelson andsussman[1]

★any fool can write codethat a computer can understand. Good programmers write code that humans canunderstand--martin Fowler

★ If the parameters of the method are directly given and do not need to access the data of an object, it is designed to be a static method.

★ Subtype is a parent type.

★ Subtypes (objects must) can be substituted for their parent type-the Richter substitution principle .

★ Polymorphic = Up Styling + method rewriting (programming Tips).

★ When rewriting the method of the parent class, persist in using @override.

★ Subclasses inherit all accessible members of their parent class.

★ Design, the code upward concentration.

★ As a reuse mechanism, delegation takes precedence over inheritance. --"Design pattern"

★ polymorphic = polymorphic variable + dynamic binding (System mechanism).

★ Users only need to understand the interface--parnas principle .

★software entities (classes, modules,functions,,etc.) should is open for extension,but closed for modification. A software entity (class, module blocks, functions, and so on) should be open for expansion and closed for modification. Ocp

★ Programming is difficult, not because it is not written, but because it is not clear.

★ Modify all member variables with private (make all Member Variables private.).

★ Modify any helper method with private. (Make any helper methods private).

★ Data down focus.

★favor polymorphic composition of objects overinheritance. Prefer to use polymorphic combinations of objects rather than class inheritance. --"design pattern"

★ Preferential use of standard library exceptions.

★ Do not use return, continue, or break in the finally clause.

★ Callbacks usually refer to executable blocks of code that can be passed as arguments to other code, or a reference to an executable code.

★first Learn computer and all the theory. Nextdevelop a programming style. Then forget all and just hack.--george Carrette.


[1] Web search: 101 moregreat computer Quotes.




Copyright NOTICE: This article for Bo Master original article, without Bo Master permission not reproduced.

"Introduction to Programming (Java)" Maxim

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.