Apache 2.4 and 500 Errors in Htaccess

I upgraded my main server from Ubuntu 12.04 to 14.04 yesterday and after the upgrade Apache didn’t want to serve anything but 500 errors. Turns out that Ubuntu 14.04 brings with it an upgrade to Apache 2.4 (used to be 2.2). One of many issues were errors stemming from .htaccess files. Here’s how to fix those.

Read on

Quick and Dirty Option Parsing in Node (or Why Eval() Is Not Evil)

My latest project is broken up into a Ruby core (for the server) and a number of front-end modules for things like themes and dashboard design. I needed a way for developers working on the front-end modules (which are structured as Node/npm compatible packages) to be able to install the built files into the core project. Grunt tasks only work in their root directory and the complexity of the tasks called for something that could be extracted out of the projects and be reuseable. So I’m writing a Node CLI utility. The first problem that needed to be solved was option parsing. This is a story of the state of option parsers in Node, how to write one yourself, and why “eval() is evil” is misunderstood.

Read on

∞ How Novices Debug Code

A few months ago I debugged a real hairy issue involving dependencies on different machines running the same cloned git repository. I had begun to write a real lengthy post on how novices debug code vs. how experienced programmers do it. Today I came across this article that explains it much better than I ever could. You should check it out. My thoughts on it are after the jump.

Read on

Sublime Text Keyboard Shortcuts

I’ve been using the amazing Sublime Text editor since it came out a few years ago and ended up learning all it’s neat shortcuts almost by accident. Today I want to share all of them. They’ll be here for me to reference and for anyone else who wants a quick and easy reference for Sublime Text shortcuts they don’t know and may want to take advantage of one day. All credit goes to the Sublime Text Unnoficial Documentation for this.

Read on

From IDE to Plain Text Editor

Clients, friends, acquaintances, and hobbyist developers will often ask me “what program” do you use to make websites. No matter how many times I hear the question I’m always taken back. I don’t know how to answer that question. Inevitably, each time I respond in an annoyed/confused tone “What do you mean”? Professionals talking amongst themselves will speak about IDE’s, text editors, terminal emulators, and other specifics, each of which are actually far simpler tools than the one that the less skilled are hoping you’ll tell them is the best. So how is that we go from complex IDE’s like Dreamweaver to simpler tools like text editors as we get better at our craft?

Read on

Random Issues on OS X After Installing Xcode

Ever had some strange things happen on the Mac command line? Have you installed or updated Xcode recently? The issue is most likely related to the command line tools. Before you tear your hair out, make sure you check these possible solutions first.

Read on

Ignore Your Ruby Tooling

Working in Ruby, as with most scripting languages, you’ll find yourself with a bunch of dotfiles littering your project’s root directory. Dotfiles serve their purpose and take care of a lot of configuration and setup. When you’re working alone you create them and never think about them again but when you’re working with a team or on an open source project you end up having to make the difficult decision of what goes into your .gitignore file. Don’t let this argument play itself out again. It’s pretty clear what should and shouldn’t be checked into version control and every project should have a policy backing that decision.

Read on

HTML5/JavaScript Cargo Cult Beliefs

There are tools and techniques we use and rules we follow every day that make absolutely no sense but we follow along anyway, nodding our heads, evangelizing, and looking down on all those poor “developers” on StackOverflow who haven’t yet heard of our new HTML5 Boilerplates. Poor souls must be developing in a third world Internet.

Let’s all take a minute to slow down, review our work, and starting asking ourselves why we’re following along with some of this cargo cult programming crap. These are a few of my favorite examples of things we do or put up with that don’t make sense.

Read on

∞ Font Awesome Icons Showing Up as Squares

Today I finally upgraded to Font-Awesmome 4, adding it to a new project. I installed it with Bower, referenced it, then used it. When I opened the page in my browser the icons all show up as squares. Usually I’d start digging in the console and start checking headers but luckily I Googled first and this is what I found. Rather than take credit for it myself, here’s the solution for those of us who are experienced developers who somehow messed up Font-Awesome. The short answer is, they added a new class. You have to add fa as well as the normal fa-iconName class to each <i />.

∞ User Authentication in a Client Side JavaScript App

I’m in the middle of a pet project of mine (also writing related like Write.app) and in the course of my research on client side user sessions, I came across this great article which introduced me to the concept of JSON Web Tokens. They’re an awesome concept. I once wrote about my own homegrown method of protecting API keys in an Angular app but JWT seems like it might be a better idea in this case.

Read on