Here's question I just voted to close. After seeing the video below I thought maybe I was wrong to vote to close.
This talk from Strange Loop suggests that making people figure out things on their own is not actually an effective way of learning to program.
I have no idea if it's true or if the methodology is valid but in the talk they basically claimed
- many devs are self taught
- those devs feel like everyone else should learn by teach themselves
- lots of classes/clubs expect students to self teach/self explore and just get feedback on their issues from the teacher
- in contrast to all of that, research shows that giving the answers is the best way to learn
From the video
- Group A: was the group asked to figure things out
- Group B: shown solutions, and asked to use them in problems
- Group C: shown solutions
(A) did worse than (B) and (C). (B) and (C) did equally well.
It's possible I misinterpreted the message. It's also possible the message is wrong.
But, if it correct then it seems like the standard response to "give me teh codez" question which is usually some form of "show us what you tried" is actually not the best way to help. The best way to help, according to the research referenced in this video, is to show working examples of good solutions.
Sure some people will just copy and paste but many will apparently learn by example. I know much of my own knowledge comes from being taught the solution (examples include sorting algorithms, 3D projection, file io, etc). I didn't "figure it out" unless "figure it out" means search for a working example.
NOTE: I'll distinguish between 2 kinds of "give me teh codez" questions
Algorithm / interview problem type questions
answer is usually 5 to 20 lines of code)
Write my app for me.
answer would be a 100s or 1000s of lines.
Clearly 2 is not a fit for S.O. The question is more of is #1 a question for S.O. without showing work. Questions like "How do I loop through an array from the ends to the middle?" without showing any work.