Recently, a steamer said they "prefer verbosity over abstraction/confusion".
In that scenario, it was regarding the name of a microservice they were creating. It was long and verbose, but it described what it did.
It was clear to anyone working on that project what that service did, now and in the future.
I prefer this to shorter, less-descriptive names.
I hardly ever create a variable called $x, $k or $v. I only would if it was clear what it meant within its context.
I like to write descriptive names for test methods that explain what the test is doing. Even if I start with a vague name, I'll refactor it to make it more specific and clearer.
I prefer not to use PHP functions like compact and to write it out and avoid the abstraction and any confusion it could cause.
I prefer code to be verbose, descriptive and easy to read, understand and change.
- Oliver
Was this interesting?
About me
I'm an Acquia-certified Drupal Triple Expert with 17 years of experience, an open-source software maintainer and Drupal core contributor, public speaker, live streamer, and host of the Beyond Blocks podcast.