From a Harvard site about the Mark I, the first programmable computer in the United States:
Before 1944, electrical engineers already used the term “bug” to refer to hard-to-find physical defects that hindered the operation of an electric device… In 1947, a physical malfunction in the Mark II computer was traced back to a moth stuck in one of the relays. Grace Hopper taped it to the operations logbook with the annotation “First actual case of bug being found”.
A few other computer programming terms originated with the Mark I, including “loop” and “patch.”
PS. The Mark I was designed by Howard Aiken, whose quote you might remember from Steal Like An Artist: “Don’t worry about people stealing your ideas. If your ideas are any good, you’ll have to ram them down people’s throats.” (Aiken also said of the computer field: “The problem in this business is not to keep people from stealing your ideas, but to make them steal them.”)