In 2008, Apple’s Safari team had a problem: web developers had noticed that links, buttons, and several input elements were not matching the selector when clicked. Similarly, clicking on those elements did not fire a or event. …

Everyone wants to rewrite their codebase. The current one has too much cruft. It’s legacy code. Ugh.

A pile of junk.
Photo by Ann Kathrin Bopp on Unsplash

At some point in every programmer’s experience, they interact with a codebase that is so frustrating that they dream of scrapping the whole thing and starting over. When is this a good idea? When is this a macabre fantasy that’s best left unrealized?

Code grows like an organism. Some evolutions…

Photo by Volkan Olmez on Unsplash

One of my more common critiques on code reviews of CSS changes is the presence of magic numbers. I’ll see a property being added with a nonsensical measurement, like , and I’ll ask to contributor why it exists. More often than not, the answer is, “because it works.” The…

Photo by Jeremy Thomas on Unsplash

Among the many seeming oddities of JavaScript is the fact that (Not-a-Number) is not equal to itself. Countless beginners have written conditionals checking if , only to find that this is never true. The solution, of course, is to use the built-in checker, . …

Nick Gard

Web Developer, Oregonian, husband

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store