|
|
|
|
|
by cauterized
3611 days ago
|
|
> - if it takes me more time to understand what you wrote than completely rewriting it you're of no use to me. Since I'm wasting that time anyway, I better write it myself and save the money spent on you. So well put. Too bad it's not just juniors who write code like this. I wish I could show the sample code and the TODO comments to one of the "senior" engineers I work with. Because it's exactly (and I mean, EXACTLY) like a few hundred functions he wrote in our codebase in the past few years. How do you suggest this sort of change of approach to someone who's your peer instead of a n00b you're training up, without sounding condescending or insulting? |
|
1. It takes time, and only time, to develop this skill. It can't be ordered by fiat. He hired junior devs, so this is what he gets.
2. He's thinking in terms of absolute advantage, not comparative advantage. Even if he could code the item more efficiently, it's worth it for him to give it to them.
As for your peers, mandatory/automated testing, mandatory code reviews, automated formatting, pair programming: all are designed to teach people to be better programmers. Implementing some/all of the above won't directly cause an issue between you and the coworker and will help everyone's code become better.