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...
November 16, 2014

Bye bye Grunt, bye bye Gulp. Hello package.json.

Build systems. The eternal blight of software development. The necessary evil that causes hair loss at a way to young age. Ok, maybe it’s not all that bad. But we’ve all been bitten by them. The build systems. Anyway. I’ve never liked Grunt. There I said it. The configuration style doesn’t fit me. I’ve always thought it was too configy and clunky. Then came Gulp that promised a straightforward pipe-based API.

Read more...
September 19, 2014

Lazy Properties in Swift

Continuing to use my blog as a reference for myself and a summary of stuff I’ve learned about here’s a post about Swift! I’ve spent some time now trying to write a little app, and I recently wanted to set a custom dataSource on one of my tableviews. The problem was that I wanted to keep a reference to this dataSource in my table view controller (which I might actually not need since it’s always there via the tableView property).

Read more...
September 19, 2014

The Obsolescence of the Apple Watch

There’s been some talk about the Apple Watch and how getting people to spend the big dollars on a gold watch might be a tough given how the technology inside of it will be “obsolete” within just a year or two. John Gruber writes on Daring Fireball: It’s a computer. And all computers have lifespans measured in just a handful of years before obsolescence. If you buy a $6,000 mechanical watch and take care of it, you can expect it to outlive you and become a family heirloom.

Read more...
September 18, 2014

Set Your npm init Defaults!

I was just now catching up on some old NodeUp episodes. In the one about the npm client they talked about some nifty stuff you can do with npm init by setting some defaults. So I just wanted to share this to those who don’t listen to the podcast (you should) and for myself as a reference: $ npm config set init.author.name "Simon Ljungberg" $ npm config set init.author.email hi@iamsim.me $ npm config set init.

Read more...
September 5, 2014

Web App Architecture Discussion

Brent Simmons, of Vesper fame, just posed an interesting bunch of questions. About the structuring of bigger web applications. Since I’m part of building one of those I thought I’d share my thoughts on the matter. In his post Brent talks about the pros and cons of splitting the different responsibilities up into different applications. I, for one, am a strong advocate of splitting it up. This is the list of components he lists:

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...
April 23, 2014

Cleaning up Your Git Repo

If you have ever worked in a team with more then one person, on a project managed with Git and this project was run using something akin to git-flow you have probably seen repos with tons of “dead” branches. Branches that were used for pull requests or features that has long since been merged. Isn’t that annoying? Why would you need all those branches in your local repository? I don’t want them in my repo, that’s for sure!

Read more...
March 25, 2014

Jank Free

Speaking of improving web experiences. You should check out Jank Free. A page from developers at Google promoting techniques for creating jank free (60fps) web experiences! I can specifically recommend this video where they talk about how to use the Chrome dev tools to identify performance problems on your website.