Arrogance, flattering attention and proximity to fame combine with corrosive effect on good judgment and perspective. The timeless lesson is being played out in Washington, D.C., to the mortification of many.

As events unravel and the cast of characters expands, someone must be working on a computer app to keep track of the details.

The resignation of David Petraeus from the top job at the Central Intelligence Agency because of an affair with his biographer is a sad story for them and their spouses and families.

Secrets are hard to keep when the modernity of the Internet combines with the ancient toxicity of jealousy. Petraeus’ paramour apparently sent threatening emails to another woman, and she was upset enough that their contents were shared with the FBI.

Unlimited Digital Access. $1 for 4 weeks.

Turns out a federal agent who knew the second woman and worried about security issues has been compromised by the transmission of shirtless pictures of him to her.

People in sensitive, vulnerable jobs are presumably held to higher standards, because their lapses of discretion have potentially profound consequences.

Petraeus is a decorated general with a gift for leadership. His biographer, Paula Broadwell, is a West Point graduate who had approached Petraeus for mentoring. A best-selling book evolved out of the relationship. One thing led to another, including headlines.

Now it turns out the man in line to replace Petraeus apparently exchanged tens of thousands of pages of emails with the woman who provoked Broadwell.

Investigators have not found — or at least acknowledged — any compromises of U.S. security interests.

What began as a tragedy for two families is starting to invite a measure of cynicism about the amount of free time some highly paid people with important jobs have to get into mischief.