Early in his police career, John R. Bailey discovered he faced TV-inspired expectations when it came to crime-solving.

The Tredyffrin Township detective, who retired last month after 34 years, recalled responding to a dispatch about a stone-throwing vandal in the early 1980s. After he had interviewed the victimized Main Line homeowner and surveyed damage to a window, Bailey said, the woman became indignant when he started to leave without the projectile.

"Aren't you going to take it with you for evidence? That's what Chin Ho does on Hawaii 5-0," she said.

Bailey said the exchange, like many over the years, stuck with him. He said he hoped such knowledge would continue to edify him as he trades his .40-caliber Glock for a black robe.

On Thursday, the 56-year-old West Chester resident will be sworn in as the magisterial district judge serving the Exton area, having been elected in November. He said that it was difficult leaving a job he had coveted from childhood but that he was ready for a change.

"I feel really blessed that I was able to remain in law enforcement," he said, acknowledging that a clean break might not have been possible.

Bailey, whose grandfather was a police officer in Radnor Township, grew up three doors from the old Tredyffrin Township building and had his career planned as long as he can remember. At Conestoga High, he took advantage of a program that let him ride with Tredyffrin officers for two months of his senior year.

"I knew that's what I wanted to do," he said. "I never looked back."

Bailey said he was fortunate that his wife, Denise, didn't either. They married after he had been on the job a year, producing a union that has lasted 33 years, two children, and two grandchildren.

Now that he is changing gears, Bailey has reflected on a career that encompassed dramatic changes in technology and crime.

Bailey said developments such as the Blue Route gave outside crooks an easier escape route and caused an uptick in offenses such as theft during his time on the force.

Homicides and high-profile crimes occurred so infrequently that they typically left an indelible impact, he said.

In the late '80s, Bailey said, a sophisticated prostitution ring operated from a Paoli business.

Bailey said that when they raided the business, investigators carted boxloads of records from the premises, some of which contained famous names, since the Valley Forge Music Fair operated a short distance away.

Another memorable case was the 2002 murder of Mildred Dunston Allen, a beloved 85-year-old community matriarch. Bailey kept a photo of Allen on his desk, a daily reminder that the case needed to be solved.

About a year later, Stephen C. Pinder, 29, a career criminal and prime suspect, committed suicide in prison, a short time after investigators had received a blood sample that would link him to the homicide.

Bailey said another of the township's most serious crimes surfaced in 2007 when a well-known lawyer, Ralph E. Mirarchi, was charged with embezzling $4 million from 26 victims, some of whom lost their life's savings. Mirarchi is serving a 61- to 122-month jail term.

"That was an amazing abuse of trust; the victims were all close family friends," Bailey said.

Bailey counts his graduation from the FBI Academy and the creation of a Hero Plaque program in Chester County among his proudest job accomplishments. The latter came about after Bailey, former president of Chester County Fraternal Order of Police Lodge 11, contacted Jimmy Binns, a Philadelphia lawyer who had created a program in Philadelphia to honor fallen law enforcers.

With Binns' input, a row of bronze plaques outside the historic courthouse in West Chester pays tribute to Chester County's nine fallen officers. The initiative was so well-received that it was expanded in November to begin including firefighters.

Bailey, who has taught criminal justice at Wilmington University, Delaware Community College, and Immaculata University, said he has shared the rock-throwing incident with his students, joking that the homeowner was decades ahead of her time in anticipating the technology that would make the rock vital evidence.

Asked how he responded to the women's suggestion at the time that he safeguard it, he said, "Oh, I took it with me, absolutely . . . It was important that she felt her needs were being addressed."

Contact staff writer Kathleen Brady Shea at 610-696-3815, kbrady@phillynews.com, or @brandywinebits on Twitter. Read her blog, "Chester County Inbox," at www.philly.com/chescoinbox