This morning Rob Miles posted a link (C# Code Snippets on Demand) to a new site from Microsoft Research called Bing Code Search: C# code snippets on-demand. basically you enter a question “How do I …” and the site searches for a code snippet that can be used to solve you problem. Wow! Cool!
It’s a research project and there is still work to be done. Soon, they say, you’ll be able to automatically enter code snippets directly into popular IDEs. Since the language available is C# I assume that means Visual Studio and perhaps Eclipse.
And then I thought “Do I want to share this with my students?” and my thinking got complicated. On one hand I really do want my students to become adept at learning how to do things on their own. In this day and age that means searching for answers on the Internet. It means learning how to separate the good from the bad and learning from examples. So this site could be a big win.
On the other hand students also get good at asking other people to do their work for them. Hang out on any inline support forum enough and you’ll see cases of students looking for people to do their homework for them. They try to hide it but generally not very well. I want students to learn for themselves and to do their own work. I don’t expect them to memorize everything but I don’t want them to have to look up every little thing either!
When it gets down to it I will share this site. I want students to explore beyond what we can cover in lectures and demos. I want them to be able to find the tools to make their own programs truly their own programs. Exploration is why I like that Visual Studio has Intellisense for example. These snippets are short enough that they are not total solutions and so students will have to understand them to really use them. And if they can’t figure them out on their own I’ll get a teachable moment. Right? Plus the searches I have tried so far bring up enough options that students will have to use their own judgment about which possible option is what they really want/need.
What about you? Would you recommend this site (or one like it) to students? Or do you do as much as you can to discourage students from looking for code on the Internet?