Are code snippets evil?

May 24th, 2004 Comments Off on Are code snippets evil?

Scoble echoes Tim Anderson’s question: “Are code snippets evil?”

The next version of Visual Studio will feature a tool that will let developers drag code snippets from an IDE pane directly into their code. This feature has been present in many development environments — especially those relating to content, like HTML editors — for a long time already. And even when their development environments don’t support such a thing, people have been using snippets libraries stored in their own files for years. Just because Visual Studio is adding it, people start talking about it.

Although it’s certain such a feature can be abused, I don’t see it as inherently bad. Rather, as Scoble points out, it’s just more geared to beginning users. If supposedly advanced users are relying on it to create large portions of their code, I would doubt they are really advanced developers. And even advanced users can benefit from code snippets — as an extended kind of code completion, for example.

Anyway, code snippets in the IDE will hardly make a difference in coding practices. After all, finding sample code for a given task is just a matter of googling it. Google is the mother of all code snippets. You can find anything there, in any language you care about. And it’s not like Visual Studio will come with every possible code snippet in the world. 😛

People will always have to research solutions, and they will grow with it. Having handly examples available will probably help them since they will have to customize the snippets to fit their needs. Call me a cynic, but people who just want to drag code around and have it automatically work for them will never be good developers. So, why bother?

Comments are closed.

What's this?

You are currently reading Are code snippets evil? at Reflective Surface.

meta