Flies are insects mentioned briefly in the How to Train Your Dragon Book series.
Flies are insects belonging to the Order Diptera, which encompasses at least 125,000 known species across all continents except Antarctica. They inhabit diverse ecological niches ranging from parasites to pollinators. Diet is equally diverse, ranging from nectar and fruit to the living flesh of vertebrate animals. Diet and environment may even vary within a species, depending on what part of the lifecycle the individual is in. Some adults don't eat anything. Fly larvae - commonly called maggots - eat their species-respective diet voraciously to sustain them through several larval stages and into pupal stage, before adulthood.
The most commonly recognized fly species may be the Housefly. Thought to have originated in the Middle East, houseflies have followed humans all over the world. They dine on any food item, feces, or garbage.
Another common species, one which is mentioned in the Book series, is the Bluebottle Fly (Calliphora vomitoria). This fly looks very similar to the Housefly, but has a bluish to greenish iridescence to its carapace. Bluebottles occur in most of Europe, North and Central America, and in Africa.
Small biting flies may also be referred to as "Midges". There is no one species called a midge. However, a common species that the author would have encountered and is common across Scandinavia is the Highland Midge (Culicoides impunctatus). This tiny fly can form swarms or clouds of female individuals that bite animals, including humans. They suck a small amount of blood for their eggs. Peak season is from late Spring to late Summer.
For the most part, flies are mentioned in the Book series as objects of comparison.
In reality, flies are considered pests and may also be vectors for human and other animal diseases such as Giardia, Cholera, and even Anthrax. Some fly species do serve as pollinators for some plants. Maggots on carcasses also help with decomposition in the food web. Charting the growth of maggots can also clue forensic scientists in to how long a person or animal has been dead. Maggots and pupae of some species may also be used as fish bait.
When Alvin the poor-but-honest farmer is first discovered in the coffin of Grimbeard the Ghastly, the Hooligans think he is a corpse. However, Hiccup astutely notices that "the face was all slimy and drippy, but it wasn't crawling with maggots or anything disgusting."
Sharkworm hunting habits are described, specifically an extendable set of back teeth that can snap forward to grab prey and bring it back to the mouth, "as the tongue of a lizard flicks out to catch a fly."
While Fishlegs is ill, he is describes as being "hot as fire, weak as a fly in a spider's web, and talking nonsense."
Later, a noticeable tic in Norbert the Nutjob's left eye is described as "jerking around frantically like a fly doing a jig."
Toothless is described as having "the reflexes of a bluebottle", when getting out of the way of a swipe from an angry One Eye. To note, 'bluebottle' may also refer to a type of jellyfish. However, in context, flies have much quicker reflexes.
Large numbers of midges are seen at the beginning of Book 5. They bite at the Viking Novices and their dragons during a "Herding-Reindeer-on-Dragonback" lesson during an unusually hot summer. The dragons use their tails as horses and cattle do "to keep off the midges and flies."