What have you tried
whathaveyoutried.com
whathaveyoutried.com
I answered a question on a forum with a series of other questions ... some were the "what have you tried" variety and some were not. After three or four iterations of "defining" questions and answers, the person I was helping said in exasperation "can't you just give me the code now"? To which I responded, "I don't have the code you need ... but I can help you understand how to write it".
The person's response is indicative of a certain type of person that I no longer try to help. He said "thanks for wasting so much of my time". How is educating someone a waste of their time? I guess it might have been more a waste of my time (especially given our relative level of expertise and pay grades).
So now I rarely give out code and often tell people up front that I won't. If they want to learn, I'm happy to help them learn and I am constantly amazed at the additional insights I gain during these interchanges. If they don't want to learn, then I just stop the correspondence right away.
One interesting side-effect is that I've come to enjoy the few in-person interactions like this much more. Two people and a whiteboard can do a lot of damage to a problem and at the same time, build bridges between those people. Conquering a problem together almost becomes like playing on a team together or fighting in a war (yes ... with far less risk).
You know the API is popular and you know for sure that someone already did exactly what you want to do. You do not intend to use the API in the future.
Posting a request for the solution on some forum or mailing list takes two minutes. Posting the response also takes couple of minutes, because the knowledgeable responder has the exact solution and doesn't need to search anything. Moreover, once the response is posted, it will become publicly visible and searchable by other people who are solving a similar problem.
Should you post the request for the solution? If your answer is "no", you should not work in engineering.
And if you spend hours of your personal time to scout message boards only to post a bunch crap that boils down to "use the search, ha-ha", the Internet will be a better place without you.
Nobody owes you anything just because you think of yourself as some kind of guru. Not even people who ask questions or request easily digestible solutions. This is not academia. You're not a professor, who can ask his students to demonstrate "effort".
You don't want to answer basic question? Don't answer them. Ignore them. It's easy. It takes much less time than whining about this imaginary problem.
You know the API is popular and you know for sure that someone already did exactly what you want to do.
These premises are unlikely to be simultaneously true. If the API is popular, your question has probably been asked and answered many times. If you really are doing something unusual, you should at least be able to find a reference to something similar, and when you ask your question you can point to it and explain what you need to do differently.
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."
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.
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".
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.
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.
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.
Because of the StackOverflow Effect, people will choose to answer even the worst questions as if they're fair play, simply because they have an answer they believe will earn them a couple points. If points were not involved, I'm willing to bet a lot more people would get told off for their poor quality questions, and a lot less people would continue to post them.
There's probably an endless supply of new-but-inexperienced coders who're happy to show off their new-found skills by offering advice to the even less experienced. I'm less sure there's an endless supply of "old hands" to keep an eye on them.
And I've seen this in areas other than programming too. It's _really_ common for motorcyclists with a year or two of riding experience to be offering all sort of advice to newer riders - advice which riders with 10 or more years of experience will sometimes just roll their eyes at, and sometimes will step in and say "that's not just wrong, but dangerous enough to get you killed if you're not careful".
(and yeah, I've been on both the "barely experience" and "decades of war stories" side of the advice giving in both coding and motorcycling…)
Tell me more, I'm curious about this :)
1. What happened?
2. What did you expect instead?
3. How does (2) differ from (1)?
I can't tell you how many times the above simple procedure turned out to be entirely beyond the coping ability of a young programmer expecting a quick solution.
It may be hard to believe in this day and age, but there are still companies out there that have no idea that they even need real technical help (and might not be able to pay for it if they did.) Some of you who have done freelance custom software development work for small/long-lived businesses trying to come into the modern world may have seen this phenomenon (I've seen it plenty of times when I freelanced regularly.) The examples used in the post may not fit this, but plenty of SO questions I've read could fit this pattern.
If we /were/ able to be truly frank about it, we would perhaps suggest that they talk to their boss about hiring a professional developer (or Sysadmin, in the case of Server Fault) to do the job that they've been unwillingly thrown into. (edit: There's perhaps a great opportunity to connect small businesses with freelance developers/custom dev shops buried in here somewhere.)
"What you are looking for is AJAX. You'll need to store your information in a database – as you mentioned PHP, you most likely will use MySQL. The javascript library jQuery has a really nice way to use AJAX, so I'd start by reading up on …, …, … and …. ."
Rather than:
"Here is the code in 3 files that i've just written without testing anything."
IMO, the best thing you can do in this situation is to inform them that they won't get their homework done for them, and what type of questions are considered reasonable.
When I asked if they have instructions on how to do that in the course material, she told me there's a thing that says "click here to download" but she hadn't tried it yet. She literally hadn't even tried clicking the thing that said it did exactly what she was asking me to help her do. Not "I tried it and I got an error" or even "I tried it and it didn't work", or better yet, "I downloaded something and don't know what do with it" no, not even tried.
I'm now dying of curiosity to find out what happens the first time she has to actually write code vs. just typing stuff in she's been handed. I might have to send her this article, we'll see! I've never done any R programming, though it now seems inevitable that I will be doing some in the near future.
There are people who understand that working at a problem develops skills that make you a more capable, valuable person, and there are those who haven't yet made that connection and seek to avoid work whenever possible. Giving the latter kind of person easy answers strengthens that mental pattern, and can lead to a sense of entitlement.
You can find this behavior everywhere, from school and work ("gimme the answers!") to consumerism ("I'd rather pay $400 to have someone come replace my door/toilet/network router than learn how to do it myself") to trivial troubleshooting ("Oh no, all the text in my web browser is big! Welp, better call tech-savvy friend" or "Oh no, my AC filter needs replacing! Welp, better get handyman friend to do it").
It's everywhere, it's endemic to human nature, it puts an moratorium on personal development, and I'm sick of it.
You might post a code sample, and they will then return to you asking why it "doesn't work." There will be no attempt to debug it, and you realise you might just have left a syntax error in there by mistake. You fix it, and still it "doesn't work." Your frustration increases with each complaint, and the urge to tell them to figure it the fuck out if they've half a brain becomes more irresistible.
It's almost parasitic, even if well intentioned or in good faith, and it's such a drain when you're giving the help that you'll stop answering questions where the poster evidently never tried, or didn't want to.
It's a wonderful document and covers quite a bit, going far beyond just how to ask smart questions.
Also, I dare say most people start by hacking together random bits of code they found on the internet.