Apologies for being nonspecific, but I don't know how else to describe Bob's struggles. Bob has been on the team for over a year now, and his code is just... not okay.
To his credit, he can make something that works... but that's not enough. His code belongs on programming horror. He's not supposed to be my junior; I'm just the repository's lead. I spend half my week helping him. Reviewing his pull requests takes hours because it's always a rats nest that needs significant refactoring/simplification. I'd love to say "do better" - but this is his best.
Most recently, Bob crashed his dev environment with a getter. (A mix of nested parsing logic with Angular's change detection = CPU crashed). It'd be impressive if it wasn't so irritating since I've already had a conversation with him about proper use of getters/setters. I even demonstrated how spammy the calls can be with a console.log statement for emphasis.
I could go on, but this is enough of a rant. I don't really know how to handle him going forward; I spend so much time helping and teaching him but he retains none of it.
Is there any hope for him? Any learning material? Advice on balancing my own sanity and workload?
That's the struggle? He's in a weird space where he's capable of prototyping solutions/things, but are problematic long term.
We're a really small team, so it's hard to justify pushing him towards alternatives like writing tests/docs. I would love to get more automated testing though, maybe I'll revisit the topic.
At least he seems okay with you helping him/dealing with his shortcomings.
Other people would just try to become your boss/manager ๐
Good luck!
Haha - at first he didn't! We had a learning good moment though.
He was really frustrated with his first pull request basically telling him to rewrite everything. He didn't see the value in spending more time on changing so much when his "worked."
After talking about the importance of long-term maintainability and stability etc etc, I told him about my PR experience on a previous project with a single other developer on it. We had different styles/preferences which sparked plenty of discussions/debates in the PRs. It could be so frustrating, but we taught each other so much and I honestly miss that.
There's nothing like learning a new trick that deletes 200 lines of pain and suffering.