3 ms·
People probably keep asking "give me the code for x" because they know that someone out there will give them the answer. If they knew that the only reply they c
by greenyoda 14y ago
People probably keep asking "give me the code for x" because they know that someone out there will give them the answer. If they knew that the only reply they could expect to get to that query was a link to http://whathaveyoutried.com http://whathaveyoutried.com (or a curt "RTFM"), they'd be forced to develop their own skills.
By giving them the answers without pushing them to work harder at answering their own questions, we're actually hurting them, not helping them.
But this is a very old observation that long predates programming or the internet. The old Chinese proverb is: "Give a man a fish and you feed him for a day. Teach a man to fish and you feed him for a lifetime."
- hermannj314 14y agoDoesn't this go contrary to one of the greatest "benefits" of software - that it is reusable? But you are arguing that if someone says, "Just give me the code, I don't care how it works, I have a test and if it passes then I am happy" that this is a bad thing. What is wrong with that? "Give a man a fish you feed him for a day, Teach a man to fish and you feed him for a lifetime, but you reduce the efficiency of society since the fixed cost of catching and feeding yourself one fish far exceeds the marginal cost of a fisherman catching one more fish." - American Proverb.
- jdpage 14y agoIn the case presented, the code is, in fact, already written: it's in Cocoa. So all the person needs to learn is how to call that code, which will be generally be different for each application. The reusable bit is already written; they're asking for the specific bit, and they should learn to write that. A library only abstracts the solution the problem; you still have to understand what you want to do to solve the problem at some level, so as to integrate the library into your solution. When someone just asks for code, it is clear that they are not interested in putting in the work to solve the problem; they are interested in getting paid (or getting a good grade, or whatever). I think that one of the reasons that this rubs us the wrong way is because hackerdom, by definition, loves the process of solving the problem, with getting paid being a pleasant side-effect. The person who asks "can I just have the code" is, in many ways, antithetical to the idea of a "hacker".
- conroe64 14y agoThe problem with your philosophy in the age of the internet is that the question and answer stays up for others to use a search engine to find for themselves. In the style of the Chinese proverb, "Give a man a fish on the internet, and you will be giving a million men a fish" By requiring everyone to deeply understand every conceivable task they might need to do, you are limiting the amount of tasks a person can do in a certain amount of time.
- greenyoda 14y agoInstructions on how to use NSURLConnection are already on the internet in the Cocoa docs, Cocoa tutorials and Cocoa sample code. Anyone who has the desire to look for them can already find them. So in this case, "teaching him to fish" would be to encourage him to look up the already existing information on his own and spend the time to actually understand what it means. Learning how to do this will make him a better programmer and save him countless hours of time in the future. Someone doesn't usually need to "deeply understand" an API in order to use it. But if they can't even create the simplest working code that uses the API, then they don't understand it at all. And if someone's just going to throw around someone else's code without even understanding how it works, they probably aren't writing code that's very useful anyway.
- conroe64 14y agoWhat if someone is rapid prototyping? Maybe they just need to perform some one-off task. Maybe they're an entrepreneur and have other things to do then learn an api when then just need to do one simple thing. The guy probably doesn't speak English very well, and maybe resources and documentation in his native language is lacking, so he doesn't know where to look. Besides, him asking the question and getting an answer can help many more people who need to do the same thing.