Rosetta Code:Village Pump/SMW Examples by language and concept
SMW Examples by language and concept
This is a particular discussion thread among many which consider Rosetta Code.
This is a particular discussion thread among many which consider Rosetta Code.
Summary
Discussion and planning for using SMW to organize/tag examples by language and concepts demonstrated by that example
Discussion
The basic idea: Tag examples in a way that says "{{{TASK}}} has an example which demonstrates {{{PROGRAMMING CONCEPT}}} in {{{LANGUAGE}}}". {{{PROGRAMMING CONCEPT}}} would be something like "memoization", "for loops", "array math", "network communication", etc.
I'll lay out my plan here. Please add comments to the sections they relate to.
How I think we should do it:
- Property pages:
- The property name I thought of was "Demonstration of"
- The idea would be to have one of these properties for each language (i.e. "Demonstration of/Language name")
- Ideally these pages would be automatically generated by a bot when a new language is created. Do we still have a bot that does that stuff?
- Having it organized this way would show a list of tasks on that page and each task would have a list of programming concepts
- There may be a way to organize it the other way ("concepts with task lists"), or still another way to have it organized as "tasks with concept lists" and then also have a semantic query to show "concepts with task lists"
- Concepts would have their own pages explaining what they are, but that might not be necessary
- Tagging template:
- I was thinking the form would be {{demonstrates|concept|language}} which would tag the page with [[demonstration of/language::concept]]. It can be read as "this example demonstrates concept in language".
- This of course is dependent on dicussions about the property organization
- This template should go under each language header as the examples get tagged, and it would not display anything. We would need one template for each concept (a la {{works with}}).
- Possible problems:
- Non-standard concept names
- I think we might just have to deal with this and correct tags as they come up
- Links on property pages won't go directly to examples, but rather the top of the task pages
- People complain about this every once in a while. I don't know how to fix it. Someone may have to JavaScript that for us (please!).