You've been on the computer for n hours. I don't know what code to write, or the urge to slam a keyboard is brewing in your chest.
Coke a bottle and then a bottle. Do not dare to drink, because there is no side effects, heart speed, the body involuntarily trembling, out of cold sweat, but still can not produce any code.
The nature of programming is tricky
Even the best programmers encounter unresolved software engineering problems. Encountering such a problem does not necessarily mean that you lack skills or knowledge.
Programming is not an easy job, we can take unorthodox methods to maintain the level of productivity you want, and make sure to submit high quality code.
If I spent a few hours on a problem and still couldn't find a solution, I would end up thinking it was a waste of time. I'm not babbling-I just think "no one can die without regret".
Re-identify problems and find your productivity again
Maybe you're already on this road. Then you can just go on and I may not have anything new to tell you.
If you're a novice, you may not yet know how to find productivity again.
Here's what I'm going to share to help you keep your productivity in a healthy way while you're programming and not be exhausted. This includes testing different solutions until you feel like you're looking for open source solutions to more experienced programmers. If everything fails, let it go.
Test the different solutions until you feel the repetition
Before you study or ask other developers (= waste their time), you should try to use your existing knowledge and thinking to develop every possible solution.
It is obvious that too many programmers start by asking someone else, and they don't even settle down to analyze the problem itself. Don't be such a nuisance, try not to waste others ' time.
Devote yourself to your work before you ask for help.
2– Online Find open source code
When you are in a job and have no results, the next step is to try open source code. Many programmers build software for the fun of creating solutions and publishing them online for everyone to use. Some people have published code that was used by their programmers for commercial projects.
GitHub is one of the two main places to look for open source code. The other is StackOverflow.
The solutions for these sites are in the form of reusable code that is easy to implement in your project.
Keep in mind that it is always risky to use code developed by someone else. It may change the behavior of your program in unexpected ways. It's common sense to back up the original code.
3– asked more experienced programmers
Have you ever come across a situation where you ask someone for help but find that you don't even know what you're asking.
Before you ask anyone, you need to be prepared with questions that you can't search through online information.
Clear questions to have a definitive solution. If it's a question you've been describing in your own eyes-then you'll only get a foggy answer (and may annoy others).
If you don't have any developers around you to ask, you can also find them online. You can ask on the StackOverflow or MSDN Social Forum, or look for slack channels that specifically target the technology you're using.
4– If it all fails, let it go
Don't be bored in a cul-de-sac, not really, then do something else--sleep, eat, and so on.
You think it's an escape from work. That's a mistake.
What I want to tell you is that when you are most relaxed, it is often the solution to the idea of a moment, this is not I made up, but there is scientific proof. Your brain is working in "Divergent thinking" mode, not in the "focus" mode-you can learn about the differences in this article.
In general, the idea is that you forget the problems at hand and let your mind immerse yourself in other things. At this point, your subconscious begins to connect the main points and move toward the direction of epiphany.
What can we do to help the brain work in a mode of divergent thinking? Take it easy: Take a walk (the ancient philosophers are very accustomed to speaking when walking, because they realize that walking helps to think) cleaning up the office or home (give yourself a reward when you're done)
I maintain a healthy balance between programming and living.
Whether you choose to program for hobbies, money, or great things to change the world--programming shouldn't be the only thing you're obsessed with, or you'll get obsessed.
Finally, if you racked your brains, but still can not solve the problem, then may wish to put aside. By working subconsciously, the idea of a breakthrough can be an epiphany.