Stepping forward


Journey through bootcamp

Recursion - Bottoms up

In Computer Science, recursion is a way of solving a problem by having the problem call itself. Perhaps the most commonly used example of recursion for algorithms is the Fibonacci sequence. Fibonacci is calculated by adding the sum of the two previous numbers or : Fib(n) = Fib(n-1) + FIb(n-2) Assuming n is a positive integer, this can be written in Ruby as follows: def fib(n) if n > 2 return fib(n-1) + fib(n-2) else return 1 end end


Linked Lists

What is a linked list?


Big O notation

One of the first concepts I was told to learn after graduating from my bootcamp was Big O. I had completed a practice technical interview and the assessor wanted me to optimize a solution I had come up with. I was unaware of the fact that the include method for arrays was much less efficient (O(n)) than looking up an item in a hash with the key (O(1)). Only after a brief introduction to the concept and a pointed suggestion to use a hash I was able to optimize my solution. So what is the Big O and why is it so important?


Creating a Timed Loop in Javascript

Javascript by default does not contain any way to pause or delay the code execution in loops but instead offers the asynchronous setTimeout() function. Because setTimeout is asynchronous the loop will not wait for the timeout to complete before moving to the next iteration. For example if we wanted to console log the elements of array = [5, 4, 3, 2, 1] in 1 second intervals and tried …


console.log(React-project)

It is hard to believe that the end is already here, well more like the preparation for a new beginning has come to an end. For this project I wanted to make an app that could keep the score of a family card game I play with my parents when they come to town. It is a pretty simple card game involving betting and playing hands with a few things like sets and moon bids. I wanted the backend to handle all of the game logic so I ended up doing quite a bit of coding in Ruby, which was odd after spending the past couple months in Javascript and React. I kept trying to invoke methods and found myself using this instead of self on a few occasions. That being said I was able to get a working version of the game up an running fairly quickly and switched over to React.