Python God tells you several effective ways to become a good programmer
As aIT 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 excellentIT A programmer who can solve the problem and promote the overall development of the industry.
It's still recommended herePython Learning group:483 546
4I6, Whether you are Xiaobai or Daniel, I welcome all Knights, Share dry goods irregularly, Including a copy compiled by Xiaobian2017 Abreast of the timesPython Information and0 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. There's a dividing line between good programmers and bad programmers, 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, 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 nothingbug” Code. 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 inIT 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 talking 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 andAPI. For instance, In manyJava The company may replace it every other weekweb 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 andAPI.
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 document
One of the basic habits of good programmers is to read a lot of documents, Technical index,JSR,API File, Tutorial, etc.. Reading the documentation has laid the foundation for us to program in the best way.
10. Learn others' code
I love being with thoseIDE There arejava 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, Man is more than man. 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, It's the right 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
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, Reasons for thinking, Instead of using it blindlyprintf Dafa, And then hit the Universiade, treat the symptoms, Feet hurt, Because it's untiedBug In fact, I'm even guilty. And good programmers even if they doBug, 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 may use it.1 One in a weekbug, But he solved itbug 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, To put it simply, 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.