Live data from Hacker News

Algorithms

khanacademy.org

131–140 of 163 posts

Re: Algorithms

#131
post #44

Earlier quoted context omitted.

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

Back in 2010, I was on a team with a intake of about 1 TB per day of mapping data, all of which needed to be integrated with previous data and condensed into processed output. I quite assure you that we cared a _lot_ about the runtime complexity of our algorithms. All the really interesting jobs require knowing data structures, algorithms and discrete mathematics well.

Sure. But that just means they're more domain specific than fundamental, at least as far as tech interview conventions go. To name another core CS subject- understanding operating systems and the underlying assembly and machine language that your nifty web and mobile platforms are built upon are important. But they're not relevant to every single type of job.

Re: Algorithms

#132

Earlier quoted context omitted.

If the 'javascript hacker' doesn't learn about the difference between iterating through a list and binary searching, and how/when one is better than the other, yes it is a problem. I say this as a self taught programmer who studied a non-CS engineering well after learning about big-O.

Can you give me an example of when a front end developer would need to do either of those things? On the back end sure, but on the front end? Who in the world is using JS to iterate through a list or do binary searching on the front end?

And also who in the back-end uses binary search? We're the people who invented NoSQL databases with HTTP/Json interface, because traditional databases were too much of a hassle.

The DBs implement the binary-search, not the back-end Dev.

For the average programmer, IMHO learning about data structures/algorithms makes you a better programmer, but it's not that essential.

Re: Algorithms

#133
The Algorithm Design Manual by Skiena is pretty great.

https://www.amazon.com/Algorithm-Design-Manual-Steven-Skiena...

It's nearly a third of the length of CLRS, and half of Sedgwick. Much more precise, yet offers more in that it talks about common problem solving uses cases with data structures and algorithms, rather than writing going through the theoretical proofs behind them.

Re: Algorithms

#134

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.

Hardly. How often is it that you can read an uncommented Python program that implements a tricky algorithm, and you can easily recover basic things like loop invariants?

For that you'd really want something like Dafny https://www.microsoft.com/en-us/research/project/dafny-a-lan...

where your program doesn't even compile if you don't give it the right invariant.

Re: Algorithms

#135

This is an excellent course and helped me get my current job. My background is chemistry/chemical engineering. I had applied for a data scientist position. Phone interview included a problem where I was asked about my solution's complexity. I admitted I didn't know about it. Still got called back for an interview on site, but the weekend before I powered through this course. Unsurprisingly, it came up in the on-site…

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.

Common Lisp is the rebel leader, but is hampered by constant infighting.

Re: Algorithms

#136

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.

Seems like a terrible filter. Some CS grads who slept through college will fail, while some non-CS grads who studied on their own will pass. Of course, to me, that would a feature, not a bug; but if you really want to filter on "university education in computer science", just read their resume instead.

Re: Algorithms

#137
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.

While I applaud Python to have established a well-designed[1] layer on top of the math/numeric libraries written in Fortran, C and C++, I hope that one day Rust will smoothen the corners.

While Rust might not become a replacement for the Python layer, it may replace the C/C++/Fortran layer with all their speed and low-level optimization, yet provide good (and especially safe!) abstractions on top of that.

Currently, people try to use C++ to fill that gap, but I'd love to see Rust's type system, borrow checker and macro system, instead of C++ templates.

[1] As opposed to Mathematica, MatLab, etc.

Re: Algorithms

#138
post #103

The Coursera Stanford [0] and Princeton [1] courses start again soon, February 20 to be exact. Not sure which one is better, but to refresh my atrophied CS skills of 10 years I've joined the Stanford course. Not sure how it compares to the Khan Algorithms course. Anyone have any feedback? [0] https://www.coursera.org/learn/algorithm-design-analysis/ [1] https://www.coursera.org/learn/algorithms-part1/

This is just my opinion and I'm sure it differs from others... Roughgarden's class is advance and expects mathematical maturity. You may find his course quite fast and rough if you are a beginner. Sedgwick's class is much easier. He is a bit boring and tries to use "real life" examples (in some instances) from the physical sciences to make the material relatable. This in my opinion detracts from the material. Also, h…

I'm going through Sedgewick's class right now. Is the MIT OCW's course math heavy? It lists "Mathematics for Computer Scientists" as a prerequisite, I am somewhat familiar with the material, but not in a very deep level. Should I take that one before?

Re: Algorithms

#139

The Algorithm Design Manual by Skiena is pretty great. https://www.amazon.com/Algorithm-Design-Manual-Steven-Skiena... It's nearly a third of the length of CLRS, and half of Sedgwick. Much more precise, yet offers more in that it talks about common problem solving uses cases with data structures and algorithms, rather than writing going through the theoretical proofs behind them.

I really love the war problems.

Re: Algorithms

#140
post #14

Another great resource I highly recommend: https://www.manning.com/books/grokking-algorithms

I didn't care for this book. I found though the use "doodle drawings" for visualization to be hard to look at and distracting. The book felt half-finished to me. For instance how does an algorithms book not include anything on trees? I think a much better and free alternative is: http://interactivepython.org/runestone/static/pythonds/index...

I'm currently referring this book to learn Python and Algorithms both in one go. Looks good so far.

PS: I'm an experienced programmer (Perl).

Post reply on HN