"Guides" preview

in Userscripts.org discussion
Subscribe to "Guides" preview 24 posts, 8 voices



Jesse Andrews Admin

While the feature isn't done yet, I'm sharing a preview of a new feature that I hope will be useful. It is called "guides".

Guides are a list of cool scripts/users with a description of why you think they are cool.

A special syntax is used to create links to users [u:###] and scripts [s:###]. It is so that:

  • Always grab the current name of the script/user
  • Creates a list of all scripts/users at the bottom for quick scanning
  • FUTURE: show popular guides on the scripts they reference
  • FUTURE: create DHTML links showing more than just the name

Before the guides go public I want to:

  • Have a few interesting guides to put on the homepage
  • Make sure it has all the features (should it link to forums, other guides, ...?)
  • Add ratings/reviews, comments, and other features to help determine the best guides

So please try them out, I've created a demo. You can find a list of guides at http://userscripts.org/guides as well as can create your own.

 
jerone Scriptwright

I like this feature and can help a lot of people (something like wiki).
Is the same HTML syntax acceptable as on scripts description pages?
And there should be some sort of control for guide accurateness and not used for scripts/site advertise.

And yes add also [g:###] for guide, [f:###] for forum topic and [p:###] for comment/forum post. But it think you should add this feature on the whole site.

 
Jesse Andrews Admin

jerone - I agree, I need to think of how to do it while being efficient (perhaps I cache the name of scripts/users/... for a bit so I don't have to hit the database every thing I see [s:###] or [g:###]

 
esquifit Scriptwright

I like the idea. When I saw this feature has been implemented I immediately thought of guides as an opportunity to explain things like Producer-Consumer patterns (in the style of Johan Sundström framework), how to use some complex scripts with lots of options, etc. I was quickly disappointed as I noticed that the very two first guides (besides yours) are
1) for self-promotion of own scripts (even worse: the promoted scripts are targeted at destroying a business model instead of *enhancing the web*, which is, I think, the aim of userscripts) and
2) a hint to a day-to-day javascript syntax construct which is built into the language since there is javascript in the world.

Maybe the original aim of guides should be stressed or somehow monitored in order to avoid that this useful feature quickly turns into a chaotic wiki full of javascript tutorials, personal homepages, etc?
Or maybe I'm misinterpreting the feature and everything is alright, I don't know.

 
jerone Scriptwright

I'm with esquifit here. There should be some rules on what may and may not be written.
Personally I think that the guides aren't the place for advertise of own script s.

 
ScroogeMcPump Scriptwright

I like the idea, even tho I won't have much to contribute to it - since it's rare that I use any scripts other than my own. The problem esquifit identifies is merely one of interpretation; every user will have his/her own idea of what this is and what it should be used for. Yes, it can be self-serving, but it can also be useful, like the recommendation lists on Amazon; the difference is that very few Amazon users have products of their own to promote.

Perhaps this needs some sort of karma/points system to rate the guides as to usefulness.

And a technical note: I understand the logic behind using numbers in the [u:] tags, but for convenience, I should be able to type, say, [u:esquifit] and have it automatically convert that into the more permanent designation.

 
Jesse Andrews Admin

Great feedback. I think rating of guides will be important to determine which ones are shown to the community.

Authors writing guides about using their scripts can be useful. (also note that Joe was doing me a favor testing the new feature and found several bugs). Your concerns are one of the reasons I'm waiting until we have several guides that showcase the feature before it is launched. Then by highlighting the guides we like on the homepage it will show what behavior we want.

Regarding the JS one, perhaps it belongs on the greasespot wiki? or another section on this site?

To the technical note: you are correct - I hope to eventually support @foo being translated to [u:333] internally. Since it is just me working on the site after work and on weekends, I cannot get everything I want on the first try.

 
ScroogeMcPump Scriptwright

I'm not sure if it'd be more effective to post this here or as a blog comment, but this looked like it could use a bUmP.

How is the ordering of the scripts and users in the end notes determined? I can't see any pattern to this.

Also, I'd like to make another feature request: [u:s:nnnnn], meaning "the user who wrote script nnnnn".

 
JoeSimmons Scriptwright

I wrote the bux.to one as a test. The "?" operator I wanted to create because a lot of beginners have trouble with it.

 
Mindeye Scriptwright

I have written a long guide to explain one by one the options of one of my scripts and the line of code to edit to change them. Is this acceptable or I should write it in the script description? The guide is here

 
ScroogeMcPump Scriptwright

I don't know what Jesse will say about that, but that was my initial idea for using this, too; I stayed away from it, tho, because I wasn't sure if it was appropriate. My script has separate Firefox and Opera versions, and it's getting to the point where it needs a more complete explanation, but I'd like to only have to worry about editing this in one spot instead of two.

Also, I really need to dig into the part of your script that generates the config screen and steal some code! ;-)

 
khopesh Scriptwright

