Bubble sort and the old rain coat.

People are always askin’ me what is the best way to learn how to think like a programmer.  Well, I don’t know that I’m the best bloke to ask, but nevertheless I always have a simple answer – sorting algorithms.  Yep, that’s it.

There are several, and I’m going to teach all of them, but for right now we are going to focus on the JV 3rd stringer  (I mean, it might even be the team stat keeper or equipment wrangler) of sorting algorithms: Bubble sort!

Look, bubble sort is like totes not effective – for sure.  It’s got heart though, and ya can’t teach that.  Bubble sort is like an old rain coat that has a few holes in it:  It’s bulky, ugly, and barely works – but, in a pinch, it can save the all to important first impressions on an unbelievably awkward tinder date.  That was terrible, MA’BAD!  Either way – Bubble sort is a good first sorting algorithm to learn, and ruby makes it all the better with it’s sugary sweet syntax.

I tried to explain in the video what bubble sort actually does, but alas, my monotone ‘not for radio’ voice and my generally poor communication skills betray me.  So, I will go ahead and let the nerds at wikipedia show you what bubble sort actually does.

Nerds at wikipedia’s take on bubble sort

So, common, stop standing there waiting for things to get easier – LEARN! NOW! I WISH I WOULDA HAD SOMEONE TEACHING ME THIS STUFF!  I HAD TO LEARN THE HARD WAY!  Through cheating… Jokes. Video below, NJOY! Don’t troll me, BRO!

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s