Cardinality Costs Me Money — And I Love It
High-cardinality logs and metrics can get expensive — but they're often the cheapest way to shrink your MTTR and keep your team sane. Here’s how I learned to love them.
Read moreDispatches from the grey area between correct and working
Thoughts on web development, programming, and technology. Sharing what I learn along the way.
High-cardinality logs and metrics can get expensive — but they're often the cheapest way to shrink your MTTR and keep your team sane. Here’s how I learned to love them.
Read moreShipping new features is exciting — but if you can't observe them, you're flying blind. Here's how I approach instrumentation before rollout, not after things go sideways.
Read moreRefactoring in the real world isn’t about perfection — it’s about clarity, safety, and knowing where the bodies are buried. Here’s how I approach it when the code is messy, the deadlines are tight, and the system can’t stop running.
Read moreYou're a frontend engineer. You're used to Node and TypeScript. But the backend is written in Java — and it's time to get your hands dirty. This post walks through a practical Java program that scans directories and runs decaffeinate on old CoffeeScript files.
Read moreA deep dive into how I stabilized a high-traffic merchandising widget by rebuilding it layer by layer—from fragile frontend to brittle backend.
Read moreIn the second installment we will finish rendering the whole app as well as add some basic URL routing to control the state of our app
Read moreES6 gives us new native js features that make making a SPA a little easier. We will be making use of modules, template strings (and "tagged template literals"), classes, promises, and arrow functions
Read moreIt's very common to use backbone's router to drive application state with the window's url. The basic idea is that popstate or hashchange events are matched to a hash of routes and invoke a handler function. This approach works well for changing views, but not so well for setting application state.
Read moreTouted as Node.js's best feature, streams are also one of the hardest to comprehend. Some of the mystique that surrounds streams is the lack of good documentation; there are plenty of online examples that show how to use pre-built stream objects (like and http request) but less on how to create custom stream objects that work within an application.
Read moreMySQL is not my strongest card. And rightly so. It is its own profession. People who are experts at MySQL are paid to be experts at MySQL. Everybody else just has to be somewhat familiar with the basic functions. However, sometimes these experts are nowhere to be found and you're left alone to design your own schema and perform your own optimizations. These are my experiences doing just that.
Read moreInspired by sequelize.js's module pattern, learn how to prevent circular dependencies but still have access to a modules exports.
Read moreQuick and dirty MySQL hacks: Check one tables entries against a join table, user a subquery in a where, check if an entry exists without actually checking, make a quick array with group_concat
Read moreOne frustrating part of learning how to use node is implementing JavaScript style OOP. I don't mean that Node's JavaScript engine is different than a browsers with respect to objects. What I'm talking about is understanding how to use objects in an asynchronous environment.
Read moreI was asked to build a Netflix/Amazon like star rating UI at a job interview recently and the interviewer implied that it could be accomplished completely with CSS. Even though I bombed that interview I still pursued this question and Im happy to say we can make a Netflix UI using radio buttons and child selectors.
Read moreBootstrap is usually my starting point when I approach a project (and if you have looked at my projects you would see that right away). I use it because it covers pretty much all my CSS bases and that leaves me time to focus on other parts of the project, like the javascript logic or polishing the UI.
Read moreOne thing I really like about Knockout is that it doesn't lock you into using any particular implementation for features that other frameworks might. In fact Knockout is arguably a library in that sense. So to get some functionality you have a choice of plugins (or you could just write your own). This is a look at the Knockout Mapping plugin.
Read moreHere's a collection of some simple best practices I've picked up while working with knockout.
Read moreKnockout observable extenders give custom functionality to observables. nuff said. No need to sell you on how useful that is. I'll just show how I used extenders in a recent project.
Read moreKnockout's custom bindings are awesome. If your view has bindings are getting out of control or you have some complex functionality then custom bindings are for you.
Read moreI'm in the process of rewiring the backend for Ethernet Bucket using Express. If you don't know what express is, here's a good primer. The goal today is to write something that can take blog entries in MongoDB (that part not covered) and turn them into web pages.
Read moreWith a little work, node can be used as a complete web server, but it's probably something you shouldn't do. Node's speed is limited when it comes to traditional web-server applications because it runs inside an interpreter (like all javascript) and just wont be as as fast at things like reading from disk.
Read moreA good jumping-off-point when writing your node server is to use a handler function to route all HTTP requests to their proper functions. If you write functions that are specific to a url such as providing a web service that reads from a database and then writes back XML or JSON you can use an if-else block or a switch block to route the request to the function.
Read moreAjax is a method of using Javascript to load resources without causing the page to be refreshed. Traditionally when you click a link on a webpage, the browser asks for that page and renders it in place of the previous page. Ajax offers an alternative for situations when page refreshes aren't ideal.
Read moreIt used to be pretty difficult to add and remove classes from page elements. Using vanilla JS required making a regular expression to search the elements class attribute for a match. JS libraries simplified the process but now HTML5 makes it even easier
Read moreDataset allows for valid use of custom HTML attributes, prefixed with "data-" Before HTML5 you could use custom attributes at will but it would not be valid HTML. One of the things dataset does is make this practice pass validators and it allows for more easy access of custom attributes with javascript.
Read more