Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> But it's easy for the algorithm to hide subtle bugs.

For sure, but I guarantee you the interviewer from the grandparent comment wasn't looking for correctness and safety when they asked to implement a binary search.

They ask the binary search question to check if the applicant knows what an algorithm is and if they ever had to implement one. (Any algorithm.)

Sadly, 90% of programmers these days don't and haven't.

> In Python you should probably just use the bisect module in practice, most of the time, rather than reimplementing it.

Well, yes, most developers ship software without ever having to actually program.



> I guarantee you the interviewer from the grandparent comment wasn't looking for

What, the company that interviewed James Hush about binary search was your company? Have you thought about the possibility that maybe he also interviewed at at least one other company which used different evaluation criteria? Maybe you should put a little bit more effort into correctness yourself!

> They ask the binary search question to check if the applicant knows what an algorithm is and if they ever had to implement one. (Any algorithm.)

> Sadly, 90% of programmers these days don't and haven't.

That makes no sense. Every program or subroutine implements an algorithm. If you haven't written any programs or subroutines you aren't a programmer.

> Well, yes, most developers ship software without ever having to actually program.

This reminds me of when I was a kid and we thought it wasn't "actually programming" when we programmed in BASIC or Pascal because actual programs were written in assembly. We were wrong about that.




Consider applying for YC's Summer 2026 batch! Applications are open till May 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: