It's a common scenario when I get stuck into some problems while developing an application or working on a project so badly that I want to give up. Also I find myself uninterested to continue with coding at times. What are some of the techniques or some good tips to keep myself motivated and not get annoyed?
I can't fathom ever getting bored with coding so to me, answering this question is an NP-Complete problem for suuuuurrrreeeee.
I do get "sick" of coding sometimes... And that occurs when I've done it enough for the day. E.G. if I'm doing hardcore coding for like 6-8 hrs then I'm done and I want to do other things the rest of the day more than likely. Doing those other things helps rejuvenate and motivate me for the next day.
Whenever you feel uninterested just say to yourself that you will quit coding tomorrow and not today! Do it every time and make sure that tomorrow will never come and you will never quit!! Happy Coding!!!
Walk away for 20 minutes, do something else.
If task is too complex, break it into smaller tasks and combat each of them seperately.
If you are bored and can’t seem to finish, focus your thoughts on the end goal and the reward.
Budding Developer Keen Learner
Gergely Polonkai
You have to believe in things that are not true. How else would they become?
For motivation, learn new stuff. For focus… well, thatʼs your game.
I learn new stuff pretty often. A new algorithm, a new library, a new service, a new language, a new whatever. Iʼm interested in everything new, even if itʼs just a temporary buzzword. Learn new stuff, and get your hands dirty with it. If you havenʼt already, allocate a few hours of your work week only for this. This can even give some ideas on the problem at hand, or some clues on where to go when it is finally solved.
Keeping focus is a much harder thing, and a lot of sites, Hashnode included, is full of tips and tricks on the subject. The problem is, it all depends on you. A friend of mine has a movie on one screen while coding; how it helps him focus is beyond me, but it works for him. I put on my headphones, big enough to keep noise out. I sometimes even turn on some music, but most of the time silence is much better.
What also helps me is taking a step back. When I have a hard problem at hand I cannot solve, I just stop trying. I switch to another task (usually a small and easy one) so my brain stops thinking about the old one. When that is done, I switch back to the original problem, and usually solve it within an hour.
Happy coding!