📎 Webclip
The Worst Programming Interview Question I've Ever Seen ! - A CODER'S JOURNEY
The post describes an interview question about summing the integers from 1 to 1000 and argues that it is a bad screening question because it has one specific answer, rewards memorization, and does not match the work most candidates would actually do. The author says interview questions should reveal how someone thinks through unfamiliar problems, not whether they know a formula.
Reading notes#
- A colleague’s question about the worst programming interview question brings back an interview where the candidate was asked to compute the sum from 1 to 1000.
- The interviewer rejected the candidate because she used a loop instead of the closed-form formula n(n+1)/2.
- The author objects to questions that allow only one expected solution and leave no room to discuss approach or reasoning.
- The author says the formula-based solution depends on discrete math or calculus knowledge that many interns would not use in ordinary software engineering work.
- The author warns that hiring someone who knows the formula may reward memorization or math ability without showing coding skill or design judgment.
- The post says interview questions should fit the role and, for many companies, should involve algorithms and data structures with multiple possible solution paths.
- The author recommends books such as Algorithm Design Manual, Algorithms in a Nutshell, and Programming Pearls as sources of interview-style problems.
