3 ms·
> If it works, but it offends your sensibilities, perhaps this is an opportunity for self-growth. I've had to learn this lesson. We have an internal microservi
by windowshopping 5y ago
> If it works, but it offends your sensibilities, perhaps this is an opportunity for self-growth.
I've had to learn this lesson. We have an internal microservice whose name is obsolete and no longer makes any sense whatsoever. Everyone is confused by the name until the original reasoning is explained, and they come to understand the original purpose of the service, now long since changed. It drives me up the wall.
I have time and time again made a case for renaming it to accurately represent its modern purpose, which would take an engineer about a week of work - there's a lot of code and config that has to be switched over.
The person running my division has shut me down on this over and over. It goes like this:
Manager: Why do you feel this is a priority?
Me: It confuses people and makes the code less self-explanatory.
Manager: How much time is this costing engineers?
Me: Well, about a minute every time I have to explain it to someone once a week.
Manager: And it would take a week to update? This doesn't seem like a good trade.
Me, mentally spluttering: But the name makes no sense!! It's the wrong name!! It's completely unrelated and has no meaning!
Manager: Do you think you can work with it anyway?
Me: sadly sighs.
I think the manager is right, as much as it offends my sensibilities.
- Waterluvian 5y agoI've been doing this stuff for almost 10 years and I _still_ struggle with this lesson. I think it's a good sign. We have a deep desire for correctness. But I think while it's perfectly healthy to desire correctness, we all need to be able to do what you've demonstrated: accept that sometimes correctness is not a logical endeavour.
- deltaonefour 5y agoI actually don't have this problem. A lot of things programmers get hung up on is just OCD stuff that don't actually improve anything. I once named a function findGreatestCommonDenominatorGCDOfFraction(numerator: int, denominator: int) -> int and one programmer wanted me to rename it into GCD(x, y) because it was more elegant. While GCD feels more elegant it's actually less clear and less practical. The length and verbosity of the function name above typically has a zero cost because of auto complete and other features you should be using in your editor.
- pkaye 5y agoWhy do you have GreatestCommonDenominator and GCD in that function name?
- deltaonefour 5y agoSearch. But even without search does having GCD in the name matter? No. It literally does not harm the program or understanding of the program in any way. Even so, the majority of programmers will have a tendency to react to this as emotionally wrong. Then they attempt to rationalize this explanation with some form of reasoning. Try to catch this in yourself as it could be happening Right now as you read this. You feel it's wrong but not from the composition of logical explanations. The feeling of wrongness forms first than you try to search for facts to rationalize your feeling. Let me be clear. There is nothing logically harmful with that name but most programmers feel there is. This type of OCD tendency accounts for about 50% requests in code reviews. Ultimately useless changes to satisfy some OCD tendency.