Using Cookbook Documentation to Pass on Knowledge

Documentation is hard. Like writing code, it is a delicate balancing act of packing information into a format that is both very dense and very readable. Going too far in either direction severely limits its usefulness.

While ramping down a client project recently, I was asked to provide documentation and guides for the JavaScript application stack the company was using. Talking such a broad topic in a useful and consumable way was a daunting challenge. Read more on Using Cookbook Documentation to Pass on Knowledge…

Speeding Up Your JavaScript Test Suite

Having fast tests is important. Slow running tests slow down development, especially if you’re practicing TDD. If tests are too slow to run, some developers may avoid running them altogether. Slow tests will also slow down CI builds, increasing the length of your feedback loop.

While it takes more development time, doing maintenance on your test suite to ensure it continues to run quickly is an important task that any significant project should prioritize. Read more on Speeding Up Your JavaScript Test Suite…

Testing Asynchronous Behavior in JavaScript with Selenium

Full stack browser testing of web applications is awesome. It validates that your application works end-to-end and allows you to check actual user workflows. For the last year and a half, I’ve been using Selenium to test a JavaScript web application we’re developing using Backbone.js.

Unfortunately, web apps that use JavaScript a lot can be challenging to test with Selenium. Read more on Testing Asynchronous Behavior in JavaScript with Selenium…

Hooking up Custom Jersey Servlets in Dropwizard

I’ve been using the Dropwizard Java framework for about a year. It’s a great web application stack for making RESTful service with Java.

I recently ran into a situation where I wanted to add custom servlets to a Dropwizard application. Read more on Hooking up Custom Jersey Servlets in Dropwizard…

Read more on Hooking up Custom Jersey Servlets in Dropwizard…

Answering Client Questions – 5 Alternatives to “I Don’t Know”

I’ve learned a lot of things in my time at Atomic Object, most of them falling into two categories: how to write great software, and how to be a consultant.

One of the most important skills I’ve learned in the latter category is how to always have an answer for a client.

Read more on Answering Client Questions – 5 Alternatives to “I Don’t Know”…

Serving Static Assets with DropWizard

Over the last few months, I’ve had the opportunity to do a lot of work with DropWizard, an awesome Java web framework for developing RESTful web services.

I was recently prototyping a small application, and I wanted to serve static files directly from DropWizard. While this isn’t what DropWizard is primarily designed to do, I didn’t want to go through the process of setting up another web server just to serve static assets for a prototype. While DropWizard has some out-of-the-box support for serving static assets, I found the documentation surrounding it to be incomplete and confusing. It actually took me a couple hours of debugging to figure out how to do exactly what I wanted, So I thought I would document what I learned here.

My end goal was to serve a small single page JavaScript app on the root of my DropWizard application, while having my DropWizard REST endpoints available at /api. The limited documentation around serving assets in DropWizard suggest that setting up an AssetsBundle for / and changing the application context path in your config file should be enough to achieve this, but that did not work for me. I had to do the following steps: Read more on Serving Static Assets with DropWizard…

Marionette.js Behaviors, Part 1: The Basics

Part 2: Testing Behaviors is available here

Marionette is a Javascript application framework built on top of Backbone. It provides great features missing from core Backbone like collection views, subview management, and abstractions for building event driven applications.

Extracting Duplicate Code with Behaviors

Marionette.Behaviors are an abstraction for sharing UI code between different views. They are a recent addition to the Marionette toolbelt (added in version 1.7). Prior to the introduction of behaviors, code sharing between views in Marionette had to be handled at the Javascript language level with inheritance or by delegating to external modules.

Behaviors are designed to be loosely coupled and injectable. A behavior knows about the view it is injected into, but the view does not know the details of the behavior. This helps to keep behaviors abstract and reusable between views. Lets take a look at a couple simple Backbone views and how they could be refactored using Marionette behaviors. Read more on Marionette.js Behaviors, Part 1: The Basics…

My Favorite Emacs Add-Ons

I love Emacs. I’ll take it hands down over vim, Sublime, Atom, and company any day. I thought I would take some time to list some of my favorite bits of Emacs and how I use them in my daily workflow.

1. Magit

Magit is an Emacs interface for git. Beyond that, it’s the best interface for git I have ever used — better than the git CLI or third-party apps like SourceTree. Magit reduces most git commands (and all of their cryptic flags) to a series of one-character shortcuts. It also introduces interactive status and log buffers that are comparable to any other git gui out there (and better than many). The best part is that version control becomes part of my editing workflow and requires no context switching. Overall I find that it massively speeds up and simplifies my git workflow and encourages me to use my VCS to its fullest extent. Read more on My Favorite Emacs Add-Ons…