@JoeSimmons: (since comments aren't enabled in guides yet) the ?: operator is also known as the "ternary" operator.

 
ScroogeMcPump Scriptwright

To khopesh: ?: isn't the ternary operator in the sense that + is the addition operator; it's merely a ternary operator. All "ternary" means in this context is that it takes three parameters. It just happens that ?: is the only ternary operator in common use.

?: is a ternary operator;
+, *, /, etc. are binary operators;
!, ++, and -- are unary operators; and
- can be binary (2-3) or unary (-1) depending on context.

To JoeSimmons: Now that we're on the subject, you should know that it's the ?: operator, not the ? operator.

 
khopesh Scriptwright

@ScroogeMcPump: Correct, ?: isn't the definitive ternary operator. However, since (as you mention) it happens to be the only one, it is in that sense "the" ternary operator (or perhaps I should more thoroughly say "a definitive ternary operator"). I don't know of a better name for the thing, and any time I forget the syntax (which comes first, the huh or the colon?), I can't exactly run to google with a search for "? operator" (and until I made that post above, I didn't know of the wikipedia entry). I always search for "ternary operator" and I always get the desired result. Way back when I learned of this in school, it was taught as "the ternary operator."

 
ScroogeMcPump Scriptwright

Several help files I have for various languages call it the "conditional operator" - try Googling that.

"the huh or the colon": No, that should be "the what or the twospot". ;-)

 
khopesh Scriptwright

I think you meant http://catb.org/jargon/html/A/ASCII.html ... I was taught the scheme programming language with "huh" for question marks, which are typically used at the end of functions who return booleans. For example, this function is read as "is five huh"

(define (is-5? n)
  (= n 5))

 
Jesse Andrews Admin

Regarding if ____ should be a guide - perhaps scriptwrights can write additional pages for their scripts?

 
ScroogeMcPump Scriptwright

To khopesh: I never used Scheme, so I never heard of that and assumed it was a joke (with so many alternatives, it's shouldn't be surprising that no one's heard of all of them).

To Jesse Andrews: I'm not interested in multiple pages for a single script so much as a page that can be applicable to multiple scripts. The user page isn't appropriate because the info I want to post isn't about me so much as my scripts (but not all of them collectively), and the individual script pages aren't appropriate because it's about more than one of them, which means I have to keep the info in sync in multiple places.

If you're okay with something like that being filed in the "guides" section, I'll do it that way, but I don't want to start on it until I know one way or the other.

 
Jesse Andrews Admin

@ScroogeMcPump,

It sounds sane to me so far. If it turns out we want to change it, I will make sure the data is migrated to a new type of "page" with the same features. For now lets use guides?

 
khopesh Scriptwright

@ScroogeMcPump (and anybody interested in learning CS design or Scheme),

Almost nobody uses Scheme outside academia; it's too simplified (most industry uses for such things use its larger parent, lisp). However, Scheme is a great tool for learning Computer Science; specifically design, but also coding practices, since it's so unlike any language you might already know (or any language you might learn in the future). The idea is that its uniqueness requires you to actually learn the fundamentals that you might have otherwise (or already) missed without the tendency of falling back to methods you already know. There are downsides, too; my alma mater changed its entry-level CS course to Scheme, and the students had a miserable time trying to understand what a for loop was when they moved to Java for the second course. While it was a struggle, I think it was probably helpful. Since Scheme is so totally useless, I think MIT's new(?) method of teaching python in their inro course is preferable (MIT used to use Scheme for that). The whole idea is to use a simplified version of an easy language to teach the basics, then move to a different language altogether for the more advanced concepts, thus ensuring that the students aren't trapped by a single language upon graduation. Languages die and get replaced, so you don't want to learn a language in a CS curriculum. You want to learn design and the flexibility to pick up whatever language-of-the-month the industry is using.

If you're interested in that method and maybe learning with it, I highly recommend the book How to Design Programs, which is freely available online at that link.

 

Oops, that was a really long rant. ... and yes, my use of "huh" was indeed a jest of sorts. More importantly, I think it succeeded in its purpose; it's far easier to say "huh" than to say "question mark," and you likely figured it out pretty quickly.

See also a fun poem using such terms.

 
znerp Scriptwright

Can anyone who's written a guide already please tell me if it's possible to edit guides once you've posted them? I'm assuming so, but I don't want to post a guide only to realise I made a simple syntactic presentational html error and can't fix it.

 
JoeSimmons Scriptwright

Yes you may edit and delete them.

 
znerp Scriptwright

Ok, cheers.

 
jerone Scriptwright

I just wanted to let a guide writer know about something, but it just ain't possible.
There are no comments or discussions possible and there is no PM system.

Cross
Presentational HTML allowed.
Use <code> for inline code and <pre> for code blocks. Use &lt; and &gt; for literal < and >.
We help break paragraphs and link your links.
or cancel