Coal’s role in American electricity generation is fast diminishing. A few large coal-mining companies declared bankruptcy last year, and several coal power plants have been shuttered. The biggest loss in all this has been felt by the tens of thousands of coal miners who have been laid off. But despite the U.S. president’s campaign pledges, those jobs are going to be hard to bring back. Besides competition from natural gas and cheaper renewables, coal mining, and mining in general, is losing jobs to automation.

But now, a small startup in the middle of Appalachian coal country has a forward-looking plan to put miners back to work. Pikeville, Ky.-based Bit Source has trained displaced coal industry veterans in Web and software development.

The retrained workers now design and develop websites, tools, games, and apps. Bit Source is proving that coal miners can, indeed, learn how to code, and do it well.

“Appalachia has been exporting coal for a long time,” says Justin Hall, the company’s president. “Now we want to export code. We’ve got blue-collar coders. It’s the vision of the future of work: How do you train a workforce and adapt it for technology.”

Bit Source’s co-owners are Lynn Parish, who worked for over 40 years in the coal industry, and Rusty Justice, who calls himself an “unapologetic hillbilly.” The duo, who run an excavation company, bought an old Coca-Cola bottling plant in 2014 and turned it into a software development space. They got over 900 applications in response to a radio call for 10 jobs.

The 10 they chose include a former mechanic, a mine safety inspector, and an underground miner. That first group was given 22 weeks of coding and software development training paid through U.S. Department of Labor grants, and now work full time with Bit Source, designing and developing websites, tools, games, and apps.

Some were casually familiar with software, but there was a steep learning curve. They learned quickly enough, though, says Hall. They started with basic HTML Web pages, and moved on to learning CSS, Javascript, and Drupal. Among other things, the coders have designed Pikeville’s economic development and tourism websites, as well as websites for the eastern Kentucky employment program and some local businesses. They are now getting certified in the Unity game engine. “Once they got in and started working with the tools and products we provided, they were able to problem solve,” Hall says. “Coal-miners are tech-oriented people. They’re engineers that get dirty.”

Others are picking up on this idea. A handful of companies in eastern Kentucky are now “rubber stamping our business model and basically doing what we’ve done,” Hall says. And it’s not just limited to Kentucky. In Waynesburg, heart of Pennsylvania’s coal country, the non-profit Mined Minds is offering free coding classes to laid-off coal workers. Its goal is to “seed the growth of technology hubs within areas in economic need in Pennsylvania and West Virginia, so that the information revolution can be the fuel to drive these areas into the future.”

The current challenge for Bit Source is to scale up and be a sustainable for-profit business. The company has received a wave of publicity for a good reason, But Hall says that doesn’t necessarily mean more work. The local market has quickly dried up, and the region is economically strained because of the exodus of mining companies, he says. He notes that Bit Source is now seeking to expand by finding projects elsewhere.