Recent Posts

Understanding Promises in Angular

Many of us were saved from callback hell and arrived in the Promised Land. Our code was flattened, control logic flowed gracefully, and our errors were tamed. But alas, there was still confusion to be found in this land of enlightenment.

For those of us who found ourselves working in Angular, the way the $q Promise library works can be a bit surprising. This post aims to help get rid of these surprises.

Read On

Harmonizing with Vi-Nature

After using Vim for a while, it is likely that you have found yourself to be incredibly productive within it. Those moments when you have to step outside, however, can be painful. But they need not be.

Vim itself is just a text editor. Vi-nature, though, is becoming increasingly universal.

"Vim is not permanent. Nvi is not permanent. Vi itself is not permanent, only vi-nature. Emacs has vi-nature, nano has vi-nature, even Notepad has vi-nature. You narrow your sights, you grow attached, and hence you do not grasp the true value of your poem’s subject."
Master Wq, Vim Koans

I've listed some applications that support the key-bindings you've become familiar with, along with some instructions on how to get them working.

Read On

Removing Distractions From Vim

Updated: 30 Nov 2013

Sublime Text is a text editor that has rapidly grown in popularity. While I still prefer Vim, I love some of the features that Sublime Text has. Among them is something called Distraction Free Mode.

As one might expect, there are plugins that aim to bring similar functionality to Vim. VimRoom and Distraction Free Writing With Vim are the two that I am familiar with. I had issues with both of them, but they may work out for you.

Out of frustration, I ended up writing my own plugin called LiteDFM. I wasn't really trying to do anything complicated, but I ended up with a poor man's Distraction Free Mode (DFM).

Read On

Working with Laravel on OSX

Note: This guide was written for Laravel 3.

In case you haven't heard, PHP is becoming cool again. I say this as a joke, but there's a ring of truth to it. With the advent of things like Composer, PSRs, and improvements to the core of PHP, things are beginning to look bright for PHP once again.

Among the shiny new things is a framework called Laravel. It's described as a framework for web artisans, and that's precisely what it is. Before you can start developing in Laravel on OSX, however, you need to make sure you have all the little bits and pieces you need. This is just a little guide to help you blitz through the process. The assumptions I make are that you have:

  • A somewhat recent version of OSX
  • Installed command-line tools from Xcode
  • Installed Brew
  • At least some level of comfort with the command-line

Read On

Getting Started with Vim

This is a brief guide to get you acquainted with using Vim in the terminal. If you're reading this, you've probably heard of Vim already. For those that haven't, it's a text-editor that's a bit different than most. It's optimized for touch typists, and eschews the use of a mouse in favor of keyboard shortcuts. Rather than binding controls to modifiers such as the Ctrl or Alt keys, Vim makes use of different editing modes. When you're just navigating your code base, you're in NORMAL MODE.When you want to type in text, you go into INSERT MODE. This talk of modes might not make sense just yet, but read on, and you will see the light.

I won't lie to you, Vim has a steep learning curve. It can be intimidating at first, even daunting. In the beginning, you will feel sluggish, wondering why it's so difficult to do basic things. You will be confused. You may even be frightened. It'll take some time, but the rewards will prove to be worth it in the end.

Read On