Lazy Loading Youtube Videos

Fri Jan 11 2019


The concept of lazy loading is a design pattern where you only download the required scripts/content when the client needs it rather than when the page is loaded. The most iconic example is the “infinite” feed that social media sites like Instagram use. Rather than dump a ton of content to the client at once, Instagram dynamically loads more content once you reach the end of the page. This allows websites to save bandwidth by only sending the client what they need when they need it.

When a youtube video is embedded into a website, it pulls a ton of scripts which are required to play the video. However, when you embed a youtube video on a blog post, most people are not going to watch that video. Even if the visitor wanted to watch that video, there is no reason why all the scripts should be loaded when you initially land on the page. Rather than embed the video normally, you can instead simply have a the thumbnail of the video with a play button on it. When the client clicks the play button, the youtube scripts are then loaded.

Performance Without Lazy Loading

Before Performance Score
Before Performance Score
Before Table Analysis of embedded youtube videos
Before Table Analysis of embedded youtube videos

Sorting Algorithms

Sat Dec 15 2018

Insertion Sort

Selection sort although not very efficient is often used when the arrays you are sorting are very small. Another benefit of insertion sort is that it is very easy to program. Essentially, this algorithm has a sorted section which slowly grows as it pull in new elements to their sorted position.

Functional Notation

\[ s([]) = []\\ s(x::xs) = i(x, s(xs)) \]

Knapsack Problem

Tue Dec 11 2018

In this post I will go over how you can frame a question in terms of recursion and then slowly massage the question into a dynamic programming question.

Problem Description

The knapsack problem is a famous optimization problem in computer science. Given a set of items, a thief has to determine which items he should steal to maximize his total profits. The thief knows the maximum capacity of his knapsack and the weights and values of all the items.

2018 In Review

Sat Dec 08 2018

Inspired by Justin Flory and Dan Schneiderman, I decided to make a 2018 review post. I believe that it would be a good way to reflect upon what I did in 2018 and make plans for 2019. This post will be a very high level overview of the projects and activities that I did in 2018 – nothing personal. Pictures say a thousand words, so, I will include a lot.


Eagle Ceremony

Eagle Ceremony Picture
Eagle Ceremony Picture

2018 Rochester Maker Faire

Sun Dec 02 2018

Rochester Maker Faire RITlug table.
Rochester Maker Faire RITlug table.


A few weeks ago I presented my musical floppy drives at the Rochester Maker Faire with RITlug. Wow, that sentence had a ton of links– you should check them out. This post is a quick recap of my experience at the Maker Faire and a project update for my musical floppy drive project. For those of you who don’t know, Maker Faires are community gatherings where people “celebrate arts, crafts, engineering, science projects and the Do-It-Yourself (DIY) mindset”.

I would like to give a huge thanks to Christian for providing me with some of these pictures and RITlug for giving me the opportunity to present at the Maker Faire.

Project Background