Marisabel Munoz

I code. I write. I draw. I learn. I love.

Finding the Rhythm of Algorithms

Week 3 of CS50 proved to be more of a challenge than I expected. I already separated more than the required time for it, knowing how much I needed to research to understand it. It was a challenge I embraced and was looking forward to completing.

I will write a few blog posts on this subject as I learn more about them. But let’s start writing about how I finally found the rhythm of algorithms in our everyday life, intending to understand how are these apply in day to day programming.

What is an algorithm?

On CS50 they jumped into mathematical and sorting examples. Not very useful for someone with zero experiences in CS. The more I watched, the more confused I was. The more I try to rewatch it, the more I felt uninspired to continue. I HAD to understand algorithms. I did not know why until later, but I knew I HAD to.

It took me a whole week. Starting from random searches and videos of random people trying to explain the same CS50 explained in the same words and the same examples… thank you very much. It took a whole week to finally make some sense of it and find the most understandable article I could find for beginners like me.

You can read itΒ hereΒ if you are curious. The author breaks down algorithms to their very base structure, instructions! A word that I did not hear the whole 1:30 hrs of CS50 (or maybe I missed it).

Ok… but what is an algorithm?

After reading many different definitions, I wrote 2 of my own:

  1. The long version: A series of systematic steps or instructions which tell a computer what to do finitely to solve a problem or create a result.
  2. The short version: Input β†’ Algorithms β†’ Output
    1. the input is the data
    2. the algorithms are the instruction on what to do with that data
    3. the output is the result

So, ingredients + instructions = cake! 🍰😍

I can’t believe it took me a whole week to get there. Why is it that people treat algorithms as something so mysterious and challenging? When, in fact, is a process we go through in our everyday life? Maybe we should all start there? Perhaps begin teaching algorithms with life examples before jumping inside the Big O.

Fortunately, there is someone who did!

I found a perfect three video series webinar on introduction to algorithms in everyday life. I won’t explain it all here as I advise everyone interested in learning to see these first. You can find the full 3-days webinar on ScII Chula’s youtube channel. Here is the first video. πŸ‘ˆ

What did I learn other than finding a perfect mate via the 37% rule?

Algorithms are both simple and complex. What makes algorithms complicated is not what they are, but how they are made. It is work by an x amount of people who we will never find out why or how they wrote it. It is work that never finishes, as we keep evolving, creating better codes, adding on top of the old one, patching, etc. So the complexity keeps growing. The work is never over, and the algorithms are never finite.

The examples used in these videos were much more applicable to my visual brain than the whole mathematical number of sorting cases and codes. I highly recommend these to anyone wanting to start understanding algorithms. Oh, and I love how I can use flowcharts along with pseudocode to build them! #flowchartgeek

My favorite method is exploration/exploitation. It is an algorithm for searching for the best thing that you want. You explore, but for a finite amount of time. Then, you select the best moment to leap and exploit the best alternative thus far while continuing to explore, in intervals. You know, just in case. πŸ€·β€β™€οΈ

I got a book from their recommendations that I think will help me see better from a programmer’s perspective. The book is called “Algorithms to Live By: The Computer Science of Human Decisions” by Brian Christian. I hope to have it finish this week and will share my thoughts on it in a later post somewhere next week. So keep an eye on that!

Now, some reflective fun:

How I learned about algorithms in algorithm

Go easy on me, it was my first. πŸ’•

Leave a Reply

Your email address will not be published. Required fields are marked *