Tag Code

12 posts found

Git aliases

JULY 07, 2022  ·  449 WORDS

If you use git in any capacity, you must have observed that a few commands are used more frequently than others. Similarly, for some commands that have many options associated with them, you would more often than not use the same options for your workflow. Typing the entire thing out [...]


How secure is a Bitcoin private key?

DECEMBER 13, 2021  ·  685 WORDS

To secure an online account, the most popular choice is to use a password and username combo. The service where the account is hosted maintains all the username/password combinations in a database and serves as a central authority to allow or deny access. In the context of Bitcoin (or cryptocurrencies [...]


tmux 101: supercharging the terminal

AUGUST 01, 2021  ·  1543 WORDS

When I worked at Braintree, I pair-programmed full-time. Braintree had developed custom tooling that was tailored for a hassle-free pair-programming experience. The basic setup was vim as a text editor running inside tmux with custom key bindings and aliases. Developers were expected to work in this setup. I joined as [...]


Lessons from refactoring an old project

JULY 15, 2020  ·  1042 WORDS

About four years ago, I started working on a simple project — a Messenger bot that 'recommends' movies. I called it 'moviebot'. It was written in JavaScript (node) and hosted on Heroku. At the time, Messenger bots seemed like an interesting avenue to explore and I was simply following a [...]


Caching API with Redis and Node

FEBRUARY 28, 2020  ·  745 WORDS

More often than not, your backend server needs to talk to downstream services, third party APIs and the database. These calls are expensive both in terms of time and money. Consider for example, your API fetches popular movies from a movie API which charges you based on each call you [...]


Defining functions in JavaScript

SEPTEMBER 03, 2019  ·  1013 WORDS

Generally, a function is a sequence of instructions or a 'subprogram' that can be invoked by the code that is external (or internal) to that function. In essence, functions 'encapsulate' a particular task. Functions are one of the fundamental building blocks in JavaScript and really understanding functions can help tackle [...]


Dark mode in React using SCSS

MAY 20, 2019  ·  313 WORDS

In this article I have tried to explain my method of adding dark mode to a react app created using and SCSS. This is my method and by no means do I claim it to be the best possible way of adding dark-mode to your react app. The end goal is to [...]


How to use the JavaScript console

APRIL 17, 2019  ·  515 WORDS

One of the easiest ways to debug anything in JavaScript is by logging stuff using . But there are a lot of other methods provided by the console that can help you debug better. Let’s get started. The very basic use case is to log a string or a bunch of JavaScript [...]


Parameters & arguments in JavaScript

AUGUST 23, 2017  ·  552 WORDS

Javascript is a functional language meaning that functions are the primary modular units of execution. Functions are obviously very important in Javascript. When talking about functions, the terms parameters and arguments are often interchangeably used as if it were one and the same thing but there is a very subtle difference. Parameters a [...]


Generators in JavaScript

AUGUST 16, 2017  ·  828 WORDS

Generators are a cutting edge addition to ES6 JavaScript. Async code is harder to manage with JavaScript’s single threaded execution model and Generators and Promises are welcome inclusions in the JS arsenal. Let’s explore Generators in detail in this article. Generators Generators are special types of functions in the sense that unlike [...]


Declaring variables in ES6 JavaScript

AUGUST 06, 2017  ·  532 WORDS

Before ES6, was the only keyword used to declare variables in JavaScript. Unlike other languages like C, variables do not need to use different keywords based on their type. For example in C, integers undergo a different treatment as compared to strings but in JS we don’t need to specify the type [...]


Hoisting in JavaScript

AUGUST 01, 2017  ·  850 WORDS

The term Hoisting is used in a lot of JavaScript blogs to explain identifier resolution. Using the literal meaning of the word as a metaphor, hoisting is employed to explain how Variables and Function declarations are ‘lifted’ to the top of a function or a global scope. While this does provide a basic [...]