Lurker News
It seems I am fighting with myself. This has happened multiple times and seriously affects the quality of my life.

I am assigned a feature to implement, usually vague and something that I feel adds unnecessary complexity to the codebase. I try to reason with my managers, but usually their minds are already made up. I then struggle with finishing this feature, logging hours upon hours against it...not because it takes so long to code, but because I can't make myself do it and waste hours motivating myself to do it. Also I waste considerable amount of time trying to do things in the most readable, maintainable and simple way possible. This means weighing merits of different solutions and choosing one. I am a really hesitant decision maker, resulting in more wasted hours.
The haranguing part is that my managers don't fire me. They don't see how many hours I have wasted, how unmotivated I am. Instead they treat me as one of their most valued employees (oh the irony!). (I am not in a position to change jobs at the moment. I am helping my BF's startup by doing this job.)
Have you been in such situations? How do you get in the zone and get it done when your entire being is revolting against the task?

Comments (201) 99 threads

Earlier comments
mnw21cam1 reply#
Yes, I left such a position to go and get a doctorate, because I was fed up with the dumbing-down of the codebase, the way that my colleagues wrote absolute undocumented spaghetti cruft, I had to keep fixing their bugs, and management were making some very dumb decisions about key features. As far as I know they are still going fine, which is surprising given I was the only one who could understand how whole subsystems worked, mainly because I knew how to write safe threaded code.

But, enough on that. A few years before then, I felt like you did, but I wasn't actually in that situation. There is a very real positive feedback loop in effect - you feel like you're doing a bad job, so work longer hours on it, end up taking longer, feeling like you have "wasted" hours, and feel worse about doing a bad job.
Believe your employers when they say you are doing great, otherwise you're likely to be heading down the burnout route which had me off sick for half a year. It's not every coder that has such high standards as you, and that is not something to be ashamed of. Be proud of the code that you have produced. Think to yourself "It's just as well I wrote this bit, because if X had, it would have been awful".
I know this sounds like extreme arrogance, however sometimes it is necessary for the purposes of regaining balance. It sounds like you are being a little too humble. If it gets too bad though, get some help from someone.

jerf1 reply#
Something else that can help is that once you've learned how to write clean, safe, reusable code, the next step is learning when not to. Clean code is an expense, and there's times to put in the extra effort, and there's times to not. Code's needs are not evenly distributed, in fact they are very unevenly distributed (power law distribution I suspect without proof)... carefully crafting to the n-th degree an end-user GUI page for a marginal feature is probably a waste of time, just make it work. On the other hand, adding a hack to a core routine used by huge swathes of the code may have much bigger negative effects than it even feels like now, and it sounds like it already feels pretty bad.

Consider working on the next level and using this as a chance to study when and where the effort is actually worth it. It may feel like you're handing yourself a license to be sloppier, but if done correctly this actually turns you into an even more capable developer than someone who finely engineers everything, because you'll have that much more time to finely engineer the things that matter once you clear away the time of fine engineering of the things that don't, and on the whole you'll be creating much more value in your code.

jafaku1 reply#
I wouldn't mind writing unclean code if I weren't the one who's going to have to maintain it and add new features to it in the near future or the years to come.
jerf#
This is part of what I mean by learning when it is and is not appropriate; I tried to make it clear it was not a blanket permission slip to be sloppy (anticipating that obvious misunderstanding of my point). If you end up having to seriously maintain "unclean" code, you did it wrong. You will do it wrong before you get the hang of it, no sarcasm. Untrained gut intuitions are not very reliable here, and the only training available is practice.

And on the other hand, "maintain" is a very ambiguous word. If you are frustrated because it took you ten minutes to add one field to a form, once in the course of 3 years (to put some concrete numbers on for example's sake), you still came out ahead not spending an additional 10 hours polishing the code to a fine sheen, so you could be happy adding that one field 3 years later and saving that ten minutes. If you're frustrated because you actually have to overhaul it significantly, and it's a mess, and now you've also dropped all your context and can't remember what is what at all, and you could have cleaned up up three years ago in three hours and now lose two weeks just to understanding what the hell, then you've lost, yes. And of course "maintain" can mean a lot more than either of those two cases, too.
And as a final note, it's all gambling, and that is also something you must come to grips with. You don't really know where the changes are going to be in three years. However, you can learn to guess with a success rate much higher than mere random chance. (Don't forget to discount future time appropriately.)

loumf#
You can add meaning to your work by picking goals and accomplishing them. It doesn't matter what they are -- just as long as they can be accomplished and you know that you did.

Pick things that incidentally accomplish the assigned goal. For example,
1. Pick an amount of time, like 3 hours, repeat this cycle
2. make a branch
3. implement the feature in the fastest way you can
4. think about why this isn't acceptable
5. throw away the branch
6. do it again avoiding one thing that made the last one crappy
Also, weighing merits of different solutions and picking one is your job -- no need to feel bad about that. Come up with an assessment tool that will help you decide. Time-box decision making, but don't stop thinking about your solution -- just give it the appropriate amount of time, not unbounded.
Making progress is motivating. You want to end up at the same place but have the feeling of progress making throughout the process. I believe that it's possible you are taking the appropriate amount of time to do the work at hand, but you are getting into an anxiety/depression cycle because you can't get into a flow state.

ollieglass3 replies#
As a manager I've had to ask people to do work like this. I try to share it out as best as possible, so everyone's getting the least unpalatable tasks for them. I've also made myself available to talk through why it's required.

Those conversations have taken my team and I to interesting places. I've discussed brand positioning with developers, and shared spreadsheets of time-to-value models with designers, at times going far outside of people's skill sets and comfort zones. If someone insists a piece of work is a bad idea, I invite them to argue against it but insist that I need them to make their case rigorously. Sometime they'll convince me, sometimes they don't want to work through the reasoning, sometimes I'll try and develop their case and argue against myself. I want to reach a position where we either change the task, or we're both satisfied that the task should be done. If that's too hard, then I'm after a position where they at least have rational faith in my request and my reasoning, and are ok to do the work on trust.
I spend a lot of time on this, for a few reasons.
First, I don't want to ask anyone to do something meaningless. Burnout isn't caused by workload. Workload causes exhaustion. Burnout is caused by resentment. If my team resent their work, that's a deep and important problem. I'll tolerate a only very small amount of that, but I'll let everyone know I'm conscious of it, don't like it, and am working to get away from it. Burnout is toxic and damaging to people and the group as a whole.
And secondly, this kind of explanatory work strengthens everyone's investment in the team and the work. It strengthens the team's ability to think together. As people become better informed, all of our discussions become richer and more valuable. People enjoy the work more, and can relax and trust each other more, knowing that decisions are made in ways they can understand and agree with.
Finally this is also a litmus test for me. If a company won't let me in on it's decision making, dismisses my concerns as unimportant and tells me to just get on with something, they're indicating they don't value the team in the same way I do.

benjarrell#
I really like your post, I didn't feel like an upvote was quite enough.

I think far too many managers completely miss the point about the company not valuing a team.

brandon272#
Thank you for this wonderfully articulated post. The term "burning out" can be thrown around a lot but it can also be a complex issue to understand. And it's certainly frustrating if it's happening to you and you aren't sure why it's happening or what the root cause is!
gknoy#
As others have said, thank you for articulating this so well. As a developer, I've often gotten feature requests which seem crazy at first, but then make sense once I understand better the context in which it will be used or the degree to which it will make a customer or other user happy.

At the same time, it's really valuable to have a manager (and other stakeholders) who listen to the "This __really__ complicates our code and will take X weeks to implement, why don't you try this as a procedural workaround ..." suggestions that I make at times.
I really agree with your point that this type of thing strengthens my investment in the team and the product.

martin-adams1 reply#
I can identify a few times I've experienced having something vague and complex thing to work on. If I were in your situation I'd look at the following...

1. If I'm working on something vague, try to extract more information about it. It's very hard dealing with frequent changes on a complex code base. I'd try to find out who the stakeholders are, customer is, and most importantly, what they are trying to achieve that this serves.
2. Break it down into smaller tasks and measure myself against these. I want to leave work having completed something and not return to work knowing I didn't complete something.
3. Try bringing a colleague in to help you, such as talking through the existing code and bouncing ideas off them. The energy a colleague puts in can help with motivation.
4. Make sure there is an end to it and that it's not an open scope. You'll never finish something if the stakeholder doesn't know what they actually want.
5. If this looks like it's the norm and you're not happy, while you say you can't change jobs now, put the plan in motion for when you can. Think about your CV, learning new things, etc that help. When the time is right you want to be ready to jump.
6. Get enough sleep. I find I procrastinate more when I'm tired. Of course, eat healthily and exercise.
7. Try to remove other distractions, such as any other commitments at work as a 10 minute interruption can cost you an hour if you're not in the flow of the work.

rookonaut#
In addition to this excellent post, try to use the five minutes rule. When you need to tackle an undesirable task, tell yourself that you'll try it for five minutes. After you got started, you will lose the five minutes mark out of sight and you already mastered the hardest part - getting started.

Load more comments