There are usually two different ways of doing something. The first is the correct way. The second is the easy way.
As an example of this, let’s look at using the functionality of C++ standard library. The correct way is to use the fully qualified name, such as std::vector or std::chrono::milliseconds. The easy way is to have using std; and then just using the class names directly.
The first way is the “correct” one as it prevents symbol clashes and for a bunch of other good reasons. The latter leads to all sorts of problems and for this reason many style guides etc prohibit its use.
But there is a catch. Software is written by humans and humans have a peculiar tendency.
They will always do the easy thing.
There is no possible way for you to prevent them from doing that, apart from standing behind their back and watching every letter they type.
Any sort of system that relies, in any way, on the fact that people will do the right thing rather than the easy thing are doomed to fail from the start. They. Will. Not. Work. And they can’t be made to work. Trying to force it to work leads only to massive shouting and bad blood.
What does this mean to you, the software developer?
It means that the only way your application/library/tool/whatever is going to succeed is that correct thing to do must also be the simplest thing to do. That is the only way to make people do the right thing consistently.Read more