Tribute Page to Jimi Hendrix – Responsive Web Design Project

In this tutorial, I work through creating a tribute page as part of the responsive web design project requirements for Free Code Camp. I completed this project a long time ago, but this time it’s different. This time, I record my process for writing the page and pushing it to production.

I think this is a good tutorial for combining the things we learned in the responsive web design certification curriculum. That covers basic CSS and HTML. This is a beginner project, but it provides the path to go from writing your first HTML code to pushing it to the internet.

A little more….

How to get the Last 15th of the Month Using Ruby

How do we compare date times from now against the 15th of last month?

how to make conditional statements since the 15th of last month

I’m  writing a program which assigns episodes to invoices based on the time the episodes were created. Each episode’s publishing date is recorded as follows:

pry(main)> most_recent_episode_publishing_date = Episode.last.updated_at
Episode Load (0.6ms) SELECT "episodes".* FROM "episodes" ORDER BY "episodes"."id" DESC LIMIT $1 [["LIMIT", 1]]
=> Mon, 26 May 2014 18:23:36 UTC +00:00

The above code tells us that the last episode was published on May 26th, 2014.

We save that date object which we can compare against the 15th of the previous month. First we need to get a date object for the day of the 15th of the previous month. Here’s how we do that:

pry(main)> now =
=> 2019-10-28 13:05:17 -0700
pry(main)> the_15th_of_last_month =, now.month, 15).prev_month
=> Sun, 15 Sep 2019

Now that we have the 15th of last month saved as the_15th_of_last_month and the most_recent_episode_publishing_date, we can compare them to know if this episodes is more recent than the last 15th of the month:

pry(main)> most_recent_episode_publishing_date > the_15th_of_last_month
=> false

This means that our most most_recent_episode_publishing_date was published before the 15th of last month. As I only want episodes published in between the last 15th and today, I’ll not add this to the Invoice association.

The logic can be flipped around however you want to use this tool. Enjoy!

Should I Join a Direct Selling / Multi-Level Marketing Organization

If you’re asking the question, “should I join a direct selling company”,  the short answer is, NO. Don’t do it. Read until the end and I’ll share ways to start making money selling things that will actually see you profiting.

I didn’t know these “businesses” were so popular until I listened to The Dream by Little Everywhere. The Dream is an excellent podcast. If you’re interested in learning about these “businesses”, listen to that. It’s free!

Those businesses are designed to make money from you paying them. If you want to make money in theses organizations, you have to start having your friends and family pay you. That sucks. These scum bag businesses are known by many names, but the ones I’m slightly aware of are:

  • Amway
  • LimeLife
  • HerbaLife
  • MaryKay
  • NuSkin
  • Xango

Don’t do it friends. The world would be a better place without them.

How to Start a Business

Mark Cuban said, if you borrow money to start a business, you’re a moron. Sure, this isn’t exclusive advice that fits every situation, but if someone is charging you to start a sales business, it’s probably a scam.

You can start selling things for free by searching eBay arbitrage or affiliate marketing on YouTube. If you want to do direct sales, start there. Those are real markets with real money being made.

If you’re trying to start your first business, start by selling something today. It doesn’t matter if it’s the chair you are sitting on or an item you can dropship to someone on AliExpress (go to AliExpress, find something cool and post the images on CraigsList to start). Once you get the first sale, good job. Repeat that process until you have the cash you need to get whatever you want.

To Wrap Up

Business building is hard. Doing the MLM thing is one of two things:

  • Impossible
  • If you’re part of the 0.1% that succeed and steal money from everyone you meet for the next 20 years, it’s unethical.

Better than calling it direct sales or multi-level-marketing, call it the Vampire Club.

Please don’t join the vampire club.

Build an Algorithm Processing Website

Why Care?

A friend of mine was interested in an idea for beating the casino at roulette.

His theory is that if he keeps playing either red or black, but adding to the bet, there is a mathematical certainty of winning at some point.

First spin, go red with $10.

Second spin, go red with $22.

Third spin, go red with $33.

Or something like that.

I told him I could write a program that would tell him the number of consecutive results from 50/50 roulette spins.

This is how we did it:

Tutorial For Launching Simple Algorithm Tools

Learning Algorithmic Technology

At this tutorial’s core, this is an HTML5 tutorial.

HTML5 incorporates HTML and JavaScript together. HTML5 incorporates CSS as well, but this tutorial doesn’t discuss that because design hasn’t been addressed here.

This tutorial takes the watcher on a journey of creating a simple web tool. In it we:

  • Start a project using command line interface (CLI) tools
  • Write the JavaScript algorithmic logic for the probability
  • Write the HTML5 user input form and clickable submit button
  • Link the JavaScript algorithm and the HTML5 input to work as a graphic user interface
  • Write clear directions for what the tool is used for
  • Initialize the project as a git project (version history software)
  • Sync our project with a GitHub repository
  • Publish the tool using GitHub pages

The tool is now available on the internet to whomever cares to view it. Click here to check it out:

If I were to answer my buddies specific question, this tool need more work. We would need to incorporate the increments of betting in order for us to get a specific plan to beat roulette…. but at the end of the day, this isn’t about beating the casinos. Even if we started beating casinos, the casinos would just kick us out.

The cool thing about this is that it helps us think algorithmically about complex issues. Using computers as tools, we can run massive tests in the blink of an eye. My computer only starts to have slow results (requiring 2-3 seconds) around 100 million spins. Imagine how long it would take to do 100 million spins in real life.

Algorithms are fun.