19

This question is regarding specifically the tag. This word has a heavily overloaded meaning for programming. The tag-wiki specifies the tag is only for the algorithmic method of fingerprinting large objects:

A hash function is any well-defined procedure or mathematical function that converts a large, possibly variable-sized amount of data into a small datum, usually a single integer that may serve as an index to an array (cf. associative array). The values returned by a hash function are called hash values, hash codes, hash sums, checksums or simply hashes.

However, there are many questions which use the tag in a different manner. Some examples:

  1. Twitter (and now Facebook) style hashtags: Pretty much everything tagged with both and
    • This crossover is currently down to just 30 questions, so someone has been cleaning it up. Whoever you are, if you're reading this, I salute you!
    • Thanks to JAB for pointing out the tag, which is now up to 525 questions.
  2. URL/URI hash marks, relating to web browsers (aka fragment identifier) (~800 questions).
    • Meanwhile, only has ~175 questions. Thanks again to JAB for pointing this one out.
  3. As Cupcake and ThisSuitIsBlackNot point out, in Ruby and Perl, a hash refers to a hashtable or hashmap like data structure with the hash function abstracted away. These structures are also known as (s) or (ies), which have their own tags.
  4. There is also the enigmatic tag with no wiki. The questions seem to be a smattering of all the other meanings. I know of no other tag that has the singular and plural form both accepted. Should this tag be burninated?
  5. Many questions which are asking about cryptographic hash functions and should probably only include the tag (which currently only has 30 questions).
    • Most questions are only asking about cryptographic or non-cryptgraphic hash functions; rare is the question which is actively comparing or asking about the differences between the two classes of hash functions.
    • MD5 x hash ~1300 questions
    • SHA x hash ~680 questions, etc.
    • This is admittedly the least objectionable tag collision, because a cryptographic hash function is essentially a beefed up, slower running hash function with mainly the same purpose. So let's focus on the fragment-identifier, hashtag and language-specific hashtable tag collisions.

Have there been any efforts in the past to clean up the tag? Are there other tags for the URL post-octothorpe fragment identifier and social-media hashtags? Or is the best course of action to update the hash tag-wiki to make it clear that it is overloaded?


No one has pointed out any clean-up efforts on the root tag. I also just tried to edit a question to create the suggested tag and discovered why it doesn't exist: it is 28 characters long and the maximum allowed length is (currently) 25 characters which the barely fits. I understand dash separation is the preferred method; is there a way to get special dispensation for long tags?

Personally, I would favor making clear, separate tags for for the other meanings of hash. We seem to already have appropriate tags for most of these cases, but the waters are still very muddy.

To accomplish this, I think the clearest way forward would be to deprecate the tag and disallow new questions from using the tag. Instead, the user would have to select from one of the other suggested tags, which would have to include , , (and/or hashmap, associative-array, dictionary - it would be great if this were language aware), and .

Is this possible? Or would it require new code to deprecate a tag in this way?

4
  • Downvoter, please comment. I feel like I've covered all angles on how to improve the situation.
    – Patrick M
    Commented Mar 22, 2014 at 19:51
  • In ruby, "hash" refers to dictionary data structures, so that's another case of misapplication :P
    – user456814
    Commented May 5, 2014 at 15:42
  • @Cupcake I'm pretty sure that's from a derivative of a [tag: hashtable] or [tag: hashmap], with the hashing bits abstracted away. And if they really wanted to abstract it, they should have called it a dictionary. (I can't decide if PHP's array or Ruby's hash is a more egregious naming violation.)
    – Patrick M
    Commented May 5, 2014 at 15:51
  • Don't forget the 1,173 questions about Perl hashes. Commented May 5, 2014 at 19:58

2 Answers 2

8

I think there are two main issues regarding finding preexisting tags:

  • Some of those tags don't show up when you type hash in the tags box for a question, so people who are not as familiar with the tags on SO will just go with whatever they're recommended rather than checking for a more specific tag.
  • The tag search feature at https://stackoverflow.com/tags only searches by tag name; I see no support for searching by contents of the tag description, meaning if the recommended tag for something has different wording a user lacking experience with that tag may not find the right one.

(Those two issues are essentially the same, now that I think about it: namely, that tag searching/matching is done solely by name.)

3
  • 5
    crypto-hash-function ? Commented Mar 9, 2015 at 12:59
  • 2
    To get observant users started down the correct tag path, I proposed an edit to the hash tag-wiki.
    – Patrick M
    Commented Apr 21, 2015 at 16:10
  • 2
    Maybe tags themselves could be tagged? Or better - if a tag X would have a list "could be mistaken for", containing Y, the SO engine could show X every time the user types Y. It would be a much looser relation than synonyms or similar names.
    – CygnusX1
    Commented Mar 19, 2016 at 21:51
0

You seem very confused about the relationship between hash functions and cryptographic hash functions.

Namely, you appear to think they are different and unrelated ideas. Nothing could be further from the truth.

"Algorithmic method of fingerprinting objects" is exactly what a cryptographic hash function is. There are only two differences between hash function in a hash table, and hash function in cryptography:

  1. For hashtables, we choose fast hash functions. For crypto, we choose hash functions that are intentionally made slow, with the idea that an attacker is going to be computing a lot more of them than any legitimate user.

  2. For crypto, we intentionally use hash functions that are difficult to reverse (preimage property). For hashtables, we don't care1.

Everything else, from the basic concept, to a desire to minimize collisions, is the same.


1Until a remote user controls the data, in which case the opportunity to cause hash collisions and turn lookup time from O(1) to O(n) is a Denial of Service vulnerability. In that case, you might care about preimage of the hashing function used in a hash table.

2
  • I am perfectly aware of the distinction between a crypto- and non-crypto- hash function. My suggestion was primarily about separating fragment identifiers, hash tags, and hashtables (as in the case of many questions tagged with ruby and hash - ruby calls hashtables hash for short - they are admittedly still related, but for tagging purposes, questions about ruby hash(table)s that don't specifically involve the hash function should't be tagged hash, in my opinion) from the hash tag.
    – Patrick M
    Commented Oct 26, 2014 at 4:53
  • 2
    The secondary point (that I admittedly didn't make very clear), was that I would favor questions only be tagged with either hash-function or cryptographichashfunction, as questions typically only deal with one or the other. Very frequently, you find someone using MD5 or a SHA function when they don't need the crypto; much more rare is a question about someone aware of the difference and asking specifically about whether or not they need the crypto.
    – Patrick M
    Commented Oct 26, 2014 at 4:57

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .