Why you should use Chart.js as your chart library—and how to make the most of it when you do

In this article I’m going to cover:

Why Use Chart.js?

You have many options to pick from when it comes to Chart libraries. I picked Chart.js because it had all the features I needed, is the most popular Chart library, with frequent updates, and has good support for React. …

If the code works, a machine can understand it. This is the lowest bar you can strive for as a programmer, writing code that only machines can understand.


Human beings are much harsher critics than computers.

Another dev’s face while looking at your code w/o comments

Writing code that is easy to understand by another human being is a much harder task.

Humans care deeply about comments, variable names, and file/folder structure because these all contribute to the context that allows another programmer to infer what you are trying to do.


When I learned about Stacks, I wondered what a practical use case for them would be. One of the most common use cases for a Stack is to implement “Undo” (e.g. +Z or Ctrl+Z).

To understand why, let’s briefly dive into what a Stack is:

What is a Stack?

A stack is a list of items that can only be changed from one side, called the top of the stack.

Plate dispenser (Image Source)

Plate dispensers are a great real-world analogy to stacks. Plates can only be added or removed from the top of the stack. The last plate you add is the always the first plate you…

I’m going to cover how and why you would use Socket.io to implement auto-save functionality in a single-page web application.

If you have any questions or get stuck, feel free to comment below.

I welcome any constructive feedback.

What is web socket technology?

“Socket.IO enables real-time, bidirectional and event-based communication.
It works on every platform, browser or device, focusing equally on reliability and speed.”

In plain English, this basically means that web sockets allow websites to stream data to and from its users. This enables apps to implement features such as live chats or auto-save functionality.

Why use web socket technology?

In my case, I had built a task management…

A cheatsheet with all the commands you need

Image from heroku.com

About this tutorial

This is not a full guide with explanations of what is happening at each step.

This is a cheatsheet to serve as a reference of all the commands you’ll need when pushing your Node.js / MongoDB / Mongoose app to Heroku.

Note: This guide assumes you have already set up git. If you have not, follow my guide How to Set Up Git for an Existing Project.

Set up your Procfile

Before pushing to Heroku, we’ll have to create a file called Procfile, that lets Heroku know how to run your website. …

Original Illustration. Data sources: (1) Voter turnout from Statistics cited on Wikipedia from Mark N. Franklin’s “Electoral Participation”, found in Controversies in Voting Behavior (2) Ballot completion data from David Axelrod, the director of the Institute of Politics at the University of Chicago in his article on Vox

Less than half of Americans show up to vote on election day & 30 percent of voters fail to complete their ballots.

Why does 48% of America not vote?

According to a recent poll by Suffolk University and USA Today, the three main reasons why Americans do not vote are:

How does the other 52% decide what to vote?

Among registered voters 30% of them fail to complete their ballot. “In the absence of information, voters make decisions based on candidates’ names, gender, ethnicity, sometimes even ballot…

I looked around for an article on how to generate documentation for a rails project in GitHub pages and couldn’t find anything recent, so I decided to publish a short guide here.

If you have any questions or you get stuck, feel free to comment below and I’ll do my best to help.

1. Install the ‘yard’ gem

Go to your repository’s Gemfile and add the following line at the bottom:

gem ‘yard’

Then run the following command in your terminal:

$ bundle install

Yard has decent documentation available here: https://yardoc.org/

Your face when you have to cancel the event last second… Source: QCEventPlanning

You’ve spent months organizing this event, and everything was all planned out.. until some attendees cancelled last second. At this point, you’ll lose more money throwing the event than cancelling it. But if you cancel the event, you won’t get your deposit back and everybody will be disappointed.

Losing money is an unfortunate reality for event organizers, who do all the work, and take all the risk. So why do people organize events, anyways?

“Shared experiences create deeper connection”

My hypothesis is that people intuitively know that shared experiences creates deeper connection. When people can connect over a shared memory, they are able to connect…

Plus they’re delicious with milk…

There are a lot of misconceptions about how cookies work, and I hope that this article can help clarify what cookies are, how they work and how they are commonly used today.

Disclaimer: I’m not an expert on the subject, and I welcome constructive criticism.

Why Cookies Were Invented

The Internet was originally designed to be anonymous. In other words, websites did not know who a visitor was. For example, if the same person visited 2 days in a row, the website wouldn’t know whether (A) 2 different people accessed the website, or (B) the same person visited twice.

Anonymity sounds pretty good, right…

Make School’s College Ranking tool ranks schools based on student satisfaction, career outcomes, and cost of attendance —the results are surprising

Choosing the right college can be the most difficult decision that young adults make. According to the Department of Education, there are about 7,700 schools to choose from in the United States alone. Even though the decision is crucial, investigating each college individually is an impossible task.

In the face of too many options, people tend to reduce their decision into something more palatable:

People tend to pick based on price or brand.

This is a logical shortcut. Nobody has the time to manually read through university websites…

Nicolai Safai

Software Engineer | PM | Interested in Music, Design, Psychology & Education. “Make it Happen Captain”

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store