Self-Management
Leave the desk
When I need time to think, I get up and go for a walk. It is good for my brain and back to have a change of scene and posture.
Don't thrash
If I've made a couple of attempts to solve a problem, and it seems like a good idea to “just try†another, then it's time revert the code and think. If I understand the program, and have a good test suite, then it could be correct. With only one of those conditions, it won't be. Unfortunately the temptation to “just try†something mainly strikes me during sysadmin work, when there's no code repository to save me from myself.
Finish work
I've had to accept that I may wake up at 3am with the solution to a problem. But I plan not to take problems home. After I've understood the essence of a problem, and converted that understanding into code, if it's within sight of stopping time, I don't run the test case. Instead I get out while the getting is good.
Learn
I do read at home, background reading rather than manuals, something that will broaden my knowledge. Deepening it is for work time, maybe for that half hour between the last coding of the day and leaving time.
Thanks
When someone reports out a defect in my code, the first thing I say is “thank youâ€. Over time, this response has become sincere.
Be comfortable with error
Many times a day, I test code I have written and find out that it is defective. If I took this to heart, I would begin to feel that I was defective too. I have needed to acknowledge lightly that there are opportunities for improvement in my work.
Argue only about issues that make a difference
“What I meant was ...†usually introduces a point that matters to no one but me. What we should have done last year will remain unimportant until the invention of a time machine. The only question that ever really matters is “What shall we do next?â€.
Reflect
Making mistakes is fine, repeating them less so. There's always a deeper level to go to: “What question could I have asked, that would have prevented me from making that mistake?â€
People first
A hour thinking and talking about a damaged working relationship can achieve more than a week's coding.
Has anyone else got some other techniques of this sort?
read & think non-related things too
... and be sure to find things to clear and distract your mind away from those problems you're trying to solve. Sometimes spending time with a good novel or out playing with the kids not only helps keep you sane and your relationships strong, but can give your mind time to refresh from that problem bugging you.
advice on "self management"
Hey! Thanks for the nice tips. It is so easy to get to my desk and not look up until its 5:00 or later :)
The idea of saying thank you instead of what the f%$& do you mean!!>>??!! is great too.
I am a newbie app developer teaching myself .net and really thank you for the advice.
Don't forget
(Reiterating what JeffW said) I too wake at 3:00 a.m., sometimes taking a pad and pen into the bathroom to flesh something out (no comments please) so I don't wake my wife with a light on in the bedroom.
In addition to having a mind that likes to get into code, and takes off now and then into neat "what if I do x" ideas, I have found it INVALUABLE to have other hobbies to disengage my computing mind at night. For me, it is volunteering, church, guitar, enjoying goofing around with my kiddos, etc. Don't forget to strengthen the non-coding side of your life!
I find disengaging to be so worthwhile because often the solution to the trickiest gotcha is solved by stepping away from it completely for a few hours and coming back to it refreshed. Many times those are the 3:00 a.m. wake up calls, but at least I didn't spend all my time thinking about it and stressing.
if stressed or stuck then
Play(kids)
else
Continue
end if
For you C#,etc folks:
if (stressed || stuck) {
play(kids);
}
else
{
continue;
}Great ideas you gave...thanks for the post!
The map is not the territory
Great comments, especially by JeffW and GregH.
I have an old conch shell, pitted by erosion and stained by algae, which I picked up on a beach in Cuba. It would need gigabytes to describe it accurately. I keep it on my desk and handle it occasionally, when I need a reminder that the truth is concrete.
Working in a virtual world, it is good to remember that life is rich.
Thanks
We have a weekly phone conference for the project team. At the end of a week's testing, one team member thanked another for finding defects in his code. A great moment.


Learn from those around you
IMO, a programmer's number one resource is his/her fellow programmers. Just talking through problems with a co-worker often helps me locate the problem. Also, don't be afraid of asking "dumb" questions. I ask my co-workers lots and lots of questions and feel I have learned a ton just from their answers.