Two years ago, coal miner Marvin Laucher saw wave upon wave of layoffs in the industry and knew he needed a way out. His sister had an idea: ditch the shovel for a mouse and learn how to write software.

At first, he wasn't sure he could do it.

It's not a new idea that people want to change careers, and tech is severely lacking in talent in the U.S., so it was just kind of a natural thing. - Amanda Laucher , Mined Minds

"I could get on Facebook and basic things, but I didn't even know what coding was," said Laucher, 34, of the small town of Waynesburg, in Pennsylvania's Greene County — the third largest coal-producing county in the U.S.

Now he's traded the long, dangerous hours in the mine for the comfort and air-conditioning of an office.

"It's not a new idea that people want to change careers, and tech is severely lacking in talent in the U.S., so it was just kind of a natural thing," said Laucher's sister, Amanda.

Teamwork comes naturally

Amanda Laucher, who was a computer consultant in Chicago, returned to Greene County with her partner Jonathan Graham, to teach the language of modern computing to Marvin and other miners, their wives and anyone else in town who was interested.

Despite some early reluctance, Amanda discovered that for some miners, the transition from coal to code wasn't as hard at they first feared. They found the skills they brought out of the mines were surprisingly portable.

Amanda Laucher helped found Mined Minds and says the skills that miners learn underground can transfer to the programming world. (Steven D'Souza/CBC)

"They work really hard and they're very diligent and very detail-oriented," she said. "And they're extremely team-oriented" — essential in programming, where tasks are shared or broken down into smaller parts.

"These team-oriented skills are really hard to find with software developers who go through the training on the traditional path," she said.

The idea evolved into Mined Minds, a non-profit training centre and consultancy that offers a free 16-week course in coding. Laucher and Graham then hire the grads, putting them right to work on developing mobile applications and websites. While it does not guarantee jobs, Mined Minds, which now also operates in West Virginia, has yet to have anyone finish the program and not have work waiting for them.

"I would hire them over any four-year grad, somebody just out of college — any day," Amanda said.

Congratulations to the first <a href="https://twitter.com/MinedMinds">@MinedMinds</a> graduating class from <a href="https://twitter.com/hashtag/WV?src=hash">#WV</a> - I am so proud of what they have accomplished! <a href="https://t.co/oJelIqYJAh">pic.twitter.com/oJelIqYJAh</a> —@Sen_JoeManchin

Economic tug-of-war

Mined Minds is in the middle of an economic tug-of-war. On one side, a local economy looking to diversify. On the other side, a workforce reluctant to abandon an industry where jobs can pay more than $100,000 a year.

"The money. The money is where everybody likes to be," said David Baer, a former miner, now career counsellor, who says there are plenty of jobs in the area but they're not as lucrative.

"Paying $12, $13, $14 an hour, not $30 an hour — that's what a coal miner's used to making," he says.

And U.S. President Donald Trump's promises and policies have given hope to the region. In March, Trump signed an executive order ending former president Barack Obama's Clean Power Plan, which would have shut down coal plants and further choked markets for coal. Trump also lifted the ban on coal mining on federal land.

"I made them this promise: We will put our miners back to work," Trump said at the time.

Politics of coal

Such promises helped fuel his surprise win in Pennsylvania. In Greene County, Trump took nearly 70 per cent of the vote.

Bryon Shriver was convinced.

"I think he's a man of his word," said Shriver, who had tried to get retrained as an electrician but went back to the mine when a job opened up.

"A lot of politicians always say this and say that and decide they're not going to follow through with their promises, and so far he's followed through with his promises and he's bringing coal mining back," Shriver said.

But experts say restoring an industry in decline is an uphill battle. Production nationally is down 20 per cent over the past 15 years. Coal mining has also lost more than 70 per cent of its workforce since the mid 1980s. With the shift to renewable energies and automation, some coal jobs won't ever come back.

In Greene County, close to 500 jobs were lost when the Emerald coal mine shut down in 2015. The Cumberland mine is still operating and has been hiring back some previously laid-off workers.

The Emerald coal mine in Waynesburg shut down in 2015, costing the region close to 500 jobs. (Steven D'Souza/CBC)

Shawn Tharp, another former miner, is more cautious about Trump's promises.

"Right now, I don't know. I'm up and down with it," Tharp says. "Sometimes I watch him on TV and I don't feel like he's doing enough to help any coal miners out or keep his promises to them."

Amanda Laucher says the president can only do so much.

"In the end, it's not Trumps fault that the jobs went away and it won't be his fault that they [don't] come back," she says. "They're not going to come back."

She says she's not promising to save the region, just helping whomever she can.

Marvin Laucher is now an instructor. He had a chance to go back to the mines but didn't take it.

"At least with this, you're always going to have computers," he says. "Computers aren't going anywhere."