Maher (@knmaher) profile picture

Java & Spring Boot Developer | Building SaaS in public | Sharing backend tips & clean architecture thoughts

Joined December 2021
Photo by Maher (@knmaher)Photo by Maher (@knmaher)Photo by Maher (@knmaher)Photo by Maher (@knmaher)Photo by Maher (@knmaher)
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
Mesopotamia! Mesopotamia! Lions never die! Lions of Mesopotamia! Tomorrow vs France – no fear, only fire! We’ve waited decades for this. Give everything on that pitch. Philadelphia, feel the roar! 🦁🇮🇶 #Iraq #WorldCup #france
124
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
Unpopular opinion: junior developers should spend less time learning frameworks and more time learning how APIs, databases, and debugging actually work. Frameworks change. Foundations pay forever. Agree or disagree?
132
Enums in Java Are Not Just Constants They Support Fields, Methods & Polymorphism Eliminate switch. Move Logic Inside the Enum. #Java
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 👇🏼
Java trick 💡 Since JDK 16 you can pattern-match right inside instanceof if (obj instanceof User u && u.active()) { welcome(u); } Stop writing the old two-step 👇 if (obj instanceof User) { User u = (User) obj; } Clearer, safer, one line. #Java
1
296
Java trick 💡 Since JDK 16 you can pattern-match right inside instanceof if (obj instanceof User u && u.active()) { welcome(u); } Stop writing the old two-step 👇 if (obj instanceof User) { User u = (User) obj; } Clearer, safer, one line. #Java
1
2
334
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
1
1
448
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 now forbid .get() in code reviews — unless there’s a guard. Anyone else have Optional usage rules in your team?
164
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
2
1
428
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
1
2
293
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
sealed + record is a clean and safe way to model strict types. Perfect for roles, events, state machines & more.
93