9
Back when someone told me my CSS grid was a hot mess and I got butthurt
I was building a product grid for a client site about 2 years ago and thought I was super clever with all these nested grids. Some random person on a dev forum just said "your grid is broken on mobile, try using flexbox for the card layout instead". I was so annoyed at first cause I spent like 3 days on that grid. Turns out they were totally right, the cards were squishing weird on screens under 600px wide. I switched to flexbox for the card wrapper and kept the grid for the page layout, and it fixed everything. Has anyone else gotten feedback that stung at first but actually made your code way better?
2 comments
Log in to join the discussion
Log In2 Comments
the_leo20d ago
Oh man I feel this so hard. I once had a guy tell me my JavaScript was "a disaster" and I wanted to defend it so bad because I had been working on it for a week straight. Turned out he was right though my code was a mess of nested callbacks that looked like a spaghetti monster threw up on the screen. I rewrote it with async/await and it was like night and day, so much cleaner and easier to debug. Still stung a bit when he said it though. Sometimes the best help comes in the form of someone calling out your hot garbage code.
-1
seth_nguyen20d ago
Spaghetti monster threw up on the screen" - thats gold and way too real. I've been on both sides of that conversation and it never feels good in the moment but usually saves your butt later. At least you can say you leveled up from callback hell to modern JS, some folks never make that jump.
7