Patrick McConlogue, a software engineer from New York City, decided to make a difference in the life of a homeless man named Leo by offering to teach him computer coding.

Patrick passed Leo every day on his way to work. One day, he decided to offer Leo a choice: cash or a laptop, Java textbooks, and free classes for two months. Leo surprised him by taking the second option.

Patrick’s fellow technology bloggers reacted harshly at first. Two, in particular, accused Patrick of being clueless about homelessness. One blogger even accused Patrick of being naive, Yahoo reports.

People have been far more supportive on the Facebook page that Patrick started to document Leo’s progress. Several posters have referred to an old Chinese proverb about teaching a man to fish instead of just giving him a fish, a reference to helping people become self-sufficient.

Leo says that he is aware of what people are saying online, but that doesn’t seem to faze him.

"Being able to code will help him do some of the things he wants to do," McConlogue told ABC News .

"The negative feedback is that you should give him housing and food. My thought is that technology will do a better job connecting him, in the long term, to what he wants."

Patrick hopes that Leo will be able to find work as a freelancer once the classes are over, Business Insider reports.