Ask HN: Strategies for working with engineers that are too smart?
509 points- 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 4 of 222
Their solutions tend to be obvious in hindsight and simple.
They work within the constraints they're given. They don't merely find one solution and push it through. They get satisfaction finding which fits best. If there's conflict, it's probably because they don't know how else to solve something.
It's true that sometimes there's only one solution, but that's rare and implies you're hitting bedrock fundamental stuff or have an over-constrained codebase that needs some refactoring. In those cases it would be apparent in other places too, not just when dealing with their code or opinions.
If your experience is limited to academic projects, grinding leetcode, even competitive programming, you've done things where first one is nearly always optimal.
Once you are on a team optimizing for continued feature delivery over time, the cognitive load of picking up and understanding old code full of raw maps and strings starts to justify the overhead of a bit more semantic scaffolding in places.
IMO the necessary judgment has to be learned even by smart, academically talented people.
Continue this thread — 1 reply
Continue this thread — 2 replies
Continue this thread — 1 reply
I'd certainly recommend the first one, there's simply less stuff to parse, it's easier and quicker to read.
x is a pair with key of type string and value of pair with key of type string and value of type string.
The other one is overly verbose to read, it takes more effort to read and understand.. But it could have merit, for instance if you need to extract status into a variable of declared type later..
I'll a thousand times rather have
// Create users from id's
userList = theblackmagiconeliner;
Than a 20 line version of it where I'm left having to read through it to determine "oh, it made users from a list of id's" or even just.. having to read through it to find out if there's other stuff plugged in because "it could go there" or even just finding where it ends and actual work starts.
userList = userListFromUserIdList(userIds);
is also perfectly acceptable, but if it's only used once in that file, I'd prefer the blackmagiconeliner.. If it's only used once in the project, I'd also prefer that to having another file just for that function. Just do the work and get on with it.
1. You're probably doing something else where you don't want to stop and decipher a magic one-liner. That comment is a great name for that function.
2. Now that you have a function, write a test. Now that you have a test, your coworkers won't be tempted to tuck extra stuff in that function, because everyone hates editing tests.
Exactly because now.. what used to be a menial computation required to get from A to B, has become a Thing, its existence has been justified not just by the declaration of a named function, but it has been blessed by the allocation of holy inodes and filesystem entries and versioning control entries, and oh god no, now it's been promoted to "actually important piece of infrastructure" by the greasy hand of a unit test. It has become a goal in and of itself.. What used to be a worthless piece of "I have Id's I need user objects"-getting-it-to-work has ascended and become immortal. Hours of work will now replace minutes, it adds drag to the entire system, not just in code size and bulk, but in developer mindshare, it exists and must therefore be considered and payed some amount of respect.
It is painless to delete a single line of "doing stuff" when refactoring something.. But alas, in the end, the function call is deleted, but it lives on, either unreferenced or shows its ugly face in other parts of the code, now mutilated and mutated to support "that thing that sounds like what it did but not quite"..
No, flamethrowers alight! Kill it with fire! Let it never be born.
And I'm actually very much in favor of DRY. But that mainly is about repetition, not about spawning as much "structure for the sake of structure" as possible.
Continue this thread — 1 reply
When we have to get down to the C, lately I've thrown away everything they try to migrate, and write something more sensible.
There really isn't any reason to add comments to this code. No one will ever read such commentary while I am employed. It does me no benefit, so I stopped.
Continue this thread — 17 replies
Of note, the nesting here seems suspect, why not use a three item tuple or a flattened data class? In many cases I find where people start arguing about naming or abstraction, there’s a way to simplify things further so it’s readable for everyone and easier to use inline. I always look for those now when I’m reaching for “you should rename this” or “you should restructure this” kind of comments.
I completely agree with your last point regardless: those kinds of arguments honestly held between well meaning team members are definitely a strong indicator that the implementation used is mismatching the use case at some level.
I'm kind of a certified idiot and the first one seems way more intuitive than the second one because it is succinct with much less abstraction. It's easier to "keep in my head" than the second one for me and, again, I cannot stress enough that I am not a clever man.
And I've been one of them, and I now try to avoid complexity if possible and try to make peace with the fact that the smart solution is most often not the clever one.
The two most intelligent people I know write code that works incredibly well, but you can tell it was coded out in one shot based on an idea they had. Makes it difficult to read, but to them it "just makes sense".
A really good friend of mine is like this. When I read over his code, it's highly compact, and makes use of language features that are pretty obscure. The stuff he builds out addresses problem I would never have thought of. But the catch is I can't follow, or understand half his code.
Sometimes though, there's an advantage here. Someone like that can get all the ideas out "on paper" (so to speak), then pass it off to someone who can make it legible for everyone else. There's a lot of value in someone like this, but you need to pair them up with the software equivalent of an editor. You'd be surprised, some people enjoy doing that!
"I can't read German, does that make it unreadable?".
Or to put it another way, we don't criticize James Clavelle's novel Shogun because it's difficult for a 10 year old to understand.
I feel that's really unrelated to how "smart" person is. It's more due to experience when you start to appreciate the simplest approaches to solve the problem.
Many people chase some new and cool features and want to use them just because it is more interesting that clapping out boring code day in day out and that's where you get those overly clever blocks of code. I've seen every level of competence fall into it. Hell, I suspect like 3/4 of k8s and related deployment are exactly that, devs bored and wanting to play with new toy.
I have met many people whose identity is wrapped up in being smart. When faced with choosing a clever solution or an understandable solution they will choose the former. This is where preserving their identity outweighs empathy for you or even for themselves. Some people also like to be the hero. If they are the only ones who get the solution then they are more likely to be the hero to fix it in some future moment of need.
Continue this thread — 5 replies
Continue this thread — 3 more replies