Automating pre-deployment sanity checks with Grunt

Sam Carr wrote “Grunt is a great tool for building, running and deploying ‘Single Page Apps’. I have a single grunt command to build and deploy to S3 for production, but recently I added some extra functionality to make deployment safer and even easier: Abort if you are not on master branch Abort if there are any uncommitted…”

Things I wish I’d known about Google Docs

Sam Carr wrote “I have had cause to write a lot of Google Docs recently, which leaves me furnished with a stock of interesting observations that others might find helpful. With no further ado… It doesn’t auto-number headers I typically want my business-like docs to have numbered headings, so an H3 might be “2.4.1. Architecture considerations”. Word can…”

Super-simple JavaScript inheritance

Sam Carr wrote “JavaScript uses prototype-based inheritance, which can prove a bit of a puzzler for those of us used to class-based object orientation. At first glance it seems like it’s basically the same and as if it can be used in very nearly the same way. If you pretend that those prototype objects are in fact classes…”

CSS Transitions can’t animate display change

Sam Carr wrote “I’d like to demonstrate a fairly simple CSS issue that caught me out, and the straightforward solution. Put simply CSS Transitions do not work if there is a change in the display property as part of the same change that fires the transition, but you can workaround this by separating out the display change. If…”

A simple Knockout page router

Sam Carr wrote “Knockout.js is a pleasantly simple approach to data-binding ViewModels into your HTML. Like many JavaScript libraries it sticks to a core mission with a few simple concepts, which makes it quite approachable. Its simple template support means that you don’t need to write much code to get a top-level page router going in your single…”

Getting back into front-end web development

Sam Carr wrote “I’ve been working on a small SPA (Single Page Application) – just HTML, CSS and JavaScript statically served and doing its thing entirely in the browser. I learned a great deal throughout the project, but here are some of the things that strike me as most valuable. Get a good workflow going I used Grunt…”

A study in Scala

Sam Carr wrote “Cards on the table: I like Scala. Right now it’s my go-to general purpose programming language, but I know that many people have a dim opinion of it, or appreciate its positives but are heavily conflicted by its negatives. Actually I do put myself in that latter camp, though I think I’ve got deep enough…”

Grunt uglify file specs

Sam Carr wrote “I struggled a bit finding relevant examples of Gruntfile configuration for Uglify, so having solved a few specific problems myself, here’s what I came up with. This is just a snippet from the whole Gruntfile of course, and contains half-decent comments already, though I’ll provide some extra explanations below to point out the most interesting…”

CodeMesh 2013 Redux

Sam Carr wrote “Last month I attended the CodeMesh conference here in sunny London, along with a couple of my colleagues. Here are my recollections and thoughts. The venue (Hotel Russel on Russel Square) is a pleasantly rambling, grand old hotel, which hosted a few hundred hardcore geeks fairly well. A couple of the rooms were a bit small and…”

By Shamsuddin Muhammad from Fort Hood, TX, USA (Jack Swagger) [CC-BY-2.0 (], via Wikimedia Commons

Documenting an HTTP API with Swagger

Sam Carr wrote “I recently tried out Swagger, for documenting an HTTP API. The big win with Swagger is that it provides a sweet HTML UI to browse your API docs and experiment with sending requests and viewing responses, which is a great experience for other developers that are trying to get to grips with your API. Try…”