Prisoners in English jails are being taught coding to give them the chance to earn up to £600 a day and plug a shortage of web developers on release.

Code 4000, the first European initiative to train convicts to code and connect them with employers in the outside world, has launched at HMP Holme House in Stockton, Teesside.

One of those taking part is Mark Robinson, an army veteran who two years ago was caught with a kilogram of heroin in the back of his car and ended up with a six-year sentence. With two daughters he wanted to make proud, the 38-year-old was delighted to be selected for Code 4000’s second prison project in January.

“I want to be able to get a good job and support my family after my release,” he said in an interview in Holme House. “Lads who are chained up in here after committing crimes for monetary gain are going to do the exact same thing again if they are not given the skills to make a decent living legally on the outside.”

Reoffending in the UK is estimated to cost around £15bn, according to the government, which supports Code 4000. The difficulty in getting a decent job is often cited as a key reason why 29% of prisoners return to crime within a year of release.

Tariq Hassan, Code 4000’s CEO and a former investment banker, said there was an insatiable demand for web developers. “We could train each and every one of the 83,000 prisoners in jail in the UK and we wouldn’t even touch the sides,” he said.

Even mediocre coders could charge £600 a day, he said, “then they announce a few months in that they are going to go and sit on a beach in Bali for a bit and you have to accept it.”

Facebook Twitter Pinterest Prisoner Mark Robinson at a computer coding workshop at HMP Holme House. Photograph: Christopher Thomond/The Guardian

In Holme House, Robinson was working on a website for the farm shop and cafe run by convicts at HMP Ford, an open prison in West Sussex. He was in a bland white room that could have been any anonymous office – were it not for the multiple locks on the barred door and the guards jangling keys at the exit.

It was tricky building a website with no internet access, Robinson said, but there was plenty of time to chew over code using a pen and pencil when back in his cell. Hassan said learning to code offline was “like climbing a mountain in flip-flops … We teach them the hard way.”

Students learn from open-source material downloaded on to prison computers from code.org. The students start by building simple 1980s video games like Pong and Asteroids. Then they learn to code in both HTML (which covers the layout and structure of web pages) and CSS (which covers the style and design of web pages), and eventually Javascript, the basis of interactive websites.

Setting up the course was a logistical headache in a secure environment where prisoners are not allowed online, said Chris Dyer, governor of Holme House. “But we have got to move with the times. Doing anything new in a prison is hard. At the moment I’m trying to set up a parkrun but it is hard to find a route which doesn’t go too near the wall that people might try to throw drugs over.”

Some people may question why prisoners are taught to code when so many young, disadvantaged people on the outside aren’t given the same skills at school. “I fully understand that,” said Robinson. “But all the courses we do here are open-source – anyone with an internet connection could do them for free. And this is a good idea to stop lads reoffending. Still, I would rather be outside with my freedom than in here learning to code.”

Facebook Twitter Pinterest Ashley Fulcher at HMP Holme House. Photograph: Christopher Thomond/The Guardian

Ashley Fulcher, Code 4000’s first graduate, was released from HMP Humber last year. He is now a software apprentice and has launched his own web development firm, Shape Up. He doesn’t advertise the fact he is an ex-convict, but nor does he hide it.

“It’s my unique selling point. Everybody loves the underdog. That’s why Rocky is one of the best films ever,” said the 28-year-old during his first, “very weird” visit to Holme House. He was in a suit and clearly nervous on what he admitted was his first ever voluntary visit to a jail, having been invited as a Code 4000 ambassador to inspire new learners.

Fulcher, who grew up in care, said he had spent half of his life “either in jail, on probation or on the run”. In 2016 he became briefly notorious in his adopted home town of Selby when he fled to Costa Rica after breaching the terms of an earlier sentence, only getting caught on his way back through Heathrow a year later.

That exotic adventure earned him 40 months in jail, where he took a long, hard look at his life. “I was 25 years old and I had fiftysomething arrests, thirtysomething convictions, mostly for violence. I’d served four prison sentences.”

The future hardly looked bright from his cell at HMP Humber, he told Robinson and the other Holme House coders. “I was destined for prison and to stay in prison,” he said. “But I had a little boy on the outside and I decided enough was enough. Someone said something about coding and I thought: ‘What the bloody hell is coding?’ Now I’m on the best path I can be – I’ve overtaken everyone in my family and most of the people I went to school with.”

Key to prison education handed to governors Read more

As word spreads within the prison population, more and more prisoners want to join in. Participants are carefully screened – Hassan said murderers would be considered but sex offenders would not, largely because they would be released with conditions restricting their web use.

Stephen Allen, the workshop facilitator, said he was keen to choose men who would make use of their coding skills outside “rather than just return to their plumbing jobs”.

He had high hopes for some of the students. “I tell them: remember me when you make your first million!”