October 9, 2015

Live Debugging Node.js in Vim: update

Just wanted to post a super quick update! Since posting my article a few months back there’s been some activity in the repository for the node-vim-debugger! Looks amazing! (If I was the kind of person to take credit for stuff I’d like to imagine that I sparked the burst of development creating an issue. Luckliy I’m very humble and would never do such a thing. ;))

August 16, 2015

Node's Require and Browserify: Take 2

A while back I wrote about taking advantage of Node’s require algorithm with Browserify. While I liked the concept of doing that I never really liked how it made things look file-wise. Well. Turns out you don’t need to wrap your little module in a directory or give it a package.json! Say you have a module called… let’s say do-some-math that exports some fancy math functions that are unique do your project.

Read more...
January 5, 2015

Building an app with Ampersand.js

Throughout 2014 I’ve noticed lots of activity in the JavaScript framework space. Tons of interesting things are happening. Ember is working on FastBoot which seems super interesting. And also in proximity to Ember is the work on HTMLBars. I’ve never spent that much time looking at Angular, and frankly its philosophies don’t seem to align with mine. Nonetheless, lots of activity all across the board. There’s also React.. and probably a million others that I’m currently blanking on.

Read more...
December 22, 2014

Taking advantage of Node's require algorithm with Browserify

This morning I read a post written by Paolo Fragomeni. In it he describes how he builds stuff without using a framework. The part that was really eye opening to me though, was the fact that you can have a node_modules directory in other places than in the root of your project. Thinking about it it seems kind of obvious. However, it is an easy thing to overlook. Paolo didn’t dive too deeply into the nitty gritty details, so I’ll lay it out in this post.

Read more...
August 13, 2014

Live Debugging Node.js in Vim

I just discovered something pretty neat. There’s a Node module called node-vim-debugger that let’s you debug running Node processes, right inside Vim. And it’s insanely simple. First do: $ npm install -g vimdebug This will install a global module that you’ll use to facilitate a connection between Vim and your Node process. Then let’s create a simple Node server to illustrate. Save it as server.js. var http = require('http'); http.createServer(function (req, res) { debugger; var foo = 5 > 7 ?

Read more...
August 10, 2014

Delegates in JavaScript

If you’ve ever done any iOS or Mac development you’re probably pretty familiar with the delegation pattern. If you’ve never set foot in Cocoa land you’ve probably never heard about this (or at least not used it). Basically delegation is a way of specializing an object and removing certain “business logic” from it. For example, take the UITableView on iOS. That’s the class responsible for displaying all those lists you see on the iPhone.

Read more...
January 1, 2014

How to Correctly Defer Loading of JavaScript

Stumbled upon this article about defering the loading of JavaScript in a good way. Using the old ways of placing scripts in the footer or other causes a big delay in the document ready event. Which is when your page has actually finished loading. This method triggers the loading of the script on that same event. The methods of inlining, placing scripts at the bottom, using “defer” or using “async” all do not accomplish the goal of letting the page load first then loading JS and they certainly do not work universally and cross browser.

Read more...