All the other suggestions here are pretty good.<p>here are some from my personal experience, they probably do not all apply:<p>(i) establish clear boundaries as to how much time/energy you are willing to put into your work. don't do unpaid work - this devalues your own time and devalues the time of your coworkers. don't silently absorb the consequences of bad decisions made by other parts of the company. push back! if you are overloaded with work, clearly explain this, and force clear prioritisation decisions. it is better if management rapidly feels the discomfort caused by their own poor decisions (similar to CI!).<p>(ii) if there are serious problems with existing code that need refactoring (there usually are), and it needs a substantial investment of time, make a business case for it and get someone with authority to make a clear business decision. people who are not getting their hands dirty with the code probably don't have a clear idea of the reality, so you need to find a way to explain that, and what the future consequences will be. it might be necessary to gather metrics and make some kind of argument focusing on which parts of the code attract the most bugs / are impossible to test / are frequently undergoing change, and how this impacts the business.<p>(iii) sometimes you may be in an environment where hastily writing lower-quality code is the best option. some organisations have found markets where perhaps this is necessary. e.g. more consulting-ish work where much work is client-specific and there is not enough money in it for a lot of development effort. if you take pride in higher standards of craftsmanship you might be far happier working somewhere else, where there are clear business reasons for doing things at a higher level of quality.<p>(iv) if management's response to your concerns boils down to "after [some duration] things will get better", they're probably just stalling, and they do not want things to change. if they want things to get better they need to actually start making changes for the better, perhaps small, immediately.<p>(v) seriously consider quitting. try to find a few people (outside of work) who you can talk through the decision with.<p>(vi) make sure you have positive things happening outside of work. exercise. eat properly. do fun things unrelated to your job. spend time with friends and family. if you do not have that much else going on aside from work, it is easy for work to expand to fill the void. this will not make you happy.