1,293 karma · joined August 14, 2007
Regardless of what "should" happen, we're just going to continue muddling around. It's worked out OK so far.
I've got an 'Organization' model and a 'Person' model. I want to use them interchangeably in some templates, so I need to be able to get their names in a consistent way.
An Organization just has a 'name', but a Person has a 'first_name' and a 'last_name'. I've been using a 'displayName' method to encapsulate the difference; would it make more sense to do something like:
var Person = Backbone.Model.extend({
initialize: function() {
var name = this.get('first_name') + ' ' + this.get('last_name');
this.set({ name: name }, { silent: true });
}
});For now: One thing that I'm still not clear on is when to wrap .get/.set.
Should I always write my own getters/setters and only use .get/.set internally? Right now I'm only wrapping them when the attributes need special processing, which leads to an inconsistent-feeling API.
All other things being equal, yes, a man is in a more powerful and advantageous position.
Obviously there are lots of individual women who are more powerful than individual men, and there are classes of women who are more powerful than other classes of men, but in general there are many advantages that men have that women do not. These advantages are a direct result of broad societal structures and cultural norms.
Yes, there are advantages that, in general, women have and men do not, but when you look at them they are almost always the result of sexist, patriarchal norms - e.g. the ideas that men are strong so they should never show weakness, strength is best displayed through through dominance, women are fragile and need men to take care of them, women are naturally better with children, etc. These problems are all tied up with each other.
> "forbidden thought"
> I don't care about "thought crimes".
Bad news: you're not the brave thinker that you seem to think you are (in fact your "forbidden thought" is probably more common than the alternative that we're presenting!).
People aren't disagreeing with you because they think it's morally wrong to think the way you do, they disagree because they think you're wrong.
Quoted for posterity.
It's not gross in the same way, but yeah, that is a great example of sexism!
Ah, Hacker News, where all ethical questions boil down to "were they paid?" and "is it illegal?".
Of course not, nobody thinks that. That notion does not exist.
> With the rels/links, you're just moving the coupling away explicit URLs to the names/identities of rels/links in the response.
I suppose, but that's a much looser coupling than the alternative (i.e. writing in the documentation "the comments URL is http://example.com/comments - you can't rearrange your URL structure, you can't start using a different domain (e.g. a CDN) for comments, existing clients can't use other sites that implement the same API, etc).
HATEOAS is about building general protocols rather than site-specific APIs. That it makes it easier to change your own URLs is just a bonus.
This isn't complicated stuff.
Not by people who know what they're talking about.
> This makes so much more sense because then you can use ?command= and have any command you want and not have people confused about what it means.
That's textbook RPC. It's a pattern that works well for many things, but it's definitely not REST.
A div exists to have no meaning. Using it for layout doesn't hurt anything except page size (unless there was a more specific element that you could have used accurately instead).
I don't understand how we're in the year 2012 and people are still repeating these "rules" without any understanding of why they might matter.
get '/:short_code' do
end
got inserted at the end of the textarea.When we're talking about a company what's the difference between a "conspiracy" and a "plan" or "strategy"? (Serious question.)