A 61-year-old man was caught out by police after committing his 23rd burglary.
Anthony Rosser broke into a student house in Swansea in the middle of the day and stole bank cards. He then used them at several local shops that same day.
But a police officer who viewed CCTV from the stores recognised Rosser the following day, as he was walking near the beach, and arrested him.
Swansea Crown Court heard how Rosser has 88 previous offences and the judge described him as an "entirely dishonest man" who had made it his life's work to take other people's property.
The 61-year-old previously pleaded guilty to burglary and to four counts of fraud by false representation. He was sentenced to three years in prison but will spend half of that in custody before being released on licence.
Sian Cutter, prosecuting, said at lunchtime on July 2, 2022 a student living in a shared house on Swansea's St Helen's Avenue heard a male voice he did not recognise in the property, but thought little of it as people were often coming and going.
Later that afternoon, he and another student who lived at the property realised their bank cards were missing from their rooms.
The students went to check the bank accounts online and found the cards had purchases on them, made that afternoon in shops on Brynymor Road and St Helen's Road. They reported this to the police and CCTV from the shops where the cards were used was examined.
The prosecution described how the next day, it was an eagle-eyed police officer on patrol in the Sandfields area who caught Rosser. They had viewed the CCTV the previous day and recognised the offender while passing by.
At first during police interview, the defendant denied committing the burglary. He claimed he had been drinking with a friend outside the seafront Tudor Court hotel at the time of the crime and was given the stolen bank cards by somebody he declined to name.
The court heard that police checked CCTV from the seafront at the time Rosser claimed to have been there but there was no sign of him, and the person named as his drinking companion told officers he had not seen the defendant at all that day.
The court heard how the break-in had impacted those living in the property.
One of the victims moved out of the house shortly afterwards to live with her partner and another was left feeling "on edge", having trouble sleeping, and wondering about what might have happened had the intruder confronted him.
Rosser has 32 previous convictions for 88 offences, including 22 burglaries.
His first conviction for burglary was in 1991 for which he was sentenced to five years. His most recent conviction prior to the latest burglary was for possession of a knife in a public place and possession of Valium.
Dan Griffiths, for Rosser, said after being released from his last custodial sentence at the end of February this year, the defendant felt he was not getting enough help to get his life back together.
That is when Rosser began abusing alcohol, as he felt "overwhelmed and hopeless".
He said Rosser described entering the student house and taking the cards as an act of "gross stupidity", adding: "Nobody would argue with that".
Judge Huw Rees told Rosser that what the burglary lacked in sophistication, it made up for in its effect on the student victims.
'An entirely dishonest man'
He told the defendant: "In my view you are an entirely dishonest man. It seems to me you have made it your life's work to behave dishonestly - you take other people's property come what may."
With a one-quarter discount for his guilty plea to burglary, Rosser was sentenced to three years in prison.
He was also given a one-third discount for his guilty pleas to fraud, which were entered earlier and so attract a large discount, and was sentenced to three months.
Both sentences will run concurrently meaning an overall sentence of three years. The defendant will serve up to half that period in custody before being released on licence to serve the remainder in the community.