Tech Tip

Navigating an AMD codebase in Sublime Text using Static Analysis and Node.js

When you have a large JS codebase that uses the AMD module pattern, like we do at Bēhance, it becomes tedious to perform certain tasks within your editor. This hurts productivity and adds up to wasted developer time in the long term. Here are some of the problems and possible/existing solutions.

(more…)



JS: Auto-generate Grunt tasks using Static Analysis

If you’ve been around modern tooling in front-end web development, you’ve likely run into task runners like Grunt and Gulp. Grunt uses a declarative way of defining tasks via a large configuration JavaScript object that gets fed into the Grunt engine. Gulp takes the more programmatic approach, using JS stream-centric code to define tasks. The battle comes down to configuration vs code when comparing Grunt to Gulp, respectively.

Personally, I’d prefer to have no configuration and no code. Ideally, tooling should help me avoid having to write that boilerplate. In this post, I’ll talk about the feasibility of automating front-end build processes and auto-generating Grunt tasks. The ideas are used in an experimental tool called YA that explores solving this problem.

(more…)



JavaScript: Mocking an npm install for your tests

I’m writing tests for a node.js tool that I’m working on and hit a snag in trying to mock (i.e., simulate) a dynamic npm install of a module within a subdirectory. I tried a bunch of ideas and ended up with a simple, perhaps not ideal, but effective solution.

(more…)



Technical interviews are actually good for you

Programmers, both new and experienced, have a hard time getting away from technical interviews: the “large-company” style of interview where you’re asked to work through an ambiguously-stated programming question with an interviewer who already knows a wide-range of solutions to the problem. There are pros and cons to this interview style; I personally don’t like it at all. However, preparing for technical interviews can teach you a a lot about yourself. I’d like to share my own findings, in case it helps a programmer with similar problems.
(more…)



Javascript: An Exploration of Prototypal Inheritance

Eureka! That’s the feeling I had when I finally saw how Object.create could help me in achieving the inheritance-oriented behavior I was after. I’d been reading lots about prototypal inheritance in JS and understood bits and pieces, but it finally started to click recently. Here are some thoughts and (intentionally simplified) explanations that will hopefully help you toward that eureka moment.
(more…)



Large-scale JavaScript: A monolithic service layer

When I started architecting the initial JS apps for YouNow, I sought to build structures that could be used both by our Backbone.js applications and one-off scripts/projects. These structures grew quite quickly over time; they became monolithic. In this article, I’ll examine the motivations, pros, and cons of a backend api service layer and suggest/brainstorm alternative implementations.

(more…)



Developers vs. Engineers

There is a clear behavioral difference between software developers and software engineers, though the terms are often, incorrectly interchanged. Through my own experience and observations, I hope to not only shed some light on the difference, but encourage developers (my target reader) to strive to become engineers. If you find this post helpful, feel free to tweet at me: @mrjoelkemp.

(more…)



Learnings from Client-side and Server-side rendering in Backbone.js

In this article, I’ll talk about the high-level technologies and pros and cons to go from a fully client-side to server-side rendered application with a supplementary Backbone.js app on top. This article draws on about a year of experience using both techniques on production apps at YouNow.

(more…)



OSX: Have both a static and dynamic IP address at the same time

Here’s how you can set up OSX to have a DHCP IP address and a Static IP address at the same time. Some tutorials on configuring a static IP will tell you to change your network interface to a manual configuration, but although that works, it prevented me from also using the internet. Plus, you’d have to remember to switch back to DHCP configuration. There’s an easier way.
(more…)



Backbone.js: Better error visibility

Here’s a quick tip that should save you some hair and a few debugging hours when dealing with errors generated during Backbone.Events pub/sub.
(more…)