My colleague is what you would call a cowboy coder. He solves problems with really complex solutions that only he understands and does not seem to care about that the team doesn't understand it. He's super fast and very skilled, but it leaves the rest of the team hanging. He sometimes works at his spare time so things we worked on the previous day can be totally changed the next day without any notice. He has also removed code written by someone else because he did not like it, in secret. I found this while browsing through commits that were committed directly to master without a PR.

We have tried talking to me about this but it doesn't seem to work. He seems to value speed over anything else and doesn't seem to have any respect for other team member's opinions.

What the hell do I do? Has anyone else worked with a similar typed person? He's really making my life hard and I think it's very frustrating. Please help.

  • 14
    Lock master branch. Make sure he has to give pull request if his code has to be merged to master. Reject his pull request if you feel his code is too complex and no comment was written!
  • 16
    Lock master. Require approval from 1 junior and 1 senior dev before a merge.

    The junior should only approve code they can understand.
  • 2
    Protect your master branch so future direct merges can not be done without a pull request. Also lock down who can do those merges and make sure his not on the list, if possible ( depends on your teams flow but usually is a good idea ) you could even enforce code reviews on pull requests to atleast get someone else on the team go over it before it can be merged.
    Will slow him down and always have an extra set of eyes on the code being merged.
  • 7
    yea, try to solve a social problem by technical solutions.. won't work. You wouldn't have stopped me, in this situation. And if you actually stop him, he will leave the team. Do you want that? Do the things he does, work?

    You said you talked to him about it and it didn't work. Try it again and again, and tell him exactly what you think isn't a good idea and tell him exactly why. That's what made me a better teamplayer.
  • 5
    Oh yes, I know the type.

    As someone said, this is not a technical problem, but a social one, and needs to be addressed by his boss.
  • 1
    Get rid of him. Let him go write his unmaintainable code and fail to empathise and socialise with the rest of the team somewhere else.
  • 1
    Very difficult situation. What you're describing is pure technical debt. This code works... for now. I've been on a project where we had an exact person like that, and 3 years later we were still finding things that we didn't understand properly and we had to refactor because they no longer work correctly and no-one understood them.

    The struggle is that managers and decision makers will see his output and go "It's fine!" and it'll only be later on that everyone will be banging their head and going "Why did we let this happen?"

    A limited scope technical approach won't work (as someone has already said).
  • 3
    @TerriToniAX @CrankyOldDev could you please not refer to me as "someone", thanks.
  • 2
    @plusgut My apologies. I was just too lazy. Won't happen again.
  • 3
    @plusgut Really? I couldn't remember the username of the comment by the time I had typed my reply. And I dislike jumping back and forward. I've raised the issue of context when replying in devRant a few times (once formally on the issues list). No offence intended.
  • 8
    What should happen: He should be given one last chance, then fired if he does something like that again.

    What will probably happen: He'll be promoted for being the "most productive" person, left in charge of a team and will keep doing this exact same thing every chance he gets.
  • 0
    Thanks for the suggestions people, keep them coming if you have more.

    The code he writes is good and scalable, but still only he understands it :/
  • 3
    @zshh You have an unmaintainable product. If he gets hit by a bus (or more likely, a bus arrives and takes him to a new job) then you're screwed. None of you will work there forever, so think about what happens if he leaves and the rest of you are left to work on his code.
Add Comment