When a programmer offered a homeless NYC man, Leo Grand, the choice of receiving a one-time gift of $100 in cash or instead receiving coding lessons for an hour a day (plus the loan of a laptop and some programming textbooks), Leo chose to invest in himself instead of taking the cash, and the results were nothing short of incredible.

Leo, who has been homeless since 2011 after losing his job, and who had no previous knowledge of computer programming, learned to write Javascript over the next couple of months with the help of his new mentor, Patrick McConlogue.

The fact that someone would take the time to help give a disadvantaged person a hand up, instead of just unloading his spare change on him, is pretty inspiring all by itself, but as it turns out, Leo is also very concerned with environmental issues, and what he ended up creating with his newfound knowledge is something that could have a very real positive effect on the world.

“It turns out Leo is a genius particularly concerned with environment issues. As I sat there becoming increasing stunned, he rattled off import/export prices on food, the importance of solar and green energy, and his approval for “efficient public transportation initiatives [referring to NY’s new Citibike]”. – Patrick McConlogue

Instead of trying to build the next Candy Crush or Angry Birds, or yet another photosharing app, Leo chose to create a carpooling app that aims to reduce the number of automobiles on the road, and in turn, to reduce the amount of transportation-related CO2 emissions.

His app, called Trees for Cars, allows people to sign up as users, state whether they need a ride or can offer one, and then the app connects those potential carpoolers with others nearby, allowing them to share a ride. The app then tracks the approximate amount of CO2 saved by carpooling, giving users concrete evidence that their actions are making a difference.

“Trees for Cars is a mobile carpooling app that connects drivers and riders. Every car on the road contributes to pollution by emitting CO2. By using Trees for Cars to find rides in your area, you’ll be helping the environment because more carpooling means fewer cars on the road. Download the app, sign in, and tell us whether you want to offer rides or take a ride. We’ll connect you with the riders or drivers closest to your complete route. Ride sharing is caring!” – Trees for Cars

The Trees for Cars app is available now for both iOS and Android phones, and is priced at just $.99, all of which goes to Leo. Even if you’re not in an area with enough users to support this type of carpooling initiative, you might consider buying the app just to support the efforts of a guy who wants to get off the streets, not through charity, but through the fruits of his own work.

And if you’re interested in either learning how to code, or in teaching others how to create their own software, check out the Journeyman Course.