
Compilers are smarter than us. On a Friday night production deploy they betray us.
Problems
Fail Fast
Declarativeness
Ambiguity
Solutions
Fail Fast
Do not trust magic coercion.
Be Explicit
Examples
- Type Casting
Sample Code
Wrong
Right
Detection
Many of this vicious are encouraged by languages themselves.
We should be very declarative and explicit and don't abuse language accidental magic solutions.
Tags
Declarative
Smart
Conclusion
Programmers pretend to be smart by exploiting language features.
They feel they belong to community standards that enforce bad behaviors like a sect.
Relations
More Info
Credits
Photo by Senor Sosa on Unsplash
Hackers are arrogant geek romantics. They lack the attentive spirit of inquiry.
Bruce Sterling
This article is part of the CodeSmell Series.
About the author
I’m a senior software engineer loving clean code, and declarative designs. S.O.L.I.D. and agile methodologies fan.
Comments
Join the discussionNo comments yet. Be the first to comment.
Code Smells
In this series, we will see several symptoms and situations that make us doubt the quality of our developments. We will present possible solutions. Most are just clues. They are no hard rules.





