Why are Bugs Attracted to Your Computer Monitor?

According to Jim Liebherr, professor of entomology at Cornell University, certain flying insects have learned to use the largest natural night light (which, up until about 100 years ago, was most usually the moon) to navigate. The insects will fly above the treetops, keeping the moon in a fixed location, allowing them to determine their line of movement. Unfortunately (for an insect which happens to find itself in a darkened room) the light sources that people create are often brighter than the moon. The insect attempts to keep the computer monitor at a fixed position relative to its body, but because the light source is relatively close to the insect, the result is an ever-more-violent spiral leading directly to the light.