Arc Forumnew | comments | leaders | submitlogin
Add snippets to arclanguage site?
6 points by bootload 6139 days ago | 2 comments
I'm noticing lots of source code being generated, patches, handy functions etc. The HackerNews community revolves around link submission + discussion. The ArcLanguage community seems to be revolve more around "arc + coding + discussion".

Would it be a good idea to generate a code snippet [0]. [1] for useful patches, handy bits of code you create?

For example:

Add to arclanguage a subdirectory /snippet where users can submit useful blocks of code with unique Urls you can point to for later reference.

- user: assigned to user when submitted

- title: name of code block

- description: quick description of code, does it work? what problem does it address?

- snippet: actual code

- karma: users vote up/down & add to submitters karma

Solving the problem of "handling snippets of code" being handed around could have a 10x effect on identifying useful bits of code, novel hacks & ultimately improve the language.

[0] http://en.wikipedia.org/wiki/Code_snippets

[1] For example http://www.djangosnippets.org/



2 points by godtvisken 6139 days ago | link

I like this idea. And maybe a category system? Tag clouds can sometimes get out of hand, and are not always suitable, but something similar could help organize the data. For example, to easily differentiate between types of snippets and what they address.

Or maybe a title and description is enough.

-----

1 point by bootload 6139 days ago | link

"... Or maybe a title and description is enough. ..."

As little as possible. Filling in fields is a pain. I think the description field could be optional if the code is commented. The bit I think would boost the understanding of the language is concrete examples. The pattern of reading the source code, writing a bit of code, posting it to arclanguage works for people who read the post.

Snippets scale better which is what you want. Quick failure with bad ideas. Good ideas expressed in code will then have to stand the test of time.

-----