In preparation for a future post discussing Elliptic curve cryptography (ECC), I’d like to introduce the broader concept of public-key cryptography first. Though these concepts are general, I’ll use the RSA algorithm as an example of a public-key cryptography system. This will also help us motivate our discussion of ECC in the follow-up post.


Cryptography is a branch of math and computer science that deals with securing information using codes or ciphers. It’s a crucial technology for the modern internet. Though not infallible, cryptography allows us to securely browse the web, shop, or make online banking transactions. …

Recently, Bitcoin and other cryptocurrencies seem to be gaining a lot of attention. Bitcoin was the first to appear, and it has attracted economists, technologists, entrepreneurs, politicians, activists, libertarians, and the list goes on. Some people love it, and others seem to hate it. But why?

Is Bitcoin real money, or is it just another fancy toy for nerds? I will try to answer this question and, in the process, explain to you what Bitcoin is and how does it work.

Bitcoin has unique economic and technological characteristics that make it special. From an economics standpoint, it claims to be…

A Non-Technical Guide to General Relativity and Black Holes

Last week we heard the news all over the internet. Elon Musk’s SpaceX conducted a test flight for the Mars starship in south Texas. Although the rocket exploded as it was landing, on Twitter, Elon deemed the test a success. They were able to collect crucial data for a future mission to the red planet. Space travel has always been fascinating, and it seems to me Mars is the next stop for humans.

In his book Reality is Not What it Seems, theoretical physicist Carlo Rovelli describes a way to travel to the future-at least in theory. It involves space…

Photo by Olav Ahrens Røtne on Unsplash

In this post, I want to show you a method to generate sorted permutations of a set. We will focus on generating these permutations in lexicographic or numeric order. There are several ways to do this, but some are better than others in terms of efficiency.

We’ll also look at a method to obtain a permutation at an arbitrary position in our lexicographically ordered sequence. With this method, we can generate the permutation we’re looking for more directly. We won’t need to generate any of the previous permutations in the sequence that come before our target one.

Let’s start by…

Combinatorics, Binomial Coefficients, and Pascal’s Triangle

Photo by Armand Khoury on Unsplash

Let’s take a taxicab ride through Manhattan in New York City. We’re starting from a point in the upper west side down to the lower east side. On this trip, we want to see as much of the city as possible. We want to see all the streets and avenues because we’ve never been here before. In NYC, streets and avenues intersect and form a grid- The 1811 Commissioner’s plan created this almost perfect matrix. To simplify things, let’s say we are in a perfect grid–no Broadway or Central Park–and that we can only travel either east or south. …

Gosper’s glider gun. Lucas Vieira / CC BY-SA

Most of us played with Lego blocks or jigsaw puzzles when we were kids–maybe you still do. You remember spending hours tinkering and rearranging them into different shapes and structures. Our imagination was the limit. These are very simple things: pieces of plastic and paperboard in a few different shapes that snap together. Taken by themselves, they are dull and boring. Yet, we were entertained for long periods. But it’s not the individual parts that make them fun and interesting. It’s the thinking–about how we can arrange them–and the building, creating something new that entertains us. …

Eratosthenes Teaching in Alexandria. Bernardo Strozzi / Public domain

It seemed easier in my mind when I first thought about it. But, finding a random prime number fast isn’t trivial. For example, the 5th prime number is 11, the 20th is 71. But, what about the 50th, 600th, or 20,000th prime number? I want to show you an efficient way to find the Nth prime number. We’ll get help from an old algorithm known as the Sieve of Eratosthenes.

A prime number is an integer greater than 1, that is exactly divisible by 1 and itself. All non-prime integers are called composites. …

Photo by Dan Nelson on Unsplash

If you are a mobile or web application developer, it is likely that at some point you needed to add authorization and authentication to your applications. OAuth and OpenID Connect are security standards addressing these needs. OAuth takes care of authorization, while OpenID Connect, or OIDC, deals with authentication. Some applications like Auth0 implement these two standards and make it easy to integrate into your projects. As a result, OAuth and OpenID Connect allow your users to securely login to your application using their existing credentials in other services such as Facebook or Gmail. …

Photo by Claudiu Hegedus on Unsplash

Some may think routines are boring and that we should avoid them. But, they give us a sense of familiarity and control. They make us feel in control because they are predictable, and we know exactly what we need to do and what the outcome will be. Routines also save us time and free our minds to explore and think about new things.

“Do what you can, with what you have, where you are.”

— Theodore Roosevelt

When we go through changes in life, and we face uncertainty, having a routine makes us feel in control. Being able to develop…

Photo by fabio on Unsplash

Last week at work I was investigating Google’s Firebase products, in particular, the Cloud Firestore database. So, I decided to take a deep dive into the documentation pages. I learned a lot about integrating the database to an application, its data model, best practices to structure our data, and how to create queries using the available SDKs. As I was reading the description of how the data is organized internally to optimize queries, I couldn’t stop thinking about the basic concept behind this awesome technology by Google.

I think Google’s Cloud Firestore is a great example of leveraging a basic…

Iram Lee

Software Engineer. Endurance sports enthusiast. Blog:

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