Program Development Viewpoint Miscellaneous

Source: Internet
Author: User

1. Important Thoughts and concepts

Recently, it has been found that computer science ideas and concepts are becoming more and more important. This is not an out-of-date preaching. When you use Java JDK, if you do not understand the concept of priority queue, you may not understand priorityqueue behavior. If you do not understand the mechanism of hash tables, you cannot write good equals and hashcode methods, it is even less likely to use hashmap; if you do not understand the concept of blocking I/0 and non-blocking I/0, the API documentation for reading I/0 packets will also be in the fog; if you do not understand the principles and methods of synchronization and concurrency, it is impossible to write a correct multi-threaded program. Also, weakreference does not understand the principles of the garbage collector. Although programming is often done, the ideas and concepts of computer science are everywhere. If you encounter obstacles when reading source code or API documents, it is likely that the related ideas and concepts are not clear, make up for it.

 

2. Focus on primary and secondary learning and master important parts

The learning should focus on the components that affect programming or are helpful to programming, while the others can be used as a knowledge background for further understanding. For example, the I/0 part focuses on the concepts of I/0 stream, buffer, blocking/non-blocking, synchronous/asynchronous and Their Application in programming, the features of I/0 devices, read/write commands, and disk scheduling are the details of internal implementation, you can get to know about it.

In short, it is best to have an overall understanding of any technology and extract important parts for study. The so-called important part is the abstraction provided to programmers by computer systems, languages, and application frameworks for specific job roles, such as programmers, rather than all their details. Recommended reading: "Computer System: a programmer's perspective ").


 

3. Write reliable and reliable code

Stop. Check the code you have written to make it more reliable and trustworthy? Can it run better? Can it be more secure? The accumulation of knowledge and skills in this area can also broaden your horizons, which is also a way forward. To write reliable and reliable programs; not to be greedy, but to be refined. Learn more about system reliability and security, and grasp development activities from the system as a whole.

During programming, you need to write programs that avoid bugs, spend more time testing and program verification, and use mature algorithms. Every time you take a shortcut, you will be lazy for one minute, it may take one hour or even one day for compensation.

 

4. Two programming beliefs

Everything has a causal effect. When a program error occurs, you must be sure where the error is. Even if it is not a software logic error, it may be that the hardware cannot breathe. Every mistake is an opportunity for new knowledge. Do more comparative experiments (run the same copy on other machines), insert print statements in any suspicious places, check whether the results are as expected, and patiently repeat them to narrow down the scope of troubleshooting, until the final result is shown.

Think from depth to simplicity. This sentence was borrowed from a reader's comment on programming Pearl, which I think is very relevant. Do not rush to programming, thoroughly analyze the problem, plan the implementation scheme to a more mature level, do what first, then how to do it, and how to do each step, what are the key points and difficulties in each step? What methods and technologies are used to solve them? Think clearly in your mind or discuss them with others, just like computers, the vast majority of tasks can be divided into a series of tiny commands. Think from the depth of the line to simplicity, truth is also.

 

5. Programming Language: a programmer's weapon

When watching a movie, you will usually find that the experts will have their own strange weapons, such as long guns, short swords, dual-stick, and Fang Tianji. In analogy, programming languages are the weapon of programmers. Different weapons have different areas of expertise. Which one should I choose? I personally think that we should first determine the domain we want to engage in, and then select the language most suitable for this field for learning and application. Best Practice: process-oriented, object-oriented, functional language, system scripting language, and browser language. For example, C/Java/lisp/Python/JavaScript. in addition, it is helpful to be familiar with as many languages as possible.

 

6.Programmer's technical growth path

According to software process (I agree), programmers can be divided into three stages: apprenticeship, employee, and expert.

Apprenticeship: Learn programming. Master basic professional knowledge (mainly data structures, algorithms, operating systems, databases, and computer networks), learn a language, and use some frameworks for some small projects, develop good programming habits and qualities. Recommended books: programming Pearl River and programming practice. These two books teach people how to program better, rather than simply typing in code.

Employee: mainly improve programming skills and study software design and application architecture. At this stage, through real project development, we will refine better programming skills and develop good development habits. At the same time, we should pay more attention to studying the ideas of software design and application architecture, learn more about system performance and reliability, and accumulate experience. By familiarizing yourself with and mastering the essence of various frameworks, the AI stage will eventually become independent of the frameworks. Recommendation: programmer practices: from small workers to experts

Experts: They mainly use their existing knowledge and experience to develop, manage, and consult software projects and learn from them. The expert stage should no longer rely on any application framework. You can select an appropriate framework or design one by yourself based on your specific business needs, that is, the realm of "no action wins or no action. Once it reaches the expert stage, the story behind it should be based on the creation of each person.

 

