I just came back and perused some code that had been sitting for a couple of weeks. After about 5 minutes I had cut-it down to half and made it much more efficient. It's funny how a small break can clear your mind and let you see a more efficient method instantly.
A break will do wonders
Miscellaneous Forums/General Discussion/A break will do wonders I'll second that, spending weeks or months away, i come back to my code and see how shoddy and bloated it is and cut it down alot
Doesn't have to be months, weeks, or even days.
I've struggled with problems in the past, gone to bed, came back the next day and the solution was sat there waiting for me only hours later.
I always deliberately leave myself something easy to do for the next day. That way its easier for me to sit down and start working. Try starting your day on a really big coding problem and you'll struggle to get motivated.
I've struggled with problems in the past, gone to bed, came back the next day and the solution was sat there waiting for me only hours later.
I always deliberately leave myself something easy to do for the next day. That way its easier for me to sit down and start working. Try starting your day on a really big coding problem and you'll struggle to get motivated.
Ironically, solutions to coding problems come to me usually while I'm listening (or rather, pretend to listen) to my girlfriend ramble on about whatever. It amazes me how often that happens....
Don't make it too long, though :b
I've gone in a complete circle with what I'm working on right now, having rewritten it about 6 times because my opinion on 'the right direction' won't stop changing (and every time I sleep on it, I manage to convince myself that the other way sucks).
The worst part is it's only 120 lines of code. (And the worst worst part is that once I finally convince myself that the way I have is "the right way," I have to spread miniature changes across about 10 different files).
I've gone in a complete circle with what I'm working on right now, having rewritten it about 6 times because my opinion on 'the right direction' won't stop changing (and every time I sleep on it, I manage to convince myself that the other way sucks).
The worst part is it's only 120 lines of code. (And the worst worst part is that once I finally convince myself that the way I have is "the right way," I have to spread miniature changes across about 10 different files).
Coding solutions usually come to me when I'm at work, I usually scrawl on the plasterboards a way of doing something that might work or be more efficient... You should see the client's faces when their nice new boarded walls/ceilings is covered in code! :)
They never usually ask, people who do usually go 'oh, right' and thats the end of the matter! :D
Dabz
They never usually ask, people who do usually go 'oh, right' and thats the end of the matter! :D
Dabz
Sometimes a wee break is all that's needed.
Yesterday I didn't do any work so I'm fresh today.
Yesterday I didn't do any work so I'm fresh today.
I mean a break from a certain piece of code...not from coding altogether.
I was gone for nearly ten months, during which time loads of Bad Things happened. Breaks are bad for my health.
a wee break gives you a fresh perspective on things, I empathise with Picklesworth... I'm (hopefully) just about to complete my 2nd full circle.
dabz, do you plaster over the code in the end?