HTTP 103 approved as new status code

Well, this is pretty cool: HTTP status code 103 approved!

An HTTP Status Code for Indicating Hints

A new status code that lets the server send headers early, before the main headers

Example from the docs:

     HTTP/1.1 103 Early Hints
     Link: </main.css>; rel=preload; as=style

     HTTP/1.1 103 Early Hints
     Link: </style.css>; rel=preload; as=style
     Link: </script.js>; rel=preload; as=script

     HTTP/1.1 200 OK
     Date: Fri, 26 May 2017 10:02:11 GMT
     Content-Length: 1234
     Content-Type: text/html; charset=utf-8
     Link: </main.css>; rel=preload; as=style
     Link: </newstyle.css>; rel=preload; as=style
     Link: </script.js>; rel=preload; as=script

Using json-server for local mock API

I keep a boilerplate Rails 5 API-only app among my repos for rapid API building, but sometimes I just want a basic structure to query against (without having to deal with a complete stand alone Rails app).

Enter: json-schema-faker and json-server

Cory House has put together a great tutorial on how to build and serve a json database in 3 easy steps:

Typed by a human or scanned with barcode reader?

Simple check to determine the speed of user input into a form element. This was to prevent users from typing in barcodes that were required to be entered using a barcode scanner.


<!DOCTYPE html>

<head lang="en">
    <link type="text/css" href="" rel="stylesheet" />
    <script src=""></script>
    <script src="check-input-speed.js"></script>
    <meta charset="UTF-8">
    <title>Monitor Form Input Speed</title>

    <div class="row">
        <div class="col-md-2"></div>
        <div class="col-md-8">
            <h2>Human or Barcode Scanner?</h2>
                <input type="text" id="input_to_check" class="form-control" />
                <div class="row">
                    <div class="col-md-12">
                        <span id="CPM">0</span>
            <div id="analysis">
                <div class="alert alert-danger" id="human">
                <div class="alert alert-success" id="barcode_scanner">
                    BARCODE SCANNER!




$(function() {

var iLastTime = 0;
var iTime = 0;
var iTotal = 0;
var iKeys = 0;

function checkSpeed() {
  iTime = new Date().getTime();
  var cpm,
    wpm = 0;
  if (iLastTime != 0) {
    iTotal += iTime - iLastTime;

    cpm = Math.round(iKeys / iTotal * 6000, 2);
    $("#CPM").html("Characters per min: " + cpm);

    if (cpm < 300) {
    } else {

  iLastTime = iTime;



That node.js so hot right now

I remember when I thought, MooTools, Prototype, Backbone, and jQuery were all revolutionary. Now we have Node.js and the ability to run a server using JS.

My understanding is that Node is a C++ app that wraps the Google V8 engine and extends its ability. You get access to the underlying C++ by way of JavaScript. Incredible.

I have a distinct appreciation for JS because of it being based on the ECMAScript specification, which is the same standard that ActionScript3 was created. Looks like it might be time to transpile some my old AS3 files over into JS.