Everyone has a internal "thermostat" of how much they deserve to make. After they get above that, then they feel bad about making more and don't usually do any work.
It's not always hard to separate the two, especially not for an outside observer, but the difference is there, and I think the 'negative' motivation often leads to less happiness in the long run.
I suppose I could throw some random thoughts out there.
I think in general what people did that helped the most, was accept me for who I was without coddling me. Showing me respect, not pity. I hated pity. I thought my balance in my life was fine, and if it got in the way of something I really wanted to do, I would make adjustments. I really valued people that would invite me places they would invite anyone else and let me pull my own weight and make my own mind up each time even if I have said no 20 times prior. Just being invited to social outings even when I had no intention of going, boosted my perceived social value each time.
As people gained my trust, they were able to challenge me on the things I said I wanted out of life, and what present aspects of my lifestyle were incompatible.
I think for me my own pride became my fuel, and a series of "challenge accepted" moments. I could never turn down a well formed challenge or someone telling me I _can't_ do something.
Smaller challenges like "holding a retail job" grew to bigger ones like "CTO", "Senior Software Engineer", "Technical Director" and eventually things I once said would never be possible like "having a healthy relationship" and "Getting married". Once the "small" challenges met success I have ever since been on a journey to find out where my ceiling is. Doing things I thought I could never do has become an addiction now, and not a whole lot scares me anymore.
I also was really stubborn/prideful and not good at accepting help, ever. Still am to a point, but getting better. Sometimes people had to help me in creative ways where I could not stop them easily. There are a number of times where I think people proved they cared about me more than I presently cared about myself, and that gave me the desire to up my own game.
Anyway. I am sure I could go on forever but this is already probably going to be a TLDR anyway.
I am happy to answer any questions here or via email/hangout etc. :)
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.