Issues of security and quality.
Security
Sean found that the Django code embedded untrusted text into the web page in safe mode, killing all tags, including <pre>. Prudent, but overkill for our purposes. It sounds like we need custom filters for the submitted problem description text. Here are some ideas.
We would not expect all submitters to know RST, but is its translator automatically safe? If so it could be a particularly useful option.
Since we do want <pre> </pre> <PRE>, </PRE>, we could have our filter just allow those particular sequences and convert all other '<' and '>' (? and unicode equivalents??) to the escaped embedded text versions &...; This would kill all other tags. The only markup we would then need to add is that double newlines are converted to <p> or <br><br>. Sean is working on something like this now.
Quality
We have a small site with public contributions. Good public contributions are great for growing the site organically. On the other hand if we get a significant proportion of bad public contributions, we can turn people off from the site in a big way. In my judgment, we should consider this as an issue.
At present there are not a lot of submissions, so I could imagine taking responsibility to somehow, after the fact, remove public links to pretty useless examples. After the fact is likely to cause some PR problems. Another idea is to do it immediately:
When a random person gets a login ID and submits a problem, it is
only linked to pages show when s/he is logged in. S/he can let
others try the problem by giving the exact problem name/URL. We
could also have people be identified as students of somebody, and
have the problems appear under some teacher or course URL. Site
administrators/editors could manually grant some people higher editor
status, where they can set their problems or others to be publicly
linked. Lots of wikis let you preview an addition before making it public. The extra step of choosing to make a submission public probably makes sense anyway.
Particularly as the user base grows, and vetting problems gets onerous for a small group, another approach is to have editors possibly still recommend/highlight some problems manually, but have all problems go public when the author chooses, but appear in an unvetted category, and use the approach of social networking sites, and let users rate the problems. (I would hope we would not just give one raw number, but split responses by the responder's perceived level of expertise or responder's perceived level of the problem)
Another way to get good problem sequences together, is to allow another layer of uploaded pages, that point to an organized sequence of problems and maybe also interspersed with tutorial chunks. Not sure who we would allow to do this in public fashion, but such suggested sequences would certainly have raised visibility.
I'm not sure what is the best thing to do short or long term, but I would like some way to reduce the highlight on problems that do not aid the reputation of the site, without getting too much bad PR or causing too much work.On the Security issue, I think we need so little formatting that we
could just assume the entire block is pre-formatted plain text. These
are problem descriptions, like you might see in the docstring of a
function. I would make priority one just getting the current form to
show plain text. Down the road we might want to add syntax coloring
(I see that is already in the TextArea widget.) or maybe highlighting
of links. We should never need to deal with arbitrary HTML.
On the Quality issue, you make some very good points. I've been
ignoring the garbage I see posted, assuming that anyone visiting the
site will not take it as our best effort. But you are right, it
leaves bad impression. My suggestion, fairly high priority, will be
to put all submitted problems not on the home page, but in a special
category "new", that is visible only if you click a small link (or
perhaps not even that, if we start getting vandalism).
Editors in each area can review the new submissions, select whatever
they think is good, add appropriate categories, and even do some
editing. I see this working a lot like Citizendium (not so much like
Wikipedia). Editors take an active role. The content is not
determined by who is the most aggressive.
I propose we set up three editorial "areas" in addition to the
individual teacher pages, where teachers can do whatever they want.
1) High School math & science
2) College math & science
3) Professional self study
The main difference is in how much skill and maturity we assume in the
students. My target audience (non-CS professionals) will probably
already know how to write a program, but have never seen Python. The
most important thing here is to get them going quickly on interesting
problems, and avoid the cruft of Java, C++ or whatever language they
may have studied in college. My help files, as you can see from what
I have posted so far, are very brief.
I assume the setup for high school students will be just the
opposite. Students here need a very gentle introduction, like what
Jeff has done in his "How to Think... " book. Also, in a school
setting (both college and high-school) we can assume more of a set
order to the topics, whereas my topics need to be much more stand-
alone - a few introductory modules, then branch off into examples from
physics, engineering, or whatever subject someone wants to specialize
in.
-- Dave.
Good suggestions, Andy. I need to get busy and put together a list of
requirements for our ultimate website. I'll post that in our Files
section and get more comments.
On the Security issue, I think we need so little formatting that we
could just assume the entire block is pre-formatted plain text. These
are problem descriptions, like you might see in the docstring of a
function. I would make priority one just getting the current form to
show plain text. Down the road we might want to add syntax coloring
(I see that is already in the TextArea widget.) or maybe highlighting
of links. We should never need to deal with arbitrary HTML.
On the Quality issue, you make some very good points. I've been
ignoring the garbage I see posted, assuming that anyone visiting the
site will not take it as our best effort. But you are right, it
leaves bad impression. My suggestion, fairly high priority, will be
to put all submitted problems not on the home page, but in a special
category "new", that is visible only if you click a small link (or
perhaps not even that, if we start getting vandalism).
Editors in each area can review the new submissions, select whatever
they think is good, add appropriate categories, and even do some
editing. I see this working a lot like Citizendium (not so much like
Wikipedia). Editors take an active role. The content is not
determined by who is the most aggressive.
I propose we set up three editorial "areas" in addition to the
individual teacher pages, where teachers can do whatever they want.
1) High School math & science
2) College math & science
3) Professional self study
The main difference is in how much skill and maturity we assume in the
students. My target audience (non-CS professionals) will probably
already know how to write a program, but have never seen Python. The
most important thing here is to get them going quickly on interesting
problems, and avoid the cruft of Java, C++ or whatever language they
may have studied in college. My help files, as you can see from what
I have posted so far, are very brief.
I assume the setup for high school students will be just the
opposite. Students here need a very gentle introduction, like what
Jeff has done in his "How to Think... " book. Also, in a school
setting (both college and high-school) we can assume more of a set
order to the topics, whereas my topics need to be much more stand-
alone - a few introductory modules, then branch off into examples from
physics, engineering, or whatever subject someone wants to specialize
in.