13 ms·
Am I the only one who finds the phrase "json encoded hash"... inaccurate? Maybe someone can enlighten me, but is JSON really an "encoding"? And what exactly d
by diminoten 14y ago
Am I the only one who finds the phrase "json encoded hash"... inaccurate? Maybe someone can enlighten me, but is JSON really an "encoding"?
And what exactly do they mean by "hash"? They want the JSON to be a fixed length? How would you like my JSON hashed? How are you going to pull my data out of the hash?
And as a 'field' called response? Don't they mean, "as the value of a field called response"?
Is this part of the test, deciphering the jargon soup? Because if I'm understanding this correctly, a bunch of terms just got misused in a very short sentence, which would put me off of applying here.
- lysol 14y agoIt's not. It's a serialized object.
- diminoten 14y agoThe JSON object is serialized? How?
- deleted 14y ago[deleted]
- gburt 14y agoIt's turned in to plain text that can be re-created in to the objects. From Wikipedia [1]: "[...] serialization is the process of translating data structures or object state into a format that can be stored (for example, in a file or memory buffer, or transmitted across a network connection link) and "resurrected" later in the same or another computer environment" [1] http://en.wikipedia.org/wiki/Serialization http://en.wikipedia.org/wiki/Serialization
- mattchamb 14y agoI also cant make sense of it. Do they want me to send them a hash of all my details? I don't think that would be very useful in letting them contact me.
- jordanthoms 14y agoHash here is referring to an associative array, not a hashing function.
- yunu_ng 14y agoWhat if the JS implementation in my system uses a tree rather than a hash table to implement an associative array. Is it then still a 'hash'?
- cperciva 14y ago"hash" = "hash table" = "associative array" (even if the implementation used by the language is not, in fact, a hash table)
- diminoten 14y agoOkay that's fair but... ugh. Unnecessary.
- cperciva 14y agoI agree, I hate the terminological abuse.
- deleted 14y ago[deleted]
- rickhanlonii 14y agoThat was my initial reaction, and then I thought that they may be just trying to obfuscate the process a bit. The more "technical" terms they use, the more they deter non-target applicants. Though, being too pedantic is certainly risks deterring the target applicants.
- yunu_ng 14y agoNo, you're confused. Nobody is saying they are being pedantic. Everyone is saying the opposite - they are being sloppy and non-technical with their terms.
- rickhanlonii 14y agoI don't believe I am, since JSON is a hash by definition. It is characteristically technical.
- GhotiFish 14y agoAre you sure it's not referring to the session ID when it says the hash? I think it means to suggest that you should send in your response a key value pair of response -> session ID that you get from the headers when you load that form.
- tlrobinson 14y agoThey most likely meant "hash" in the sense of Ruby's Hash (http://ruby-doc.org/core-2.0/Hash.html http://ruby-doc.org/core-2.0/Hash.html), a.k.a. hash map, dictionary, associative array, etc. It's annoying terminology, I agree.
- gburt 14y agoIts the distinction between data structure and algorithm that seems to fall apart here. The word hash on its own is used to refer to the output of a hash function ("the hash of X is Y") rather than the ADT "dictionary" that they really meant. It appears that you're right though, this may be something extracted from the Ruby community.
- jon-wood 14y agoThat's precisely it, I come from a background of doing Perl and Ruby, which led to my misuse of the word hash here.
- andyidsinga 14y agoI was gonna say.... my first thoughts were : a) which algo, and b) which field should be hashed ... ....so in fact they're probably weeding out programmers who've done such things
- gburt 14y agoYou are not the only one. I read that and thought it was the most awkward phrase you could have picked. Not because JSON isn't an encoding though ("JSON-encoded" makes sense to me) but because saying "hash" instead of "hash table" or "associative array" or pretty much anything else is uncomfortable -- the word hash on its own generally refers to a hash function rather than the data structure.
- SapphireSun 14y agoExcept in Perl where it is a synonym for dictionary.
- gburt 14y agoAnd Ruby [1], apparently. [1] http://ruby-doc.org/core-2.0/Hash.html http://ruby-doc.org/core-2.0/Hash.html
- jameshart 14y agoIt's not terribly precise but it's not very confusing if you're familiar with the way HTTP APIs are typically constructed nowadays, which presumably would normally be the case for the kinds of applicant they want to attract. They want you to HTTP POST a JSON-formatted (yes, you could say 'encoded') JavaScript dictionary - a 'hashtable' (hash is an appropriate abbreviation for this, albeit a confusing one) - i.e. a JavaScript object whose key/value pairs match the keys they specified. Of course, the question of why they requested the key/value pairs be POSTed in JSON format when HTTP specifies a perfectly simple and widely supported mechanism for POSTing key-value-pairs to a web endpoint, which is application/x-www-form-urlencoded... well that's a different problem.
- jon-wood 14y agoYes, I could have been a lot clearer about that, and will clarify the text in the morning, this was my first attempt at a publically available API, and now you mention it the documentation could have been far better. As people have picked up I meant a hash table serialised as JSON.
- runarb 14y agoAs people have picked up I meant a hash table serialised as JSON. You are probably thinking about associative arrays. A hash table is something different: http://en.wikipedia.org/wiki/Hash_table http://en.wikipedia.org/wiki/Hash_table
- jon-wood 14y agoAnd so my lack of formal CS education is exposed! I guess I've got some reading to do on the train into work tomorrow to properly understand the distinction.