Skip to main content

Why Adding 'block' to My Label Changed Everything: Understanding CSS Display Property

· 11 min read
Mahmut Salman
Software Developer

I'm learning frontend after years of backend work, and I just discovered something fundamental that nobody explains clearly: the display property. I added block to my label, and suddenly my form inputs stacked vertically instead of sitting side-by-side. I had no idea what I just did. 🤯 My frontend mentor explained how block, inline, and inline-block are the foundation that flexbox and grid are built on. This conversation changed everything.

Why My Password Field Wasn't Spacing Correctly: Understanding Form Structure and space-y

· 13 min read
Mahmut Salman
Software Developer

I'm a backend developer building my first login form, and I couldn't figure out why my password field wasn't spacing away from the email field. Both fields were squished together even though I had space-y-4 on the form! 😤 My frontend mentor showed me a critical structural mistake: I put both fields in the SAME div. This conversation taught me why form structure matters just as much as styling.

The Mystery of CSS Flexbox Centering: Why Merging Two Divs Breaks Everything

· 10 min read
Mahmut Salman
Software Developer

I'm a backend developer learning frontend, and I just spent 2 hours debugging why my centered login form moved to the left when I "simplified" my code. The CSS felt like black magic. 🎩✨ My frontend mentor showed me why two divs are NOT just redundant nesting—they're a fundamental pattern in CSS positioning. Let me share this conversation that changed how I think about layout.

From HTML Error Pages to Beautiful JSON: Fixing JWT Authentication Errors in Spring Boot

· 13 min read
Mahmut Salman
Software Developer

"Why is my API returning HTML error pages?!" I stared at my console in disbelief. My React frontend was trying to parse JSON, but Spring Security was happily serving up a Whitelabel Error Page for failed authentication attempts. This took me 3 hours to fix. Let me show you how to make Spring Security play nice with modern frontends. 🎨✨

Stop Writing For Loops: Master Java Streams with 5 Essential Patterns

· 14 min read
Mahmut Salman
Software Developer

I used to think Java Streams were confusing magic. I avoided them for months, writing nested for loops like it was 2005. Then I saw a senior developer calculate cart totals in ONE line of code that took me 15 lines. I felt like a caveman discovering fire. 🔥 Let me teach you the 5 patterns that cover 90% of real-world Stream usage—no PhD required.

Mastering Two-Tier Exception Handling in Spring Boot: A Complete Guide

· 11 min read
Mahmut Salman
Software Developer

Ever wondered why sometimes your Spring Boot exceptions are caught by @RestControllerAdvice and other times they're not? Or why your custom AccessDeniedHandler returns 403 before your controller even executes? I spent hours debugging this mystery until I understood Spring Boot's two-tier exception handling architecture. Let me save you the confusion. 🎯

Wait, You're Exposing Your Password?! Understanding Input vs Output DTOs in Spring Boot

· 14 min read
Mahmut Salman
Software Developer

I'll never forget the day I accidentally exposed user passwords in my API responses. I returned the entire User entity from a GET endpoint, thinking "Spring Boot will handle it!" Spoiler alert: It returned EVERYTHING—including hashed passwords, internal IDs, and timestamps. My code reviewer nearly had a heart attack. 😱 That's when I learned about DTOs. Let me save you from this nightmare.

The Mystery of the 403 Login: Understanding Spring Security's Two-Stage Authentication

· 11 min read
Mahmut Salman
Software Developer

"My login endpoint is returning 403 Forbidden! But I configured it as .permitAll() in SecurityConfig! Why is the JwtFilter still blocking it?" I spent 2 hours debugging this. Turns out, I had a fundamental misunderstanding of how Spring Security works. The JwtFilter doesn't "skip" endpoints - it runs on EVERYTHING. Let me explain the magic. 🎩✨

My 'Aha!' Moment: Why Public/Private Actually Matters (And I Was Wrong About Security)

· 14 min read
Mahmut Salman
Software Developer

"Why make something private? Just make everything public. If the coder knows which method to call, they call it. Problem solved, right?" That was me a week ago. I was so wrong. Here's my journey from "public/private is just fancy nonsense" to "holy crap, this actually makes sense!" 🤯

Why Create Custom Exceptions? It's Not Just About the Name!

· 10 min read
Mahmut Salman
Software Developer

"Why create InvalidCredentialsException extending RuntimeException? Isn't it just to get a descriptive name instead of generic RuntimeException?" No! The name is only a small part. The real power is type-safe error handling - allowing Spring to distinguish between different errors and handle them differently without string parsing. Let's see why custom exceptions are essential, not just fancy naming.