A 38-year old man was to "grow up" and start taking responsibility for himself as he appeared in court on a burglary charge.
Alan Patton was handed a 10-month sentence for breaking into the staff room of a shop in Belfast and stealing items including a bank card, a driving licence and £10.
Sentencing Patton, Judge Neil Rafferty said: "He has reached the stage in life where he either sorts himself out or he doesn't."
Patton appeared at a remote hearing of Belfast Crown Court, via a videolink with Maghaberry. He admitted the burglary charge at the Sostrene Green store on Ann Street on April 11 last year.
Defence barrister Kelly Doherty said Patton's life has been blighted by alcohol and substance misuse that has led to periods of homelessness.
However, she told Judge Rafferty that Patton - with the help of his family - had secured accommodation which would help to stabilise his life.
The Judge said this would give Patton a "roof over his head and gets his feet on the ground" - but warned that further offending would lead to the "revolving door" of prison.
Noting Patton has a "significant" criminal record, Judge Rafferty accepted the defendant had taken steps to address his addiction issues, which included attending a residential course in the Scottish Highlands.
Judge Rafferty spoke of the significance of Patton securing accommodation which he said had led to him taking a pragmatic approach to sentencing.
Handing Patton the sentence, which will be divided between five months custody and five months licence, the Judge addressed him and said: "You are nearly 40. At some stage you are going to have to grow up, at some stage you are going to have to take responsibility for yourself and at some stage you are going to have to stay clean and get on with living what is left of your life."
Patton replied by saying "I have listened very carefully Your Honour. Thank you for the chance."