picture source

In my previous article, we saw about the bottoms-up approach or tabulation to solve problems. In this article, we are going to pick the same problem of calculating the nth fibonacci number of the fibonacci series using another technique called, top down approach.

Like how in the bottom-up approach, we went to the bottom of the problem and solved for the sub-problems before landing on the solution of the main problem, the top-down approach is just the opposite of that. But if it’s the opposite, then are you saying we will start with the solution of the problem? Well! …

Image source

Understanding the nuances of Python namespaces and scopes is often helpful to make wise decisions when writing advanced Python. Python is such a friendly language that, it lets us break the rules easily and yet achieve our goals. But, sometimes rules broken in the past could come back to bite us in the future in unimaginable ways.


A Namespace is a mapping between variable names and objects. There are 3 general kinds of namespaces:

  • __main__ and builtins namespaces — All the built in names live here and this namespace is created when the interpreter starts up.
  • Global namespace — All…

In this article, we are going to learn the most basic and fundamental technique of Dynamic Programming(DP) called Tabulation or bottoms-up approach.

Any large computer science problem can be broken down into smaller sub-problems. These sub-problems can be independently solved and composed to get to the solution of the main problem.

Take for instance the problem of building a house from scratch. At a very basic level, the house is just a unique arrangement of bricks assembled with other raw materials. Each brick requires the exact same amount of effort and same technique to produce it. …

Marc Randolph Co-founder, Netflix

Netflix’s co-founder, Marc Randolph’s episode on the Tim Ferris show is full of interesting stories and nuggets from the origins of Netflix. I will try to paraphrase a few of them which I found interesting:

Good vs Bad Ideas

“There is no such thing as a good idea. Every idea is a bad idea. Crazy ideas that might have been Netflix: “

  • Personalized Shampoo — Cut a lock of hair and mail it to us, our team of ace scientists formulate a personalized shampoo
  • Personalized dog food — Formulate a custom dog food for your dog based on the breed, gender, activity level, climate…

Steve Jobs talks about App Store economy in 1983

“Prediction” of technological change in the strict meaning of the term would require ability to know both what changes could be expected and when they would occur. We can know with high probability what technological changes are likely by looking at a few dynamics

Economic needs and opportunities

The first dynamic element in technology is economic needs and opportunities — Declining productivity of capital in a major industry. …

The card networks(VISA/MasterCard) started out as non-profit associations helping their member banks to generate profits. Today, they are hugely profitable publicly traded companies — A fact that would have astonished anybody in the 80s. How did this come to be? Read further

The rise of Checking Accounts

It’d be a stretch to say that the card networks might not exist today had the Federal Reserve Bank not mandated the banks to accept checks for deposit at par. But, this certainly took away the profits banks would have otherwise made by charging check deposits. The Checking account is by far the oldest payment system in the…

An interactive 2FA screen is table stakes with the SignUp/SignIn flow these days especially if you’re building an app that requires high levels of security.

Note: If you came for the code, skip to the bottom of this post for a link to my GitHub repo.

End result of this post

In this post, I will walk you through the process of building a screen that looks like the one above. So let’s get started.

For the animations part, we are going to use a third party library called animated widgets which you can find here: https://pub.dev/packages/animated_widgets

So, let’s go ahead and declare it in…

How to set up a basic GraphQL project using graphql-express, what are root types, and how to best structure the code in GraphQL projects.

In this post, I am going to explain what problems GraphQL solves, setting up of a basic GraphQL project using graphql-express, what are root types and how to best structure the code in GraphQL projects.

Your ultimate guide on why and how to use GraphQL

source: xkcd comics

If you’re a REST aficionado like me and you are hearing a lot of buzz around GraphQL, then you’re not alone.

GraphQL will do the “REST”

— Someone on Twitter

Before jumping into conclusions with no data, I decided to unravel the mystery of GraphQL by diving deep and tried to understand how different it is from REST.

This post is structured as follows:

  • A brief introduction to GraphQL and it’s concepts.
  • An example showing how to build GraphQL endpoints.
  • Solve a specific problem using REST and GraphQL.
  • Source code link to GitHub repo at the end.

So let’s get…

Linking this post to my GitHub repo where I am in the process of documenting some commonly used patterns and idioms:


Karthik Kalyanaraman

Software Engineer | Curious about technology and the economics of the tech industry | https://twitter.com/karthikkalyan90

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