3 ms·
> Nobody has all the answers. Nobody has memorised AOCP and every DS&A book written. The trick to not being an imposter is knowing you don't know, but that you
by arvinsim 10y ago
> Nobody has all the answers. Nobody has memorised AOCP and every DS&A book written. The trick to not being an imposter is knowing you don't know, but that you have the means to figure it out even if nobody else has before. You want to go dive into the books, into the theories, into discussions with colleagues and everybody else you can find who might have a handle on it.
That is true. But if you look at the way some companies does interviews, they do seem to expect you to memorize a lot programming trivia.
If am to be honest, I have forgotten how to implement the shortest route from using a directed graph from scratch. But I am confident that I can easily reconstruct the implementation after I review the actual algorithm since I have done it before. I never had to implement it myself in production in all of my years of programming.
But then again, maybe I am just stuck on one of those programming jobs that are considered 'menial'.
- PaulRobinson 10y agoExactly, so the way that interview should have gone is something like: Candidate: I'm not sure, I think I remember something about A* or something. Me: Cool, that sounds familiar to me as well. How about we go google it up and then have a look at implementing it. Here's some source data that comes from our supplier, let's pair on getting something working... And an hour later, we would have built something trivial but useful, and I'd be happy.
- LyndsySimon 10y ago> If am to be honest, I have forgotten how to implement the shortest route from using a directed graph from scratch. I've never known, because I've never had to do it. What I do know is that I've read about Dijkstra's Algorithm solving a very similar problem. A quick Google leads me to Wikipedia, which has a section on specialized algorithms for directed graphs. This is the type of background information and research ability I would expect from a developer, not that they would necessarily be able to recite the correct algorithm and implement it without checking a reference.
- AstralStorm 10y agoEven for this, search engines are a good starting point. You might want to look for libraries under a suitable licence, for algorithms in both wiki and research papers, lastly in a book. If it is some implementation detail first docs then sources. If that fails, look for a blog (weirdness is often blogged about), only finally ask a friend. Stack Overflow (and Math Exchange) is a meagre source mostly useful for details and even then answers are very varying in quality, typically poor but a decent starting point for proper analysis. Never take a ready made solution without understanding its limitations and important details. I've seen poor or cruft libraries used where better ones existed. Also second guess pulling a big framework whole. Something like Boost might have many things, but they tend to have important shortcomings, so might not fit. (Say, their parser lib, concurrency extras, matrix math) Lastly if there is nothing useful, there are general ways to implement algorithms. If doing something yourself, take platform specifics into account if performance matters.
- LyndsySimon 10y agoIn my experience, finding the right search terms is 80% of the battle. Knowing the phrase "Dijkstra's Algorithm" is a big leg up here, and would put me only one or two degrees of separation away from the correct answer. If I didn't know that term, then I'd search "shortest path directed graph". That leads to a Wikipedia article with links to a variety of algorithms.