cover-img

Code Smell 25 - Pattern Abusers

Patterns are awesome. With great powers comes great responsibility.

15 November, 2022

11

11

0

TL;DR: Don't abuse patterns.

Problems

Over Design

Readability

Solutions

1.

Measure the tradeoff of patterns usage.

2.

Create solutions based on real world names (essential) over architecture (accidental).

3.

Choose good names.

4.

User MAPPER technique to find bijection real entities.

Sample Code

Wrong

Right

Detection

It would be very difficult to create automatic detection rules.
A class name with more than one pattern on it, is a warning.

Tags

Abuser

Naming

Conclusion

Chose when to apply a pattern solution. You are not smarter for using too many patterns. You are smart if you choose the right opportunity for everyone.

Relations

More Info

Credits

When you have a hammer, every problem looks like a nail.

This article is part of the CodeSmell Series.

11

11

0

Maxi Contieri

Buenos Aires, Argentina

🎓Learn something new every day.📆 💻CS software engineer 👷coding👨🏽‍🏫teaching ✍🏾writing 🎨Software Design 🏢SOLID 🌉TDD 👴Legacy 💩Code Smells

More Articles

Showwcase is a professional tech network with over 0 users from over 150 countries. We assist tech professionals in showcasing their unique skills through dedicated profiles and connect them with top global companies for career opportunities.

© Copyright 2024. Showcase Creators Inc. All rights reserved.