Every child can tell you that 1 + 2 = 3. But what is 0.1 + 0.2? As developer, you are doubtless aware that the result when using floating-point arithmetic isn't exactly 0.3 but rather 0.30000000000000004. That's good enough for many applications, but in some…
Library of the Week: lz-string
You know the feeling. You need a simple generic utility library, and you're convinced you aren't the first one. You know the best code is the code you don't have to write yourself, so you consult Google, Stack Overflow and even GitHub. No dice?…
Library of the Week: Crossroads.js
This week, let's talk about the standalone routing library Crossroads.js [https://www.javascripting.com/view/crossroads-js] by Miller Medeiros [http://blog.millermedeiros.com/]. We should also mention Hasher [https://www.javascripting.com/view/hasher], a library by the same author that is often used in conjunction with…
Library of the Week: Pikaday
We're introducing a new feature today on the JavaScripting blog: Library of the Week. We're receiving a lot of great submissions, and we decided it would be worthwhile to highlight some of the best ones. We'll be posting about a new library every Friday.…
Real-World JavaScript Anti-Patterns (Part Two)
My previous post [https://blog.javascripting.com/2014/11/06/real-world-javascript-anti-patterns/] was mainly about pure JavaScript syntax, callbacks and iterating collections. In this post I would like to focus on usage of a couple of popular third-party libraries: jQuery [http://jquery.com/] and Lodash [https://lodash.com/]. As in part…