7.How to become an expert: Do a Good Job of career Accumulation

[1] When writing small programs at ordinary times, we should do our best to do more careful consideration in design, make them practical, and write good documents. People who always want to read the program will think about it.

[2] extract the source code and build a simple and practical knowledge/code management system.

[3] detailed records of errors and solutions encountered during the development process, or written as a blog to share with more people;

[4] Good design ideas, techniques, detailed records, or blog posts to share with more people.

[5] accumulated business knowledge and willingness to communicate with customers.

[6] humble and humble, always empty cup mentality.

 

8. Do a good job of Chemical Engineering: procedures and documents are actually a pair of twins and cannot be eccentric.

Programmers, from a superficial perspective, seem to be able to write a program. Actually, it is not. It is also of great benefit to patiently and meticulously do a good job of tedious documentation and chemical engineering.

A programmer will inevitably encounter many problems and solutions in his life's programming and development work. If not recorded in detail, it is easy to repeat the same mistakes, or do a lot of repetitive work. In addition, the work done by others is also worth learning. Therefore, good programmers should do well in the chemical work of these documents and record their own and others' work in detail for future use. These are one of the most important professional fortune for programmers.

10.Take time every weekend to focus on others' work and social hot issues

You cannot concentrate on your own affairs. Take time out every weekend to care about others' work. Answer questions in the Forum, pay attention to the progress of open-source projects, the trend of friends, social hot issues, and dynamic information in various industries, give yourself a macro non-technical perspective.

 

11. Development and Learning

One of the most common tasks in a programmer's career is development. In the development process, more learning is inevitable. How can we coordinate the relationship between development and learning?

① When developing, try to familiarize yourself with and select existing libraries, software packages, and components that have undergone rigorous tests to complete development tasks, avoid repeated tasks, and improve development efficiency and software quality; when learning, try to reinvent the wheel, find out the internal principles and mechanisms, and at the same time get the pleasure of creation. For example, to use a hash table in a Java application, you should directly use existing classes such as hashmap. When learning, you need to figure out the internal principles and implementation (seemingly a red/black tree ), and write your own implementations;

② There is a gap between learning the basic principles and selecting the application framework for development: how to apply the basic principles and mechanisms learned? The answer is: Understanding the application framework and enhancing learning and insight. If you have a solid foundation, you should be able to use the framework in the first two times. The third time is the time to study the framework source code. The frameworks are full of clouds and must be able to remain unchanged. In the process of studying the framework source code, an essential skill is to read the existing code and benefit from others' work.

③ It will always be thought and technology. The idea is the guide to how to do things, and the technology is the specific code implementation. Without thinking, technology will get lost; without technology, the idea is just a castle in the air. To learn something, you must first master its thoughts and working mechanisms, and then use a typical representative language that represents different perspectives to implement it.

 

12.Programs and software

Programs are small and beautiful. They can collaborate with each other to accomplish more complex tasks. It is enough for a program to complete its own tasks. Through careful design and implementation, rigorously verified and thoroughly tested to obtain reliable and reliable Program unit modules;

Software is usually huge, and the association and interaction between modules must be carefully planned. If a variety of Program unit modules cannot be effectively integrated, even after careful implementation of each module, it may lead to heavy and bloated software, which is time-consuming and labor-intensive. Moreover, software development often involves personnel communication, administrative management, costs, progress, and other factors that are difficult to measure with technology. Therefore, software development is more complex than program development.

 

13.Coding and Programming

I prefer "program design. The program is designed, not purely encoded. Before coding, You can have enough time for pure thinking and refinement. Think carefully. When eating, sleeping, walking, and closing your eyes, when everything can be stopped to free up time for thinking. Programmers should be able to "predict results through pure thinking, rather than relying on display results to judge Program correctness ". Think of yourself as a programmer, and learn the knowledge, skills, and qualities that should be understood and mastered as such a role.

 

14. Six tools for programmers

Problem Analysis and estimation; data structure; algorithm design; design pattern; regular expression; concurrent programming.

 

15. write code on paper for Design

There are two basic elements for becoming a good programmer: solid professional foundation and agile and meticulous thinking. Writing code on paper is particularly helpful for training meticulous thinking and design capabilities.

Writing code on paper has three benefits: 1. Focusing; 2. Helping Design on paper; 3. Avoiding computer radiation as much as possible.

It is mainly applicable to designing and compiling important module functions on paper.

16. thinking first

Let's get something done. Don't get happiness, don't lose your grief. The most important thing is perseverance and sustainable development. A programmer should first have rich and free thoughts. With the idea first, you can write a thousand words on the computer. If you have less Internet access and more books, you can study, exercise, and communicate with others when you are free.

 

Program Development Viewpoint Miscellaneous

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.