Why You Should Practice Algorithms

October 01, 2018

coding algorithm

Let me throw out a quick question: why do developers get paid?

Is write lines of code? How about on a higher level than that- maybe developers are employed to build websites or set up servers and databases.

Maybe developers don’t do anything and just get paid to grumble about the vending machine’s limited selection of energy drinks.

The real reason developers draw a paycheck isn’t any of the above. Those might all be things that developers do, but they’re not really the end goal.

Here’s why you get a paycheck in development: you solve problems using technology.

That’s it. It’s not about a language, a framework, IDE’s or databases. It’s all about solving problems. That is what you’re payed to do, and that is - when it’s all said and done - what you should be really good at.

Is a part of solving problems getting good in a specific language? Sure it is. How about having a fundamental understanding of how the internet works and how HTTP requests are sent and responded to? Yep, that’s part of it too. Learning frameworks, supporting multiple browsers, using ORM’s- these are all things that HELP us solve problems, but they’re tools to accomplish the overall purpose of problem solving.

I’ve always believed that fundamental problem solving skills are more important than specific language or framework knowledge. You can take an udemy course for a week and dive into a new framework for a job - but problem solving isn’t something you can just learn to do by taking a quick class. It’s the reason smart companies will look to hire people who have a track record of problem solving, even if they’re lacking in a particular skill set. That’s why, when it comes to focusing on what you should spend time on, it’s important to keep refining your problem solving abilities.

So how do you work on your problem solving skills? One of the best ways I’ve found to work on problem solving is by practicing coding algorithms. These are simple exercises that ask you to write a method (or multiple methods for more complicated ones) to solve a given problem.

Practice algorithms draw a strong parallel to real-world development in that there are multiple “correct” solutions available. Some might be more performant, some might use fewer lines of code, some might be have lower cyclomatic complexity (be more readable by other developers). Which should you strive for? Well, just like in real life, there are tradeoffs to all these approaches - and that’s a whole different blog post anyway :)

So where should you look for algorithms to practice on? One site that I love is codewars. Codewars offers problems with a wide range of difficulty levels that can be solved in a large number of programming languages. Free Code Camp is a great site if you’re just working on your Javascript chops.

Are algorithms all you need to practice to become a great developer? Of course not. Software development is a complex process, and a wide variety of tools are needed. But for refining your problem solving skills (and picking up language-specific mastery along the way), algorithms are a great way to spend a few lunch breaks a week!

John D Potts

John D Potts

Web developer and speaker in Charlotte, NC.