People say you don’t need algorithms because there is a good portion of work out there where you don’t need it. But at the same time there’s this:
Algorithms are hard
But they are everywhere when programming
So they are a necessary evil
There’s reading the solution, and understanding the solution. You want accomplish the latter.
There’s usually the following steps when being given a problem.
- Break down the question into the core problem.
- Understand the core problem
- Apply you current knowledge to formulate a solution to part of the core problem
- Implement your solution in code
Usually you want to go thru steps 2-4 while breaking down parts of the core problem. Learning to do something usually comes down to learning to do part of what you want to accomplish, and combining it all later. Programming is no different. (it probably is all it is)
The main thing is, the first time you are presented with a complex problem, you will be lost since you have little current knowledge to apply to the problem. Looking at the solution is fine at this point, but understanding it is very important. If you don’t understand part of it, break it down and figure out whats going on. (When your given a solution, you kind of want to do things backwards)
There’s also the fact knowing common algorithms provides solutions to a huge vast of potential problems. So knowing whats out there, and how to implement them basically gives you answers to an infinite number of problems.
I’m one of those that say learning algorithms is important because knowing how to do something is one thing, but knowing how to do it well is pretty important too.
The best thing todo is just go out and learn what’s out there, what its used for, and what sort of problems they solve. From there you can figure out how to implement it in code. If your looking at solutions you skip over the first, and most important step. I promise you no one coded their solution first, they just implemented an existing algorithm.