Wanna learn backend and build stuff?

Then read this article.

General advice

Rule of thumb I personally have is to get a basic intuition of something by reading/watching stuff and then really learn by building stuff (with resources by your side). For example, if I was to try to learn Android app development, I’d spend ~1.5 hours reading the reference of Java and looking into the actual IDE and then I’d try to create my first app using the Internet as I go along. The latter takes a lot longer than the former, but I get more hour by hour value.

This is more effective given greater experience in programming in general, but I think the ratio between consuming:building is equal across different experience levels. For example, I would recommend a newbie in programming spend 10x (just a guesstimate) what I’d typically spend on the “consuming” part and 10x on the building part.

I think this is important for both fulfillment (so satisfaction in what you are doing) and in trying to become a “learning machine”. I’ve seen many people quit coding right after they start because they don’t get the purpose in sitting down and consuming a few resources for weeks on end. That makes sense to me. It’s much more captivating to get something to work than to get to the bottom of a page.

You can really only get meaning and direction from trying to create something. In doing so you will come across many obstacles that you need to learn to solve. 99.9% of the time, what you learn while creating stuff will generalize to the domain you’re working in. That means you’re equipped to build something new.

The best thing you can do is build things where scope grows on an exponential scale. So, for example, my first real app was a simple, ugly calculator. My sixth real app was a full-fledged social network. If your projects keep increasing in breadth then you will devour more and more information and know more about technologies and become a “learning machine”.

TL;DR: learn by doing.

This article is specifically for building backends using Node.js.

Learn Javascript

Node.js is just a “runtime environment”. Javascript is the actual language you write in (thus the “.js”). So you need to know it.


Javascript reference:

Good community:

Learn Node.js

Hands on course:

YouTube tutorial #1:

YouTube tutorial #2 (probably better but less fun/interesting):

Level by level challenges:


Learn the theory

Not necessary but would help a lot:

A good reference:

Test out your own or existing REST APIs using a Google Chrome extension, eg:

Learn UNIX

If you’re building backends you’ll need to work with Terminal and know the different commands (UNIX). Personally I just improvised as I went along but I found some good links:

A good reference:

IMO don’t worry too much about this. You’ll learn as you go along.

Learn about databases

Get an intuition of what they are with these resources. With databases you generally have either SQL and NoSQL. Let’s assume you want to learn about NoSQL:

There are many resources online for learning SQL. But my aim is to get you familiar with MongoDB, the main NoSQL databases that a lot of Node.js developers use.

(First you need to install it, by the way.)

Reference for MongoDB:

Now put it together with Node.js:

However, you’re best using the “Mongoose” module from NPM which makes things a whole lot easier:

Learn about serving webpages

Alternatively, instead of Handlebars, you could use Jade:

Look at AngularJS:

Tips for Node.js & Backend

  • Use Express to build your APIs
  • Use Socket.io for chat
  • Meteor.js is good for real time applications
  • Use Async to parallelize tasks
  • Put all your “routes” in a separate, dedicated routes file
  • Use Passport.js for authentication
  • Look into Redis for storing things like cookies (or generally where a database is overkill)
  • Use “cron jobs” to schedule tasks like running a moderation algorithm every 30 minutes
  • Don’t bloat controllers and models with too much logic
  • When you’re building side projects for fun, abuse NPM (do not otherwise)
  • Never sync node_modules folder (if you’re using NPM) to your git repository. Put it in .gitignore.

Don’t know what NPM is? If not — NPM stands for Node Package Manager, a dependency manager. It’s basically a portal where programmers publish their “3rd party modules” for Node.js. If that doesn’t make any sense, just think of it this way: you want to let your backend send push notifications to iOS devices, but that’s a lot of new stuff to learn + code. Instead, you can find a pre-existing library — or “module” — online that already does this that you can integrate into your code pretty easily. You just have to type:

awesome_module.sendPushNotifToDevice(<enter device here>, <push notif message here>);

You don’t have to code “sendPushNotifToDevice()” because the module already does. You can obviously imagine dozens of uses for this. NPM is a way to quickly add and manage modules in your applicaiton.

Here you can find a repository of modules that you can use. There will also be details on how to install and use it:


Optimization is important with Node.js:

Build your first [REST] API or “web application”

Hmm. I don’t know which resource is the most helpful. I’ll just a link a few. Maybe go through each one just for practice. Some of this might be outdated though, with reference to the modules.

This seems to be the most comprehensive one, and you can deploy it with Heroku:

Learn about deploying your application

Start with DigitalOcean.

You might also enjoy Heroku. It’s easier.

Then move on to something more legit like AWS or Google Cloud.

Make a social network

You could follow this tutorial. By this point though I’d expect you can find your own resources. I’m just piecing together random stuff I’m checking out online for reference to what is possible to find:

This is some good reference code for a social network:

Also, PM me and I can share parts of the Contra codebase (depending on who you are).

Resources to help you build things

The internet. Seriously — really any webpage or book that can help you fix the next bug or implement the next feature.

Google is your gateway. You have to ask a lot of questions. And you need to ask them because you’re curious about the result and really ambitious / you need to work towards your goal. From this, ruthless researching skills will naturally emerge. Ask people because the internet can’t give you a good answer, not because you want to impress somebody (this is a mistake I’ve made myself).

Also, this article:

Questions (AMA)

Message me for questions