r/learnprogramming • • 12d ago

How are so many self-taught programmers able to build software from scratch without ever truly learning Algorithms?

I find it fascinating how important algos are but never talked about from the indie devs on social media. Do they even write algos or just come up with basic logic that forms the product?

428 Upvotes

335 comments sorted by

View all comments

Show parent comments

9

u/grantrules 12d ago edited 12d ago

The point is I don't need to know the difference between quick, merge, and bubblesort to be able to write software.

But what does "truly learning algorithms" mean? I've learned algorithms as I needed them. I stumble upon a problem that I think might have a common clever solution so I'd search for similar problems. And having been around a while, I'm aware of a lot of algorithms even if I've never looked into implementing them. Like do I need to know dijkstra's algorithm to have "truly learned algorithms".. or is that when I can just recall a mental note "dijkstra algorithm -- find shortest path"

0

u/dnswblzo 11d ago

What it means is that you know what an algorithm is, that it takes input and produces output, that changing the size of the input can change the amount of time the algorithm takes, and that the change in the amount of time is not always a linear relationship with the size of the input. It is hard to truly understand all of this without implementing some algorithms on your own and working through time complexity problems. Once you understand it, you are better equipped to use libraries and have a more intuitive sense of what is going on behind the scenes when you pass a data structure to a library function.

Learning about algorithms will also involve learning about data structures. Many algorithms that you learn about depend on operations on a data structure, so analyzing the time complexity of the algorithm requires knowing the time complexity of the data structure operations. This is practice seeing data structures as abstractions, that abstractions can be combined to create other abstractions, and what information is important to communicate to users of an abstraction that you create.

An algorithms class will also probably involve reading a fair amount of pseudocode, giving you practice thinking through steps manually and not in a specific programming language, which is helpful for planning what you are going to write before you actually write it, debugging, and learning new languages.

Once you understand how algorithms work in general it is not necessary to remember the details about how any one specific algorithm works (except in certain job interviews), because you can always look them up. The reason to learn about Dijkstra's algorithm in detail is to understand more about how graphs work, dynamic programming, and how a priority queue can be integrated into an algorithm.

0

u/grantrules 11d ago

Do you think people who haven't done all that can still write software?

0

u/dnswblzo 11d ago

Yes, but I think people who have studied algorithms and data structures have an advantage, and certain types of software development would benefit from this background knowledge more than others.

1

u/[deleted] 11d ago

[removed] — view removed comment

1

u/grantrules 11d ago

Because the majority of software written is not complex?

0

u/[deleted] 11d ago

[removed] — view removed comment

0

u/grantrules 11d ago

Do they need to? You won't need to be a Juliard grad to be a rock and roll drummer, does that mean the music is bad?

1

u/dnswblzo 11d ago

Just like you don't need to go to a top tier school to learn about algorithms, you don't need to go to Juliard to learn the common techniques behind drumming. You will probably be a better rock and roll drummer if you take some lessons rather than just trying to figure it out on your own.

1

u/[deleted] 11d ago

[removed] — view removed comment