Perfectionism Hinders Progress

What we can learn from greedy algorithms

March 28, 2021

Many people don't realize that the core of computer science is finding the most efficient ways to solve problems, a lot of times these problems have to do with sorting things, finding the most optimal route for something, or figuring out how to best arrange data. A lot of these problems are solved with the use of algorithms, an algorithm is a predefined set of steps that can be applied to a problem to solve it, in a way a recipe is an algorithm, we also follow an algorithm when we do arithmetic. There are several different types of strategies to create an algorithm to solve a problem, a brute force algorithm is usually simplest but doesn't always get a result as quickly as you'd like, divide and conquer is another type of strategy along with recursion, but one of the most interesting strategies for creating an algorithm is to shoot for what is called a greedy algorithm.

Unlike other types of algorithms, a greedy algorithm does not always come up with the best solution to a problem, but it will always get a solution. Often times path finding algorithms will be some sort of greedy algorithm since it is often impractical to search every possible path. Imagine the year is 2000 and you are on vacation in an unfamiliar city and you are trying to figure out how to drive to a particular location from your hotel, when you look at the roadmap you're not going to spend all day trying to find the fastest route there, you're just going to find a simple one since you don't want to spend an hour staring at a map trying to find the perfect route. Greedy algorithms work the same way, they look for the simplest solution which is rarely the best but it gets the job done. It could take a computer minutes or even hours to find the perfect solution to some problems but finding a simple solution that is more than likely 90% as good as the perfect one usually only takes seconds. Greedy algorithms sacrifice accuracy for progress.

It is important for us to learn from the greedy algorithm, many people today suffer from perfectionism. Of course perfection is a great thing to strive for, but an obsession with it can be harmful. I sometimes like to write stories and I used to always get caught up on what I wanted to name characters, one day I realized that I was spending so much time stressing over what to name characters that I ended up never writing the stories these characters were meant to be in. I realized that the overall story was more important than the names of the characters so I decided to just settle for whatever my first impression was for character names so that I could focus on the important stuff. Perfectionism was hindering my progress.

I've adopted this practice with this website as well, you'll notice that my older posts aren't as well structured as the stuff I put out now, if I had spent time trying to make everything perfect when I first started out this website would have a lot less today. Even the title that is on my homepage is something that I chose not to seek perfection on, it does not say "Jacob's Unnamed Blog" because I was trying to be clever, I put that there because I literally couldn't be bothered to think of an actually good name, I knew my time would be better spent on actually building the site instead of spending hours trying to think of a name. Nothing on this site is perfect (I didn't even spell perfectionism right when naming this file), I do strive for good quality, but perfectionism is unrealistic so I chose not to stress about it.

If you see yourself as a perfectionist I invite you to calm down. It can become too easy to get stuck on the smallest details and loose sight of the big picture. Don't let yourself fall into that trap, a lot of the time the details you get caught up on are details that most people wouldn't notice anyways. Strive for quality progress rather than perfection.