Reading List
The most recent articles from a list of feeds I subscribe to.
Custom event for detecting fetch errors in Backbone.js
One of Backbone’s major strengths as a javascript MVC framework is the way it helps you do event handling. By extension, it’s also great for handling errors that result from failed AJAX calls. As you can see in the Backbone.js documentation, the error event is triggered when a model’s attempt to save fails server-side. However, there is no Backbone event that detects when the fetch event fails. Since a fetch from the server is the first thing that happens when a page is loaded, you would need to know if it fails because that could indicate that the API is down or some other server error.
Quick Tip: Use jQuery to Complete an Arbitrary Number of AJAX Calls Before Firing an Event
Somewhat recently, I encountered an issue where my expected user input is an arbitrarily long list of words. While I could get the word count, I had no reliable way to know whether all of the ajax requests had been completed before firing an event that created a list of definitions for each word. I had several realizations in my quest:
I could do the entire process synchronously. However, this meant that one bad ajax return or error could cause the entire process to hang.
Avoiding the OOM Killer by limiting the number of Apache2 processes and clients
Prologue Last week I had the following mortifying experience: I tried to ssh into my box hosted at RackSpace and nothing happened. It simply hung, and never prompted me for my password. Commence panic. I determined that port 22 was, in fact, open, and I was connecting to the machine at some point.
nc -zw3 monicalent.com 22 Connection to monicalent.com 22 port [tcp/ssh] succeeded! telnet monicalent.com 22 Trying 198.
Projects
TinyPilot (2020 - present) TinyPilot is a small, inexpensive device that gives you remote access to servers before they even boot.
Refactoring English (2021) Refactoring English: Effective Writing for Software Developers is my upcoming book that teaches developers practical tips to improve their writing.
Hit the Front Page of Hacker News (2021) Hit the Front Page of Hacker News is my video course that shows how I write high-quality blog posts that succeed on tech sites like Hacker News and reddit.