jsonresume / resume-schema

JSON-Schema is used here to define and validate our proposed resume json
http://jsonresume.org
MIT License
2.15k stars 277 forks source link

Social url/handle separation #6

Closed jayzalowitz closed 10 years ago

jayzalowitz commented 10 years ago

Take it from me, unless you have a handle/id (ex FBid)/standardurl setup its going to lead to issues.

jayzalowitz commented 10 years ago

i would suggest ex: twitter_url: https://twitter.com/handle twitter_handle: @handle twitter_id: twitterApiId

This allows for both handle referencing, linking, and API integration

wdoekes commented 10 years ago

Adding a bunch of keys like that is not nice. But I agree that you will indeed run into problems.

This would be more of my liking.

{
 twitter: {
    handle: "handle", /* no @ please */
    url: "https://twitter.com/handle",
    ...
 }
}

However, what would be the canonical form for new profile types? id? {icq: {id: "12345"}} In that case we should name the twitter handle (@handle) id as well. And the facebook username should also be id.

Or we could call all of them handle, but that would make the icq num improbable. How about pk for primary key: use the friendliest unique key:

Going back to the example:

{
 twitter: {
    pk: "handle", /* no @ please */
    url: "https://twitter.com/handle",
    ...
 }
}
thomasdavis commented 10 years ago

I think pk makes progress on the issue. Other issues have brought up that dynamic property names are inconsistent with most of the specification also and instead we should maybe favor

{
 name: "twitter",
 pk: "handle", /* no @ please */
 url: "https://twitter.com/handle"
}

When people use "twitter.com" instead of "twitter", I'm hoping themes will push certain names to become standard.

jayzalowitz commented 10 years ago

I get the idea of using the phrase pk, I really do, but for most social networks there is a distinct identification difference between numerical id, which never changes, and handle, as well as url, my suggestion is to just call that the id as it is more normally understandable

wdoekes commented 10 years ago

@jayzalowitz : I'm not sure what you're saying.

DonDebonair commented 10 years ago

I don't think there's a use for including a numerical, technical id (like the fbid). The two things I would be interested in, are: something like a handle (Twitter handle, FB pretty-username) and the profile url. What remains, is naming those two. I think pk is not going to be clear for a lot of people. Why not call it userId?

jayzalowitz commented 10 years ago

I distinctly disagree, on the nonchanging,stable id front. As someone who has just gotten done building a service around social information and job candidate, I can tell you it is of incredible importance to have both proper linking and programmatic + perm. access to reach out for more information.

The best example is tools can be built to keep a resume up to date using these profile ids, and with how portable this is supposed to be that would mean people never really having to update a real resume again.

That being said, I agree that userID > pk for multiple reasons

DonDebonair commented 10 years ago

But what are you saying? Aside from userId (for handles etc.) and url, should we add the technical id as well? I think people should update the userIds in their resume.json, if they change handles etc.

jayzalowitz commented 10 years ago

Yes, It is a really big deal for me to make sure there is a technical id in the spec.

There are no changes in the fbid... twitterid.. for example they stay the same number and can be used to fetch more information reliable no matter what the user does with their account. Additionally, they are the only field guaranteed to be there in some cases. (ex;basic calls to facebook without auth.)

My understanding, which may be wrong, is that twitter teats the id as the key if finds information off of in their api.

Think thats not important? What about a tool that tracks social media manager applications by the number of followers they have, that would have to have the unique id built in.

shea256 commented 10 years ago

I pointed this out somewhere else, but many Facebook users do not have usernames, so their URL uses their ID instead. In addition, many LinkedIn users do not have usernames, but instead only have ID's (internal to LinkedIn) and unique URLs for public consumption. There are other services out there that try to give all their users usernames, but as it turns out, usernames are not enforced across their userbase. These might be edge cases, so maybe they shouldn't dictate the default schema label, but there should definitely be a fallback at minimum for people who don't have usernames.

shea256 commented 10 years ago

Also, has "handle" become a universal term now? Is that preferred over "usernames"?

So correct me if I understand, but the current choices are:

osg commented 10 years ago

