26 lines
1 KiB
Markdown
26 lines
1 KiB
Markdown
|
---
|
||
|
title: >
|
||
|
Verbosity over abstraction
|
||
|
pubDate: 2023-09-06
|
||
|
permalink: >-
|
||
|
archive/2023/09/06/verbosity-over-abstraction
|
||
|
tags:
|
||
|
- software-development
|
||
|
---
|
||
|
|
||
|
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.
|