After working for 10 consecutive hours, one cup of coffee after another, facing the blue-light display, I suddenly felt blank and couldn't write any code... They say that becoming a programmer and persisting is a very courageous thing. But the touch and excitement that code can b

2024/05/1313:06:32 technology 1575

worked continuously for 10 hours, drinking cup after cup of coffee, facing the blue-light display screen, and suddenly felt blank and unable to write code... They say that it is particularly courageous to become an programmer and stick to it. However, the touch and excitement that code can bring will sometimes suddenly fade away like the tide. Programming is mental work. When programmers face code day after day, they will inevitably feel exhausted and exhausted. How to overcome this state?

1, ‍Clear the requirements and then get started

Writing code is a creative process, just like writing a novel. It does not mean that you can write a novel only after you have recognized all the words and learned the sentence structure. This is not a quick fix. Yes, when you encounter a need, think about it first, how can you achieve it? How can we achieve better results?

Don’t start writing code as soon as you come up. Master as many refactoring methods and refactoring thinking methods as possible. Mastering refactoring does not necessarily mean reconstructing the original code, but letting yourself think about what to do before writing. Write.

After working for 10 consecutive hours, one cup of coffee after another, facing the blue-light display, I suddenly felt blank and couldn't write any code... They say that becoming a programmer and persisting is a very courageous thing. But the touch and excitement that code can b - DayDayNews

2. Make good use of open source

Maybe you can try open source code. The quality of open source projects with a large number of users and good reputations is guaranteed. Making full use of open source projects can help you save a lot of time. GitHub is a major place to find open source code. Note that using code developed by others is always risky. It may change your program unintentionally. So, be sure to back up the original code!

After working for 10 consecutive hours, one cup of coffee after another, facing the blue-light display, I suddenly felt blank and couldn't write any code... They say that becoming a programmer and persisting is a very courageous thing. But the touch and excitement that code can b - DayDayNews

3. Ask colleagues and seniors

If you really can’t handle it yourself, you might as well ask excellent colleagues or seniors for help. However, when asking for help, you should pay attention to ensuring that the code you write must be clean and standardized so that others can understand your code ideas and design intentions. And you can clearly explain your own problems and confusions, express the context of the code you write clearly, and make it easier for colleagues to understand, so that we can help you more efficiently. If you want to become a programmer with zero foundation, Wei ❤ Worker Z python Programming Learning Circle has accumulated a lot of e-books and video inventory. You can go directly to send "T" to get it for free. This is how I learned it myself, and now I have achieved some success. It is easy to get started.

4. It is futile, so you might as well put it aside for a while.

Studying a piece of code for a long time is fruitless. It is easy to fall into a dead end. You might as well put it down first and give yourself a break. If you have some time to empty your mind, you may be able to see another bright spot. Shelving briefly does not mean giving up, but letting yourself temporarily step out of the world of code. Since you still can't solve the problem after racking your brains, you might as well let it go first. After a short period of short selling, a breakthrough idea may suddenly appear!

Even the best programmers will inevitably encounter some problems when writing code. If you want to reduce the frequency of your own mistakes and lack of inspiration, you must constantly summarize in your studies to ensure that you can write high-quality code in a better state. Quality code.

technology Category Latest News