this as a major pain of the language. The
this and its many quirks and forms. We will lay out the four ways to set a function’s
this value, as well as discuss some common use cases and pitfalls.
Testing is a vital part of any development process. Whether a project's authors are hoping for scalability, fewer bugs, or just code that stands the test of time, a solid test suite is essential.
It's all well and good writing tests, but how do you know that you've tested the code that matters? Did you cover the most important components? Did you test the sad path? The edge cases? What about the zero states?
Using Istanbul, you can generate a nice coverage report to answer these questions. In this article, we'll look at how to get it set up in a typical clientside JS project.
I was working on a Backbone project with fellow Quick Left-er Bob Bonifield recently, when we came across a problem. We were building an administration panel to be used internally by a client, and there were a couple of views that needed to display the same information about users in a slightly different way. To prevent unnecessary AJAX calls, we decided to cache the result of
Backbone.Model#fetch at two levels of our application. The result: less network time and a snappier user experience. Here's how we did it.
Here at Quick Left (Boulder), the office has a single restroom, and like ~30 or so employees. With that, employees were often faced with the harsh reality of making numerous trips to the restroom only to find it occupied, and subsequently needing to walk back to their desks.
As our slogan states, "We turn hard problems into great software", and thus we set out to find a solution to this problem, but of course no ordinary solution would do. We also needed something that would satisfy the inner geek in all of us.