|
|
|
|
|
by zeroname
2706 days ago
|
|
> I have no fucking clue how to write a BFS. I've never needed to know how to write a BFS. I will probably never need to know how to write a BFS. If I give you a description of what a BFS is, you as a programmer should be able to write one. A BFS is rather trivial. You shouldn't have to know how to write it, you should be able to figure it out. The same goes for implementing a linked list or the FizzBuzz problem. As a programmer, you need to make up algorithms on the spot to solve business problems. You don't know the solution beforehand, you figure it out, that's your job. It's the key skill that basically separates you from a typist. > There are more productive ways to interview someone; for example take a bug in your product and see if the candidate can fix it. This is a different skill. It's an important skill, but finding errors in an existing structure and fixing it is different from being able to create that structure in the first place. |
|
I'm working on something at the moment, and one of the key features is that while there's a fair amount of data, none of the structures are particularly big - and are very unlikely to ever become big.
So my thought process is that stupid brute force algos are absolutely fine for this domain.
If I have performance problems I can look into optimising them.
If I had hundreds of terabytes of data to start with, I'd take a different approach, and I'd research - not invent, because I don't care to reinvent a wheel if someone has already produced a much better solution - more efficient algos.
If none of the above work, then I'd consider improvising something and testing how it performs.
Would this pass your interview process or not? Do you want someone who's going to brute force an answer to your toy problem and think they've solved it with something that works but is inefficient, or someone who has memorised a collection of standard answers but maybe can't improvise something new, or someone who is going to check what's already available to save time, or someone who can improvise a super-efficient answer and do it even if it's not needed?
Who would you pick?
Do you really think this question has a simple answer?