When Alex Mathis heard there was a coding school in Akron, Ohio, not far from where he lives, he thought its claim—that he could become a gainfully employed computer programmer after a three-month training course—sounded suspicious.

He’d never taken a computer-programming class in his life, but by the time he finished an intensive 12-week, $13,750 program at the Software Guild, he had a job with Buckeye Mountain, a maker of rail freight software. “If you told me several years ago that I was going to be a computer programmer...