Preston Thorpe is a software engineer at a San Fransisco startup. He’s alsoserving his eleventh year in prison.

Preston Thorpe is on the verge of becoming a senior software engineer at a promising tech company—all he has to do is walk through the door. For six months, Thorpe was a prolific volunteer contributor to an open-source project led by Turso, a database company. His work was so impressive that Turso’s CEO, Glauber Costa, quickly offered him a job. That was also when Costa discovered something extraordinary about Thorpe: he is currently serving an 11-year prison sentence for drug-related crimes.

Despite his incarceration, Thorpe has been working full-time from his cell at a venture-funded, San Francisco-based startup since May. Costa first reached out to Thorpe in January to learn more about him. Over time, their conversations deepened, revealing Thorpe’s transformation and the circumstances that led him to where he is today. Costa said knowing Thorpe’s story only increased his respect for him.

Thorpe is part of an experimental program in the Maine state prison system that allows incarcerated individuals to work remote jobs while in custody. Though unconventional, these opportunities have proven highly rehabilitative. Thorpe’s journey to prison began when he was kicked out of his home as a teenager. He turned to selling drugs bought from the dark web and was imprisoned by the age of 20. After a brief release, he was arrested again 14 months later, having no money or safe place to live.

“I was a complete idiot,” Thorpe admitted during a video call from prison. “I had given up on my life, completely written it off, and just accepted that this was my life. I had no hope.”

But fate had other plans. Thorpe was transferred from a New Hampshire prison to the Mountain View Correctional Facility in Maine just before the pandemic. The isolation of COVID-19 gave him time to reflect. “When I came to Maine, it was completely different,” he said. “I actually felt like maybe it’s not over; maybe I could end up having a normal life. I had this epiphany: ‘I’m going to make something of myself.’”

At Mountain View, Thorpe enrolled remotely at the University of Maine at Augusta. Around the same time, Colby College proposed hiring an incarcerated graduate student as an adjunct professor. Maine Department of Corrections Commissioner Randall Liberty took a chance on the idea, and it proved successful. “His students can visit him at the prison, and he can tour them around,” Liberty said. “It provides a real diversity of opinions and backgrounds, creating a rich learning environment.”

Today, about 30 inmates, including Thorpe, are employed while living in the Earned Living Unit, a less restrictive facility for those with a history of good behavior. Inmates with remote jobs surrender 10% of their pay to the state, along with any required restitution, legal fees, or child support payments.

Maine has been a pioneer in this approach. Haley Shoaf, co-executive director of Unlocked Labs, noted that the state’s infrastructure for remote education, expanded during COVID-19, opened new opportunities for incarcerated individuals. Unlocked Labs, where Thorpe worked before Turso, hires incarcerated and formerly incarcerated engineers to develop educational software for prisons.

Commissioner Liberty, with 43 years in law enforcement, shifted his approach to rehabilitation after serving in Iraq. He recognized the trauma of incarceration and began implementing programs addressing the root causes of crime: substance abuse, untreated mental health issues, and lack of education.

“If you truly care about making the community safer, being fiscally responsible, and supporting victims, this is the way,” Liberty said. The U.S. criminal justice system struggles with high recidivism rates, but Maine’s data shows progress. While many states see 60% of former inmates return to custody, Maine’s rate is 21-23% for men and 9% for women. For those who attend college classes in prison, the return rate drops to nearly zero.

Violence in Maine prisons has also declined. Last year, a maximum-security facility recorded only seven assaults on staff, down from 87 in 2017. “When you treat people like people, they become the best version of themselves,” Shoaf said.

Thorpe embodies this success. He takes full responsibility for his past but feels like a changed man. “It’s like waking up from a dream,” he said. “All the memories of why I came to prison don’t even feel like they happened to me.”

For the past three years, Thorpe has spent nearly every waking hour learning programming. Costa noted that Thorpe’s dedication stemmed not just from passion but from a desire to be seen for who he is—an engineer, not a criminal. In the open-source community, where identities are often hidden behind usernames, Thorpe was judged solely by his contributions.

“The worst part about prison is that you assume this identity of a criminal,” Thorpe said. “Letting someone have a career gives you purpose.”