Live data from Hacker News

Algorithms

khanacademy.org

61–70 of 163 posts

Re: Algorithms

#61
My high-school-age daughter is using Khan Academy to learn about logarithms for her math class. She was telling me about it, and I thought "hmm, maybe I should finally figure out what Big-O actually means". Now here we are! I guess we'll both be on KA tonight.

Re: Algorithms

#62
post #44

Earlier quoted context omitted.

And now in your current job how often are you evaluating the complexity and implementing specialized algorithms?

Implementing: never. Evaluating: occasionally. In my opinion, an understanding of data structures is _much_ more useful for a data scientist than algorithms. Why should data scientists know about algorithms? Because data scientists are typically interviewed by computer scientists/software engineers, and that's what they tend to ask. I recently conducted many phone and on site interviews for a data scientist position.…

For software engineers, algorithmic complexity is a good filter for, say, Javascript hackers vs people with a university education in computer science. Just saying.

Re: Algorithms

#63
post #36

Earlier quoted context omitted.

If Python is the king, C is the court jester juggling knives. Done well it looks amazing, elegant, and efficient, but in the wrong hands you'll lose your hands.

It also forces you to know what's happening under the hood though. If learning the material comprehensively is your goal I think it's not a bad idea to dig in to a c implementation.

At this point, I would recommend Rust for the "under the hood" part, while forcing you to write safer code.

Re: Algorithms

#64
post #36

Earlier quoted context omitted.

Python is the algorithm king as far as I'm concerned. It really gets out of your way and lets you focus on the abstract nature of what you're trying to accomplish.

If Python is the king, C is the court jester juggling knives. Done well it looks amazing, elegant, and efficient, but in the wrong hands you'll lose your hands.

I am slowly working my way through CS50 on EDX and its an interesting experience doing an intro to CS type course in C for sure.

Re: Algorithms

#65

Earlier quoted context omitted.

Implementing: never. Evaluating: occasionally. In my opinion, an understanding of data structures is _much_ more useful for a data scientist than algorithms. Why should data scientists know about algorithms? Because data scientists are typically interviewed by computer scientists/software engineers, and that's what they tend to ask. I recently conducted many phone and on site interviews for a data scientist position.…

For software engineers, algorithmic complexity is a good filter for, say, Javascript hackers vs people with a university education in computer science. Just saying.

And in your mind, "javascript hackers" are worse than "people with a university education in computer science" at doing modern front-end web development?

In my experience, building performant web applications is much more about things like reducing bundle size, making sure animations are hardware-accelerated, being smart about _when_ you do complex work... The cost of using an O(n^2) algorithm over an O(n) algorithm will rarely have a tangible impact, since you don't typically deal with item sets that large on the client.

Not debating that CS fundamentals are valuable, just that they are _far_ from the most important skillset to have. Give me a JS hacker who understands page load times over a CS grad who writes his own bucket sort algorithm any day.

Re: Algorithms

#66
Odd choice to start with the iterative factorial before moving on to the recursive one. Usually it's the other way around, since the iterative algorithm is faster and uses less memory.

Re: Algorithms

#67

Odd choice to start with the iterative factorial before moving on to the recursive one. Usually it's the other way around, since the iterative algorithm is faster and uses less memory.

Recursive might be harder to grok to someone new because of the implied stack.

However, once you understand the iterative version, it's probably easier to understand how the recursion is actually working.

Re: Algorithms

#69

Earlier quoted context omitted.

It also forces you to know what's happening under the hood though. If learning the material comprehensively is your goal I think it's not a bad idea to dig in to a c implementation.

At this point, I would recommend Rust for the "under the hood" part, while forcing you to write safer code.

Probably a good idea!

Re: Algorithms

#70

It's strange they didn't cover dynamic programming at all. IMO every course should include at least one classical example of dynamic programming. For example: https://en.wikipedia.org/wiki/Longest_increasing_subsequence https://en.wikipedia.org/wiki/Longest_common_subsequence_pro...

I'd never heard of the expression "dynamic programming".

https://en.wikipedia.org/wiki/Dynamic_programming

Am I to understand that it is "just" recursion with caching?

Post reply on HN