Ask HN: What do you do when your entire being opposes the task at hand?

395 points by septerr ↗ HN
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?

209 comments

[ 2.5 ms ] story [ 341 ms ] thread
Find something about the task that intrigues you, and build your motivation around that. A new gem, or new language feature, etc.

I've also found focusing on tests helps. Write as many tests as possible - focusing on getting those to pass. In theory, by the time you're done, the feature will be to.

Just first ask yourself if the next person to work on this code will appreciate the 'new features' you used.
Always a good point. Based on OP's description, they may not feel the next dev would appreciate the code at all, and it's just a matter of fighting through this feature on a personal level.
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.

Also I waste considerable amount of time trying to do things in the most readable, maintainable and simple way possible.

Is waste really the right word here?

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!).

"When given a vague, annoying feature to implement, very carefully considered approaches and built it in a surprisingly readable and maintainable way"

What you're experiencing isn't atypical - sometimes programming something sucks! Your employer values your ability to power through it and still get good results.

> What do you do when your entire being opposes the task at hand?

...anything other than the task at hand, obviously. :-)

I don't think that's specific to programming. It's what we all experience when we procrastinate.

Set yourself small very clear goals which you write down and where you commit yourself to finishing them in a given amount of time.

However, what your mind is telling you with the feelings you experience in my opinion is something along the lines of "Don't do this, it's not great".

So when you experience this very often, you need to change something in your life, or else you'll fall into depression because you have overcome your inner hesistation one time too often.

Don't take this as a scientifically accurate account, just my personal experience.

It sounds like symptoms of burnout. I am not an expert but I have personally suffered from burnout before...and it took me a while to get over it. It sounds like you are additionally hampered due to being personally obligated.

As far as I know the only way to get over burnout is to stop. If you do not you will suffer more. I wish I had better news.

Yeah, I've been there and felt the same way. Your best bet is to either find a different job, or one thing that can help a lot is just take a vacation. I was working on a project for months and months, and every few months some new requirements would appear. It's easy to feel unappreciated at a point like that. What really helped me was taking time off and working from home. A week or two of relaxing can really help you jump back into your dreaded project with a fresh perspective and not feel burned out.
I agree, this is primarily why I'm leaving my current position for a company with realistic expectations. I've had months without a single day off working 60 - 90 hour weeks every week because they refuse to compromise with deadlines or adding additional developers. I'm planning on taking a few weeks between jobs to just unwind so I'm not frazzled for the next position.
God is perfectly just. Maybe God is punishing your managers for their sins and blanking your mind to slow down their project.

God is perfectly just.

If we have a bad president, let it be. We have a sinful nation and God is punishing us with a bad president. Maybe, your neighbor is bad or the CIA is bad or New Orleans is bad or Haiti.

It is hard to shoot the right people, but God has perfect aim.

1) Look at the problem a different way and try to find a way to make it more interesting, attractive and (most importantly) impressive. I had to find and fix a tedious problem so I wrote a visualization, defect detection and automatic correction tool. If you have the freedom, try solving it with a new language or technology that you've always wanted to learn.

2) Challenge yourself to finish the project as quickly as possible. If a realistic estimate is that the work will take 1 week then try to finish it in 1-2 days. If it is awful work, try to get it over as quickly as possible. It helps if you can find an existing solution that you can use as a starting point.

3) If you're paid hourly, you might consider outsourcing the problem to someone off of elance. You should reframe the problem so that it doesn't require you to share any info (source code etc) from your employer with the person you outsource to. Ideally, ask the person to create an open source project on github.

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.

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.
Not a therapist, but have a look (or better, have a professional have a look) at ADHD-PI. What you've said describes perfectly how I feel at work a lot of the time, and it's what I was diagnosed with.

I seem to have a finite pool for motivating (or more accurately forcing) myself to do work. And when that pool is empty, it's off to HN or Reddit I go. Frustrating, and I still don't have a solution yet.

Hope this helps.

Have you tried modafinil? I've heard it works for some people, but lack first hand experience. I'd be curious though.
Working through some non-medicinal remedies first (changing habits, setting up routines, etc). Not quite having the effect I hope for, but we'll see.

The consensus of what I've read is that most pharmaceuticals are temporary fixes, at least for adults. But that's just heresay from the internet, so I might be wrong.

And for the record, since they are always so highly advised, yes, I already have good exercise, recreation and mental reflection routines in place. :)

Frankly, it's just called programming. Programming is that pesky, resilient three-headed monster between your idea and the finished product, you have to give in and tame it.
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.

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.

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.
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.)

