this post was submitted on 25 Dec 2025
542 points (96.9% liked)

Programmer Humor

28043 readers
489 users here now

Welcome to Programmer Humor!

This is a place where you can post jokes, memes, humor, etc. related to programming!

For sharing awful code theres also Programming Horror.

Rules

founded 2 years ago
MODERATORS
 

Post:

You have three switches in one room and a single light bulb in another room. You are allowed to visit the room with the light bulb only once. How do you figure out which switch controls the bulb? Write your answer in the comments before looking at other answers.


Comment:

If this were an interview question, the correct response would be "Do you have any relevant questions for me? Because have a long list of things that more deserving of my precious time than to think about this!

you are viewing a single comment's thread
view the rest of the comments
[โ€“] Wirlocke@lemmy.blahaj.zone 11 points 1 day ago (1 children)

Here's my answer that works with any kind of lightbulb.

Flip switch 1 on, switch 2 off, and get switch 3 stuck in a halfway point which I've done on both lever switches and flat switches.

If it's on it's switch 1, if it's off it's switch 2, if it's flickering or dimmed it's switch 3 and you should probably turn it off to stop damaging the relay.

[โ€“] xthexder@l.sw0.com 9 points 1 day ago* (last edited 1 day ago)

Trying to get a switch stuck half way sounds like a good way to start a fire. If the bulb is dimmed, that means not all the power is making it to the bulb, and half of it is probably going into heating up the switch contacts. It could also be arcing inside the switch, which will also destroy the contacts. I think some new building codes require "arc fault protection" on circuits for this type of reason, in addition to "ground fault protection" (GFCI) on bathroom/kitchen circuits.