Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

README.md

Social Circle And Friends

by Ben Nadel (on Google+)

View the Live Demo

I really enjoy working with human concepts (since they make sense in my head) and human interactions. As such, I thought it would be fun (and complex enough) to try to model the rules that surround a group of friends. Each group will be composed of one or more people, including both men and women. But, the following rules apply:

  • [Property] No group of friends can be larger than 150 members, according to Dunbar's number.

  • [Property] Men and women can be in the same group, so long as the ratio of one gender to the other does not drop lower than 1/4. Meaning, you cannot have a group with 5 men and 1 woman (or vice-versa).

  • [Conflict] Men and women cannot be in the same group of friends if they share a mutual attraction towards one another (you've seen When Harry Met Sally, right?).

  • [Conflict] Unrequited attractions are allowed; but, only if they do not create a love- triangle. Meaning, it's OK for Sarah to have a crush on Bob, only so long as Bob does not have a crush on someone else. This would only lead to unnecessary heartache in causal conversation.

  • [Property] No person in the group can be under the age of 18 (we're all adults here).

  • [Multiplicity] People can belong to more than one social circle (ie, group of friends).

  • [Property] No person can have an attraction to themselves (ie, no narcissists here, please).

Anyway, that's just my first pass on the topic. As I start to learn more about this stuff, I'm sure that I'll add and remove from this list. Also, I tried to put the type of rule that each constraint represents; however, I am not sure those are accurate.

Collaboration Pattern Players

When I first started putting some code down, I had several more objects than I have now. I think this is because I didn't really think about the problem, I just dove in. Going forward, I'd like to think more about the objects in question and about what kind of pattern players they are within the problem space.

In this example, I end up only having two pattern players: Person -- SocialCircle. They form a Member -- Group collaboration in which a member (Person) knowns zero or more groups (SocialCircle) and each group (SocialCircle) knows zero or more members (Person).

Something went wrong with that request. Please try again.