The comic made his piece with my book. (Victoria Will/Invision/AP)
Mark Whitaker is the author of "Smoketown: The Unknown Story of the Other Great Black Renaissance." Previously, he was managing editor of CNN and, before that, editor of Newsweek.

In journalism, as in life, sometimes you make your own luck.

After 35 years in the business, I learned that lesson again when I set out to write a biography of Bill Cosby. I had been a fan since I was a kid, listening to his comedy albums and watching “I Spy.” As a young parent, I loved “The Cosby Show.” But as a reporter, I was also fascinated by the contrast between his public image and his personal life: the non-racial comic who became a scold on trends in the black community; the iconic TV dad who weathered a sex scandal and the loss of his only son, all while staying married to the same woman for 50 years. And I figured that someone needed to capture Cosby’s life story while he and his contemporaries were still alive.

My first reportorial decision was to seek his cooperation. As a news executive, I had met Cosby several times, but I didn’t know him well. So I approached someone I knew he trusted: his friend and adviser Harvard psychiatrist Alvin Poussaint, who had been a source of mine since my college newspaper days. Poussaint agreed to speak to Cosby, but he called back to say that the comic wasn’t interested in helping me. A week later, I got a call from Cosby’s lawyer warning me he wasn’t going to talk.

I went ahead and wrote a book proposal anyway, promising only an independent assessment of Cosby’s career, and I got a deal. I started by focusing on the parts of his story that I could piece together without his help. I secured interviews with the producers and director behind “The Cosby Show” and reconstructed the “I Spy” years from books, articles and archived interviews with Sheldon Leonard and Robert Culp. But I also kept in touch with Cosby’s publicist,  and all my research paid off when he eventually started sending me e-mails about articles that “Mr. C” wanted me to see. By then, I had read them all, and they could tell I had done my homework.

Finally, more than a year into my reporting, the lawyer called again to say that Cosby wanted to speak with me. Then, on the day I announced that I was stepping down as managing editor of CNN, my assistant rushed into my office.

“Bill Cosby’s on the phone!” she said excitedly.

I picked up the phone.

“Congratulations!” boomed the unmistakable voice.

“Why are you congratulating me?” I asked.

“Mark,” he said (as though we were suddenly old friends), “when I write my routines I have a process I call ‘loading the boat.’ I’m going to help you load your boat!”

Cosby and Laurence Fishburne at the Kennedy Center Honors in 1998. (Rober A. Reeder/The Washington Post)

I heard from his representatives that Cosby was not going to answer any questions about the paternity lawsuit he faced or the murder of his son, Ennis, although they urged me to talk to others who had been with him on the day of Ennis’s death and at his burial. But Cosby himself imposed no other conditions, on me or on the dozens of people he encouraged to talk to me. Over the next year and a half I had a half-dozen phone interviews with Cosby — never planned, and never short. He loves to tell stories, and  meanders from memory to memory without any road map. But since I had been studying him for so long, I knew what he was talking about when he told me about Miss Forchic, the sixth-grade teacher whose ashes he keeps on the mantle of his study (next to his mother’s), and Gavin White, the track coach who got him into Temple University and whom he calls an “abolitionist”—his private term for white people who have helped him along the way.

When Cosby invited me to spend two days on the road with him, I knew precisely what I needed to get: recollections of his life before he became famous, and his thoughts about comedy. To my surprise, he told me that making people laugh has always been his second goal. His first has been to “put them there” — to pull audiences in with engrossing stories. Once I had access to Cosby and more than 60 of his closest friends and associates, I decided that’s what I would try to do: write a book that put readers there, showing them how Cosby’s life and career unfolded in real time and letting them draw their own conclusions, rather than telling them what to think. It comes out Monday.

I was under no obligation, but when the book was in galleys, I sent copies to Cosby’s publicist and lawyer so they would know what was coming. Although there were things in it they weren’t entirely happy about, they didn’t ask for any changes, because they knew I had solid sourcing for everything I had written. As difficult as Cosby and his representative were at the beginning, they were just as respectful of the work I had put in at the end. Every journalist has a story like that.

Oh, and one more journalistic lesson from this experience: It helps to pick a subject as riveting as Bill Cosby.