I have a site where people post code snippets containing code of various types such as PHP, jQuery, CSS, HTML5, node.js, Android, iOS, etc. Currently I'm using the term "platform" to designate which of these disciplines the user can post. I know this term isn't accurate because CSS isn't a platform, it's a markup language and jQuery isn't a platform, it's a library. So in terms of UX and readability what term should I use? We already have tags, but these are not restricted to only programming languages, platforms, libraries or frameworks.

So the question is when posting a code snippet and I've got a dropdown containing PHP, jQuery, iOS, CSS to generally describe the snippet, what should the label be for the dropdown?

  • Maybe I should just say "Snippet Type" – Hawkee May 6 '12 at 0:20
  • What does this have to do with UX? – Charles Boyung May 6 '12 at 14:07
  • 1
    @CharlesBoyung Terminology affects the UX. I considered all the SE sites and couldn't find a better match. – Hawkee May 6 '12 at 19:12
  • "language" sounds about right to me. – DA01 May 6 '12 at 19:23

You could use programming language because that's what it is. But if you don't want to have markup language in the list of programming languages, then maybe you should only have language as the label. Your audience is developers, architects and programmers and they would not be confused if you used language. A third alternative is to use language syntax which is the content of the snippets.

This means that the libraries jQuery and node.js should be categorized as JavaScript. It's the same when you have snippets using .NET framework in C# programming or Java EE framework in Java programming.

If the library is important, add them as tags like or . The same goes for frameworks which also can be tagged.


download bmml source – Wireframes created with Balsamiq Mockups

| improve this answer | |
  • Yes, this is a good suggestion, but there are some exceptions. For example would you call jQuery or node.js languages? They both use JavaScript as a language. – Hawkee May 6 '12 at 13:10
  • jQuery and node.js are frameworks built upon the JavaScript programming language. This is the same as using .NET framework in C# programming language. (I'll add it in the answer for clarity) – Benny Skogberg May 6 '12 at 13:28
  • 1
    I like where you're going here, this is a good proposition. – Hawkee May 6 '12 at 19:14
  • Thanx! I hope it gives you some idea to diffrenciate between language and framework. It can be done by a second drop-down as well, but I think tags work better in this case. – Benny Skogberg May 6 '12 at 19:18
  • 3
    Well, there's multiple ways to handle this. Sounds like you want one field to represent different taxonomies. There are languages upon which libraries are build and can be used in frameworks. They really are 3 different things--and there are 'gotchas' such as the .net framework. The .net framework uses all sorts of languages and can use libraries as well. – DA01 May 6 '12 at 19:46

Omit the label and just go with tagging. I like how SE uses a loose tagging system with a pre-populated list of tags that includes both languages, frameworks and libraries - it allows users to tag according to their own mental model. Good user experience has a low knowledge prerequisite - what if a user does not fully understand the model of how languages are separate from frameworks, platforms etc... and they are just beginning to dabble with code examples? A flexible tagging system would be preferred.

enter image description here

The downside is that the bottom-up folksonomy will not be as structured as a top-down taxonomy... however you can build in rules that automatically tag a jQuery tagged post with JavaScript - or C# with .NET to fill in the gaps. Allowing other users to tag snippets can further fill in the gaps.

| improve this answer | |
  • Funny how you see (Steve) jobs tag among JavaScript tags and not flash... – Benny Skogberg May 13 '12 at 6:14
  • Thank you Luke. One thing I plan to do is offer a dropdown to indicate the markup for each code snippet posted within a page. So there will be an "Add Code" button which will display a code box and above it will be a dropdown or input box to enter the language. This might work with tags, but I'd have to restrict it to one tag per code block. – Hawkee May 14 '12 at 17:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.