The pk choice was the only one in the list that I needed to look up to know what it meant. Due to its lack of clarity, consider removing or renaming it.

shea256 commented 10 years ago

I changed it to include another choice "primaryKey" - also added "id".

jayzalowitz commented 10 years ago

I honestly feel like userid or id makes more sense than pk, thats just me. I don't think I have seen that in a spec anywhere, and if you aren't as familiar with relational databases, it really dosen't make as much sense.

On Thu, Jul 10, 2014 at 1:05 PM, Ryan Shea notifications@github.com wrote:

I changed it to "pk (or primaryKey)"

— Reply to this email directly or view it on GitHub https://github.com/jsonresume/resume-schema/issues/6#issuecomment-48656800 .

osg commented 10 years ago

@jayzalowitz, I'm with you on this one. Even seeing it with the definition, it is the least intuitive. Let's get rid of it.

-1 for pk

shea256 commented 10 years ago

I agree, I'm not a fan of pk. Just including that in the list of choices so other people joining the conversation have context.

osg commented 10 years ago

That makes sense.

Nit: For the sake of sanity, please keep comments rolling forward rather than editing old ones (unless it's within moments of posting).

thomasdavis commented 10 years ago

Experimenting with a new label called "Decision Needed", this issue has it applied. It means we will be passing something through in the very near future.

DonDebonair commented 10 years ago

I vote for any of these: "username", "userId"

osg commented 10 years ago

+1 for either of those two too, @DandyDev

DonDebonair commented 10 years ago

Also, #71 deals with social media as well, and as I said there: I think we should enforce that either username/userId is provided or url and optionally both.

ocram commented 10 years ago

Well, username is so common and standard, why even discuss odd alternatives such as pk (99% of non-tech people don't know it) or id (too unspecific). I think there are more important decisions to make ...

DonDebonair commented 10 years ago

Still the choice between userId and username. And you know, there are 2 hard things in computer science (and anything else really): cache invalidation and naming things.

ocram commented 10 years ago

Yes, these two are actually interchangeable, at least in common parlance. I think we can be happy with both of them ;)

jayzalowitz commented 10 years ago

I vote for

Link UserId Username

There is a real need in some of the apps I have personally built in the employment space for said unique userid that does not change.

Take it from me, a UserId as described in the sentence above is present in the APIs of just about every social network, and if we don't account for it, people doing the social thing may be a lot less likely to use this (I cannot describe how much it helps with the amount of error checking and lookup code you need to write.).

On Fri, Jul 11, 2014 at 5:58 AM, Daan Debie notifications@github.com wrote:

Still the choice between userId and username. And you know, there are 2 hard things in computer science (and anything else really): cache invalidation and naming things.

— Reply to this email directly or view it on GitHub https://github.com/jsonresume/resume-schema/issues/6#issuecomment-48726908 .

DonDebonair commented 10 years ago

Eeeehm, I think we're talking about userId/username for specifying your "handle", not the unique number that Twitter/Facebook/... uses to identify someone.

I still think a "technical id" should not be included. Adoption will actually be hampered if people have to lookup this number to complete their jsonresume.

Take it from me,

I'm sorry if I don't just "take things" from people on the internet :)

and if we don't account for it, people doing the social thing may be a lot less likely to use this

Baseless assumptions as far as I'm concerned.

jayzalowitz commented 10 years ago

Should it be required. No. Should it be in the spec so that if people want to pass those unique ids on they can be. yes.

Scripts can be written to fetch said Ids when a "normal person" puts in their username (which btw, should be the name for that)

On Fri, Jul 11, 2014 at 6:39 AM, Daan Debie notifications@github.com wrote:

Eeeehm, I think we're talking about userId/username for specifying your "handle", not the unique number that Twitter/Facebook/... uses to identify someone.

I still think a "technical id" should not be included. Adoption will actually be hampered if people have to lookup this number to complete their jsonresume.

Take it from me,

I'm sorry if I don't just "take things" from people on the internet :)

and if we don't account for it, people doing the social thing may be a lot less likely to use this

Baseless assumptions as far as I'm concerned.

— Reply to this email directly or view it on GitHub https://github.com/jsonresume/resume-schema/issues/6#issuecomment-48730970 .

DonDebonair commented 10 years ago

That's nice and all, but social networks also allow you to fetch users by their username. And if that's not present, the url will always contain some sort of id to identify the user. If you make it optional, its perceived value becomes even less, because what use are your machine routines if you cannot depend on each user having it?

Regardless, I still vote -1 on adding a technical id.

Maybe others should chime in!

jayzalowitz commented 10 years ago

Daan,

That's nice and all, but social networks also allow you to fetch users by their username.

Usernames can and do change, thats why I am suggesting this.

And if that's not present, the url will always contain some sort of id to identify the user.

is so incorrect that you dont even know... it 100% depends on what security restriction on viewership the network is trying to impose

If you make it optional, its perceived value becomes even less, because what use are your machine routines if you cannot depend on each user having it?

Actually, one of the big deals here is limiting api calls to the service under limited conditions... and to add a point, you cant actually rely on the username input being correct anyway.

Point being, without this feature in there, this spec requires a large amount of api unique id tables and that sort of thing stored outside of this system, when having an optional field could prevent a lot of extra issues.

On Fri, Jul 11, 2014 at 7:11 AM, Daan Debie notifications@github.com wrote:

That's nice and all, but social networks also allow you to fetch users by their username. And if that's not present, the url will always contain some sort of id to identify the user. If you make it optional, its perceived value becomes even less, because what use are your machine routines if you cannot depend on each user having it?

Regardless, I still vote -1 on adding a technical id.

Maybe others should chime in!

— Reply to this email directly or view it on GitHub https://github.com/jsonresume/resume-schema/issues/6#issuecomment-48734735 .

osg commented 10 years ago

The old-school approach is if I change my username, I vet my resume for accuracy before I send it out.

Does this issue need to be decided for v1; as per the title of this issue, can we use either a URL or a handle for v1?

DonDebonair commented 10 years ago

Proposal: each social network account is specified with a username and a url. At least one of those is required, specifying both is optional.

Please vote.

osg commented 10 years ago

+1

shea256 commented 10 years ago

@DandyDev I like that. What's the option currently in second place?

thomasdavis commented 10 years ago

Great points everybody, this is a tricky issue. As far as I can tell we might be moving towards something that looks like this, correct me if I'm wrong.

{
  "profiles": [{
      "name": "twitter",
      "username": "neutralthoughts"
   }, {
      "name": "facebook",
      "url": "https://www.facebook.com/1231453342"
   }
  ]
}

Where username and url have to be declared as one or the other but not both.

DonDebonair commented 10 years ago

Let's also add an example of the "both" scenario, so it becomes something like this:

{
  "profiles": [
   {
      "name": "twitter",
      "username": "neutralthoughts"
   }, 
   {
      "name": "facebook",
      "url": "https://www.facebook.com/1231453342"
   },
   {
      "name": "soundcloud",
      "url": "https://soundcloud.com/dandymusicnl",
      "username": "dandymusicnl"
   },
  ]
}
thomasdavis commented 10 years ago

Is there a reason for the both scenario? Otherwise the validator should just make sure one or the other exist and throw errors otherwise "You can't specify a username and url"

It's sort of annoying that themes might sometimes get different values for twitter. Sometimes they can show the username, otherwise they will have to infer the username or just show a "Twitter" link

DonDebonair commented 10 years ago

I was under the assumption we would allow either or both. I don't see a reason why we shouldn't allow someone to put in both their username and url for a social network, and my example is just for illustrating that option :)

thomasdavis commented 10 years ago

Yeah I guess it doesn't affect implementations so much.

ocram commented 10 years ago

It's usually just redundant information, anyway.

And I agree with @opensourcegrrrl that you can just fall back to the "old-school" approach and change one line in your resume when you have changed your Twitter handle etc.

I don't think we should have technical, numerical IDs in the resume which are platform-dependent, internal properties of the specific site that are out of our control.

