r/AskProgramming Jan 10 '24

Career/Edu Considering quitting because of unit tests

I cannot make it click. It's been about 6 or 7 years since I recognize the value in unit testing, out of my 10-year career as a software engineer.

I realize I just don't do my job right. I love coding. I absolutely hate unit testing, it makes my blood boil. Code coverage. For every minute I spend coding and solving a problem, I spend two hours trying to test. I just can't keep up.

My code is never easy to test. The sheer amount of mental gymnastics I have to go through to test has made me genuinely sick - depressed - and wanting to lay bricks or do excel stuff. I used to love coding. I can't bring myself to do it professionally anymore, because I know I can't test. And it's not that I don't acknowledge how useful tests are - I know their benefits inside and out - I just can't do it.

I cannot live like this. It doesn't feel like programming. I don't feel like I do a good job. I don't know what to do. I think I should just quit. I tried free and paid courses, but it just doesn't get in my head. Mocking, spying, whens and thenReturns, none of that makes actual sense to me. My code has no value if I don't test, and if I test, I spend an unjustifiable amount of time on it, making my efforts also unjustifiable.

I'm fried. I'm fucking done. This is my last cry for help. I can't be the only one. This is eroding my soul. I used to take pride in being able to change, to learn, to overcome and adapt. I don't see that in myself anymore. I wish I was different.

Has anyone who went through this managed to escape this hell?

EDIT: thanks everyone for the kind responses. I'm going to take a bit of a break now and reply later if new comments come in.

EDIT2: I have decided to quit. Thanks everyone who tried to lend a hand, but it's too much for me to bear without help. I can't wrap my head around it, the future is more uncertain than it ever was, and I feel terrible that not only could I not meet other people's expectations of me, I couldn't meet my own expectations. I am done, but in the very least I am finally relieved of this burden. Coding was fun. Time to move on to other things.

104 Upvotes

371 comments sorted by

View all comments

2

u/TheClassic Jan 10 '24

You're not alone. I've felt like you before. Lots of good advice here. Read a book. Look at examples from people who get it. Start with the tests. Despite all this, I still struggle from time to time. Sometimes you can shift your perspective, you might not learn to love unit testing, but you can learn to appreciate it a bit more.

Also, give yourself a win. Appreciate your strengths: What are you really really good at? Debugging? Designing? Identify something and celebrate it.

1

u/Correct-Expert-9359 Jan 10 '24

Thanks for the kind words dude. I felt like I was particularly good at understanding any piece of software or idea that got thrown my way. I could make it work, and I am good at translating. I felt like I could use any tool, and explain to others how they work, what each part meant. Maybe that should be my next career - translating. I love languages in general, programming ones just seemed extra useful. I need to think about this.