User experience, like behavioural economics, was a big change from focusing on what we produce and sell, to how it is used or bought. It means putting the end consumer in the centre of the design process. It includes understanding how to use our perceptions and emotions when buying and using the product to make the process more efficient or enjoyable.
Bad actors also started using the lessons learnt from these disciplines to be deceptive. In design, this is called a dark pattern. For example, when an advertisement includes a button you may mistake for a button of the interface of the site it is placed on.
In development, there is sometimes the tendency to hide or obscure development. The code is made harder to read or hidden, in an attempt to make it more difficult to find and understand. Sometimes this is made for security, or at least that is the reason given.
This is particularly harmful when developing on top of open source projects like WordPress because in order to obscure development code is often placed in the wrong place, going against the original design of the project.
Developing in ways designed to hide or obscure the code, other developers are faced with code that does not make sense and is more difficult to work with. It spreads ideas that are wrong or misleading as a way to justify this type of development. And all of these contribute to less and worse knowledge of the open source project.
For example, I was recently presented with the following reasoning: a common error people make is using too many plugins; instead of installing a plugin that makes a simple task, it is preferable to use a simple code in your plugin or your theme functions file. This is wrong because it encourages developing the wrong way, but also presents new unsupported implications:
- It is preferable to have several functionalities in a single plugin instead of plugins created for a single purpose.
- A fewer number of plugins is better, even if the amount of code or functionalities is the same.
- Using code we write is inherently better than using a plugin already created.
And this is without going into justifications that appeared further in the discussion, like using fragments of code being more secure and better for performance, without any supporting evidence.
Working with knowledge, especially with open source projects, and doing it openly and sharing is a win-win situation. No one benefits from obscuring or hiding knowledge. But it is also a dark pattern as it confuses the end consumer and prevents them to learn and improve their understanding of how development works, and what value it has. It is a pattern designed to keep you in the dark.