Reflection: Why can't I even write common programs?

Source: Internet
Author: User


In an imperfect world, it is a smart move forward.ProgramThe first thing people should know. ------ Introduction


It has been about three years since I started to officially learn and use the Java language (excluding the time I used to learn C). During this period, I wrote a simple addition, deletion, query, and modification function, I have also gone deep into the source code to study the working principles of one thing. I have read many good software development books, such as programming Pearl, programming practices, and understanding computer systems. I have learned a lot from AI to experts.Programming LanguageI think it is a bit savvy, but I always feel that I can't even write common programs. Here, a common program refers to the use of existing components, frameworks and other construction software to write business logicCode.
Why?


Why?

Relying too much on "Understanding", without going deeper into the core and working principles of things, we always stay at a superficial level of understanding. I have read a lot of books, but I have tried too little and the proportion of digestion is too low.

Relying on intuition, document description, and abstraction mechanisms to use components and frameworks, without in-depth understanding of their internal implementations, write programs on the basis of a thorough understanding, although it works programs can be quickly built in the initial stage, little is actually known. Similar to building a castle in the air, there is a lack of solid basic support.


 Solution: After the overview, all the vague aspects accumulated during the development process are broken through, connecting the learned and used joints to form a solid knowledge and skill system.


Lack of sufficient challenges?

Most of the programs written are close to the business application layer and do not go deep into the core of the computer.

Solution: in fact, it is a great thing to do a common thing very well."Great"
The program does not have its own greatness, but it combines many ordinary programs to accomplish what it should do. Business-layer development will also encounter some very challenging problems. Do not avoid them and try your best to solve them. You will be honored to do what you should do well.


There is no program to take the shot?

Seeing that someone else has written influential programs or software, but he has not yet obtained anything; the influence of written programs is limited to a small scope and cannot be widely used, lack of motivation and motivation.

Solution: You just did not write a program for practical use. Minzhi discovers deficiencies and strives to improve them. He will always write programs that he is proud. It is not necessary to come up with a very heavyweight project or application. Even a small program may be able to do very useful things. At the same time, we should make it available to others as much as possible to accept others' suggestions and improvements.


Do you want to achieve it all at once?

Obviously, good programs are always polished by time, rather than being well written at one time. First write the basic available programs, and then gradually refine. Reading excellentSource codeTo expand your knowledge.


Demanding program quality, but testing laziness?

Despite trying to follow good programming specifications and styles, I always feel that the Code performance is not good and there are hidden bugs. We hope to write programs with good performance, reliability, stability, robustness, maintainability, and ease of use.


 Solution: lack of good tests leads to unconfidence in the code you write. Learn some testing skills, systematically and strictly test your own programs, and ultimately gain confidence in the code. Do you think the code performance is not good? Do not do things by feeling the actual data and means. 


Not rigorous thinking?

I have to say that program development is a powerful test of rigorous logic thinking. If the thinking is not rigorous, it is easy to write programs with many bugs hidden on the surface that can actually work easily. How can we improve the rigor of our thinking?

Solution: study moreAlgorithmIt should be a good way. In addition, train yourself to think carefully about problems.


Are you expecting an overly ideal status?

We hope to draw on existing mature solutions as much as possible to make consistent and elegant overall solutions.

 Solution: continuous improvement and progress.


Are you interested in program development?

It's not surprising. After all, "It Works" is not exciting enough to write high-quality and easy-to-use programs, the pursuit of higher development goals may cut development interests and fun.


 Solution: there may be a lack of strong external incentives, such as participation in a very innovative product development, or significant material rewards. Seek direction in due time.


Is the development method and process nonstandard?

Sometimes, overly casual development methods and processes, as well as loose work plans, will reduce your efficiency, enthusiasm, and creativity. In addition, it is hard to say anything, influential products are generally completed by the collaboration of multiple people. A strong open team discussion atmosphere is conducive to smooth development activities.

Solution: first, formulate reasonable development tasks and work plans, and then invest in the work; and gradually establish an effective development process and work method suitable for you.


Code quality is actually a phenomenon and result. There may be many reasons behind this: less rigorous thinking, less thoughtful consideration, bad programming habits, project progress pressure, carelessness, lack of adequate testing, lack of driving force and motivation, lack of in-depth understanding of things and mentality issues. It is necessary to improve from the source of the problem, rather than solving one problem from the symptom.


Review the Unix/Linux design ideas, which attracted me with a few words:

A great program, if met: (1) it must meet actual needs; (2) there is no "expert" around who knows how to write this program; (3) there is not enough time to complete the task perfectly.

The first point is the most necessary but often inadequate or inadequate. The second three points indicate that there is no ideal state, there is not enough time to think about a very elegant solution, and there is not necessarily a ready-made mature solution.


After all, a program is just a program. Do the right thing and gradually become better. As to whether it is great or not, what has actually been done may only be external performance and halo. You can write programs that can do good and interesting things in a down-to-earth manner. Do you know how to enjoy your life?

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.