4 ms·
This has happened to me a few times. These are the tips that I follow. -Don't worry about it. Its just a phase and it happens to the best of programmers. -Dri
by aniket_ray 16y ago
This has happened to me a few times. These are the tips that I follow.
-Don't worry about it. Its just a phase and it happens to the best of programmers.
-Drink loads of water. I don't know the biology behind it but when I'm properly hydrated I think much more clearly.
-Take some time off work. Play a game, watch a movie. Any of those guilty pleasures that you generally avoid. And don't feel bad about wasting a bit of time. Your mind needs the rest.
-Cycle through different kinds of music. I see that sometimes working with music helps and sometimes working without. Sometimes changing music genre helps. I cycle through phases during which I am most productive in either Heavy Metal, Folk, Classical or 80's pop music.
-Aboodman has already mentioned the importance of timely healthy meals. I tend to keep some fruits with me when I start programming, to munch on over the programming session.
-Something that might be the most important is, solve easier problems and gradually move to the harder problems. Generally (and managers would tell you) that you want to solve the harder problems first, but when you are in stuck and looking for inspiration solve some easier problems. If there are no relatively easy problem at work, there are lot of easy programming problems available on the net (Google programming interview questions). Find some relatively easier problems and code a solution. Then, move to relatively harder ones.
--I tend to like easier problems where the target is to achieve a particular performance (say processing should end in xyz seconds) because then you could gradually improve your solutions. Victories in small battles are just as important for our mind as the bigger ones.
Just my 2 cents.
edit: formatting