Skip to main content
22 events
when toggle format what by license comment
Sep 9, 2014 at 14:06 history edited mechalynx CC BY-SA 3.0
added 248 characters in body
Sep 9, 2014 at 14:03 comment added mechalynx @canon yeah but inclusions are easy, what about all the other features? I'm not arguing they're extremely useful (except AJAX handling) but they still are "features" and not bloat if you're doing more than a snippet.
Sep 9, 2014 at 14:02 comment added mechalynx @l4mpi I didn't think of it like that and it seems more elegant to not have separate systems indeed. A lot of people have expressed reservations for the security of this - perhaps this comparison should be made in this case.
Sep 9, 2014 at 14:00 comment added mechalynx @canon on your edit: we'd only have to save to jsFiddle what StackSnippets can't handle itself. I don't see that as pointless.
Sep 9, 2014 at 13:58 comment added l4mpi @ivy_lynx so, what do you currently do when a post contains a link to a jsfiddle which is unsafe, bad, or just generally disagreeable? Simply do the exact same thing for a post that contains a Stack Snippet which is unsafe, bad, etc. Flagging should be reserved for extreme cases, e.g. a snippet purposefully written for crashing a users browser (or making it unresponsive) should be flagged with a custom flag explaining the issue. A snippet that makes the browser unresponsive because it's bad code should simply be downvoted and commented on - mod time is too valuable to handle cases like that.
Sep 9, 2014 at 13:58 comment added mechalynx @canon well I was just elaborating on the theoretical benefits, but to be specific, it can, just not in 100% of cases, which is fine by me, for a backup. jsFiddle has support for Coffeescript, SCSS, AJAX, jsHint, jsTidy, sharing, collaboration, accounts, DTDs, document load events and a cornucopia of libraries. These aren't useless, but the vast majority of fiddles don't use them. StackSnippets can add support slowly and carefully, based on feedback which would be based on usage, while having jsFiddle cover it in the meanwhile. Would StackSnippets even have all those from the start?
Sep 9, 2014 at 13:49 history edited mechalynx CC BY-SA 3.0
added 290 characters in body
Sep 9, 2014 at 13:45 comment added mechalynx @canon If we have both, we can have our pie and eat it too. StackSnippets would not have to have the full feature set of jsFiddle, could be used only as a fallback, while maintaining use of jsFiddle overall, which I think is best as it is a tool specialized in that job, whereas StackSnippets in part of a larger structure. If having both isn't beneficial, why then have StackSnippets in the first place? The same logic can be applied. My idea is to make them complement each other, rather than have StackSnippets replace jsFiddle entirely.
Sep 9, 2014 at 13:41 comment added mechalynx @l4mpi It would complicate things, but in my opinion, there is a usability difference between code listings and runnable snippets. Nobody bats an eye at clicking on a linked fiddle, so why would people not just run snippets blindly? I also added that flagging would work just as well, which would be much less complicated (I'd be interested in what your opinion is on that, as an alternative).
Sep 9, 2014 at 13:39 comment added l4mpi "Allow a safety review or rating for snippets" - We already have that, it's called voting and commenting. Downvote and optionally comment on posts with snippets that contain bad code, just like you would when the code in question is not in a snippet but simply in a code block. Adding extra functionality which only exists for code snippets would only complicate things.
Sep 9, 2014 at 13:36 comment added mechalynx @canon perhaps, but still, unless we consider the rep system broken and requiring changes, this should also be fine in the same sense. Its practically the same system, even the same infrastructure could be used if it's generalized enough. On the side of social mechanics, it should work just as well (no matter how broken the rep system may be) - also, there is the case of having a snippet downvoted to hell in a highly rated question, which provides more resistance to trollish downvoting in my opinion (but this is of course, speculation).
Sep 9, 2014 at 13:34 comment added mechalynx @canon btw, on embedding, I think that my suggestion has a possible solution for that (if the problem is stability as the post you linked states): Store the snippet on StackOverflow and the embed is just a POST to the API of whatever web app is to be embedded, essentially creating a temporary jsFiddle in our case. If jsFiddle is down, it falls back to the built-in Snippet engine on StackOverflow. This would require less storage on the side of jsFiddle and other engines as well.
Sep 9, 2014 at 13:31 comment added mechalynx @canon ah ok, that makes more sense. I just added an edit, where I mention that the same versioning system for posts can be used for snippets, thus allowing backtracking to restore the rating, if there is such malice. In any case, the same can happen with questions and SO seems to be doing fine :P
Sep 9, 2014 at 13:29 history edited mechalynx CC BY-SA 3.0
added 264 characters in body
Sep 9, 2014 at 13:27 comment added mechalynx @canon 1. Agreed 100% on per-version ratings; I had this in the count suggestion but it makes perfect sense here as well. I don't understand how it could be gamed and I don't understand what you mean on user recovery. The way I see it the security rating isn't a code quality rating, just a warning to prevent problems in the future. If there is a known severe bug, it can just be a code listing instead. 2. why exclude them? The idea for me is to provide some metric of how much the snippet has been tested. If you need to exclude them, use the same system used for views on questions.
Sep 9, 2014 at 13:06 comment added TMH Haha it's okay, I was kinda just typing as I was thinking, but again to reiterate, I think the safety idea or yours is a great idea :).
Sep 9, 2014 at 13:03 comment added mechalynx @TomHart I might have come off as more hard than I intended :P Didn't mean to be that critical, just using your idea as an excuse to further argue in favor of my own and perhaps some day, take over the world.
Sep 9, 2014 at 12:57 comment added TMH It was just an idea, to backup how safe the snippet (is/should) be. As far as exploiting I was thinking maybe people would start writing snippets where they're not really necessary just for the rep. It was just a passing thought, but seems a tad overkill/just pointless haha.
Sep 9, 2014 at 12:06 history edited mechalynx CC BY-SA 3.0
added 114 characters in body
Sep 9, 2014 at 12:05 comment added mechalynx @TomHart How would a rep system for snippets, on a website that already has one that works, be more exploitable than the already existing rep system? Note that I'm not recommending a rep system, I feel it would be redundant, but I do think that a minimal safety rating would work smoothly enough. Now that I think of it, flagging could also work well.
Sep 9, 2014 at 11:31 comment added TMH I like the safety rating idea a lot. Could potentially tie it in to a rep bonus/punishment, but that may give a way for people to exploit the system.
Sep 9, 2014 at 11:29 history answered mechalynx CC BY-SA 3.0