Allow developers to make mistakes

Occasionally I look at the theme for one of the first WordPress sites I developed. I look at my early PHP, my early CSS, my early JavaScript & my HTML about ten years into my career.

The HTML has at least lost its font tags and table based layouts but my overall reaction is to wish I could curl up and hide.

The code is full of the kind of mistakes you’d expect of a new developer. Magic numbers, CSS and JavaScript files are hardcoded in the header rather than enqueued. Escaping has since been added.

If I could rewrite the site from scratch, I would.

I’d make the same mistakes.

If I could rewrite the site from scratch, I would. I would not go back in time and avoid newbie developer mistakes. Discovering these mistakes is a big reason I am the developer I am today.

The benefit of making mistakes comes from discovering you have made them. The slight embarrassment you feel helps you remember the code required to avoid them later.

Every line of code I write at work gets reviewed before going in to production. Frequently there are mistakes in my code that get picked up in these reviews, I love it and still sometimes make newbie mistakes. A recent comment: isset check unnecessary, unset won’t throw a notice on undefined things.

Cool, I’ve learnt something. ??‍♂️

Embrace the mistake, educate

The comment above, “isset check unnecessary, unset won’t throw a notice on undefined things”, is to the point, helpful and – most importantly – it’s not judgmental. It takes the opportunity to educate.

We can help improve another developer’s skills by avoiding judgement when we discover a mistake.

Creating an environment where someone feels comfortable making newbie mistakes is to create an environment where someone feels comfortable learning. Be it a commercial agency or an open-source project, allowing mistakes is the most important role of an experienced developer.

By Peter Wilson

Peter has worked on the web for twenty years on everything from table based layouts in the 90s to enterprise grade CMS development. Peter’s a big fan of musical theatre and often encourages his industry colleagues to join him for a show or two in New York or in the West End.

2 comments

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.