This week, I changed my first diaper. I did an okay job, but I'm sure I'll get better.
I'm not looking to perfect the technique or innovate. I just need to get to a point where I do it properly, cleanly, quickly and efficiently.
At some point it'll become a passive skill. Something I do automatically without really thinking about it. It'll become so ingrained that it just happens naturally. Like muscle memory, but for everyday tasks.
Like putting gas in the car. It's routine maintenance that keeps everything running smoothly.
Here are some more passive skills you've probably mastered yourself:
- Brushing your teeth
- Checking your mirrors while driving
- Washing your hands after using the bathroom
- Putting on your seatbelt
- Closing cabinets and drawers after opening them
- Wiping down the counter after cooking
- Saving your work every few minutes
These aren't skills you actively practice or get excited about. You don't wake up thinking "I can't wait to change a diaper today!" You just do it because it needs doing.
So when you sit down to write some code, you're practicing another passive skill. Writing semantic HTML.
This should be so automatic that you don't even question doing it. You just build it right from the start, without having to consciously think "oh shit, I need to add a label to this form."
If it's not a passive skill for you yet, that's okay.
The key is repetition until it becomes automatic. Start by consciously choosing the right HTML elements every single time you write markup, even for simple stuff.
Each time, force yourself to think through the semantics first. Is this really a div
or should it be a section
? Should this be a button
or a link
? At some point, you'll start thinking in semantic terms before you write any code. Instead of "I need a clickable thing," you think "I need a button that submits this form" or "I need a link that takes users to another page."
Code reviews help a ton. When you see semantic HTML done wrong (or right), it sticks in your memory. You start noticing patterns and catching mistakes before they happen.
Eventually you'll catch yourself fixing other people's non-semantic HTML without even thinking about it. That's when you know it's become a passive skill.