Always declare your variables in JavaScript!

One mistake many people who are new to JavaScript often make is forgetting to declare their variables before using them. It is a mistake I often see when browsing through questions on StackOverflow. Instead of continuing to write very similar comments pointing out the problems with not declaring variables and how to avoid making this mistake, I decided to write this post so I can link to it in a more terse comment and give a more in depth explanation of the problem than I could in a SO comment.

Spotting bad JavaScript tutorials

It used to be that you could find very few truly good JavaScript tutorials online. Thankfully, the state of JavaScript documentation has greatly improved in the last few years, thanks in part to a campaign headed by Mozilla. Unfortunately there are still a lot of bad, outdated tutorials out there. A lot of people learn JS by copying code they find and tweaking it to figure out how it works. Following bad examples can teach you lots of bad habits.

Converting the UselessCode.org Blog to a static site

If you've visited this blog before you might notice something is different about it. It's not just a new theme, previously it had been running on WordPress but has now been refactored into a static site generated with a Metalsmith based script.

The pitfalls of the HTML5 autofocus attribute

The autofocus attribute that HTML5 adds to input elements is a nice convenience feature, but it has its drawbacks.

ES6 spread operator + Date constructor = awesome

I've been working with the Date constructor a lot recently and I discovered something. The new spread operator is extremely useful when dealing with the Date constructor.

Ucsv 1.2.0 released

I've been busy with a number of other projects but I have finally gotten around to a new update to Ucsv. This version fixes a couple of small bugs and adds the new csvToObject and objectToCsv methods.

UCSV 1.1.0 released

Version 1.1.0 of the UCSV JavaScript CSV library is now available. Version 1.1.0 adds support for use as a CommonJS module.