A lot of people talk about code optimization, and most of the time they mean memory and performance. But there are a lot of aspects of code that can and should be optimized – including the ability to easily read and understand the code. In this quick video, I’ll talk about why I think code […]
A few months ago, I stopped writing AJAX-style auto-complete inputs on my web apps. Instead, I started using the HTML5 DataList feature. It’s a pretty simple, and fairly slick way to do auto-complete on an input text box (as long as your list isn’t too long, since all items will be rendered into the HTML […]
A friend of mine, Justin Searls, recently released a project that he and his team have been working on for a while, to replace both sinon.js and the built-in jasminebdd mock / spy tooling. The project, TestDouble.js (apparently named after his company, TestDouble?) aims to provide a simplified, clean, yet powerful mock / stub / […]
I’ve often been involved in conversations that boil down to “framework vs library” use in software development. But after reading a blog post, recently, I found myself wondering if this is even the right question to ask. If “framework vs library” is the wrong question, then what is the right question?
Webhooks are a great way to add integration with external services and systems. I’ve used webhooks from Stripe, Dropbox and other systems to tell my app when something happens on the external service, making it easy for my system to respond to whatever the event was. While webhooks are generally easy to handle, there are […]
A lot of people think that Node has built-in singleton objects with the “require” function. This is far from the truth. The require function only creates a cached module instance that can easily be broken. So, what does it take to build a true singleton in Node.js?
I’ve done a lot of work with ES6 in the last 6+ months, and I’ve found that while I do still have a lot of questions about some of the new features and syntax, there are some parts that a big win for everyone, right now. To illustrate the parts that I like best, I […]
A reader recently sent me an email, asking a question about how to find an item in an array, based on a property / attribute that would match. Meaning, the object instance will be different, but the attribute (such as “id”) will be the same. This person wanted to know if there’s a good way […]
Last night, I spent 2 hours working on a new technique for crocheting a hat. The technique creates a stitch that looks like it was knitted. I had only practiced this technique once, but I set out to create a hat anyways. It was going to be a fun project! A new stitch technique, with […]
I’ve been running WordPress on various blogs for a few years now. Prior to that, I’ve tried out several different solutions for blogging and other needs that WordPress can fulfill. While I think WordPress as a whole, leaves a lot to be desired, I also see it as a very useful tool for getting a […]