The first computer bug was a literal bug.

To be exact, a moth.

On Sept 9, 1947, a moth got trapped in Harvard University's Mark II computer -- causing multiple errors.

This bug disrupted the electronics inside the Mark II.

Here's a photo of that first computer bug.

@atomicpoet i'm curious, is this why the name "bug" was given to computer errors?
@ipg Yes.

@atomicpoet I remember reading the word "bug" was used way before 1947.

I could only find Edison's use of it in 1878 but I remember reading about an even older reference but a quick search didn't help me find it.

Edited to add link to source: https://interestingengineering.com/innovation/the-origin-of-the-term-computer-bug

@ipg

What is the origin of the term "computer bug"?

Computer bugs are occupational hazards for programmers and software developers. But have you ever wondered about the origin of the term computer bug?

Interesting Engineering
@hvangalen @atomicpoet @ipg
From Oxford English Dictionary
@hvangalen @atomicpoet @ipg I'm a librarian (at MIT). I can't help myself.   đŸ¤“

@Dlenares @atomicpoet @ipg Cool, yeah that rings a bell! I remember that originally 'bug' already meant a glitch in a system and was in use before computers were a thing. The first *computer bug* is of course still the one mentioned by the OP, which poetically happened to be a real bug.

Thanks for looking it up!

@hvangalen @Dlenares @atomicpoet @ipg
Love this discussion on the origin of bugs in computers and other machines 😍
So for code debugging, one should be using insecticide, naphthalene, or similar.
@TatianaIlyina @hvangalen @Dlenares @atomicpoet @ipg Why not DDT ? It's been a while, but CP/M's Dynamic Debugging Tool (DDT) worked pretty well as I recall.
@hembrow @hvangalen @Dlenares @atomicpoet @ipg
OMG, yes DDT and I thought of Dichlorodiphenyltrichloroethane which was banned in 1970s 😅
@TatianaIlyina @hvangalen @Dlenares @atomicpoet @ipg It was only banned in some parts of the world, and then of course we replaced it with a multitude of other insecticides with all sorts of other effects.
An aside: In the early 70s, when I was still in primary school and years before I used CP/M, we did a school play about bioaccumulation and DDT. This was well after "Silent Spring" of course and these problems were quite common knowledge but for some reason we just keep using that stuff anyway.
@hembrow @hvangalen @Dlenares @atomicpoet @ipg
More than half a century after Silent Spring and we write doctoral dissertations on the topic. Mine was actually about modeling the fate of pollutants like pesticides and insecticides in the sea.
@hembrow @TatianaIlyina @Dlenares @atomicpoet @ipg Haha I just made a DDT joke totally unaware that it already did exist. Of course it does, because many coders are a funny bunch!

@TatianaIlyina Someone called Daisy should create and release a Debugging Toolkit. 😅

@Dlenares @atomicpoet @ipg