Skip to content
DevMeme
2621 of 7590
CS Fundamentals Post #2900 · source on Telegram

The Off-By-One Handshake: A Software Dev Interview

Description

A four-panel comic from 'Cyanide and Happiness' by Explosm.net, illustrating a classic programmer joke. The first panel shows a job interview setting where the interviewer asks the candidate, 'Can you count from 5 to 10?'. In the second panel, the candidate confidently replies, 'Sure. 5, 6, 7, 8, 9'. The third panel shows the interviewer immediately saying, 'You're hired!'. The final, larger panel provides the context, showing the two characters shaking hands inside an office with a sign on the door that reads 'Software Dev'. The humor is rooted in the common 'off-by-one' error in computer programming. Many programming languages use zero-based indexing and exclusive upper bounds in ranges (e.g., a loop from 5 to 10 would run for indices 5, 6, 7, 8, and 9). The candidate's answer, while mathematically incorrect, perfectly reflects a programmer's mindset, making it an unintentional competency test that he passes with flying colors

Comments

23
Anonymous ★ Top Pick This is the only interview where answering '10' would get you flagged as a potential product manager
  1. Anonymous ★ Top Pick

    This is the only interview where answering '10' would get you flagged as a potential product manager

  2. Anonymous

    Hired on the spot - any dev who instinctively treats “to 10” as an exclusive upper bound will fit right in with our for-loops…and our sprint commitments

  3. Anonymous

    The real tragedy isn't that they missed the off-by-one error - it's that after 20 years in this industry, I've seen production code deployed by 'senior' engineers who would genuinely celebrate getting 5 out of 6 numbers right in a for loop

  4. Anonymous

    This perfectly captures the industry's FizzBuzz paradox: we mock candidates who can't solve trivial problems, yet simultaneously hire anyone who can count to 9. The real kicker? The candidate didn't even make it to 10, demonstrating a classic off-by-one error in their understanding of the requirements - and still got hired. It's the software equivalent of 'we're not looking for perfection, just someone who shows up.' Senior engineers know the truth: the ability to recite numbers has about as much correlation with writing production-grade distributed systems as knowing how to spell 'Kubernetes' has with actually operating a cluster at scale

  5. Anonymous

    Hired for nailing the half-open interval - because in dev interviews, stopping at 9 proves you grok loop invariants better than fencepost arithmetic newbies

  6. Anonymous

    Interview litmus: “count from 5 to 10.” Stop at 9 and you’ve internalized half‑open ranges; include 10 and you’ll internalize our on-call rotation

  7. Anonymous

    We hired them because they parse requirements as [5,10) - keeps the fenceposts out of prod

  8. Алексей 5y

    в чём прикол

    1. Deleted Account 5y

      мем для джунов

      1. Алексей 5y

        а конкретнее?ъ

        1. Terry Filch 5y

          5+6+7+8+9

          1. Deleted Account 5y

            1000-7

            1. @leroifrancais 5y

              Ор

          2. @haievskyi 5y

            шо?

          3. Алексей 5y

            шо?

  9. @haievskyi 5y

    а это не о range(5, 10) > 5,6,7,8,9

  10. Алексей 5y

    а где 10

  11. @haievskyi 5y

    первое включительно последнее нет

  12. @mikhomak 5y

    блять что это зп хуйня ебучая

  13. @mikhomak 5y

    уххх сука даже промолчать не смог

  14. @Subeltz 5y

    english plz

  15. @its_sauce 5y

    - can you count to 10? = of course. 1, 2, 3, 95, 4, 98, 2000, 7, 8, 8.1, 10 - you're hired. Microsoft

    1. @RiedleroD 5y

      you forgot me, xp and vista. Some people say those aren't real numbers, but I'm pretty sure they're just irrational.

Use J and K for navigation