Share options

Links to related pages

Make it sustainable. Keep it simple. Plan properly. Use the least power. Code just in time. Make intentions clear. Minimize cognitive footprint.

Do it right the first time

Time to read

, 570 words, 3rd grade

Practice makes permanent.

Weʼve all heard the old adage that “practice makes perfect.” Well, we are here to tell you that that is utter nonsense.

For one thing, it is missing a key qualifier: proper. As in proper practice makes perfect.

More correctly, that qualifier should be “perfect” as in, perfect practice makes perfect. After all, how can you achieve perfection if you are not practicing perfection?

But that begs the question, doesnʼt it? Wouldnʼt we need to be perfect already to practice perfection?

Practice does not make perfect. Practice makes permanent. Repeat the same mistakes over and over, and you donʼt get any closer to Carnegie Hall.
Sarah Kay

Sarah Kay nails it. Practice makes not perfection, but permanence. When we practice, we are establishing neural pathways, muscle memories, and habits. These will be difficult to overcome later if weʼve made the wrong ones.

Far too many coders write sloppy code most of the time. They fail to consider and reflect. They plan little if at all. And they tell themselves that they will “fix it later.”

You can bet that they wonʼt. And then who gets stuck with it? Thatʼs right: the next developer to touch the code.

But even if they do eventually fix it, then they have now made crappy coding, rather than craft coding, a habit. And like any habit, it will be difficult to break.

Iʼm not a great programmer; Iʼm just a good programmer with great habits.
Kent Beck

Consider this:

You want desperately to be a world class professional golfer: the next Tiger Woods. Humor us. Truth is, if you are reading this, then it is already way too late. You should have started around age three.

You will need to practice, right? So out you go to the course every few days and whack the ball around making no effort to do it well. Then once a month you get a lesson and spend half an hour trying to do it right.

How well do you think this approach will work?

Not well, we suspect.

Now consider your coding habits. When you are writing code, how does your brain know when you are just messinʼ ʼround vs. when you are practicing for reals?

Answer: it doesnʼt. To your brain, it is all practice. And so every line of code you write is making permanent the way you wrote it.

Your sloppy coding is not helping you to become the “Tiger Woods of coding.” The truth is that it is making that goal ever more difficult to achieve. You are building very bad habits that it will be difficult if not impossible to overcome.

And the longer you do this, the worse it gets.

Make great habits

So do it right the first time and everytime. Write every line of code as if it were the line for which you will want others to remember you. Donʼt overthink it, but do the best you can.

At first it will be hard work. But as you gain skill it will become second nature, and then you will do it with ease.

Finally, remember that todayʼs code is tomorrowʼs legacy code. You are not going to have time to “fix it later.” So do it right the first time.

Links to related pages

Make it sustainable. Keep it simple. Plan properly. Use the least power. Code just in time. Make intentions clear. Minimize cognitive footprint.

Get notified form

Get notified of site updates
Button bar

Carbon emissions for this page

Cleaner than 99% of pages tested
0.016g on first visit; then on return visits 0.008g
QR Code

Scan this code to open this page on another device.