Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

What are the programming methods of Python

2025-01-14 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >

Share

Shulou(Shulou.com)06/02 Report--

This article introduces the relevant knowledge of "what are the Python programming methods?". In the operation of actual cases, many people will encounter such a dilemma. Then let the editor lead you to learn how to deal with these situations. I hope you can read it carefully and be able to achieve something!

1. Estimate the time required to solve the problem. Don't be afraid, admit it! I have seen programmers sit in front of the monitor for eight hours to solve a particular problem. Set a time limit for yourself, 1 hour, 30 minutes, or even 15 minutes. If you can't solve the problem in the meantime, ask for help or look for answers online instead of trying to be a "super stacker".

two。 A programming language is a language, just a language. As time goes by, as long as you understand the principle of a language, you will find similarities between different languages. In the language you choose, you should feel "comfortable" and be able to write effective (and concise) code. Most importantly, let the language adapt to the project, and vice versa.

3. Don't pay too much attention to the "design pattern" of the program. Sometimes it's easier to write a simple algorithm than to introduce a pattern. In most cases, the program code should be easy to understand, even cleaners can understand it.

4. Back up the code frequently. When I was young, I had the experience of losing a lot of code because of a hard drive failure, which was a terrible experience. As long as you don't have a backup, it should be as if you have a strict deadline, and the customer will need it tomorrow. At this point, it's time for the source code / version control software to show its skills.

5. Admit that you are not the top programmer-lack of knowledge. I often think that I know enough about programming, but there are always others who are better than you. As the saying goes, "A mountain is always higher than a mountain." So, look like them!

6. Study and learn again. As mentioned in point 5, I often have a computer or programming-related magazine or book in my hand (if you don't believe it, you can ask my friend). Admittedly, there are always a lot of skills you don't know, and you can learn from them so as not to lag behind. If you have a clever way to acquire the new technology you need, you should keep learning every day.

7. Eternal change. You should treat technical / programming knowledge the same way you treat stocks: diversification. Don't feel good about yourself in a particular skill. If there is not enough support for that technology or language, you might as well start updating your resume and starting a new training program now. What is the main principle that I can keep moving forward? You can understand at least two or three languages, so if one language is out of date, you can rely on another when learning new technologies.

8. To promote the new people. Assist and train junior / entry-level developers to learn excellent programming methods and skills. Maybe you don't know that when you help them move to a higher level, you yourself are moving to a higher level, and you will be more confident.

9. Simplify the algorithm. Code is like a demon, after you have finished coding, you should go back and optimize it. In the long run, some improvements here or there will make it easier for later support staff.

10. Write documentation. No matter whether it is the API of the Web service or a simple class, you should try to document it. Code comments, which I used to be proud of, have been accused of over-commenting. It only takes you a few seconds to comment on three lines of code. If that's a difficult technology to understand, don't worry about commenting too much. If you can do your job well, most architects, backup programmers, and support groups will appreciate it.

11. Test, test and test. I am a fan of black box testing. When you finish coding, it starts when you are "recognized". If your company has a QA department, if there are errors in your code, you will get more comments than the project manager. If you don't test your code thoroughly, I'm afraid you're not just developing code, you may also be notorious.

twelve。 Celebrate every success. I have seen many programmers shake hands, high-five or even dance with their peers after solving programming technical problems. Everyone will encounter "epiphany" in life. If a programmer happily comes and asks you to see his extraordinary code, you may have seen it 100 times, but you should also celebrate the 101st time for this guy.

13. Check the code frequently. In the company, your code should be checked frequently (including self-check and other colleagues check). Don't regard other people's checks as demanding on the style of the code. They should be regarded as constructive criticism. For individuals, always check your code and ask yourself, "how can I write better?" This will speed up your growth and make you a better programmer.

14. Review your code. There are usually two ways to see your previous code: "unbelievable, I wrote this code" and "unbelievable, I wrote this code". The first is often a tone of disgust and thinking about how to improve it. You may marvel that old code can also be revived into a better program, or even a complete product. The second is usually with a sense of surprise and accomplishment. Developers should have one or two results of their own projects that people can't help but stand up and watch. Similarly, based on your superior programming skills, you can take out past programs or projects and update them into better products or ideas.

15. Humor is indispensable. In my development career over the years, I have met a lot of humorous programmers, what plaid shirt, stormsuit, wooden labels are affixed to the programmer's body, can only say that everyone has a different personality. In fact, in our line of work, besides technology, humor is also a must.

16. Beware of omniscient programmers, programmers who don't want to share, and inexperienced programmers. When you meet these kinds of programmers, you should be modest yourself. Omniscient programmers would rather be a hero than a team member; conservative programmers are writing their own code; and inexperienced programmers will come to you every ten minutes to ask you that when the code is finished, the code is yours, not them.

17. No project will be that simple. Friends, family and colleagues have asked me to do something in a hurry, to build a program or website. For such a thing, we should make a plan from both sides in order to make something that will satisfy both sides. If someone only needs a 3-page site that uses Microsoft Access at first, it is likely to become a 15-page site with SQL Server, a forum, and a customized CMS (content management system).

18. Don't take it for granted at any time. If you take on a simple project, you may think that some part can be easily completed. Please don't think that! Unless you have a class, component, or piece of code that has been written and has been tested in an existing project. Don't think it will be easy.

19. There is no completed software. A programmer once told me that no software has been completed, it is only "temporarily completed". This is wise advice. If the customer is still using the program you wrote and has stood the test of time. If you have the opportunity, you are still updating it, which is not a bad thing, and it keeps you moving forward.

20. Patience is a virtue. When customers, friends, or family members use a computer, they may get frustrated and want to smash the computer or leave angrily. I keep telling them, "you control the computer, not the computer controls you." You have to be patient with computers that are used for programming. Once programmers know what the problem is, they look at it from the computer's point of view and say, "Oh, that's why it does it."

This is the end of the content of "what are the programming methods of Python". Thank you for reading. If you want to know more about the industry, you can follow the website, the editor will output more high-quality practical articles for you!

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Development

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report