Least Significant Bit

Ask Hack Learn Share!

Posts Tagged “antipatterns”

Antipatterns: Using modules as classes

Imagine a module Calculator defining some methods which then you call like Calculator.sum(1, 2). While this usage of a module is valid in some cases, this time I think we are seeing an antipattern in place. Let's see in my opinion when using a module directly to call methods on it makes sense and when it is an antipattern.

Antipatterns: Exceptions for flow control

In a recent pull request of mine at work a colleague called my attention into an antipattern I had in the code, namely Using exceptions for flow control, and he was right. So we just had to change it.