Code Smell 87 — Inconsistent Parameters Sorting
Be consistent with the parameters you use. Code is prose.

TL;DR: Don’t confuse you readers. Keep the order.
Problems
- Readability
- Consistency
Solutions
- Refactor and change parameters order.
- Use named parameters
Sample Code
Wrong
Right
Detection
- Some very smart linters may be able to compare arguments and hint for possible mistakes.
Tags
- Readability
Conclusion
This is a very simple smell.
Readability is very important to avoid mistakes.
Relations
Credits
Computers are good at following instructions, but not at reading your mind.
Donald Knuth
This article is part of the CodeSmell Series.