'You should be proud': magistrate praises addict's turnaround