It's the little things in development that trip you up the most. So I've got a tracked robot (more on that to come) and it has some lights in the front that we can fairly call headlights. It also has an arm with a camera and gimble and stuff on top that is fairly called the "head". And on the head of the robot there is a light that is also fairly called a headlight, though for different definition from the other headlights.
And therein lies the conundrum. Two pieces of code were developed separately and must now come together. Both have a thing that is best referred to as a headlight and both pieces of code have chosen that name, headlightPin, headlightState, headlightOnTime, etc, etc. So obviously one gets refactored before they get combined. Easy enough to do with find and replace.
But which one loses the name? I could get away with headlights and headlight, but I might end up having to post this code on the forum one day and then PaulS would see it and I'd have to change it before I could get any help anyway. I'd rather just nip it in the bud and avoid doing stupid things to begin with.
SO, which wins? The headlights? Or the light on the head? Who has a better name for one of those things?
Neither of them needs to lose the name, but add a prefix to them. The one on the robot can be changed to robot_headlight and call the other one gimbal_headlight or whatever prefix is appropriate. Then document it at the head of the program.