This question already has an answer here:
I am one of two software engineers at my company. Our boss is not a software expert but he understands our work at a decent level and he is a good manager.
The other engineer and I have been working together for about a year. I started at the company before he did but he is a couple of decades older, with the corresponding industry experience. The code he wrote for our first project together was, in my opinion, bad: it worked, but it violated programming conventions left and right. There were unnecessary global variables all over the place, for example, and classes were tightly coupled to each other when they shouldn’t have even known about each other. Programmers will recognize these as signs of a poorly-thought-out application design. (There are reasons why you might need to use one of these so-called antipatterns, but in my opinion none of them applied in our situation.)
Well, okay. My coworker’s experience was in C and C++ and this project was written in Python, so maybe his lack of organization was just due to unfamiliarity with the environment. We’ve been working in C++ for the last six months, though, and my coworker is writing the same kind of code. It’s not just an abstract complaint: we’re reworking part of our application now and it’s taking much longer than it should because the existing code was thrown together more than designed.
My coworker is, on balance, making our team more productive than if it were just me working alone. But when you consider the amount of time I spend refactoring his code, our productivity is much less than it would be if we had two engineers who knew how to design software. (I also end up spending a lot of work time being inwardly pissed off at my coworker for writing bad code that I now have to fix, but maybe that’s a personal concern more than a professional one.)
As I said, my coworker’s code works, in general; it’s just not amenable to being examined or changed. Another issue is my coworker’s age. If he were my age, I’d do my best to teach him how to organize code in a way that makes sense. But the fact that he’s a generation older, and has a job title senior to mine, makes it seem like this would come across as condescending and insulting no matter how I brought it up. (And really, I feel that if he had the desire or ability to learn good engineering principles then he would have already done so.)
So my quandary is this: should I bring these concerns to my boss? And what would I even say? I consider my coworker to be incompetent, given his position, but that’s a pretty darn strong word to use to describe a colleague. I don’t see a way to resolve the situation without firing the guy, so what could I even expect my boss to do?