←back to thread

108 points atan2 | 2 comments | | HN request time: 0.407s | source
Show context
JKCalhoun ◴[] No.46226188[source]
The appeal of bubble sort for me is that is it the only one I understand well enough to implement myself without having to think much about it.
replies(9): >>46226273 #>>46226459 #>>46226558 #>>46226657 #>>46226707 #>>46226774 #>>46229431 #>>46229476 #>>46229497 #
ExtremisAndy ◴[] No.46226273[source]
I felt this comment in my soul. I’ll never understand it: I’ve written thousands of lines of code (as a hobbyist) to solve all sorts of problems I’ve run into and yet always seem to struggle to wrap my mind around the core algorithms any real developer should be able to handle easily. This is why I’ve never pursued programming as a career.
replies(2): >>46226747 #>>46227691 #
vbezhenar ◴[] No.46226747[source]
It took computer scientists of the past, a lot of effort to come up with these complicated algorithms. They are not easy or trivial. They are complicated and that's OK that you can't just quickly understand them. Your imaginary "real developer" at best memorised the algorithms, but that hardly differs from smart monkey, so probably not something to be very proud of.

It is your choice which career to pursue, but in my experience, absolute majority of programmers don't know algorithms and data structures outside of very shallow understanding required to pass some popular interview questions. May be you've put too high artificial barriers, which weren't necessary.

To be a professional software developer, you need to write code to solve real life tasks. These tasks mostly super-primitive in terms of algorithms. You just glue together libraries and write so-called "business-logic" in terms of incomprehensible tree of if-s which nobody truly understands. People love it and pay money for it.

replies(1): >>46226850 #
melagonster ◴[] No.46226850[source]
Thanks for your kind comment! I do not have any systematic leaning of computer science; I often feel confused when reading textbooks on algorithms hahaha.

Should I be familiar with every step of Dijkstra’s search algorithm and remember the pseudocode at all times? Why don’t the textbooks explain why the algorithm is correct?

replies(2): >>46227800 #>>46229343 #
1. monadgonad ◴[] No.46229343[source]
> Should I be familiar with every step of Dijkstra’s search algorithm and remember the pseudocode at all times?

Somehow, I think you already know the answer to that is "no".

I've been working as a software engineer for over 8 years, with no computer science education. I don't know what Dijkstra's search algorithm is, let alone have memorised the pseudocode. I flicked through a book of data structures and algorithms once, but that was after I got my first software job. Unless you're only aiming for Google etc, you don't really need any of this.

replies(1): >>46230408 #
2. chopin ◴[] No.46230408[source]
You should know the trade-offs of different algorithms, though. Many libraries let you choose the implementation for a spcific problem. For instance tree vs. hash map where you trade memory for speed.