Using Algebra to De-compose Successful People of Color

Image for post
Image for post

Thousands of years ago, Indian mathematicians were the first to capture the concept of zero. But it was only after the British were finished with India, that the country really understood what it meant to have nothing. During that time, my father inherited from his father, the experience of being born in a hut he would never inherit. My dad used to help his grandmother reinforce the lazy walls by slapping on fresh cow dung.

As a child my father probably had the kind of carbon footprint that could fit inside of his shoes. He never wore shoes. The family car was a bicycle. The retirement plan was my father. Basically, his origins resembled a Horatio-Alger story awaiting its inflection point. …

Radical is the new pragmatic for a world at the brink.

Image for post
Image for post
Illustrations by Author

Of all the issues debated in the 2020 Presidential Race, climate change is of an entirely different class. Most scientists agree climate change is an existential threat with a non-negotiable deadline that is approaching in a matter of years. But what makes it unique is it shares it’s urgency with nearly all the other issues on the table.

Climate change promises more refugees, more famine, and less resources to go around. …

Image for post
Image for post

As a country we are so devoted to promising opportunities over outcomes that we would rather give a person the opportunity to choose not to kill someone with a gun than guarantee everyone the outcome of not being shot. Our allergy to equal outcomes has denied the average American better health care, higher education, and, as we’ve seen in these mass shootings, even their lives. It is time we reckon with the darker side of being the land of opportunities.

In America, we are taught that the market is our primary giver. Republicans, along with most Democrats, are adamant about not disturbing the Giver while it works lest we become the USSR. In their eyes, the government’s primary role is limited to safeguarding things needed for the market to operate like protection of private property, national defense, and some basic infrastructure. Of course, a society like this is hardly fair because it generally takes money to make money. People born into wealth mostly stay rich and people without money struggle to escape poverty. …

Image for post
Image for post

My grandfather was staring deeply into the television screen in the dimly lit living room. After his cataract had over matured, he swapped the newspaper he peeled through every morning for a news channel with as much depth as the flat screen it was served on. The biggest punishment for putting off the surgery was turning out not to be the loss of sight in one eye, but the 24 hour news cycle — a different sort of blindness.

The television buzzed about the stampede that killed nearly forty people in the “Mumbai Local” train station. My grandfather shook his head and asked why innocent people had to senselessly die. He shifted his attention to me and dragged his finger across his wrinkled forehead while quietly confessing, “For each of us, it is written.” …

Image for post
Image for post

You can’t officially do it, but you can write a function that does virtually the same thing. Let’s see how and maybe why you should.

But first, have you ever found yourself in this situation?

Image for post
Image for post

You wanted to call a function with an input when another function returned undefined for that same input. The above works, but wouldn’t it be nice if we had something more generalized?

If we were using objects this could be nicely done with a spread operator.

Image for post
Image for post

😍 Doesn’t that look prettier? When I call combinedObj[x] it will return fObj[x] unless fObj is undefined for x. In that case, gObj[x] would be returned. …

How functional programming practices can be applied to the way we think and feel

Image for post
Image for post
Credit: Aleutie/iStock/Getty Images Plus

When we model anything, we simplify it. Even if we want to represent something as basic as a drop of water, we do not paint each atom in the drop.

Image for post
Image for post
Photo: Anirudh Eka

Instead, we try to distill the most relevant aspects of the subject, which are determined by the purpose of the model. If our purpose is to evoke the idea of a water drop, the color and shape is probably enough.

Modeling is nothing new for us. In order to navigate the overwhelming complexity of our lives, we build mental models and act based on them before we ever consciously realize it. For example, when I was very young, I would become anxious to the point of crying if the sun set before my parents took me home from school. …

Image for post
Image for post

Finding the answer took me step by step to implementing transducers in JavaScript. Id like to take you on this journey so that you too can utilize this powerful abstraction. So, shall we trance?

The problem

This:

[1, 2, 3].map(x => x + 1).filter(x => x > 3)

And This:

[1, 2, 3].reduce((a, x) => { 
let y = x + 1;
return y > 3 ? a.concat(y) : a}, [])

do the same thing. They both add 1 to each number in a list and then keep only the numbers that are greater than 3.

But deciding which one to use leads us to two important…

Image for post
Image for post

So you probably know that functions are objects in javascript (if not go up the prototype chain of a function to find out). But recently, I noticed that javascript objects can be treated like functions. Which leads to some pretty cool implications!

Functions

According to wikipedia:

A function is originally the idealization of how a varying quantity depends on another quantity. For example, the position of a planet is a function of the time.

Given an input (time) you can determine an output (position of the planet). Let’s look at a simple function:

const square = (x) => x ** 2;

Here we have a function that given some inputs will produce some…

Image for post
Image for post

If the history of our planet was scaled to 24 hours, the entire existence of our species would be less than 2 minutes, and the existence of Redux would probably be a fraction of a millisecond.

And yet…it’s still old enough to have legacy code written in it.

Have you ever faced a giant reducer that you wanted to break into smaller chunks?

Ideally you would use combineReducers to build your reducer from other reducers that handle the subtrees of the state. …

Image for post
Image for post

One thing I really enjoy in programming (and in life) is when I discover a deeper truth that underpins what seem like unrelated things. There’s something spiritual about it.

I wanted to share such a discovery that I made a couple of years ago when I was new to Haskell and wanted to kill time in the Yangon International Airport.

The problem I was working on required me to filter a list into a sublist based on a function that goes through each item of a list and says if it belongs or doesn’t, by returning True or False. …

About

Anirudh Eka

Passionate about finding patterns in computers, society and minds. Follow on twitter for free links! https://toomanynames.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