As a IT Software programmers in the industry , The motivation that drives me to work every day is the fun and passion for programming . But in order to stimulate fun and achieve eternal pleasure , We need to learn and follow some basic knowledge to become a good programmer .




Of course, these things I summed up are not so magical , You say you can be a good programmer if you want to learn , That's impossible. . It's just a short cut from my experience . Definition of good programmers , It can be understood that we can develop excellent IT A programmer who can solve the problem and promote the overall development of the industry .

It's still recommended here Python Learning group :483 546
4I6, Whether you are Xiaobai or Daniel , I welcome all Knights , Share dry goods irregularly , Including a copy compiled by Xiaobian 2017 abreast of the times Python Information and 0 Getting started , Welcome to junior and advanced partners . I'll help you out when you're not busy .



1. Master basic knowledge


No matter what industry or job , Concept understanding is the key to success . Unless you have a strong conceptual foundation , Otherwise, you won't be a good programmer . Understanding the core concepts helps you design and implement solutions in the best way . If you think you haven't mastered the specific concepts of core computer science and programming language yet , So it's not too late to go back and learn the basics .

2. Label every code set you write (how,what)

I find that one of the obvious dividing lines between programmers is , Do you have the passion to know “what and
how”. Some programmers know exactly how their code is executed and the result of execution . I also understand that sometimes it's time , We have to move on to the next step as soon as we know that the code can do the job . Although it's about solving problems , It seems to be a topic in another direction , But as a programmer , We should study the problem as deeply as possible to reach the highest level . believe me , as time goes on , You will form this good habit unconsciously , And it's a huge benefit ..

3. Learn more by helping others


Maybe most of us only go to forums and groups when we need help . One of the things that distinguishes a good programmer is , Good people often go to these places to help others . And they help others at the same time , I can learn a lot myself . If it's in a team , We should help each other . believe me , Understand the background of other people's problems , Studying and proposing solutions will help you learn more , Grow faster .

4. Code should be simple , Easy to understand , There is logic



Just like in other aspects of life ,KISS(Keep it simple and
short) The same rules apply to programming . Code should have logic , Avoid being too complex . Some people write complex code just to prove that they have the ability to write complex code . But my experience tells me , Simple and logical code to work effectively , Not only fewer problems, but also easier to expand . I remember a saying

Good code is the best document in itself . Before you add a comment , Ask yourself first ,“ How can I improve the code , You don't need to write this comment ?”——Steve McConnell

5. Spend more time analyzing problems , You can spend less time to fix it later


Spend more time understanding and analyzing problems , Design the best solution , And then you'll find that the next job will be twice the result with half the effort . The design process does not mean that modeling languages and tools must be used , It can also be very simple , Such as looking up at the sky , And then I have a brainstorming in my head . Programmers who are used to crackling when they get a problem , The final results are often different from the requirements .

If you don't have the whole structure of the program in your head when you take a bath , That means you're not ready to start writing code .——Richard Pattis

6. The first to analyze and review your own code


Although it's a little difficult , But know the problem before others find out , Can let you learn how to write “ Close to none bug” Code of . We should be fair and rigorous in our code review , We should also be able to accept other people's audit without hesitation . One takes on the attributes of one's associates , Work with good programmers , Actively listen to their feedback , It will certainly help you become a good programmer .

7. Don't be discouraged in the face of changing technology




Recently in IT In the industry , A lot of people I met —— Or talk about being disappointed in their work , Or even quit to find a new job —— All agree , They want to learn and use the latest technology . I think that's understandable , But the word “ abreast of the times ”, I don't think so . We can hear people saying it every day “ What new tools are coming out now ,API, Framework and other methods, etc ” It can make programming easier . This is actually happening all the time in the field of technology . What we really need to pay attention to and understand is the transformation of core and basic technologies , On this basis, let's look at the new framework , Tools and API. for instance , In many Java The company may replace it every other week web frame , But it's based on the client — Demand mode of server communication mode ,MVC pattern ,filters/servlets/JSP, Resource binding ,XML Core concepts such as analysis are still the same . therefore , Instead of worrying about changes in frameworks and tools , It's better to spend some time learning these core concepts . believe me , On the basis of understanding these core concepts , We can grasp the new framework more quickly , Tools and API.

8. Emergency measures are not effective for a long time


Many times , Software programmers may adopt emergency and flexible solutions ( Or because of the time crunch , Or lack of deep understanding of the problem , Or lack of technical experience ). however , These contingency plans break the code , Which makes it difficult to expand and maintain later . I can understand , Sometimes it's really hard to avoid , But it's like we should all be honest , You lied , Then we need to know the day when lies will be revealed .

9. Reading documents

One of the basic habits of good programmers is to read a lot of documents , Technical indicators ,JSR,API file , Tutorials, etc . Reading the documentation has laid the foundation for us to program in the best way .

10. Learn others' code




I love being with those IDE There are java Excellent programmer communication and interaction of source code , read / Refer to their code . Because it's not just about getting the basics , You can also learn new ways to write projects . Read and reference some reliable and known open source code or your own advanced code , It also helps us to program better .

Last point , Not listed in the front : Don't compare with others


it is said that , Human to human , exasperating , Comparing yourself to others can only lead to negative emotions , And become a bad competition . Every inch has its advantages , Everyone has their own strengths and weaknesses . I've seen so many times that so-called special programmers make stupid mistakes . therefore , Analyze yourself , List shortcomings , Try to improve yourself , That's the way .

Programming is a real pleasure , Welcome to enjoy .

“ Any fool , They all write code that the computer can understand , however , Code written by excellent programmers , It can be understood by all mankind .”——Martin Fowler

also

I think good programmers , Not only excellent in code , More important in thinking, etc .

I think a good programmer is cautious , When there are needs and tasks , Constantly clarify requirements and tasks , And confirm the desired result many times , Instead of listening or looking at the list of requirements and tasks .



I think the thinking of a good programmer is clear , When writing code , There are a series of detailed steps in his mind , I know what he's doing , And every step he writes down, he knows exactly what he's saying .


I think the thinking of a good programmer is meticulous , After the problem , He will study the problem in detail first , Reason for thinking , Instead of using it blindly printf Great law , And then hit the Universiade , treat the symptoms , Foot pain , Because it's untied Bug In fact, I'm even guilty . And good programmers even if they do Bug, He'll expand the problem, too , And think about whether other parts have similar problems , It's just not there yet , And he will reflect on his experience in detail .


I think the coding habits of a good programmer are good , His code is pleasant to read , When encountering a difficult implementation point , He will also write clear notes to help later people understand , Because he knew that the code wasn't just for the computer to execute , It needs to be understood by others , Because project development is teamwork , Not alone .

Working with good programmers is enjoyable , Rather than finding it difficult .

Good programmers always solve problems in the end , And no matter how long it takes , he / Can she solve the problem , How to solve it ,
He might use 1 One in a week bug, But he solved it bug It's definitely planned ; Generally, programmers can only solve problems that are highly similar to those they have solved , If this problem hasn't happened ,
Basically, it's a lot of luck . It's easy to say , It's hard to do , It's basically a combination of a person's intelligence , physical strength , experience , Understanding of the system , professional knowledge , Bottom level understanding ,
Mastery of Architecture , Grasp the details of language ... Wait a lot , In a nutshell , Good programmers always seem to avoid problems , But ordinary programmers are always blocked by some messy problems
--- This is not an accident , There is a certain necessity .