Lurker News
There are a couple of engineers on my current team that I can only describe as being a little too smart for their own good, and I'm struggling a bit with how to work with them. I've worked with this sort of engineer on previous teams as well, and they all share a few traits:

- They're brilliant, I mean very smart people (in an almost academic way?)
- They have a big appetite for adding complexity to systems
- They also have a big appetite for adding work to their own plates
- Their code has no consistent style
I work in embedded systems, so I'm generally writing C for resource-constrained systems. This sort of environment is rife with footguns, and I spend most of my time just trying to avoid those. A big part of that is keeping the things that my team controls as simple as possible, and while we are resource constrained, it's a balance. The tension comes when someone's more than happy to, for example, implement a complex caching scheme from scratch to save a few hundred bytes here, a handful of microwatts there. To me, adding that type of complexity for those sorts of performance improvements is missing the forest for the trees.
When an engineer like this proposes something that adds unnecessary complexity, it's usually hard to argue with. The proposed change typically does indeed make the system objectively better, and they're the one taking responsibility for doing the work and ensuring its correctness. But the overall system becomes a little more brittle, and a little harder to reason about, two things that are much more difficult to measure than memory and power.
Here's an example: an engineer on my current team recently proposed adding a significant feature to a module I wrote to make something dynamic that's currently statically defined at compile time. I pointed out that we could just change a couple entries in a static table to accomplish his goals, and we were able to avoid the extra work. What was notable, though, was his immediate willingness to write that feature. Maybe I'm lazy, but I'd sit there and think of half a dozen other ways to do it before settling on changing the module itself. But because he's smart enough to easily reason about a complicated solution, and he's willing to take on the extra work, he stopped there without weighing it against the larger system.
Have you worked with engineers like this? Do you have any thoughts on how to work with them in a productive and friendly way?
--
One more example if you feel like reading more:
In a past role, I got into a debate about code style with the smartest person I've ever worked with. It boiled down to me advocating for more whitespace in his code and him arguing that adding whitespace made the code harder to read. It took a bit, but eventually I came to understand that he is so good at reading code that he just wants it all laid out in front of him as densely as possible. He can effectively run it in his head, as long as he can see it.
That was baffling to me, I walked away thinking that I must be pretty bad at reading code. I use a very consistent style with long variable and function names, I keep my solutions as simple as I can, and I use whitespace generously to provide visual cues about the code's structure. All of this is to minimize the amount of brainpower I needed to understand my code, so I can put that energy toward thinking about the problem itself.

Comments (474) 222 threads

Show all comments

Showing thread 14 of 222

dmuth2 replies#
I can offer what much younger me was once told by a senior engineer:

1) With respect to not having whitespace: "Not everyone is as smart as you, and you need to ask yourself, do you want junior engineers working on your code to keep bothering you asking how things work, or would you rather your code by easy to read (and commented) so that they can pick things up on their own?"
2) With respect to complexity: "We are expected to build products that align with business objectives. New and experimental code belongs in your home lab and on your GitHub, not in a production environment."
Depending on how things go with #2, maybe offer to let the engineers spend 20% of their time working on lab projects to improve their product, with the understanding being that the rest of the time they are expected to build products with a minimum of complexity.

ethanwillis#
I can agree with the spirit of #1 but also I think it has a subtle bad implication. You do want your juniors to talk to you and you should want to talk to them. You should also want to push them out of their comfort zone (slightly at least) so they can grow.

For #2, I don't think it's fair to say complexity is always equivalent to "experimental." We're getting close to conflating code that takes skill to write with code that has no benefits or will be buggy/experimental. The OP doesn't really deny that his engineers can write this code without failing at it or that it wouldn't improve the product in a measurable way. The post in regards to complexity is really more about the spirit of your first point in which he thinks some subset of his team can't easily deal with this type of code.
I would say that "complex" code that provides a measurable benefit and that some of your team can "wrangle" isn't necessarily a bad thing. If you want your product to be differentiated and better versus your competitor's product you're going to have to do this. If we all program (100% of the time) solely to lowest common denominator on a team(and I don't mean this disparagingly) then the company's product can only be as good as its "worst" engineer.
Otherwise, we can all get off of this site and build the same todo app from the same step by step tutorial :)

goatkey#
Generally agreed with this, and I had a similar experience.

I think overall it comes down to trying to help them build empathy by showing them that they aren't the only one that will have to interact with what they build, as they are a part of a team.
An easy way to start is, like the parent suggests, with showing "How does making it easier to read or reason about ultimately benefit you?" (e.g., not having to be asked for help by junior engineers). The downside of this is it's kind of abstract, and ultimately a selfish motivator ("what benefits me?" over "what benefits the team?"), as another commenter mentioned.
One option that might be more tangible and team-oriented is to discuss design options as a team. Hopefully in doing so they can understand the complexity in their approach as other people ask questions. If you're able to structure in such a way, one trick here is to separate the design phase from the actual implementation phase. So, whoever designs the approach isn't the one that implements it (within reason -- you could also pair program here, with the whoever designed it as a reviewer and not the primary).
Some of this is also about them realizing what is obvious to them is not obvious to others. One tell here is if they use "why don't you just..." a lot when asked questions.
One phrase I use a lot on my team is "don't be a hero". Heroics in a team setting (willingness to write overly complex features, take on indefinite maintenance of code they wrote so others don't have to reason with it, etc.) are generally detrimental to the team overall. If they find themselves having the need to "carry the team" a lot, you could direct some of their energy/problem solving towards how they could help up-level the team overall or fix team processes.
Anyway, a bit of a ramble, but that's my 2 cents. YMMV.