Profile    Mohammed Shiroz Status   Loading  
Logo
Share This

My clean code
blog and Updates

It's my personal blog and my post about what was my interested in. Not regularly. If you have any questions any discussion, I'm happy you get in touch with me, and try to answer as many as possible!

Blog
Let's See
Back to blog
Filter by:
Tags
//Article

Writing Readable React Components: Six Habits, One Messy Example

Writing Readable React Components: Six Habits, One Messy Example

Blog Summary

Every React codebase has that 400-line component with props called data, flag and cb. Let's refactor one, habit by habit: better names, derived state, custom hooks, smaller components and less prop drilling.

Read more
  • 52
  • 133
  • 25

Value Objects in PHP: Small Classes That Prevent Big Bugs

Value Objects in PHP: Small Classes That Prevent Big Bugs

Blog Summary

An amount in the wrong unit, a swapped string argument, a lease that ends before it starts. Value objects like Money, Email and DateRange turn these bugs into errors on the exact line that caused them.

Read more
  • 59
  • 102
  • 14

SOLID Principles With Practical PHP Examples (and When to Ignore Them)

SOLID Principles With Practical PHP Examples (and When to Ignore Them)

Blog Summary

SOLID gets taught with shapes and animals, then applied with fifteen interfaces for a feature that needed one class. Here are the five principles with real PHP examples, the smell each one fixes, and when to leave them alone.

Read more
  • 145
  • 48
  • 18

Laravel Collections: Ten Methods That Replace Your foreach Loops

Laravel Collections: Ten Methods That Replace Your foreach Loops

Blog Summary

Most loops in application code do one of ten jobs, and Laravel collections have a named method for each. Here are map, filter, keyBy, partition, pipe and five more, with the gotchas and the cases where a loop still wins.

Read more
  • 75
  • 41
  • 10

PHP Enums in Laravel: Replacing Magic Strings for Good

PHP Enums in Laravel: Replacing Magic Strings for Good

Blog Summary

A status check comparing against 'actve' can sit in your code for months and never be true. Backed enums, Eloquent casts, Rule::enum and methods on enums turn those magic strings into something PHP checks for you.

Read more
  • 137
  • 94
  • 15

Writing SQL You Can Still Read Six Months Later

Writing SQL You Can Still Read Six Months Later

Blog Summary

Every codebase has a query everyone is afraid to touch. Formatting, honest names, CTEs, comments that explain business rules and a first look at window functions turn it into SQL anyone can follow.

Read more
  • 72
  • 11
  • 19

01. About Shiroz

Mohammed Shiroz

Hi, I'm Mohammed Shiroz, a software engineer and AI enthusiast from Sri Lanka who turns ideas into intelligent, real-world solutions. With over 9 years of hands-on experience, I currently lead real estate ERP development at Kate Group, a...

03.My Projects

04. Categories

Ready To Start Your Project ?

Get in Touch
Close