I don't expect gratification from my work as an employee: I expect money.
Many years of submerging my own will has resulted in the realization that the company does not get any gratification from me, either. A quick and dirty solution that produces the expected results is completely acceptable to them, and making an extraordinary effort to produce a deliberate and solid solution was likely a waste of effort.
If you want to write code that won't make you cringe after a six month hiatus, start a side project at home in your leisure time, or launch your own company. Don't think of the rapid and sloppy fix as instant gratification, but as cost-effective development effort. In general, companies don't want the well-considered, "correct" solution, but the one that represents the lowest costs or the greatest profits. And they don't often consider technical debt in those calculations.
If they cared at all about code quality, they would have a person whose job is to monitor and improve it, with the authority to institute procedures for the other developers. If you don't have a boss (or pseudo-boss) nagging you about code reviews or test coverage or metrics, your company doesn't care. Just fix the problem in front of you with as little effort as possible. Take the instant dopamine hit, if you still get one from solving your company's stupid problems with a scant twitch of your brain.
The real challenge in an office environment is to build personal relationships and trust networks, not the actual work you are assigned. In a way, all of your assigned tasks are a distraction from that.
If this seems wrong in your gut, this is a direct result of the current management culture.
Many years of submerging my own will has resulted in the realization that the company does not get any gratification from me, either. A quick and dirty solution that produces the expected results is completely acceptable to them, and making an extraordinary effort to produce a deliberate and solid solution was likely a waste of effort.
If you want to write code that won't make you cringe after a six month hiatus, start a side project at home in your leisure time, or launch your own company. Don't think of the rapid and sloppy fix as instant gratification, but as cost-effective development effort. In general, companies don't want the well-considered, "correct" solution, but the one that represents the lowest costs or the greatest profits. And they don't often consider technical debt in those calculations.
If they cared at all about code quality, they would have a person whose job is to monitor and improve it, with the authority to institute procedures for the other developers. If you don't have a boss (or pseudo-boss) nagging you about code reviews or test coverage or metrics, your company doesn't care. Just fix the problem in front of you with as little effort as possible. Take the instant dopamine hit, if you still get one from solving your company's stupid problems with a scant twitch of your brain.
The real challenge in an office environment is to build personal relationships and trust networks, not the actual work you are assigned. In a way, all of your assigned tasks are a distraction from that.
If this seems wrong in your gut, this is a direct result of the current management culture.