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 travel and a rocket ship. That’s just a little passage in the book while he’s explaining the physics of black holes. From this came the inspiration for this post. …


Image for post
Image for post
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 refreshing our memory on what a permutation is. …


Combinatorics, Binomial Coefficients, and Pascal’s Triangle

Image for post
Image for post
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. …


Image for post
Image for post
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. …


Image for post
Image for post
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. …


Image for post
Image for post
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. …


Image for post
Image for post
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 and follow a routine also makes us more resilient to unexpected situations and less risk-averse. Because no matter what changes we go through in life, knowing that soon we will re-take or re-develop a routine, gives us the confidence to handle those changes. We get a confidence boost by knowing that no matter what happens “outside,” we can always adapt to our circumstances and come back to our routine, even if that routine has changed slightly or it is completely different. …


Image for post
Image for post
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 concept in computer science to create a powerful software product. Usually, the most elegant solutions to any problem are those that are clean and simple. …


Image for post
Image for post

A couple of weeks ago, I started taking the course Computer Systems Security from MIT’s Open Courseware (OCW) platform. I decided to (finally) begin with it, since we recently started a new software development project at work in which we want security baked-in from the start. I had been wanting to dig deeper into secure software application development, and this seemed like the perfect moment to start. I really like using MIT’s OCW because they offer the full-blown class, including videos of the actual classroom lectures, reading materials and homework. And, for this course in particular, what I really loved is that most of the reading assignments are published research papers on the subject. Lately, I had been trying to read more research papers, but it is sometimes difficult to choose from the vast corpus of literature. I think it is a great way to keep up (and learn) with the most recent advances in your field of interest, especially in the STEM fields. …


Image for post
Image for post
Photo by Noralí Emilio on Unsplash

With a long weekend approaching, my binge-watching recommendation is Babylon Berlin on Netflix. If you haven’t watched it already, it is most definitely worth it! This is, in my humble opinion, one of the best TV shows out there right now. It is a German TV show based on the novels by Volker Kutscher. The main character is Inspector Gereon Rath from Cologne, who is sent to Berlin on a special assignment. He is also a combat veteran from WWI, where he lost his brother in the battlefields. It all takes place in 1929, during the Weimar Republic years in Germany. The show is very historically accurate, which I think is one of the best parts. …

About

Iram Lee

Software Engineer. Endurance sports enthusiast. Blog: stemhash.com

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