In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-02-21 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/03 Report--
This article introduces the relevant knowledge of "summing up four ways to improve programming skills". In the operation of actual cases, many people will encounter such a dilemma, so 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. Refactoring existing tools
Lack of feedback is one of the biggest obstacles to your programming learning. when you first learn programming, it's not a big deal. You want your code to run, and the more experience you gain, the more challenges you face. You need to consider design patterns, architecture, readability, performance, and so on. You will find that there are multiple solutions to each problem, and you need to judge whether your solution is reasonable.
Fortunately, there is an easy way to get feedback on the code or a different perspective on the problem: by rebuilding existing libraries or other tools.
All you need to do is find some tools (preferably the ones you use often), understand its functions, and then determine its core functions. Read the documentation carefully, learn about API, and make sure you're ready to start refactoring.
You don't need to rebuild everything, just one or more common use cases, and in general, the project will take you a few days to complete.
When you finish programming, the interesting part comes, check and analyze the source code, consider possible situations and Bug. Then reopen the source code of the tool you created and check your code and solutions to these problems. Are your solutions similar? Is it better or worse? why? Try to understand the decisions behind the code base.
Many libraries are created by experienced programmers and extended by the community, and by examining their code, you can learn new patterns and methods of problem solving, and when you try to solve these problems, it will be easier to apply new knowledge to practice.
two。 Pair programming
Pair programming is a controversial idea. It is a software development technique in which two programmers work together, but only one person writes the code and the other reviews the code. The two change roles regularly.
The disadvantage is obvious: only one programmer writes code, so it takes more time to create software, and the advantage is better software quality. The benefits of pair programming for software development are controversial, but the benefits to your programming skills are obvious.
When you write code, your partner will discover your patterns and thinking habits, and you all need to analyze each other how to create code. When you look at the code written by other people, you can see their patterns and mindset, and it's almost certain that you deal with problems differently, so this is the way to find problems from another perspective.
Pair programming is difficult, in order to be more efficient, your partner should be close to your level, if they are too junior, they will become the way you are. But if they are much more experienced than you, they may soon become impatient with you, or simply do everything themselves.
3. Restrain oneself
It's hard to be creative. you're used to solving problems in one way, without even thinking about other ways, just like autopilot. As a programmer, in order to become more creative, you have countless ways to restrain yourself, such as:
Avoid some language features (for example, do not use if or Switch statements when writing code)
Reduce the variability of data-use pure functions as much as possible, and even use tools such as Immutable to achieve immutability.
Use test-driven development-TDD is a powerful technology that can make your code better and force you to change your way of thinking.
Limit your time, such as giving yourself three days to develop applications or participate in a hackathon.
Constraining yourself is not the most important part. You can choose what looks interesting. The key is a paradigm shift. Forcing yourself to rethink and improve your approach is the accelerator of your growth.
4. Write technical articles
If you've been programming for a while and think you know what you're doing, but it's not, when you're programming, you'll find that you don't know a lot of things. and often unconsciously repeat these same steps over and over again.
When you explain your coding process in writing, you begin to think deeply about your programming methods, whether some code is at the heart of the problem, and whether others are too redundant and complex. Writing will make you think about your code systematically and critically. You need to restructure and simplify it to create useful learning materials for others. There is no better way to learn more about a subject than to teach others. Make good use of this way, and you will grow faster than you can imagine.
That's all for "summing up four ways to improve your programming skills". 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.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.