Psychology in Java Development

Source: Internet
Author: User

Since the advent of the advanced programming language, there have been no less than one hundred types of programming languages. Java is one of the most outstanding and dominant among them. Besides the advantages of "write once, run anywhere, another concern is that it meets the needs of human psychology. Java is a static object. No programmer can develop an application. It has no value. In the process of software development, what is the programming language, what is the language, what is the human programmer, there is a clear interface and division of labor, in the field of engineering this interface is called Man-machine engineering, it is called engineering psychology in the field of psychology, and the two have similar meanings.

Best practices for Java Development advocate the use of complete words to represent identifiers, even if it looks long, such as resource managers represented as ResourceManager. People can understand the meaning at a Glance. Is the interface more friendly.

The Java language writer may have used C or C ++ for development. c ++ may be familiar with Hungary naming rules, which use prefixes to indicate data types. For example, a Indicates array, c Indicates char, and so on. Type prefixes can also be combined. Prefix usage also promotes the application of the abbreviation of the identifier, such as pdlg used to name a dialog box pointer. The abbreviated rule is further promoted to the application software development field. Another scenario is that I have seen disctmgr indicating discount management and rsmgr indicating resource management. Application Software is closely related to industries and fields. Not all developers are familiar with it. Poor abbreviations allow people to guess the meaning of the abbreviations, shift people's attention, and occupy the energy of thinking about code logic.

Psychology research shows that human attention is limited, and the human brain considers three things as the best state at the same time ~ Five statuses may drop. It is quite difficult to pay attention to more than seven things. Limited attention can be understood as resources. At the same time point, attention should be allocated reasonably. When I was a child, the teacher often reminded the students not to make minor mistakes in class. The attention of the Students shifted to playing small tricks and reading the scenery outside the window. Of course, they would not listen to what the teacher was talking about. When I was a child, I was a good and obedient boy.

Back to the question, where is the psychological principle embodied in Java Development? Developing software is a complex task. You need to design classes, methods, write code logic, compile, debug, and understand business requirements. Development itself is very difficult. When designing a class, efforts should be made to achieve low coupling and high cohesion. Low coupling and fewer closely related classes will not waste your attention on other classes. High cohesion can focus your attention on the interior of a class. The more concentrated the memory, the more high-quality results can be produced. Why are there so many excellent programmers? Because the work is too invested, the attention is too concentrated, and the health care is not taken into account, you can live a quality life.

What is the psychological significance of a complete word? The meaning of the entire word can be understood at a Glance. a lower level of attention can be allocated, and more attention can be allocated to the program structure, branches, loops, and so on, isn't it possible to do more meaningful work?

Compared with C/C ++, PHP, and other languages, Java code is easier to understand. Although it sometimes looks like code is long, for example, Java Bean's getter/setter method, it is easier to understand, with the support of development tools, programmers prefer to use them. Therefore, we strongly advocate the use of the entire word, such as ResourceManager and getresource (). We should use the abbreviation with caution. It is best not to grasp it.

Human Attention is limited, and the project duration is limited. In a sense, a project's month is the product of attention and project schedule. For project managers, mobilizing developers' attention to high efficiency and application level can shorten the project cycle and the boss will be rewarded.

 

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.