Publish-subscribe Pattern

While building Hack Reactor: The Game, we often run into the situation where Angular controllers need to communicate with each other. For example, when a game starts, it generates a set of puzzles and the manual required to solve them.

Read More

Token-based Authentication: Generating Token

When it comes to authentication between frontend client and backend API without using an outside service (for example, Facebook or Google OAuth 2.0), the two main methods are Session-based Authentication and Token-based Authentication.

Read More

De Morgan's Laws

De Morgan's laws are a pair of boolean algebra rules, if written in javascript-style boolean expressions, they look like this:

Read More