Let’s be honest—we’ve all written “just get it done” code that somehow works… but looks like a wild jungle of confusion. I’ve been there too. 😅
As I started working on real-world projects (and teaching others too), I realized that clean code isn’t just for looking fancy—it saves time, reduces bugs, and makes teamwork so much easier.
So, here are a few things I actually started doing differently that helped me go from messy to maintainable:
1. Meaningful Class & Variable Names 🎯
I used to name things like abc, mainDiv, box1… and then spend hours later figuring out what they meant. Now, I try to name things based on what they do or what they represent.
✅ productCard instead of box1
✅ isLoading instead of loadStatus
✅ userList instead of dataArray
This small change makes the code way more readable—even for future me.
2. Consistent Folder Structure 📁
At first, I’d dump everything into one or two folders—components, styles, logic… all mixed like a salad.
Now I follow a simple, scalable structure like:
src/
├── components/
│ ├── common/
│ │ └── Button/
│ │ ├── Button.jsx
│ │ └── Button.module.css
│ └── FeatureSpecificComponent/
│ ├── FeatureComponent.jsx
│ └── FeatureComponent.module.css
├── pages/
│ └── Home.jsx
├── utils/
│ └── formatDate.js
├── hooks/
│ └── useDebounce.js
├── assets/
│ ├── images/
│ └── icons/
└── styles/
└── global.css
✅ It’s easier to find files
✅ Each component lives in its own mini folder
✅ Cleaner and more organized as the project grows
3. Breaking Things Into Reusable Components 🧩
Instead of copying the same button or card everywhere, I create a reusable component once and use it across the app.
It keeps the code DRY (Don’t Repeat Yourself) and makes updates easier—change in one place, apply everywhere.
4. Comments That Actually Help 💬
No more // loop starts 😅
Now I write comments when I know something is tricky or might confuse someone reading it later (even if it’s me).
// Delay API call until user stops typing
Clear, short, and to the point.
5. Writing With My Team in Mind 🤝
Whether I’m reviewing someone’s code or teaching code quality, I remind myself: we’re building as a team, not as solo coders.
So my focus is always on clarity, reusability, and keeping the code base beginner-friendly and scalable.
💭 Final Thoughts
Clean code isn’t about being perfect—it’s about being intentional.
These small habits made my work cleaner, my projects easier to maintain, and my team’s life better too.
If you’re part of a dev team (or teaching one, like I am right now), feel free to share this with them. Let’s make clean code the standard, not the exception. 💪✨