This is anecdotal advice on how I deal with failure.
This story begins in the middle.
Yesterday, I got the e-mail. Ya know, the type of e-mail you’ve been waiting a week for. However, the contents were not what I wanted to hear.
I recently had a coding interview that involved evaluating one schema against another. The details of it aren’t that important, but one thing that came out of it (in the middle of the interview) was that you can’t break out of a forEach()
loop. I had forgotten that little tidbit and it probably screwed up my chances of getting hired. After you read this, hopefully, you won't make the same mistake I did! Don't be like me.
This problem is fairly simple, however, it will allow us to explore our good friend recursion. We will use a combination of that and functional programming to solve this fella with relative ease…hopefully. Alright, enough yammering, let’s get to it!
The sum of the squares of the first ten natural numbers is:
1² + 2² + … + 10² = 385
The square of the sum of the first ten natural numbers is:
(1 + 2 + … + 10)² = 55² = 3025
Hence the difference between the sum of the squares of the first ten natural numbers and…
I am more excited to talk about this problem than any of the other problems so far. I am really happy with how it turned out and I think you will be too. Enough said, let’s solve this thing!
If you like to watch rather than read, check out the video that accompanies this article. If not, keep reading!
2520 is the smallest number that can be divided by each of the numbers from 1 to 10 without any remainder.
What is the smallest positive number that is evenly divisible by all of the numbers from 1 to n
?
…
Welcome to ByteSize JavaScript where we chew on manageable chunks of code. Today we’re going to be talking about recursion.
Recursion is one of those things that you see a lot when you’re learning about JS. The question is, do you understand what it is? If you don’t, I’m going to give two examples that will hopefully clear it up. If you do, check out my examples anyways! I’m sure you have some further insight you can share.
If you learn well by watching, check out the video version of this article!
Recursion is simply:
A function calling itself…
Welcome to another edition of Jared rediscovers grade school math! Today we are tackling problem four of Project Euler. We are going to talk about Palindromes and for loops. Let’s get into it!
A palindromic number reads the same both ways. The largest palindrome made from the product of two 2-digit numbers is 9009 = 91 × 99.
If you like to watch rather than read, check out the video that accompanies this article. If not, keep reading!
Find the largest palindrome made from the product of two 3-digit numbers.
A word that reads the same forwards as backwards…
Today we’re going to tackle Project Euler problem number 3! We are going to learn all about primes and factors. This problem is fairly straight-forward, so we shouldn’t have to dig too deep into Wikipedia.
Checkout solution 2 here:
The prime factors of 13195 are 5, 7, 13 and 29.
What is the largest prime factor of the given number?
If you like to watch rather than read, check out the video that accompanies this article. If not, keep reading!
First, let’s figure out what a prime number is, in case you forgot…which I did.
A whole number greater…
Getting all the even Fibonacci numbers
Welcome to Round Two of Project Euler! This time we’re heading into the land of state management and that guy you’ve probably heard about: Fibonacci! I’m excited, are you excited?
Check out the solution for Problem 1 here:
If you like to watch rather than read, check out the video that accompanies this article. If not, keep reading!
Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be:
1, 2, 3, 5, 8, 13, 21, 34…
Multiples of 3 and 5
Here we are, attempting the Dark Souls of coding challenges. We’ll start today with a fairly simple one: getting multiples of 3 and 5.
If we list all the natural numbers below 10 that are multiples of 3 or 5, we get 3, 5, 6 and 9. The sum of these multiples is 23.
Find the sum of all the multiples of 3 or 5 below the provided parameter value number
.
If you like to watch rather than read, check out the video that accompanies this article. If not, keep reading!
At first glance…
Recently, I got a job that required me to debug a Squarespace site to see why it was loading so slow. I figured I’d share what I did to increase the load speed.
I used Google’s built-in tool “Lighthouse”. If you don’t know where that is, you can find it in the Dev Tools under “Audit”.
Freelance web developer living in Los Angeles. I write articles I wish I had when I was learning — mostly about Javascript and web development.