While I can 100% relate to your scenario, a big part of being a professional at any job (not just development) is being able to set aside your personal feelings and emotions and get your job done.

It's good that you are getting your job done, but it seems that you are still having issues setting aside your personal feelings and emotions. This is pretty normal for inexperienced developers. It's something you should focus on working on.

Here's how I developed that skill:

1) Remind myself that this is not my company or my project. It's someone else's. There's no reason for me to feel so personally invested in the project as a whole. If I've voiced my concerns and thoughts and been overruled, then my job is to get what is asked of me done to the best of my ability.

2) Have side projects that ARE personal and that I CAN be emotionally invested in. When you have a side project where you do call the shots and it's done 100% the way you want, you will find it is easier to not be so emotional over your day job.

3) Lastly, I have found that as I get more experienced and better at explaining myself, situations where managers overrule me and tell me to do something that is against my own recommendation become more and more rare (they'll still happen sometimes as long as someone above you can make unilateral decisions, so never expect it to fully go away.)

It's good that you've recognized your situation needs to change. Best of luck.

I like all your points, but option 2 is very intriguing. I've never had the time for that, given I use all my mental and physical capacities for my day job. So I'm conflicted; I just don't think I'd have enough time to do a side project to the standards I'd expect of myself.

I think that's also why many posters here are saying 'use some new language feature X to make your work project more exciting' - basically adding a side project into your day job. [I think that road can lead to ruin, if you're making it harder on the next person to work on the code. Be careful and considerate.]

I know a lot of people work that way (using new technologies in their day jobs) but personally I take my day job too seriously to do that. I learn new technologies by doing side projects. Then once I feel comfortable with them I can start using them in my day job. I don't want to look my boss or coworkers in the face and say "Yeah that fuck up was because I was using this project to learn a new thing."

I think you're over estimating how much time you need for a side project. You can even just spend a couple hours on a couple weekends a month on something. Or even every other month. You don't have to work on it every day or anything. That's the great thing about it being a side project. There's no rush. No timetable other than whatever you choose for yourself.

People tend to reserve pair-programming for tasks they perceive as being unusual, complex, or otherwise needing extra review. Personally, I've found it can be helpful even when you simply need to stay on task. When you both have the same goal, you can rally each other; it's typical to become more productive together than you would have been apart.

If this sounds like it could be your style, grab a buddy and see if you can hammer out some of the small stuff together. If not, some of the other suggestions here are good as well.

Actually, I find that it works better of the mundane and boring. Pain reduces by sharing it! :P

It's easier to stay on an interesting task, but here a good pair keeps you from going off the rails and totally losing track of the goal.

Back when Pivotal Labs largely made prototypes for wealthy people's ill-conceived ventures (think social networking for dogs), the saving grace was that you were pairing.

It's amazing how much better a boring project is when the sample files you upload are image macros with your boss's head photoshopped on a walrus, and there's someone next to you laughing.

Unless it's morally against my ideals, like violating privacy, stealing money from kids with phones, etc., I don't see that many problems with features I don't agree with. They want it, they pay, why not? Surely, if it was my own company or a team I'd value, then I'd hesitate to implement that feature and argue with everybody about it. But at some point, I leave the project and once I don't I own it anymore, I don't have problems with features I don't like. That is, unless they tell me /how/ to solve the task.

What helps me most is finding a technical challenge that makes the feature interesting and fun to implement. This shouldn't be too hard, if you are free to design the feature technically. Hope that little hack helps you getting things done.

I'm glad I'm not the only one that gets this sometimes.

I can completely identify with some of the points made, my particular frustration is working with appalling specifications that are 9 times out of 10 incorrect/incomplete quiet often leading to features being written multiple times. It's demoralizing. I have no particular solution, some will say just knuckle down but it's easier said than done, there are some tasks that just can't be made interesting. Unlike the OP I can change job and am, next week.

I post about it on Hacker News to procrastinate
My suggestion: Major lifestyle change before you burn out and involuntarily go out of business for six months. Take control of this while you still can.
you have to make a choice imo. you can either suck it up and get on with it or flat refuse to do it. if you feel strongly enough then refuse to do work and quit the job... fulfil your contract to the minimum possible whilst giving them every legal reason possible to want to pay you to go away.

however i feel inclined to reserve that for serious problems, like weak leadership, oppressive or immoral behaviour etc. rather than poor features or undesirable work...

doing things you don't want to do is part of work. letting your leaders make their mistakes and learn from it is part of it too. i'm strongly inclined to say you just need to grow up a bit and get on with it... and be grateful that this is a 'problem' for you because its nothing compared to what most people consider to a problem in the workplace.

