During my first on-site coding interview I encountered a concept I had never seen before. I don’t remember the question word-for-word but it went something along the lines of:
Create a memoize function that remembers previous inputs and stores them in cache so that it won’t have to compute the same inputs more than once. The function will take an unspecified number of integer inputs and a reducer method. Refer to:
//Given reducer method:
}//Create a method called memoize such that:
const memoizeAdd = memoize(add);//then calling…
memoizeAdd(100,100); //returns 200
memoizeAdd(100); //returns 100
memoizeAdd(100,200) //returns 300
memoizeAdd(100,100) //returns 200…
Mathematically, function composition is applying one function to the results of another, for example:
g(x) = x + 5
f(x) = x / 2Let's evaluate: f(g(5))First...
g(5) = 5 + 5
//we get 10Then...
f(10) = 10 / 2
//we get 5So... f(g(5)) = 5
If you got that, great! But we are programmers, not mathematicians right? …
An overview of my experience discovering and switching over to Atomic Design in a React Native project.
First, I’ll introduce my experience, the project applied in this scenario, and why I was interested in adopting Atomic Design. Next, I’ll explain what steps I took to migrate over to the Atomic Design pattern. Finally, I’ll discuss what challenges I faced when switching over to Atomic Design and what I’d do differently.
So let’s begin…