Designing the architecture that can stand the test of time

Assume you were to design a new web application today. This application would need to be scaled to millions of users, would have a lot of complex business logic, is intended to be a long-term investment and would be a high revenue generator. How would you design it?

I started thinking about the same a while ago and here is my answer to the question. Let’s get started!

Factors that Matter

Before designing anything, I want to be concrete about the factors that matter and have influenced the design.

  1. EtC Principle: The definition of a good design is that it makes the code…


Angular + Firebase = AngularFire

It took me a long while to figure out the authentication with persistence in AngularFire 6 because of the lack of examples and information on the same, so that I thought I’d contribute to help the next person figuring it out.

You can find my code repository and my auth service code file on GitHub.
Now, Let’s get started.

1. Install AngularFire & Create Service

On your terminal, enter the following commands in your project repository:

ng add @angular/fire
ng service auth
ng component test

2. Adding FireAuth Module in Imports

// app.module.ts
import your_firebase_config from '../environments/production';
import { AngularFireModule } from '@angular/fire';
import { AngularFireAuthModule } from '@angular/fire/auth';
import { AngularFireAuthGuardModule } from '@angular/fire/auth-guard'…

This tutorial is for vscode users who are looking for some cool tricks that their code editor can perform, this is a basic tutorial to introduce the following features:

1. Quick Menu (Goto line, Open file & Command Pallet)
2. Fold / Unfold code
3. Zen coding
4. Quick find / Global find
5. Code Selection (word, line & block selection)
6. Quick actions (Comment code, duplicate line, quick change name)
7. Multi-cursor actions
8. Many shortcuts

Just reading the blog is not enough, the blog will only introduce you to the features, you need to follow the instructions in…


Your security is only as good as the weakest link in the chain. Encrypt your disks.

Photo by Dayne Topkin on Unsplash

I know a lot of folks who setup a root password on Linux or account password on Windows without encrypting their drives, anyone can easily bypass these password with something as simple as a live boot disk. The weakest link in the chain is TOO WEAK to be reasonably secure.

So, here I will discuss a simple tool called cryptsetup to encrypt drives on Linux.

We need to encrypt our internal HDD (root) and external HDD that contain your data.

1. Install-time root encryption

I was capturing screenshots for writing this blog when I found an easy to follow tutorial by CryptoDad:

- Part…


The following sections are not from the book but contrived from my own knowledge. Some of the sections were mentioned in the book but I feel they deserve their own space.

54. Keep it Stupid Simple (KISS)

The smartest solution to the problem is not the best one, neither is the most optimized one nor the best looking one. The only solution that can stand the test of time is the simplest one.

“Simplicity is the ultimate sophistication.”
— Leonardo Da Vinci

55. “Select” is not Broken

More often than not, we conclude a tool or dependency to have errors but it’s worth the investigation if we are using it as…


Chapter 7. While You Are Coding

37. Listen to Your Lizard Brain

If you have a hunch about something, heed it. We keep on forgetting our lessons, but our subconscious brain remembers the patterns and communicates them as instincts. If the inner voice is not clear enough, distract yourself for a while or explain the problem to someone.

Instincts are simply a response to patterns packed into our subconscious mind.
So, let your instinct contribute to your performance.

38. Programming by Coincidence

Human beings have an innate habit of seeing a pattern where none exist. This can cause us to see patterns in dependencies and use them in a way they were never intended to be…


Chapter 4. Pragmatic Paranoia

23. Design by Contract

Trust between software can be maintained by contracts. In design by contract, if all the preconditions are met, a routine must guarantee that the post conditions would be met. Designing a program that does no or less than what it claims to do is the heart of design by contract.

“Do One Thing and Do It Well”
— Unix philosophy

24. Dead Programs Tell No Lies

Try…Catch is only a good habit when you have a rescue plan for inside the catch block. If you don’t, it’s better to let your program fail. A dead program does a lot less damage than a crippled one.

If…


The following series of blogs are lessons from in the book “The Pragmatic Programmer: Your Journey to Mastery” by Andrew Hunt, David Hurst Thomas mixed with my understanding and lessons I’ve learned over the years in tweet size sections for the Generation Z & Alpha.

Chapter 1. A Pragmatic Philosophy

1. It’s Your Life

Take proactive control of your life. If you don’t like your current job or the tool set you work with, it’s your responsibility to fix that.

“You can Change Your Organization or Change Your Organization.”
― Martin Fowler

2. The Cat Ate My Source Code

You are responsible for your actions and the results of your actions, whether glorious or tragic. When…


General usage of openwisp-controller, GIF created and added to documentation during GSoC 2020

The Google Summer of Code 2020 was very productive for completing a lot of tasks. Specifically, the “Done” tab of the Kanban Board created for my project will have 150+ cards (including issues & pull requests) by the end of the GSoC 2020.

Aim of the Project

The primary aim of the work done for this project is to improve the maintainability of OpenWISP. While designing OpenWISP and making it highly customizable, we went a tad bit too far with separation of the concerns and ended up making a lot of repositories. This caused the problem that introducing a change in the code required…


Photo by Max Duzij on Unsplash

Terraform is one awesome way to write your infrastructure as a code. This blog is aimed for people starting out with terraform and are about to write a module. These tricks will be helpful for writing a good module.

You may look at terraform-gcp-openwisp & terraform-kubernetes-openwisp as two example modules that follow these guidelines and are published on terraform registry.

This blog has been written based on syntax from terraform 0.12.20. It contains three sections:
- Dynamic resources & blocks
- Useful Features
- Module Folder Structure

Dynamic resources & blocks:

Suppose we have these local variables, let’s see some loops to make our…

atb00ker

Stoic. Existentialist. Optimistically Nihilist. Snowdenist. Friendly. Confident. Perfectionist. Creative. Playful. Programmer. Philosopher.

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