During my homeless days I had a laptop for a while. I would do web programming for various online clients on it, and when that got stolen I would work from a local college forging student ids to use library computers.
I made enough for fast food dollar menus, and to keep a little bit of gas in a somewhat-running car I bought for $100.
The bare minimum to keep myself distracted and fed was all I did even though so much more was possible. I told myself I liked the freedom, but in truth I was just too scared and had too low of self esteem to take on a more comfortable lifestyle.
Even when I found a home I picked a ghetto camper in the woods, and took only enough gigs to pay bills. I would make a couple grand on a programming/consulting contract, live on it till it ran out, then take on a new gig.
It took a lot of the right people investing in me over and over, and being patient, before I started to decide that I deserved more, that I wanted more. That it was worth working hard for.
It takes more than just teaching marketable skills to get someone off the streets. It takes them seeing themselves as worthy to do more with their lives. At the end of the day, they have to make that choice to change, and triggering that is going to be different for everyone.
I am sure teaching this man to code was huge for his self-worth, but there are a lot of deeper emotional issues why he is there that are probably going to take a lot of time and patience to uncover one step at a time.