A funny book about Afghanistan and Pakistan? Sounds like an oxymoron. Where is the comedy in a war that continues to claim U.S. and Afghan lives? What is comic about suicide bombers and IEDs, or a nuclear-armed Pakistan, reeling from chronic dysfunction?

Remarkably Kim Barker — a reporter at ProPublica and the South Asia bureau chief for the Chicago Tribune from 2004 to 2009 — has written a hilarious, harrowing, witty and illuminating account of her experiences covering both countries, “The Taliban Shuffle.”

Barker is adept at dramatizing her adventures as a reporter — depicting herself as a sort of Tina Fey character who unexpectedly becomes addicted to the adrenaline rush of war. Her voice in these pages captures both the serious and the seriously absurd conditions in “Af-Pak,” and the surrealism of being a female reporter, whose dating problems range from a boyfriend competing to cover the same story to being romantically pursued by the former prime minister of Pakistan. Black humor, it turns out, is perfect for summarizing the sad/awful/insane incongruities of war.

Barker observes the shocking lack of security in Pakistan after the assassination of former Prime Minister Benazir Bhutto. Of a meeting in Islamabad between newly sworn-in Pakistani President Asif Ali Zardari and Afghan President Hamid Karzai, she writes that it “featured absolutely no security, no metal detectors, no bag searches, even though the list of people who wanted to kill either man was surely the size of a New York phonebook.”

She conveys how small the war in Afghanistan still was in the spring of 2005, before insufficient U.S. resources and growing anti-foreigner sentiment fueled the Taliban’s resurgence: “Sure, the Taliban blew up things in the south, but so far they mostly blew up themselves, and their attempts to use recalcitrant donkeys as suicide bombers” (known as DBIEDs, donkey-borne improvised explosive devices) “only provoked laughter.”

On the challenge the U.S. faces in trying to develop a police force in Afghanistan, she writes, “This was a largely illiterate country … where young men from the provinces didn’t know how to lace their boots because they’d never had boots.”

As for Afghanistan’s chaotic election process, Barker notes that, in the 2005 parliamentary elections, voters had to choose from 390 candidates: ” “… Each candidate had a photograph and a symbol, because many Afghans were illiterate. But creativity ran out, and symbols had to be reused. Candidates were identified as different objects, including a pair of scissors, one camel, two camels, three camels, two sets of barbells, mushrooms, two ice-cream cones, three corncobs, two tomatoes, stairs, a turkey, two turkeys, one eye, a pair of eyes, a tire, two tires, three tires — to name a few.”

Nor were matters helped by the bad behavior of foreigners, who had brought booze and brothels to Afghanistan. “It was a place (for them) to escape,” she goes on, “to run away from marriages and mistakes, a place to forget your age, your responsibilities, your past, a country in which to reinvent yourself. Not that there was anything wrong with that, but the motives of most people were not likely to help a fragile and corrupt country stuck somewhere between the seventh century and Vegas.”

Barker readily acknowledges her own eager enrollment at “Kabul High”: how she rented a room in the “Fun House,” a kind of dorm filled with journalists, U.N. workers, lawyers and other Westerners orbiting the war — temporary expats who forged fast, intense friendships that were galvanized by adversity, the curfews and the frequent power failures.

Eventually, Barker says she realized she “had turned into this almost drowning caricature of a war hack, working, swearing and drinking my way through life and relationships” and that she “had a choice — I could choose life, or I could choose to keep hopping from one tragedy to the next.” Her decision: to return home before it was too late.

She is not optimistic about the countries she left behind. “At some point,” she writes, “I realized the horrible truth — the United States and its allies could win every single battle in Afghanistan and blow up every single alleged top militant in Pakistan, but still lose this war.”