It seems to me that this kind of situation is what some types of programmers try to escape by creating "amazing" code. This is the kind of code that you come back to a little while later and wonder what you were thinking when you wrote it.
The question I thought this title was asking, and one I'd like to hear answered, is: "What do you do when you're asked to do work that you feel is unethical, as a developer?" For example, I was recently asked to build a system wherein users would be refunded actual money into "credits", and allow the administration to modify the value (1 credit != $1) arbituarily.
Don't let yourself get paralysed by indecision.
Welcome to programming!

"Also I waste considerable amount of time trying to do things in the most readable, maintainable and simple way possible"

Motivation is tied to your attitude here as you are looking to do more 'interesting' work, whereas the task at hand looks boring. However the task at hand could be important for the company, so it is important to take trouble understand the big picture here. Most engineers (and I am one of them) are too self-centered to do this, and this can be debilitating.

It involves coming out of your shell, being proactive to talk to the business, product and other areas and see why these set of features that needs to get done has important implications.

At the end of the day, everything is about service. If you enhance your attitude to think more in a service-oriented way (it is not all about you), this changes your 'attitude profile', and in turn can boost your motivation factor by several orders. Suddenly what looked boring becomes very important. It may mean to be more pragmatic ( no ideological fixations on 'purity of code'), roll up your sleeves and get it done.

The valuable service to the customer, can lead into repeat business, which adds to the bottom line, and that later could mean more bonus for you, which you can use it up for that special time with your BF that you have been planning for a while.

You have no power to choose the features you're assigned to implement. The most, then, for which you may reasonably be held responsible, even by yourself, is that you implement a bad idea in a good way. From the sound of it, you've got a lot of practice at that, and you've made it a habit. That being so, you have nothing for which to reproach yourself. Cultivate detachment, and relieve yourself of the need to try to take on more responsibility than your authority can support. This will free you to concentrate on what you can control, i.e., the quality of your implementation.

And, if you can't change jobs, then consider coming up with a side project. It doesn't have to be commercial, or even of particularly general application; even if you're just scratching an itch of your own, it'll give you scope to exercise the agency whose absence in your day job is giving you fits.

Actually, you could probably quit and it wouldn't be as big of a deal as you expect. Most people over-estimate the risk of quitting. And most people are a lot more understanding than we give them credit for.

Every time I've reached that point that you have described, I've quit. It was the best thing for me every time, too. There is no point wasting your time doing something you don't want to do, especially if it's for someone you care about. You'll just do a shitty job and you don't want to dump shitty jobs on people you care about.

Is it just that the work is boring, or are you being asked to do unethical things? I mean, either way, I would quit, but if it's anything unethical I would urge you to run as fast as possible.

However, if it's just "boring" work, perhaps recasting it in a different light might help. Look at it as a game of seeing how many you can finish in a single week. Stop worrying about doing the "best" job on it. If the project is so boring to you, then you probably shouldn't care so much about the quality of it. Just dump out some garbage, get the checkboxes filled, see how much you can get away with. Make it a learning experience, a chance to test your boundaries.

The other point is that if this is your BF's project, you are in serious danger of building up a load of resentment for him and breaking up the relationship if things get any worse. It may actually be better to tell him that you're not getting on with the project and it'd be better for your relationship if you work in different places. There's nothing wrong with that.
This job is not directly for the startup. I have been contracted out by the startup to this job and the money it brings is important for the startup atm.
(comment deleted)
I think mnw21cam's point still stands - if working at your current position is "seriously affects the quality of [your] life", you need to prioritize that over making money for your boyfriend's startup, or you'll hold it against both him and the company for making you do something you don't want to.

Take care of yourself first, even if it means a slower launch for the startup! And it sounds like you have good coding practices and are well-regarded at your current position, so hopefully you could find another job that is more aligned with your values. Best of luck!

That changes things a bit. If you believe strongly in the startup's strategic goals, then perhaps you can convince yourself that your current goal is purely tactical, and can indeed force yourself through it with willpower alone. Sometimes -- rarely, IMHO -- flogging yourself to get through some necessary shit work does make sense.

If you were actually working at the startup, on its principal mission, then your problem would be more complex. Not only would you have to think about the appropriateness/advisability of the particular feature you're implementing, but you'd have to constantly evaluate it in light of your relationship with your SO and your prospects in the new company. It would be very difficult to separate these questions in your mind, so IMHO it's a good thing you don't have to.