Days of the Condor

Projects About

Writing your own CoffeeLint plugin

Nov 8, 2015

Recently I wrote about maintaining code consistency on growing teams using CoffeeLint. If you use CoffeeLint across many projects or with a large enough team, sooner or later you’ll come across a situation that isn’t covered by an out of the box rule.

CoffeeLint provides a plugin system that makes authoring your own linter easy. The implementation guidelines are outlined in Building Custom Rules. There are three different types of rules that can be implemented depending on your needs: LineLinter...

Using CoffeeLint for consistent code

Oct 8, 2015

As I write more CoffeeScript on large teams, I want to be able to open a file and understand code style with little cognitive overhead. Fighting with engineers over personal opinions about writing code is never worth the time. It’s a job for robots.

CoffeeLint is a tool that helps enforce code conventions. You specify a set of rules and let CoffeeLint blow up CI if things aren’t to your team’s collective stylistic taste.

The way we resolve differences of opinion on my team is that if you don...

How to build a living styleguide

Oct 4, 2015

At the time of writing, Bootstrap is the most starred repository on GitHub. People love it and it’s largely due to documentation. With styled output positioned alongside underlying markup, learning to build something that looks great is extremely intuitive.

Bootstrap is not only a nice looking design tool, it also holds Twitter accountable for the quality of their CSS. If the code is a mess or a half baked design gets out, it’s there for all 87,297 of those stars to see.

I’ve worked on projects...

Dead simple GitHub Page publishing

Sep 30, 2015

GitHub Pages are awesome. Combined with a CNAME record you have a Real Site on the Internet.

The most annoying part for me was always remembering the command to publish to GitHub Pages because I might be using a node tool, a ruby tool, or plain HTML, CSS, and JavaScript to create the site. Some of these tools have built in publishing mechanisms and others don’t.

Now, instead of relying on the tool to publish I have a really simple shell script take care of it for me. It’s one line and it’s...

CoffeeScript static analysis

Dec 16, 2012

For a while I’ve been looking for code quality tools to analyze CoffeeScript. I haven’t found anything very promising. So as part of a recent push to become more comfortable with Bash scripting, I decided I’d cut some corners and do it myself.

Here’s a utility function I wrote to help me color text. It colors output yellow when it’s within a warning range, and red when it exceeds a critical range.

#!/usr/bin/env sh

# set the output color based on conditions
set_output_color() {
  local value
Page 1 of 3
Next page