Leo Grand
Leo Grand, the homeless coder, released his app, "Trees for Cars," after four weeks of coding lessons. Trees for Cars

They say a man can eat for a lifetime if you teach him to fish, but what about teaching him how to code?

Leo Grand, a 36-year-old man who has been homeless in New York City since he lost his job at MetLife in 2011, may provide a real-life answer to the hypothetical. After 16 weeks of coding lessons, Grand created an app, “Trees for Cars,” and it's now available as a 99-cent download from the Apple iTunes Store and Google Play Store.

On Aug. 22, Grand was approached by Patrick McConlogue, a 23-year-old programmer, who offered to either give Grand $100 in cash or teach him how to code. Grand accepted the offer to learn coding, and McConlogue gave him three books on JavaScript, a Samsung Chromebook with 3G, access to Codeacademy, and a solar charger.

For four months, McConlogue met with Grand for an hour of coding lessons each day, at the place where Grand slept outside. When the weather got cold, the doorman at a nearby luxury apartment let Grand charge his laptop inside, according to Business Insider.

Grand coded every line of code for Trees for Cars, a mobile carpooling app that connects drivers and riders. In addition to helping people carpool, the app shows users how much CO2 they save and provides a gamification platform to encourage people to save more.

Trees for Cars
Leo Grand, a homeless man who was given four weeks of coding lessons, released his "Trees for Cars" app. iTunes Store

“Trees for Cars is a great way to build relationships, strengthen communities, help each other financially and energy-wise, all under the umbrella of saving the environment,” Grand said about the app in an official statement.

All of the money from the app will go to Grand, who said he will use the profits to continue his computer programming education.