Archives For programming


Like it or not, if you’re not writing apps with AngularJS, you’re not getting much freelance work. This is sad news for a few reasons, but maybe not the reason you’re thinking.

I like to keep my finger on the pulse of what skills are in demand. I do this because I help coordinate training events and part of that is deciding what topics we’ll present. A few good ways to do that are to keep an eye on the job boards and freelance websites. It’s no surprise that job boards are still overwhelmed with work in the typical enterprise topics. Java, C#, Ops, etc. UX is getting more prominence, which makes me feel good (that’s my main job function these days).

The freelance websites are showing a different trend. There, AngularJS is blowing up. Many of the front-end development jobs specify AngularJS as a requirement. Continue Reading…


I read an interesting article on about Why Python is perfect for startups. I’ve done the startup thing a couple times now and I’ve spent a lot of time developing with Python. I just wanted to add a little balance to that article and point out a few things to consider before investing in Python as the foundation for your new business.

Yes, I know, I’m about to unleash a holy war. Putting down someone’s favorite language, tool, whatever, is bound to frustrate people. So let me put this argument to rest before we begin. These are my opinions based on my observations. You are 100% free to have different opinions than I have. And, if you can do so politely, you are absolutely welcome to voice your opinions in the comment section below.

With that out of the way, let’s highlight four big concerns: Continue Reading…


Have you ever been doing a little web development and needed a web server for local testing? This usually happens to me when I’m doing Javascript and want to use a little Ajax. Much of what you do will work fine with the classic file:/// protocol, but sometimes that just won’t cut it.

Yeah, we can always use MAMP or XAMP or maybe you have a web server (IIS, Apache or Nginx) installed locally. Then you have to either move your files to the web root or configure it to point to your project folder, then remember how to start it (edit that config file). I just found a simpler way… Continue Reading…

Photo Credit: Cayusa

It’s quite common to create an app where you want to protect numerous pages. It’s not difficult to check for req.user and force the user to a login page, but code duplication is not a good idea. Fortunately, it’s quite easy to write a middleware that will require authentication for a whole set or URLs.

First, we’ll set some assumptions: You’re using Express 4.x, you’re using router (is there any other way?) and you’re probably using Passport. I don’t think Passport is required for this solution, but it’s the only option I’ve tested with. Let’s assume that you’ve got a homepage that does not require authentication but the rest of your site, other than the login/logout/register pages, require authentication. Continue Reading…

Photo Credit: dzarro72

Recently I built a demo application using Sails 10.x (currently in beta) and needed to add authentication support to it. One of the challenges with this is that the documentation for the beta Sails is not complete yet, and much has changed. The documentation is still great, so I definitely recommend making it your first stop.

While browsing through NPM modules I found sails-generate-auth which looked like an excellent solution for authentication. Yes, it works, but unfortunately the documentation is not written very well. The Github page makes it look like all you need is a configuration file and you’re set. In reality, there is a bit more work to do. Here are the steps I took. Continue Reading…

Screen Shot 2014-01-08 at 7.59.38 PM

EJS “cleans the HTML out of client-side templates.” From that description, you’ll quickly realize that EJS was at first a client-side template library. It has been repurposed successfully to also be a good server-side client library for Node.js.

In my opinion, using the word “clean” in the same sentence as EJS is a bit misleading. It does have the benefit of being included as part of the Express library for Node.js, which makes it easy to get started with, however like some other libraries, it lost functionality when Express made the jump to 3.0.

By the way, this is one part of a 5 piece series, so if you want to explore other options, don’t forget to visit the series start where I explain the biases and summary information and link to all of the tutorials.

Continue Reading…

Jade logo

According to the Jade website, “Jade is a terse and simple templating language with a strong focus on performance and powerful features.” Similar to Python, it uses indentation to help keep track of tag nesting which forces you to keep your markup looking clean. Because there are no closing tags, the end result is very concise. I suspect that if you used CoffeScript and Stylus, Jade would feel very comfortable.

Furthermore, it is the default template language enabled in new Express.js apps. Therefore it is commonly featured in beginners tutorials and documentation. At first glance I found it very confusing. The tutorial featured on the homepage is quite trivial, and therefore isn’t very representative of real-world work. However, there is decent documentation that you can dig into. You’ll find that much of the documentation focuses on standard HTML syntax and less on the dynamic capabilities.

By the way, this is one part of a 5 piece series, so if you want to explore other options, don’t forget to visit the series start where I explain the biases and summary information and link to all of the tutorials. Continue Reading…

Standing Ovation for Davey Richards

Recently I was using a Node.js library that incorporated EJS and I wondered what factored into the decision to choose that template engine over some of the others. I realized that because of my familiarity with Mustache, when I started using Node.js I immediately started with Hogan.js (see my tutorial on how to supercharge Hogan with Express) and I hadn’t checked out the other popular options. What are the differences between Jade, EJS, Hogan, Handelbars and JSHTML? I’d never used most of them in a real project.

I decided it was time to change that, and figured that if I were going to do the research I might as well share the results with you. I thought I could just make one long post but wow it turned out to be long so I’ve chosen to split it into 5 separate articles, which I’m linking below. Before we get into the specifics, let me take a moment to explain my biases and tell you what I value so you can use my comparisons to make your own decisions. Continue Reading…


Last night Des Moines Web Geeks had a code dojo focusing on Firebase, a tool I’d seen demoed by a few locals, including Brad Dwyer‎ from Hatchlings. In under 2 hours three teams each built a secret santa app using only client-side HTML5, CSS and Javascript. It was awesome.

Firebase makes this possible by providing an abstracted server side component accessible using a pure client-side javascript API. This is called a Backend as a Service (BaaS) or in some cases a Mobile Backend as a Service (mBaaS) platform.

Another BaaS I’ve used, and one that has been in the headlines this week, is Stackmob, which was just acquired by PayPal. I’ve used Stackmob and am quite fond of it. Now, having some exposure to both, I realize that Stackmob and Firebase are very different products offering unique types of services, even though both are considered BaaS products. I thought I’d write up a little comparison of the two. Continue Reading…


Ruby has it. Node.js has it. Python has it. Java has it. And now, finally, PHP has it too! A built in web server for developing and testing applications locally! Let’s be fair, PHP has had this capability since mid-2012, but it wasn’t available on Mac OS until Mavericks launched in October 2013.

So now you don’t need MAMP to do local development. You probably just need a database, either the included sqlite3, the fabulous or MySQL (brew install mysql). Here’s how to get going: Continue Reading…