Flow is a state of total immersion in a task that is challenging yet closely matched to one’s abilities, akin to “being in the zone.” Flow occurs when a person’s skills match the level of challenge presented by the environment and when a task includes clear goals and immediate feedback. Tasks that are too easy are boring. In contrast, tasks that people perceive to be too difficult lead to anxiety.
The French loanword ennui comes from the very same Late Latin word that gave us annoy — inodiare ("to make loathsome"). We borrowed ennui several centuries after absorbing annoy into the language. Ennui deals more with boredom than irritation - and a somewhat specific sort of boredom at that. It generally refers to the feeling of jadedness that can result from living a life of too much ease. The poet Charles Lloyd described it well in his 1823 Stanzas to Ennui when he referred to that world-weary sensation as a "soul-destroying fiend" which visits with its "pale unrest / The chambers of the human breast / Where too much happiness hath fixed its home."