Adding URLs in addition (which usually just consist of name and username which we have included already) doesn't make this better, and it doesn't give @jayzalowitz the IDs he wished for. So shouldn't we better avoid this disimprovement?

DonDebonair commented 10 years ago

Not every social network provides clear usernames, that why we opted to include an url. I think the discussion is mostly about allowing both for a social network entry, of only allowing one of two. A reason for allowing both: a templating tool that generates a webpage, could show the username, and make that link to the url, without having to construct that url themselves.

jayzalowitz commented 10 years ago

Oh, trust me, the url users will submit will not normalize to the username without a bunch of edge case catching (I have dealt with millions of social profiles and tried to get them down to something usable in the machine context, Ids are important, and I am still willing to fight about that), but let me be clear.

I will never implement this standard unless both username and link are available, even optionally, this is a critical feature.

On Sat, Jul 12, 2014 at 9:25 AM, Daan Debie notifications@github.com wrote:

Not every social network provides clear usernames, that why we opted to include an url. I think the discussion is mostly about allowing both for a social network entry, of only allowing one of two. A reason for allowing both: a templating tool that generates a webpage, could show the username, and make that link to the url, without having to construct that url themselves.

— Reply to this email directly or view it on GitHub https://github.com/jsonresume/resume-schema/issues/6#issuecomment-48816775 .

DonDebonair commented 10 years ago

I will never implement this standard unless both username and link are available, even optionally, this is a critical feature.

Please Jay, could you keep the discussions civil? This kind of muscle flexing is not helping at all.

That said, as I mentioned earlier, my proposal would be to include them both (optionally) for each social network entry. Require at least one of two, and optionally allow two. So we agree on that. I'm still not convinced of the technical id requirement, and it seems that that is agreed upon by most contributers, so we'll leave that out, at least for now.

shea256 commented 10 years ago

Agreed @DandyDev.

@mwaclawek I would say it is very important to have a URL option OR a numeric ID option. The reason is that many people on LinkedIn, Facebook and other social networks don't have usernames. If a LinkedIn user hasn't picked a username yet, then the URL is the only way to uniquely identify him/her (in a publicly crawl-able way). If a Facebook user hasn't picked a username yet, then the userId and the URL are the only other ways to uniquely identify him/her (they map to each other, where the URL is just https://www.facebook.com/<userid>, which redirects to https://www.facebook.com/<username> if the username is set).

If you don't have a URL option, say good bye to supporting LinkedIn, Facebook and other social networks that don't have required usernames.

DonDebonair commented 10 years ago

And as said, even for social networks that do have clear usernames, such as Twitter, it can be useful/convenient for the user to add the url to his/her profile as well, just to make life easier for template designers.

shea256 commented 10 years ago

Ah, well in the case of twitter, every user has a URL with the same structure taken from the username, so I wouldn't say prepending "https://twitter.com/" is really a problem for template designers.

In addition, if it's optional to have a URL, then the template designer would have to support the case for which only a username is provided anyway, so no work is saved.

DonDebonair commented 10 years ago

Also true.

In any case, I think we all agree on url and username both being valid for a social network entry, and I think we also agree on one of two being required. Can we also agree on both together being valid as well?

shea256 commented 10 years ago

I think both being included should absolutely be allowed. I wouldn't recommend people populate both fields but I see no benefit in marking the inclusion of both as invalid.

SoundCloud is an interesting example because the username does not necessarily map to the URL :O. This means that if you want the user's URL, you need to have the URL included and cannot use the username. It's not even like LinkedIn, where you may have the username OR the URL. Here only the URL is valid because using the username can produce the incorrect URL.

thomasdavis commented 10 years ago

I'm a little lost, why is url not sufficient to cater for user id's?

Understandably database indexing wouldn't be as great, but they can infer id's and do their own hacks to make it searchable.

shea256 commented 10 years ago

I believe we were mostly discussing the merits of including a URL option. We simply touched on the idea of user id's.

ocram commented 10 years ago

@DandyDev and @rxl agree.

In any case, I think we all agree on url and username both being valid for a social network entry, and I think we also agree on one of two being required. Can we also agree on both together being valid as well?

Yes, this seems to be a good solution.