My time in addiction rehab for an opioid addiction left me humiliated and desperate to know why my friends were dying. Now a wave of app developers is trying to do things differently.

My dad’s company had season tickets to the White Sox. On muggy Midwest summer days, we’d go as a family—always sitting in the same seats, 25 rows above first base.

I told this to a counselor I’ll call Bill when he asked me to remember a childhood memory. It was part of the confrontational circle, a form of group therapy with a self-explanatory name.

It was the summer of 2012, and the beginning of my third round of treatment for an opioid addiction I’d been trying to kick since I was 17. Now, I was 22 and out of excuses for where all my money went. I’d confessed to my mom that the pills I’d been using had escalated to heroin. At the behest of a counselor, I checked in to a residential program, the kind of addiction rehab you probably recognize from television, the kind reserved for serious cases.