Robert Barry Crossan from Creggan Heights in Derry had been found guilty of the robbery which occurred on December 14 2013.
Crossan had been convicted after a trial by a majority verdict.
The court was told that Crossan had entered the bookmakers premises armed with a gun at 9.25 p.m.
He was wearing a hoodie and a balaclava pulled down over his face.
He banged the gun on the glass four or five times and demanded money from the safe.
He was told that the safe was on a time lock and took money from the manager's hand and made off with £400 or so.
The manager and the staff felt threatened and frightened by the robbery.
During a briefing on the robbery on December 30 a police officer thought she recognised Crossan who she had had dealings with for seven years.
A procedure known as a controlled viewing was carried out and the officer identified Crossan.
He was arrested and at interview denied all the offences.
Judge Philip Babington said Crossan had a 'poor record' with 101 previous offences including burglary and theft charges.
He said his offending had begun in 1990 when he was aged 15 and 'had continued to this day.'
He said that Crossan had been assessed as being a high risk of re-offending due to his drug use and other factors.
Judge Babington said Crossan had been using cannabis aged 12 and ecstasy aged 15 and had told a probation officer he had no memory of this robbery but had probably done it to feed his drug habit.
The judge said the use of a weapon was an aggravating factor as was Crossan's 'rsignificant criminal record.
He added that robbery was a serious offence and said: "Offending against small business has to be deterred."
He jailed Crossan for 10 years.