
Java & Spring Boot Developer | Building SaaS in public | Sharing backend tips & clean architecture thoughts
Joined December 2021
- Tweets47
- Following274
- Followers18
- Likes177
World Cup 2026 is done for Iraq. We knew this group was stacked with France, Norway and Senegal — no one expected us to breeze through or anything. Qualifying after 40 years was already a big deal.
But honestly, the way we played… that’s what’s frustrating. We expected more fight from the lads. More heart, better organization, some real chances instead of just sitting back and getting picked apart. The losses were heavy and it didn’t feel like we showed up with the right mentality against teams at that level.
This level isn’t good enough. Things have to change — the preparation, the tactics, how the team approaches these big games. We can’t keep accepting performances like this. Qualifying got us here, now we need to actually compete properly next time around.
#Iraq #WorldCup2026
108
Wishing all Yazidis around the world a blessed and joyful Ser sal! May this New Year bring peace, healing, and hope to your communities. 🌸 #Sersal #YazidiNewYear
107
Enums in Java Are Not Just Constants
They Support Fields, Methods & Polymorphism
Eliminate switch.
Move Logic Inside the Enum.
#Java

ALT This image compares two approaches to handling operations in Java. On the left, a traditional switch statement is used to handle enum values like ADD and SUBTRACT. On the right, a more object-oriented approach is shown where each enum constant contains its own behavior using polymorphism. The key idea: Java enums are full classes — they can have methods and abstract functions. By moving logic inside the enum, you eliminate switch statements, improve readability, and enforce behavior at compile time. A simple but powerful Java design improvement many developers overlook.
83
Need a map that’s fast and keeps the order you insert keys?
LinkedHashMap = HashMap + doubly-linked list.
✅ Predictable iteration
✅ Perfect for JSON/config output
✅ Turn on accessOrder=true → instant LRU cache.
#Java #CleanCode #maher4j
1
79
See this 👇🏼
We once refunded €10 000 overnight.
No hacker. No missing semicolon.
Just one innocent-looking Java line.
Here’s the bug that cost us — and how you can dodge it 👇🏼
#Java #CleanCode #Maher4J
1
408
We once refunded €10 000 overnight.
No hacker. No missing semicolon.
Just one innocent-looking Java line.
Here’s the bug that cost us — and how you can dodge it 👇🏼
#Java #CleanCode #Maher4J
Our rule now:
Never use BigDecimal.equals() for monetary comparisons.
Use one of these instead:
amountPaid.compareTo(expected) == 0 // safest
amountPaid.stripTrailingZeros()
.equals(expected.stripTrailingZeros())
1
69
Since switching, zero false refunds, cleaner audits, happier CFO.
Small change, massive impact.
Guard your decimals — they guard your money. 💸
#Java #BackendDev #FinTech #CodeTips #Java4Maher
66
We now forbid .get() in code reviews — unless there’s a guard.
Anyone else have Optional usage rules in your team?
We once lost hours debugging a NullPointerException.
Cause? Optional.get() — someone assumed it was always present.
Now our rule is simple:
❌ Never use .get()
✅ Always use .orElse, .orElseThrow, or .ifPresent
It’s not just cleaner — it’s safer.
#Java #CleanCode #DevLife
We once lost hours debugging a NullPointerException.
Cause? Optional.get() — someone assumed it was always present.
Now our rule is simple:
❌ Never use .get()
✅ Always use .orElse, .orElseThrow, or .ifPresent
It’s not just cleaner — it’s safer.
#Java #CleanCode #DevLife
I used to inject services into entities “just to make it work.”
It worked — until it made testing painful and the domain layer messy.
Clean Architecture changed how I think.
Entities shouldn’t know about Spring. Ever.
2
303
Most Java devs never use sealed classes.
But they’re perfect when you want strict control over inheritance.
Here’s how sealed classes help you write safer, cleaner, and more predictable code
1
5
1,182
Why use this?
✅ Prevents unauthorized subclassing
✅ Exhaustive switch handling
✅ Safer role modeling
✅ Cleaner architecture
Great fit for domain-driven designs.
1
112

