I used to play a lot of sports when I was younger and I would always strive to get better and be the best. I would dedicate large amounts of time just to practice my free throws, day in day out. Or shooting pucks into the five hole for hours on end. That’s the thing, whenever we want to get better at something tell ourselves

practice makes perfect

And I’m here to tell you that practice doesn’t make perfect, it makes habits.

I will always remember the day that my basketball coach told me that practice doesn’t make perfect, it makes habits. It’s perfect practice makes perfect. Do something a thousand times over and you will be able to do it no problem, but if you’re not doing that thing right for those thousand times, you’re going to develop habits. Habits which are really hard to break.

This can be applied to literally anything. When I first learnt CSS I was in college and didn’t think I was going to pursue it as a career, so I was writing sloppy CSS. When I came to learn more about CSS, I was still struggling to write clean CSS because of the habits that I made when I was first learning.

You may be thinking, but it works for me now. That may be the case but if you want to take things further then you’re going to need the correct technique. Especially with code, it may be working now but, more often than not, it will cause you problems down the line. Efficiency is another thing. In the programming world efficiency is everything. Your code may be working with your bad habits in it, but could it be more efficient?

Next time you learn something, take your time. Get a basic understanding of what’s going on before you dive in, get stuck and find a workaround. But take that with a pinch of salt. Sometimes workaround are necessary, but not all the time.