Apperception

While I spent a week of my paternity leave watching my little daughter, I managed to finally watch the initial season of Westworld.  I had pretty low expectations but everyone said to watch it.

I did enjoy the show, though like most movies and shows (Harry Potter, Avatar), I would have preferred to just experience the made-up world for a while, just watching some of the character interactions, before returning to the main storyline.

There’s a scene where you get to see the interface that lets the developers change the personality weightings of the characters — I was drawn to it.

This reddit thread pointed out that you can see in the UI a bunch of other characteristics that developers can edit behind the fore layer.  So in theory you can get pretty fine-grained with the personality development.  Though I’m not sure where the developers imprint a character’s backstory here, or if it can even be done via the UI.

What I love is the immediate feedback from editing a character’s personality (shades of Bret Victor’s talks about interactive code) and how the mixture of weighted traits form a baseline personality which guide, but not proscribe, all their behaviors.

This got me thinking about Galapag.us; I think I’m getting to a point where I’m ready to work on it some more.  The main thing for me in the last year has been severe time limitations with family as well as a ton of stuff to learn and think about while coding at work.  What that means is that in order for me to work on Galapag.us, I need to prioritize building a separate module for things so that I can work on them in isolation in a language and framework that requires the least complexity and time spent reasoning what the code should be doing.  As a result, I’ve spun out the MUD/text-based aspect of Galapag.us from the web application code, and I’m going to do the same with the character creator.

I’d like to get to the point where I can create random characters for fun while on the subway to work.  My previous strategy was to create essentially an MVP where everything is integrated.  But now, since this is primarily a labor of love and my life’s project, then I want to just stay with the bare metal so I can work on the components that enable me to play more.

Experimenting with React

resume_mobileWorking on Galapag.us allows me to experiment with new frameworks and to try out new design patterns on mini-apps.

React is one of the newer front-end frameworks and rivals Angular in popularity in new JavaScript apps these days.  Created at Facebook, React has done well to allow a developer to make isolated components which have readily-understandable state at any given point in time.  Having been spoiled at Vimeo by their breezily easy codebase, I was excited to try React to see if it would resemble working with Vimeo’s code.

It’s pretty good!  Components aren’t entirely isolated — you still have to find some clever way to inject style, or just settle on styling globally if you don’t want to do it inline (which React allows for).

Anyway, I built 2 mini-apps.  They’re not quite ready for production yet, so I’m not really going to link to them, but…

Resume

I’d been looking around the web and found JSON Resume, a schema proposal that allows for saving one’s résumé details in a JSON format, so it’s easily portable and separated from style and presentation concerns.  Perhaps an even more important goal of the project is to provide an alternative to the horrendous process of uploading your details via PDF or DOC to some job application site, only to have it either mangle the parsing of your file or, even worse, to force you to re-enter all the info into some shitty 5 page web form that looks like it was constructed a decade ago.  And God forbid you should ever have to update your info when you come back to your profile years later.

I figured it would be nice to have this app built-in for free — perhaps entering in all the pertinent data would become a quest to complete.

So I mapped a lot of the pre-existing modeling I already had in Galapag.us into a call to the API server that serves up your résumé data in JSON format compatibile with JSON Resume 0.0.0.

json

This app didn’t have that much complication in terms of interaction or dynamic changes — a straight-forward app making an AJAX call to populate the front-end.

But it’s fairly clean and extensible — and it’s mobile-friendly.

butterfly

Butterfly

The other mini-app I made is called Butterfly, as in a social butterfly.  The goal of Butterfly is simply to provide an easy tool for you to jot down someone’s name whom you just met at your local deli, or at a party, or whatever, so you know how to find his/her name later once you’ve long forgotten.

After all, we remember close friends but often meet so many random people who are still remarkable in their own way in your life, that we can’t remember their names.

This app is mobile-friendly too, and should make it easy for you to load the app on your phone and add the details of someone you just met.

The Bigger Picture

The résumé data signifies that my data modeling is at least getting to an intermediate point where it’s beginning to provide value in having a large datastore but also diverse enough to support applications which need broad access to different datapoints.

And the butterfly data model helps to map the social graph.  I’ve witnessed the torch and pitchfork brigades that attack services which attempt to allow people to post content about other people without their express permission.  While I disagree with this as a supporter of radical transparency, I understand how it’s just not tenable in today’s society.  But at least for those who opt-in and for certain datapoints, those who volunteer should reap all the benefits of a more interconnected virtual world.  So I do plan on rewarding those who share more — with things like the genetic crossing mini-app.

Galapag.us still isn’t useable in the sense that it replaces my daily viewing habits, and it’s not my first choice for a datastore yet.  I know when the site will be getting approachable for others when I start to dogfood it myself.  I keep adding more and more over the years, and refining that which is already there.  Eventually it will become useful, and, hopefully, necessary in terms of providing competitive reputation.

gc

A Liminal Event

At 36 years of age, as of March 7th, I have just become gloriously married.

You know those times at school when the teacher or a counselor would have you write down your 1-year, 5-year, and 10-year goals?  For as long as I’ve been an adult, marriage has been one of my key goals, since I value stability and a strong base as extremely helpful building blocks towards a better, unique, independent, meaningful future.  This has been a wondrous achievement, to become married to my wife!

It took me a while, and I was woefully ill-prepared for any form of marriage up until just recently despite wanting it, having incurred some hefty life experiences that forged my Ben-ness: training, war, official mistakes, transitions between cities and schools, finding a fulfilling career.  Fortunately, I also hadn’t found the right woman yet.  In retrospect I think I’ve dodged some bullets in life and I safely made it to this happy point; healthy and happy and intact to be able to recognize it in another and now I’m very lucky to have met but also deserving of my wife.  My Best Man wanted it clear to me that I was fortunate to have met her, whereas I countered that I also put in my time and effort to earn that chance.

And now we’re here.  I must confess; I’m a pretty even-keeled guy but our wedding was amazing.  Even better than we could have expected, better than all the fantasies and cliches.  Our friends and family, all holding court in their own ways, keeping the party on lock, the wedding vows themselves touching, the pacing and pre-wedding rituals, the smiles on family who have given us so much but we have not quite given much back to yet.

The honeymoon as well was what I would call a true honeymoon.  While I am loathe to engage in goofy grinny sugar, the honeymoon in Costa Rica (a bit in a secluded rainforest resort where we could sleep and eat the best food, a bit in a beach resort full of sun and surf) was almost fairy-tale like.  The best part was to share it all with a true equal, someone who is equally dedicated and invested in us — perhaps the most valuable thing one can find in life as well as one of the hardest and rarest things to find.

Prediction: Anniversary Weddings

As a side note, after having seen what the wedding culture is like, how the TV shows portray weddings, how our own planning went, I think if you wanted to create an extremely effective long-term marketing campaign, you would push for anniversary weddings as a major new event.  Think about what couples go through: their first wedding is probably going to be at least somewhat on the cheap since they’re either on the hook for it and/or they have no disposable income.  So a bride is not necessarily going to get her dream wedding when she’s so young, unless someone’s parents are loaded.

But imagine: after 5 years or so, the couple will probably have more money and will want to throw a more lavish wedding.  Perfect opportunity to market a second wedding.  Then the longevity wedding at 10 years or whatever, before a couple starts to get old and the glamour of the wedding’s superficialities fade away.  This would create several more opportunities for wedding industry folks to cater to couples and to create narratives out of multiple weddings.  It would also create more excuses for families to gather (which in the grand scheme of things is immensely important, overlooking the pettiness and jokes that surround having to deal with the in-laws and crazy uncles and whatnot).

Anyway.

Introspection

This is one of those moments in life where I take a knee at the top of the hill, look back at the path I’ve come from, and sigh and reflect on all that’s happened.

And then look further up the ridges and ranges to see what’s coming next.

I can definitely feel the strong pull of crossing over from one stage of my life into another.  For the first time, that journey is not alone, my decisions are not solely my own, and instead of destructive creation, there is now only creation, at least for the fortunate time being.  The teens and 20s are pretty destructive years but they chip away at your character and you end up in your 30s and 40s as the type of person you have chosen to be.

We love our little place in the East Village, but we have our story to write and we wonder where we go next.  For once it’s nice to share that decision, that conscious choice.

A developer’s job as a crash course in multilingualism for coding languages, organizational principles and methodologies for projects, and building applications rapidly — I feel this work has deepened my appreciation and respect for the creator and the builder and the artist, a continuation of my studies in art/tech school.  Writing code has in some ways taken the place of writing for me; I no long blog so much unless some large sweeping societal issue has me particularly wound up to write.

I was writing finger .plans in high school and college because I saw John Carmack doing it.  I wrote blog posts through the rest of most of my life thus far, even while in the Army.  Nowadays I think my conversation with the internet, and therefore with you, the reader, has contracted into more private communities.  In fact I think the most interesting communities will become smaller and more niche — it’s already happened on reddit where the subreddits are still positive, informative, and overly open to each other.  I would love to see local intranets for residential buildings or mesh networks that require some form of test in order to gain entry.  When I want to converse, I want to talk about what can be built, not why things shouldn’t, which has become the norm for discourse in most public forums.

Negativity

If I had to say what I hate most, it’s probably negativity.  I’m a pretty conservative person in my own assessments, probably a product of both my Chinese mother’s caution and my sergeant’s training to hope for the best but prepare for the worst, but this should not be confused with negativity.  Negativity is debilitating, demotivating, draining.  Those who find the inner strength to build and create and love need to be supported by the rest of us, not brought down.  And when it comes to examining what is possible, I’m usually overly optimistic.

LOOK AT THIS SHIT.  I PULLED THIS CLASSIC SLATE EXAMPLE UP ON THE FIRST TRY. LOOK AT THIS SHIT. I PULLED THIS CLASSIC SLATE EXAMPLE UP ON THE FIRST TRY.

Cranks and haters have always been a part of online and intellectual discourse, but it’s run rampant now that we have what is somewhat of a critic’s internet buffet. The Twitter community I used to enjoy, journalists and reporters and analysts and policy folks, once encouraging of a naive eagerness for new information, has become TMZ-like (in that it loves gossip, the less true the better) and pompous in its derision for anything and anyone.  No one is safe, in the end, from being torn apart for whatever reason: the idea won’t scale, this or that person is a fraud, etc.  The Atlantic, Slate, these are publications that your liberal news junkie loves to read.  And the writers they hire at those places are absolutely TERRIBLE in their negativity or insinuations of impending failure.

Facebook buying Oculus Rift, Amazon studying the use of drones for delivery, Google making a HUD interface in Google Glass.  What I want to be a part of is a community where those achievements are exalted, not ripped to shreds, as they have been by people I might have respected at some point.  I grew up in an idealistic proto-internet time of downloading MP3s and playing Quake online and Napster was a giant; anything was possible even if it was all insane.  Unless you tune all the negativity stuff out, you wouldn’t know.  You wouldn’t marvel at all the amazing work, such as the people who have contributed research and proofs of work towards, say, NP-Complete math problems.  Louis CK would say “everything is great and no one is happy”; I mean the research and consideration going into those Facebook and Amazon drones and balloons is just a beautiful thing to behold.

As the internet has passed through most of its adolescence and begins its maturity, the rest of everyone who plugged in were stuck in a status quo where it seems none of those critics and cranks have really advanced or improved at their own crafts.  To see the amazing achievements announced daily, and then see them shit on, well, it’s frankly infuriating.

Jason Collins coming out as a gay NBA player.  The quickest response: “But he’s a horrible player.”  Sports, one of the worst refuges of the shitbag critic.  A dude makes the NBA and instead of people showing him respect, they’re quick to point out he’s not a perennial all-star.  I’m sure even in Jackie Robinson’s day, people were slagging on him for something.  Some petty something.  As another sports example, what could be worse than this upvoted rant against watching sports?

The Snowden affair has made everything absolutely toxic.  The government lurks behind every piece of electronics now, in the minds of Snowden’s supporters.  It’s the same kind of paranoia I’m sure most of those people would make fun of the Republicans for in their loathing of Obama, or of conspiracy theorists for their suspicion of anti-gun, anti-religion, etc. liberals.  When John Schindler is pointing out how Glenn Greenwald is one bad day away from appearing on Alex Jones’ show, everything seems absurd.  My liberal peers now make blase jokes about the NSA but barely bat an eyelash at unprecedented expansion of corporate personhood.

SXSW just happened and I’ve never been, but I know people who seem to go regularly.  How do they afford it?  It’s expensive as fuck.  Do their employers pay out for it?  How much are people really getting out of SXSW?  So many people who go aren’t even creatives or builders.  I’m definitely not against a flashy party, but I do wonder when it seems like the B-players are being sent.  E3, SXSW, and other conferences are now meetups for the elite and rich, those who can either afford to go or who are paid to go.  And what are they contributing back as a result?  This is why conferences lose their magic.  This is why, most notably, TED tanked.

Wonder why communities stagnate?  Because they have more cranks than dreamers and helpers.

As I’ve gotten older, I’ve come to love watching the Grammy’s and Oscars more.  For me it’s bewilderment at the complexity and sheer market size of their industries.  The amount of resources, attention, and output generated by dresses, producers, talented artists and directors, the entertainment and happiness that they bring.  I love the process.  Studying how films are cast, the bonding the cast goes through for the film, the pushing of boundaries in the technical areas of the film, the representation of songs off an album into powerful videos, live tours, and performances for award shows, the biographies written up in Rolling Stone and whatnot.

20130813-1190-macklemore-cover-306x-1376429053

But the pettiness of the crowd drags it all down.  All the slagging on Macklemore even though him and Ryan Lewis were by far the most interesting artists of the year in terms of touching all aspects of the industry and affecting culture.  I actually thought Lorde’s album was incredibly powerful for such a young person but I’m happy with all the results.  The same goes with Oscars.  I try to make a point of it to see as many nominees in as many categories as I can, because those picks represent a curation by the industry.  Hence it drives me nuts to hear people completely destroy films in their critiques — the labor going into a project is admirable, even for lesser quality films.

Negativity.  I can’t stand being around it.

Elite Self-Loathing

One story I really hate seeing is the condescension towards Silicon Valley startups who seem to be creating fluff products when, you know, there are people dying in Africa and stuff!  Why can’t those engineers work on actual important problems?

Of course, who’s writing those stories?  Well in the case of the latest NYTimes story, it is written by none other than a Columbia computer science grad student who lives among the gilded engineer community being called out.

Man, where to start.  The insanely awesome advances in open source software, particularly in the promiscuity of excellent language features being shared among the major coding languages such that they’re all beginning to share a lot of commonalities, these are created by developers and coders and hackers and engineers, people who actually do enjoy spending a whole weekend by themselves indoors in the dark pushing characters around on the screen.

0199210829.02.LZZZZZZZ

You don’t have to wait around too long before you hear people say, “We must teach the kids how to code!”  Chances are, the people saying it can’t code.  And they won’t go learn how to code beyond tutorials.  This is fine — I certainly don’t think everyone needs to code — but I am definitely a believer that if you tell others they should do something, you should have done it yourself first.  Now, code as a gateway towards solving problems that kids might be interested in, this is a great addition to a school syllabus. (having them design a database to catalog what they own, or a double-booking ledger system to keep track of what little money they make, etc.)

Anyway, my point was that engineers are good at primarily one thing, which is writing very specific code that can test the limits of what was previously possible.  Criticizing Facebook for focusing on creating end-of-year videos?  That’s an immense computational task and it had to be done using tons of peoples’ disparate datapoints.  But the knowledge of how to pull that off is now going to be passed along to successors, to schools and research facilities, and eventually to grad student theses and private products.  As a former student of international development practices, that shit is hard enough as it is and most everyone in that world barely has the statistician’s background enough to be able to make informed decisions about whether this or that program or measurement is actually helping the people who need it.

So it’s the height of arrogance for people who don’t know how to build or measure things to tell others who can do one or the other that they should not only do that task but also design, fund, scale out, and deliver onto the ground solutions to improve society.  Some mercenary blog-quality writer for The Atlantic decides that this or that project is worth slagging because he was clever enough to think of holes in the project’s design while he sips his morning coffee.

I saw this at ITP — while the community itself is immensely supportive and open towards nonsensical, wildly over ambitious ideas, when it comes to critiquing others’ work, the feedback often comes back to blowing huge holes through someone’s work just to sound smart about it.

Getting back to those life goal write-ups.  I never really did them very seriously but when I think back to them now, they were immensely informative and helpful.  When I was in college, I think my short-term goal was to be a full-time daytrader, since I was doing fairly well trading the dotcom boom.  I didn’t have the perception and experience to realize that market volatility would dry up, that the system’s regulations would be gamed so that small-time daytraders (less than $25k in their account) would be locked out of the practice because of restrictions on the number of trades one can make.  If you want to know how Wall Street has changed, beyond the infamous “quants”, then you should look at how daytrading restrictions have locked out regular folks from trading actively, and also look at how IPOs, buyouts, and other mostly stock market-related business deals are all about cashing out and not adding value.  The stock market’s investment and negotiation deals handled by the big finance firms are not too far off from nobles trading title and land for reputation and power.  Their employees get little.  The only way normal folks can win in the market anymore is to just play for the long-term.

My Flaws and Strengths

Flaws
  • not “great”
  • too stoic
  • too serious
  • not close with enough friends and family
  • no natural ability
Strengths
  • relentless
  • high tolerance
  • courageous
  • top caliber friends
  • respectful
  • reverent of the process
That’s my list.  I might also add that the part I probably think the most about is that I know that positivity and being enthusiastic and empowering others to be happy with things is the most fulfilling thing one can do day in and day out, but for me what I lament is that I am by my nature just not that person.  Having met some powerful leaders, wonderful motivators, and just all-around badasses in my time (many of whom were at the wedding, if only for a few hours before they had to return home!), I have witnessed what they can do for others, and that’s just their natural state.  In the world I’m more of a defensive-minded person, more of a guardian, more of a sheepdog.  It’s just the way I am, and it’s what I’m best at.  How will I integrate that into being successful and truly great?

Taste

People fight so strongly for their opinions.  What for?  How about this quote?
“Good taste is a myth. A story our rider creates to serve the needs of the elephant. And the sooner you kill your good taste idol, the sooner you’re going to give yourself a chance to be a better designer. It frees you up to add taste as another tool in your designer’s toolbox. Consequently, instead of focusing on good taste, your focus becomes the right taste for the problem at hand. There’s a subtle but profound difference.”

The magic moments of online forums or of hobby-based communities are that in most of the growth stage, the conversation is dominated by doers and builders, people who are curious about the implications and who love to share positive aspects of it all.

And then I’m sorry to say but the “intellectuals” then bandwagon on, having read about it all in this or that magazine or on a prominent blog.  This is around the time when communities start becoming caustic, full of cynical comments enforcing behavior of entrenched, mature communities elsewhere.  The doers mostly get drowned out.  I saw it happen on HackerNews, and to some degree on reddit.  Those amazing comments you go to read when you first joined are replaced more and more by negative comments (and by memes, but I love memes).

These folks are full-time consumers: of culture (which they did not live in), of art (which they could not possibly create on their own), of popular culture (which they foster animosity towards but can’t help but indulge in).  A community of fast-food binge watchers.  I am an avid consumer of pop culture myself but I do feel a certain pressure to need to contribute something back: to try to find artistic outlets for my more pragmatic views, or to attempt things that are somewhat subversive.

The full-time consumers are up against the people who believe in doing, as referenced in this hackernews comment section on ageism in tech:

“I have a ton of cultural criticisms of the current tech industry, but the one thing that it is absolutely getting right is valuing creation. The damage that could have been caused by the Google/Apple cartel has been limited largely by the startup industry that, for all its faults, has as a crucial belief that the act of building things is valuable, and that people who make things are the ones who create the most value.”

Strengthening a Community

To me it seems like it would take very little actual effort to maintain the positive tone of a community and avoid the police that have made Wikipedia and StackOverflow so abhorrent to contribute to.  Active enforcement of positive messages would be a given, but bigger than that, I’d prefer a whitelist system where your reputation precedes you.  Do you have a good online history of being helpful, of encouraging others and of sharing lots of content?  Then you’re in.   Admittance is earned.

One major piece of Galapag.us that I hope to implement eventually goes along with the theme of different islands.  The islands have their own cultures, wildlife, climates — and their populations should have culture and personality that reflects it.  So each island would have its own rules for communication and culture.  For example, a welcome island would have strict rules against hurting new players, whereas another island may be a free-for-all.  But I think most islands would be somewhere in between, capped mostly by having formula requirements to gain admittance, based on a person’s stats.  Perhaps an island requires a very high reputation with very low negativity and an innate nature for helping others, so one would need to have very useful posts as well as have an “angelic” alignment.

I like anonymity, pseudonymity, and verified identity all at once.  I think they all have their place.  But I also think that one’s reputation should be compatible with a community.

So here I am.  Here we are.  Starting a new family, a new chapter in life.  I think I’ve definitely become more of a homebody as I’ve gotten older; saving money, disliking the quirks of others more, understanding which types of events are never that entertaining yet knowing which ones are really key.  I’d like to think I’m stressing meeting up with friends more now.  I definitely cherish that time.

And, to conclude, my goals:

1 Year:

  • get a substantial raise to pay off more school debt and begin having children
  • plan on where my wife and I might like to move to and live
  • crash-course on C/C++ and algorithms

2015 (37 years old):

  • fluency with computer science algorithms, data structures, searches, and sorts
  • west coast driving trip
  • scouting trips for places to live

5 Year (41 years old):

  • children
  • Galapag.us as a command-line/search box-driven game

10 Year (46 years old):

  • at the age when I should expect to create a life’s work or project that is “great” and “glorious”

 

Note: I’ll probably be adding to this, as I had trouble expressing what I wanted to say in a cohesive manner and worked on this over several nights.  I know I’m leaving tons out, and need to think more about future plans.

But hell, it’s so good to be in a state of strengthening and building now.

Momentous

After thesis and graduation, I took a break from Galapag.us to focus on getting a job.  I ended up getting hired at the wonderful The Barbarian Group as a developer (!!), about which I’m extremely happy, for that career change was exactly what I left DC and came to NYC to accomplish.

In the time since, I’ve been lurking in the nether regions of HTML5 canvas, HTTP headers, XSRF protections, and Drupal.  And now that I’m a little more comfortable with all the life changes around me, I have started coding for fun again.

I gravitate towards the MEAN stack for most any new fun project now: node.js/express.js being extremely easy to set up and expand, plus mongo which makes it super easy to drop in and manipulate with mongoose as an ORM, and then learning the intricacies of angular.js, which has made front-end state super easy.

And these projects I like to work on tend to relate to quant self and meta data about the self, which means they’re natural fits as an app on Galapag.us.  So with that in mind, I fleshed out a new interface for collecting moments at Galapag.us.

Momentous

There are many categories of data on Galapag.us, like exercise, school, and work, but there are also more nebulous forms like moments.  What discrete events did you attend today?  What special interactions did you have with random strangers, or with your loved ones?  What was the quality of those experiences?  That’s all Momentous does — it’s an excuse for me to build a quick angular.js app that collects the random moments of my day.

momentous

You can give it a shot at https://galapag.us/momentous/ (you’ll have to login/register) or just use the main moments page at https://galapag.us/c/moments/ if you like.

These sorts of mini-apps allow me to work on Galapag.us, experiment with new frameworks, and build nicer front-ends than the messy base template I’m currently using.  It’s still a work in progress.

The Future

I’m loving angular.js for building nice interactive apps that react quickly to the user and to the backend.  I’m thinking it’s a huge leap forward for writing HTML and JavaScript that expresses its meaning and functionality within the HTML source (by way of directives and filters) instead of having events bound to HTML states but stored in separate JS files.

From there, I’m thinking there’ll soon be code editors for JavaScript that build server-side API routes to receive and respond to the requests written by the user in client-facing scripts.  So you’d write some angular.js or jquery front-end stuff to hit an API route, and the IDE would automatically build the route to receive it and pull it from the database.  There’s still some disconnection between development for the client and for the server, but I think that’s what the next major leap forward will be for writing apps for the web.

Opening Up Galapag.us for Alpha

My thesis project for NYU-ITP has been Galapag.us, a tribe and ecosystem for promoting the idea that we should be radically open and transparent with our data so that we can form and share metrics to measure our progress and success in different areas of our lives.  More info at the front page of Galapag.us.

User Zero

I came up with the idea in 2006.  An email I sent to my Army buddy in April, 2006:

I sort of had an idea but it seems like it’ll be difficult to build out.  My idea would be for something similar to Xbox Live’s ranking system.  Except it’s for your life.  Privacy issues aside, people would volunteer to put in as much personal info as they want.  At first it might seem cumbersome putting in so much info but I think as myspace and other services have shown, people are willing to do it if it means it cultivates their identity.

So for instance you put in your income and number of kids and connect your accounts for online game rankings (like in Halo or Battlefield 2) and your exercise plan and your birthdate and your finances and investments and how many web sites you’re on (like myspace, digg, yahoo, etc.) and from all that data, the company would generate statistics that break down your life and give you info about how much time you spend on certain tasks, how efficient you are with your money, what your online reputation is.  Stuff like that.  The core would be statistics…anonymous statistics I think so people won’t have any incentive to forge their results.  The point would be to turn peoples’ lives into a numeric game where they can see how they rate in certain aspects of their lives.  Think of all those online quizzes people take about what kind of lover they are or what their personality is.  That could be tabulated into the statistics, which could be searchable or broke down any way the person wanted.

At the end of a year, we could look internally at our statistics and go visit the top overall people in person to go verify their data and videotape their lives, interview them.  Then a winner would be announced…like the best person award.  Heh…there’d be so much controversy and whining and competition if it caught on.  Then we could write a book about our experiences going out and discovering what makes someone “the best” compared to everyone else.

So…that’s my idea so far.  Sort of like a real-life RPG.  Perhaps we could offer points for real-world scavenger hunts or traveling to different countries around the globe.  What about having life coaches for certain segments, if someone was weak in an area like professional development?  I was thinking we could also offer points for accomplishing certain tasks like humanitarian work.

A lot of stuff happened in the meantime: I got out of the Army, went to study foreign policy in DC, worked for Homeland Security, moved to NYC for school.  And so now I’m wrapping up the thesis, which allowed me more than a semester to work just about full-time (including any waking moment) on trying to make Galapag.us a reality before I can either A) get funding or B) get an engineer/developer job after school.

So I present Galapag.us for thesis on May 15 at NYU.  I have two weeks still to work on it before then.  I think I’ve gotten it to a point where I can start letting alpha testers in to explore, and think about it.  My work log has been tracked on the thesis blog.

Beginning Alpha Testing with Thesis

Want to help alpha test or just look around?  Give it a try at https://galapag.us/login and see what you think!

Here’s the slide deck I’ll be presenting at thesis:

Stack

  • Amazon EC2 small instance with ubuntu
  • node.js/express.js: So easy to build a site using this framework.
  • varnish/nginx+ngx_pagespeed: Caching, run-time optimizations for faster page loads/downloads.  Routes to https and socket.io server too.
  • python scripts for maintaining server default state
  • celery for queuing
  • redis for temporary data dumps and lookups
  • mongodb for permanent data storage
  • angularjs for the comment system
  • mocha, unittest, qunit for unit testing in python and javascript

 

I know the site’s confusing — like an airplane pilot dashboard.  It’ll become more cohesive over time.  A lot of things aren’t quite working yet, or they have filler data to get them going.  Apologies for that.  For more familiarization, try the welcome demo.

But here are some features that are worth checking out:

Comment System

Comments will be available for tribe forums, formula critiques, peoples’ profiles.  I decided to use angularjs so I could learn how to build SPAs with it!

ss_comments

 

Tribes

By tracking individual data, one can also track internal company metrics and state-level happiness metrics too!

ss_graph

 

The Islands

Each island has its own weather, environment, and bonuses/penalties for certain user behavior, so it benefits you to live on the island that incorporates your style best.

ss_islands

 

Professions and Skills

What does it mean to be “good” at something? Are companies hiring the most qualified candidates? How do we standardize that?

ss_professions

 

Your Genome

A profile for your data.  You get reputation scores in different areas.  Those scores are determined by which formulas you choose to use.  You can also see your internet of things (devices, pets, objects) is on the bottom right, while you’ll also be able to create gaming characters using your own data.

ss_profile

 

Quests

You can complete quests within Galapag.us to gain experience.  Some tasks will be data-gardening for other people, some will be to introduce gaming elements, others will be to visit lesser-seen parts of the site.  But mostly the quests should be geared towards helping others.

ss_quests

 

Status Bar

I love github’s command bar. I want users to be able to do most everything through the search bar.

ss_searchbar

 

Tribes and Their Genomes

Tribes are important to our identities. formulas serve as their DNA.

ss_tribes

 

Universal Reputation Lookup

The left-side widget can be opened on most pages to see what reputations the people named on them have.  I intend to allow people to look up reputations from just about anywhere.

ss_widget

 

 

API/Sandbox

Galapag.us will have an API to access one’s data, as well as common stats such as state population census results, zodiac signs, and global stats.  Plus a place to test the routes, within the sandbox:

ss_api

 

So with all that, please go help alpha test at https://galapag.us/login to begin your exploration of identity and reputation.  Thanks, and come to the ITP Spring Show if you can!

A Fake Review from The Economist: A Review of Galapag.us

[This was one of our initial assignments for our ITP thesis projects. Come up with a pie-in-the-sky review of your thesis idea.]

[FAKE] The Economist: A (Fake) Review of Galapag.us

Reputation and identity

The internet was a house of nil repute, until Galapag.us

An NYC startup is providing an ecosystem for people to build reputation metrics using any of their data

Forays into the online world have been fraught with peril, uncertainty, hucksters, intrigue, and irresistible indulgence of curiosities. Despite a need for truth-telling and fact-checking, social networking sites have been unable to establish reputation as a measure of quantifiable value to provide the unicorn of positive user experience.

However, a New York City-based startup would like to change that. Galapag.us, so named after the chain of islands made famous as Charles Darwin’s Eureka! moment for his theory of evolution, as well as for its American heritage and social emphasis (.us), has built up a loyal tribe of Galapag.users who promote its cause.

The tribe promotes openness of data and identity as a way to create measures for reputation, under the idea that being radically public will create more value for individuals and for society than governments, businesses, and nefarious individuals can take away through violations of privacy.

Surely other companies have attempted to reëvaluate reputation metrics, but as Ben Turner, the “discoverer” of Galapag.us says, “Companies either focus on low-hanging fruit from Foursquare and Facebook APIs, or they can only measure data in small spheres of peoples’ identities such as diet, exercise, or desktop PC productivity.” The strength of Galapag.us, Turner says, is in its ecosystem of data, variables, and formulae cutting across the spectrum of peoples’ identities, such as their professional progress, their hobbies, what they spend the fixed-limit twenty-four hours of the day doing, etc.

The other strength is indubitably its passionate tribe, made up of early adopters, quantified selfers, data science geeks, academic researchers (who have access to large-scale anonymized organization- or “tribe-” level data), and even recovering patients whose lives have been made quantified in order to survive their maladies.

For now, Galapag.us is closed only to members who vow to be open with their data, even though granular privacy controls with an “opt-in” only mentality are available. But Turner envisions a future where Galapag.us will provide reputations and identities to everyone — and every thing — on the planet, as a way to combat trafficking, bullying, undervaluation of good behavior, and other social problems.

The company can walk the walk, with an organic, thriving user base, as well as with its discoverer being a Texan and a former Army sergeant with an intelligence background, technical capability, and New York City Silicon Alley DNA. In an age where Internet users feel as though everything is being taken away from them, it is a breath of fresh air that Galapag.us is trying to return more value to people — and to society — than they need to provide on their own. economist_rectangle.gif

Understanding Genomes: Data Viz Tests for Galapag.us

My Understanding Genomes class with Yasser Ansari has been primarily about understanding the process of how DNA is replicated and how its encoding carries instructions for the building of life.  Our midterm is a fairly open-ended assignment for applying the DNA replication process to a project.  I decided I would do some tests for a person’s Galapag.user data object, in the form of a JSON object being displayed in various ways that allow for quick symbolic/artistic interpretation (which humans are good at) but also allow for quick deep dives into the data (which nerdy types like me who want to see more data on-screen at expense of simplified UI).

So, the first step is to set up a way to access the JSON object.  Right after the spring semester finished up, I had some free time before work started and so I began to port my PHP+MySQL Galapag.us code over to node.js+Express+MongoDB.  I still have a lot of work to do on that, but I can’t really work on that till next semester (AKA thesis semester).  Now, of course, because we use it at work, and there’s a class at ITP teaching it this semester, I’m interested in switching over to Python Flask+MongoDB, but I’m worried I might lose some time figuring out the quirks of that, versus just doing the quick-and-dirty with JavaScript.

Anyway, I’ve already set up some basics for a Galapag.user’s profile database model.  And for Nature of Code class last semester, I built a quick node.js Express server for sending a JSON object of a person’s characteristics (1-10 scales for creativity, strength, charisma, etc.) to a Processing sketch for my genetic crossings project.

So I combined the two models to create an expanded Galapag.user profile, which looks something like this below:
{ "status": "OK", "JSONtitle": "Profile Summary", "profile": [{ "_id": "xxx", "adjectives": "", "appearance": 10, "armSize": "38R", "bio": "test me", "bodyType": "average", "broken": "femur", "caffeine": "coffee", "charisma": 8, "chewNails": "never", "children": 0, "chineseSign": 2, "city": "Des Moines, IA", "coatSize": "38L", "creativity": 3, "discipline": 6, "dressSize": "N/A", "drink": 1, "drugs": 0, "education": 6, "entrepreneurialism": 1, "eyeColor": "brown", "eyewear": 0, "facebook": "", "facialHair": "none", "fillings": 1, "flickr": "", "formulaEducation": "", "foursquare": "", "freckles": "back", "gender": 1, "google": "", "gracefulness": 8, "hairColor": "blond", "hairLength": "short", "hairStyle": "shaved", "health": 6, "height": 66, "homeTown": "Des Moines, IA", "honesty": 3, "humor": 6, "income": 120000, "injuries": "", "instagram": "", "intelligence": 5, "legSize": "30", "linkedin": "", "liquidityInteraction": "", "loggedOnTotal": "", "luck": 8, "maritalStatus": "single", "money": 7, "nationality": "USA", "neckSize": "16 1/4", "occupation": "analyst", "personalityType": "ENTP", "pid": 99, "piercings": 0, "politics": "Republican", "prosthetics": "none", "race": 1, "religion": "Christian", "religiosity": 6, "responsibility": 6, "scars": 1, "sexuality": 0, "shoeSize": "9", "sign": 1, "smoke": 1, "stamina": 5, "strength": 6, "strengthFriend": "", "stress": 6, "suggestedBy": "", "surgeries": "", "talent_art": 2, "talent_math": 6, "talent_sports": 8, "tattoos": 1, "totalBooks": "", "totalCostWardrobePerson": "", "totalInteractions": "", "totalTransactions": "", "totalWardrobe": "", "trustBusiness": "", "trustFriendship": "", "twitter": "", "waistSize": "32", "website": "", "weight": 175, "wisdom": 3, "wit": 5, "xbl": "", "youtube": "", "zipCode": 85083, "claimed": true, "audited": false, "firstTime": false, "active": true, "joined": "xxx" }] }

To visualize the data, there are a couple things I’d like to focus on.  One, I don’t want it to be just another widget you put on your site (besides, does anyone have sites anymore?), and two, I want to emphasize the non-financial benefits of reputation, which is to say, Galapag.us would be great for dating or hiring, but it should really stick to a core of providing an alternative model of judging trust, reputation, and worth through non-financial actions such as being a good friend, a good citizen, self-sacrificing (or not, depending on your opinion of altruism), whatever.

The point is that everyone has his own opinion of what makes someone else valuable, and Galapag.us needs to be a system that does not favor one system over another.  Granted, I think Galapag.us will have its own core values, which I’m hoping will be built upon the company’s DNA, of its founders, but it will also allow for alternate models created by, for example, the average expectations of the entire Galapag.userbase, or hopefully, the aggregate beliefs of different regions, countries, cultures, etc.

Anyway, back to the assignment.  DNA transcription, translation, and replication are essentially protocols for the secure passing of information.  Biology has created a highly reliable process for this.  Humans have developed less reliable processes for the passing along of cultural information, less reliable because the processes rely on generations of humans adhering to the cultural norms and traditions and taking the time to teach it to the next generation.  But look what beautiful things humans have done to pass along generations of information quickly:

Maori facial tattoos (ta moko) were often used to denote one’s place in society, based on positional rules.  From this blog post:

 For men, the Moko showed their rank, their status and their ferocity. The which is generally divided into eight sections :
1. Ngakaipikirau (rank). The center forehead area
2. Ngunga (position). Around the brows
3. Uirere (hapu rank). The eyes and nose area
4. Uma (first or second marriage). The temples
5. Raurau (signature). The area under the nose
6. Taiohou (work). The cheek area
7. Wairua (mana). The chin
8. Taitoto (birth status). The jaw

Something I’m more familiar with, American military uniforms, which allow soldiers who have never seen each other to immediately know someone else’s rank, achievements, stature, etc.  Here’s General Petraeus:

American children are primed for the military uniform (which is now full of symbology invisible to most Americans because of the small percentage of people who actually serve in it) through their Boy/Girl Scout uniforms:

These are individual displays of conformity into cultural systems and achievement within them.

But we also have ways of remembering those we’ve lost and loved.  Take, for example, the American quilt, which has traditionally been used to record family histories or American history, …

…but which not too long ago was used to create a massive remembrance of HIV/AIDS victims on the National Mall:

So how can I encode profile information in such a way that it’s visually appealing, culturally useful, and statistically informative?  To be honest, I have no clue.  It’s not something I’m strong at.  What I’m hoping is to have a few different options available, but to also just put up the API for proper designers to build their own interpretations, something that’s more in keeping with an open-ended system.  Yes, it is likely that no one at all would ever use Galapag.us, particularly any developers, but I think what’s important is to build a simple API for people (including internally at Galapag.us) to interact with.

Here are some visualizations I already made in the past:

So if I were going to come up with a new visualization that could be displayed in various mediums (on clothing, on sites, badges, business cards, etc.), there doesn’t necessarily need to be any order or logic if I am looking to create something cool aesthetically with the data, but it could help, with minimal cost.

In thinking about Galapag.us and a holistic reputation system, I thought that one would need to find universal constraints.  The first constraint I thought applied to all things, and people, rich and poor, good and bad, was time.  As Arnold Schwarzenegger and other motivators would say, there are only so many hours in a day in order to be great.  No matter how important or unimportant we are, we all only have 24 hours a day to do things.  How do we use that time while we’re alive?  How much time have we invested into different aspects of our lives?

At the same time, there are qualities and characteristics about people and things that require no time to develop or improve or grow into.  It doesn’t take you time to develop kindness, or honesty, or whatever.  You either are at any particular point in time, or you’re not.  These are binary instances, which may vary over time (most people go through periods of both).  If you took a snapshot at any point in time, you would be either one or the other.  Contrast this (and all its inherent inconsistencies) with, say, having gone through college.  It takes 4 years, usually, to get a degree.  Being a college graduate is something that took time to develop.

So time is one dimension. The other one, for better and for worse, is money.  What is your opportunity cost of spending x hours doing something?  If you become a surgeon, you have to spend maybe 6 years and a ton of money for med school.  But afterwards you end up healing sick, weak people.  If you take out loans now, you are going into debt in the present in order to earn far more money and reputation in the future.  What if you wanted to start a family in the meantime, but had to wait?  What if you had to leave your country in order to go to med school?  What if you couldn’t leave your country because of warfare or poverty?  So time versus money is a construct that we’re all in some form or another a part of.

Note that setting up time versus money does not imply that richer or more productive people are better.  It just places events on a chart.  So, I could still say that you could be a productive person even if you had no money, or you could be completely lazy and rich, but it doesn’t condemn you to being “good” or “bad”.

What if I set up this chart?

This, above, is perhaps a chart that shows the objectivist vs. altruist debate.  Should you be the best person you can be, but only for yourself (“selfishness”, in Ayn Rand’s use of the word), or is that utility also dependent on how much you’re useful to people outside of yourself? (if we added a time vs. money vs. health dimension here, we could map altruism vs. selfishness better)

Are the charts biased by going down and to the right?  Or up and to the right?  Does that imply, because of the way we learn mathematics (positive x, y graphs) that heading further out up/down to the right is “success”?

So I’m already seeing that even in displaying data in order, there are a lot of issues with bias, implication, and categorization.  Would it be better to have a visualization where a core self starts in the middle, and branches head outwards to denote connections with people outside oneself?

Let’s try to visualize the above JSON object.  Oh, and did you know that a Pokemon’s “personality value” is captured into a 32-bit unsigned integer in computer memory? (e.g. a binary 2^32 number)

Here’s a simple grid, with transparency based on the 1-10 scale of each characteristic.

The next is a line of squares, separated by category (mind, heart, body), with opacity again representing the 1-10 scale:

A background repeated pattern of the first grid:

The last one charts outwardness and utility for two separate people.  The opacity represents the outward importance of the characteristic (i.e. intelligence is not very outwardly useful to other people) while the length of the bar represents the utility to the individual.  The two peoples’ bars are next to each other (i.e. the first bar is person 1’s intelligence, the second bar is person 2’s intelligence, the third bar is person 1’s strength, etc.).

What I like about the chart below (obviously it’s still not very clear) is that you can find the average utility vs. outwardness (the middle white line) and chop off the baseline, to find the spikiness of the person’s outward utility to the world.  If the data were better represented, you could also get a better sense of who is more “visible” in the world based on his characteristics, and who tends to be overshadowed, literally.

I didn’t have enough time to do more complicated visualizations, plus Processing is not the best thing for working with hashmapped/databased data.  I would rather be using Python or JavaScript to compare two different users’ data across different dimensions. Here’s a gist of my Processing sketch:

Nature of Code Final: Genetic Crossings

Professor Daniel Shiffman’s Nature of Code is outstanding.  Just check out the syllabus. And play with the Nature of Code repo Processing sketches hosted on Github. And be sure to get his book when it comes out! We covered some basic algorithms for simulating inside the Processing environment vectors and forces/repellers, genetical algorithms, Wolfram cellular automata, neural networks, autonomous agents, flocking behavior, particle systems.

Background

For me, the pull towards genetic algorithms, heredity, fitness, evolution, Punnett squares, etc. was great, so my project for my first intro to computational media class turned into my Nature of Code final.

My "EUDAIMONIA" Tattoo

My Genetic Crossings project attempts to create a simulated environment where people exist within a world connected to God, the peoples’ religions, their nationalities, and each other.  They produce offspring based on characteristic attraction rules (for my demo I only used “appearance”, “money”, and “religion”, but only to demonstrate what was possible –I would like to create a more fully-formed algorithm for my personal reputation/identity ecosystem Galapag.us to approximate and adjust to the infinite ways that people become attracted to each other and become married or have children or devote themselves to the other), and they can die.  Their well-being or happiness (what in Galapag.us will be eudaimonia) is dependent on their quality of living within their religions and nations.

Map View

A video from an older version:

See previous documentation on this project:

 

Here are the initial characteristics I created for each person.  There are so many more yet to add! Strength, intelligence, wisdom, charisma, stamina, wit, humor, education, creativity, responsibility, discipline, honesty, religiosity, entrepreneurialism, appearance, money, gracefulness, stress, health, luck, talent_math, talent_art, talent_sports.

Initial nationalities/regions: USA, China, EU, Africa, South America.  Characteristics of security, innovation, job opportunity, immigration policy, life expectancy, education, sanitation, standard of living, pollution, biodiversity, crime, political freedom, and nutrition.  By no means comprehensive.

Initial religions/spiritualities: Christianity, Judaism, Islam, Taoism, Confucianism, Hinduism, Buddhism.  With characteristics of commercialism, morality, hierarchy, portability.  Obviously these need some tightening up/additions/discarding.

Final Project

So in my midterm I managed to add Verlet 2D physics to the sketch so that people, nations, and religions have connections to each other which make them bounce around like they’re on springs, relative to their attractions and strength of ties to each other.

In my final proposal, I sought to add the following:

  1. Wolfram cellular automata
  2. Connect to external database
  3. A selection algorithm to choose certain parts from parents based on mutation rate and fitness to pass along to new offspring
  4. Interaction sliders to change variables
  5. Macro events that affect well-being of all objects in the world, such as earthquakes or war
  6. Micro events that affect individual well-being, like rites of passage
  7. Discrete clusters of people, mostly based on familial strength of ties, instead of one big clump of people in the middle like in my midterm

 

I managed to get most of this done.

I enjoyed adding Wolfram CA.  I wrote a node.js app for express which would act as a JSON middleman between my main genetic crossings sketch and a wolfram sketch.  Basically, when viewing the chromosomal stainings (genotypes), you can click on the CA button to the left of a person’s staining, and this will pass a JSON object (using Prof. John Schimmel’s Processing-Nodejs code) to the node server, which is detected within 5 seconds by a polling timer within the wolfram sketch.  The wolfram sketch then uses the JSON object as its data to apply rules to to construct a pattern unique to the selected person’s genetic characteristic code.

1) I added a third parameter to the rules which would display as either black or aqua, depending on the CA rules.  Prof. Shiffman’s code used base-2 groups of 3, which had 2^3, or 8 total possible combinations (using only the digits 0 and 1), but I used base-3 (0 = white, 1 = black, 2 = aqua), so it became 3^3, or 27 possible combinations.  For this ruleset, I duplicated Wolfram rule 90 three times, then added a few extra codes.  The triangular look seemed the most visually interesting for what I was doing.  Anyway, what was cool about Prof. Shiffman’s code was that it keeps streaming the pattern from bottom to top.  So when a new person is clicked on, that person’s signature is integrated into the flow seamlessly once the sketch loads the JSON off the node server.  I don’t know that any of this actually is useful except that it looks cool and uses principles from class and maybe, just maybe, shows someone’s digital characteristic “signature”.

Streaming Wolfram CA on top of Processing sketch code. Console of Processing shows a passed JSON object.

2) I’m happy I was able to set up a MongoDB to be accessed via node as well as by my Processing sketches.  When I build out Galapag.us, I’ll be able to pump out JSON objects of actual users into these sketches for data visualization.  I’d been wanting to do this since my first semester and now it’s done.  Most credit goes to John Schimmel though for writing the hook into node though!

node.js instance output including passed JSON object

3) I realized that I already had some mutation within my matingDance.sex() function, once the two parents’ characteristics were passed to a matingDance.punnettSquare() function.  Before, the function would just average the two parents’ characteristic values together and then add or subtract a random amount from them for mutation.  What I changed was making the function choose randomly from either parent’s base characteristic.  So if one parent had 10, and the other had 1, the result would not be 5 (rough average) but either 1 or 10.  Then I would offset a random amount (hardcoded as 4) if mutation kicked in (if a random number between 0 and 50 was less than 2, for approximately a 1 in 25 chance of mutation per characteristic).  What this ended up doing was increase the diversity within the genepool and more accurately reflect reproduction.  I still need to tweak these numbers to get more consistent levels of variety but the algorithm is mostly there.

Here’s a view of the chromosomal stainings before I changed the algorithm — here it averaged the parents’ traits, which, in the case of this sketch’s iteration’s octomom, created many extremely similar offspring:

Before

And here’s the view after picking from either parent and allowing for a slim chance of mutation:

After

I feel as though the end result has a more diversified population with more variability between generations and individuals.  I need to tweak this so that if the value from a parent is at 1 or 10, it may mutate in only one direction, but here’s the matingDance.punnettSquare() function:

int punnettSquare(int comp1, int comp2) {
    int mutation = (int)random(0, 50);
    int dominance = floor(random(0, 1.99));
    int crossover = 0;
    if (dominance == 0) {
      crossover = comp1;
    }
    else {
      crossover = comp2;
    }
    if (mutation < 2) {
      crossover += (int)random(-4, 4);
    }
    // don't want it to be out of bounds
    // TODO: fix so it can mutate only one way if parent is 1 or 10
    if (crossover < 1) { crossover = 1; } else if (crossover > 10) { crossover = 10; }
    return crossover;
  }

4) I didn’t add sliders to change variables mid-sketch — at this point I can use variables pre-set in the main class but I’d like to make the interface more user-friendly and interactive later.

5 and 6) I didn’t do macro and micro events because I figured they’d just require making a button that, when pressed, would cause particles’ values to change.  What would be interesting would be to have random events happen based on their likelihood to occur and then some events would have permanent effects (damage to peoples’ personalities) or temporary effects (nationalities’ well-being that would later recover).  This kind of introduces the possibility for individual peoples’ health and whether they have injuries/disabilities/diseases/gifts/talents.

I did add a Ritual class though, which only includes right now a funeral function.  When funerals are recognized by a culture (by pressing ‘f’), the dead are removed from view on the map and their attraction springs are removed as well.  What this is supposed to represent is that funerals are a way for the living to remember the dead and then put them to rest so that the living can move on and create new ties with the living.  I do like the idea that we retain our ties to the past, which can sometimes become weaker in death and sometimes become even stronger.  I didn’t model that yet.

public class Rituals {

  Rituals() {
  }

  void funeral(boolean funeralsRecognized) {
    println(funeralsRecognized);
    for (int i=0; i<numPeople; i++) {
      if (person[i].parent1 != -1 && person[i].parent2 != -1 && person[i].alive == false) {
        if (funeralsRecognized == true) {
          physics.removeSpring(parentSpringArray.get(person[i].parent1Spring));
          physics.removeSpring(parentSpringArray.get(person[i].parent2Spring));
          physics.removeSpring(parentMinDistanceSpringArray.get(person[i].parent1MinDistanceSpring));
          physics.removeSpring(parentMinDistanceSpringArray.get(person[i].parent2MinDistanceSpring));
          person[i].lock();
          person[i].display(0);
        }
        else { // TODO: re-reference spring after it's recreated?
          parentSpringArray.add(new VerletConstrainedSpring2D(person[i], person[person[i].parent1], person[i].parent1RL, random(parentGravity1, parentGravity2)));
          person[i].parent1Spring = parentSpringArray.size()-1;
          physics.addSpring(parentSpringArray.get(parentSpringArray.size()-1));
          parentSpringArray.add(new VerletConstrainedSpring2D(person[i], person[person[i].parent2], person[i].parent2RL, random(parentGravity1, parentGravity2)));
          person[i].parent2Spring = parentSpringArray.size()-1;
          physics.addSpring(parentSpringArray.get(parentSpringArray.size()-1));
          parentMinDistanceSpringArray.add(new VerletMinDistanceSpring2D(person[i], person[person[i].parent1], random(parentMinDistanceRL1, parentMinDistanceRL2), random(parentGravity1, parentGravity2)));
          physics.addSpring(parentMinDistanceSpringArray.get(parentMinDistanceSpringArray.size()-1));
          parentMinDistanceSpringArray.add(new VerletMinDistanceSpring2D(person[i], person[person[i].parent2], random(parentMinDistanceRL1, parentMinDistanceRL2), random(parentGravity1, parentGravity2)));
          physics.addSpring(parentMinDistanceSpringArray.get(parentMinDistanceSpringArray.size()-1));
          person[i].unlock();
          person[i].display(1);
        }
      }
    }
  }
}

7) Discrete clusters.  I ended up adding relationships between people and their parents from just constrained springs to a combination of constrained springs and minimum distance springs.  What this would change is that a person’s distance from his parents is both constrained to no more than a certain length but also more than a minimum length, so that they can both be more visible instead of overlapping visually, and also be more clustered together.  I found that this makes certain groups on the map appear more clustered instead of forming a big ball in the middle.  I still need to do more work on this though because as there are more people in the sketch, the big clusterfuck returns (because there are too many connections between everything and I can’t zoom in closer to see the gaps and relative spacing between different networks).

I converted a lot of my arrays of spring connections over to one large ArrayList, which I think was easier to deal with in the end in terms of manipulating them after they were initiated into the environment.  I did find, however, that I had to pass a reference to the spring’s number (since it was just an ArrayList entry) to the person’s class instance so it could refer to it later.  A problem with this though, as I realize just now, is that if I remove springs (as I do in the funeral ritual), I’ll lose the correct references.  So I have to make sure that when the springs are added again, when funerals are disabled, that a pass a new reference to the ArrayList.

I also found that there tends to be super-breeders every time I run the sketch, with certain people tending to produce tons of offspring while others produce none.  I’m talking like 1 or 2 people will produce 10 kids, which tends to make the sketch appear too tightly clustered because everyone is closely linked.  Perhaps this is a feature, rather than a bug, of reproduction?

Code

You can download the code from Github.  You’ll probably want to start up a node instance and then start the genetic crossings sketch, then finally the wolfram sketch.  Instructions are in the README.md.

Github: https://github.com/Xeus/Genetic-Crossing

Conclusion

And this leads me to some closing notes. I shied away from adding fitness yet again to my reproduction algorithms because I felt like “fitness” in the short-term was too much like large-scale evolution theory and autonomous agent simulation.  In my sketch there wasn’t really an ideal fitness state, with no limitations or rules imposed on the larger scale.  What I wanted was to break into modeling some culture into the simulation, so that choices were made between sexual partners based on cultural norms and not as much on randomized reproduction. Obviously modeling culture would work best if it were overlaid on top of basic biological reproductive theory such as choosing the fittest partner and whatnot, but I felt that was too much for the scope of this simulation, which I wanted mainly to focus on social networks.

JavaScript has come a long way.  It’s now the same on the backend and the frontend.  Processing can be exported to JavaScript in some capacity, and dataviz libraries such as D3 are taking off.  Soon we will be able to introduce more fluid, data, physics, and particle system simulations within a browser.  It’s too early for my sketch yet (ToxicLibs takes some finagling) but this is a glimpse of the web to come.

As I begin to do more serious work on the internal mechanics of Galapag.us, it’s stuff like this Processing project that makes me appreciate how careful I’ll have to be with positioning different factors against each other so that people can create their own formulae/evolutions to weight different priorities how they deem fit.

Looks like this book out of the Harvard Berkman Center, “Interop: The Promise and Perils of Highly Interconnected Systems”, by John Palfrey and Urs Gasser, is a must-read.

What I do feel is that current online social networks have not really tried to map out the complex interweaving, competing, variable connections and attractions we have between ourselves and others, between the different identities we all have, between the things we care about more or less at different times in our lives, etc.  To facilitate something like this, I can’t help but feel there needs to be a massive API that allows people to access all this data (if privacy settings allow it) so that we can take advantage of the multi-dimensional nature of our species.

You can think of someone’s identity as a meshed web that is being pulled apart by the external world and people and ideas and being pulled together by muscle and ligament and cartilage and sense of self and personality and such.  You can think of a community as a bunch of these springy people pulling on and apart from each other constantly, but at a stronger tension than from other communities.  Communities form religions and nations and cultures, again with that same network of relationships and competing identities. I hope that’s the dynamic I was able to capture in doing this project.

Credit

Special thanks to:

  • Prof. Dan Shiffman for all his documentation and code from Nature of Code, particularly his chapters on forces, genetic algorithms, ToxicLibs, and cellular automata
  • Prof. John Schimmel for his Processing-Nodejs code

Genetic Crossings (ICM Final Project Presentation)

[see more documentation: proposal, part 2, part 1]

Focus

For Heather Dewey-Hagborg’s Intro to Computational Media class at NYU’s Interactive Telecommunications Program, I decided my final project would involve creating a simulation incorporating the traits of people, nations, and religions, creating offspring who are summations of their genetics and environments.

Processing is a great language for easily visualizing data.  I early on realized I wanted to make a visualization as a study for Galapag.us, my eventual thesis for developing a reputation and identity system that centralizes all the data you’ve ever created about yourself and what others say about you so that you can develop algorithms and formulas for evaluating and comparing your results with others.

Inspirations

Visually, I was interested in karyograms, Punnett squares, chromosome stainings, and representations of solar systems.

 

Application

The sketch initializes a world and fills it with 5 people to start off with, Albert Einstein and Gisele Bundchen, and 3 random individuals.  Time begins, with each pass of the draw() loop aggregated and calculated into a rough approximation of years in time.

People have innate traits and characteristics saved into variables: strength, intelligence, wisdom, charisma, stamina, wit, humor, education, creativity, responsibility, discipline, honesty, religiosity, entrepreneurialism, appearance, money, gracefulness, stress, health, luck, talent at math, talent at art, talent at sports, whether employed, happiness, nationality, religion.  They are on a scale from 1-10, with 1 implying the most negative state and 10 being the best. (e.g. poor health vs. superb health, ugly vs. gorgeous, a stressed-out person vs. a carefree one, etc.)

They are born into nationalities/regions: USA, UK, Africa, China, South America, with the traits security, innovation, job opportunity, immigration policy, life expectancy, education, sanitation, standard of living, pollution, biodiversity, crime, political freedom, and nutrition.

They have religions/ways of life: Christianity, Catholicism, Judaism, Islam, Taoism, Buddhism, Confucianism, with the traits commercial, morality, hierarchy, and portability.

You can already see the terminology isn’t precise (nations vs. regions), and I’m missing tons of variables.  Had I more time to code in more negative effects, I would add personality traits like deception, violence, libido, etc.

God is in the sketch.  All people are connected with him.  He also has baller stats:

// who art in Heaven
  god = new Person(-1, 0, 0, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10, 10,
    0, 0, 10, 0, 10, 10, 10, 10, 10, 10, 10, 10, "God", "null", -2, -2, -1, 0, -1, 0, 1, 1100, 600);

Every pass through draw(), it’s determined whether 1) there’s a potential match (via the flirt() function), matching a male and a female (sorry, I didn’t have time to code in adoption et al), 2) there’s chemistry, and 3) if so, then sex().  Chemistry() requires a degree of likeness in appearance, money, religiosity, and some other superficial requirements. Then again, there’s also the matingDance.beer() function, which I’m particularly proud of:

else if (matingDance.beer(flirter1, flirter2)) {}

Social lubrication — some of the basic requirements for chemistry are, um, degraded, leading to easier baby-making.  This is also good for preventing my sketch from not having enough chemistry to produce offspring between the people.

Women between ages 18 and 50-ish are fertile (I had to adjust the numbers so that the sketch would work throughout its duration instead of the whole civilization losing an ability to breed by becoming too old) and need at least 5 “years” or something between babies before they can have another child.

boolean checkFertile(int _flirter1, int _flirter2) {
    int female = 0;
    boolean fertile = false;
    if (person[_flirter1].gender == "female" && person[_flirter1].alive == true) {
      female = 1;
      if ((currentYear - person[_flirter1].lastBaby > gestationRate) &&
       (person[_flirter1].age >= 18) && (person[_flirter1].age = 18)) {
        fertile = true;
      }
    }
    else if (person[_flirter2].gender == "female" && person[_flirter1].alive == true) {
      female = 2;
      if ((currentYear - person[_flirter2].lastBaby > gestationRate) &&
       (person[_flirter2].age >= 18) && (person[_flirter2].age = 18)) {
        fertile = true;
      }
    }
    return fertile;
  }

Children are created through matingDance.punnettSquare() of their parents.  The parents’ traits are averaged together and then some mutation is introduced for variability in the children.  I think I coded it so some traits change more than others, and some don’t change at all.

People can reach somewhere around 65-ish before death becomes a regular reality.  Once people die, they are removed from the population size, which is capped at 40 — allowing another child to be born somewhere if there’s less than 40 people alive.  The maximum number for the duration of the sketch is 90 people, so if 40 people are dead, up to 50 others can be alive.  The sketch starts to slow down once there’s more and more computation via people objects.

The orange-yellow buttons toggle between the main universe-like view and another view, which contains system stats and karyogram-like views of each person’s traits.  The traits are displayed as circles, with their sizes representing the size of the traits.

I made some formulas (or evolutions, as I call them) for actual vs. potential well-being.  This computes someone’s traits as he is born with, and after they are adjusted for quality of the nation and his religion.  This is then divided by the maximum well-being one could have in the same religion and nation.  Thus you get a ratio of actual vs. potential.  The goal is to bring these numbers as close together as possible, to see if a society is running at full efficiency.

In my fairly generous, unscientific, unsystematic world, people are STILL running far below efficiency.  The best of human achievement is squandered daily, not just by peoples’ own personalities and time constraints, but by poor maximization policy and by inflexible religious traditions.

I also coded in a happiness evolution:

int happiness(int i) {
    int happiness = person[i].health + person[i].money + person[i].stress + person[i].creativity + person[i].religiosity +
    round(nation[person[i].nationality].standardOfLiving / 10) + round(nation[person[i].nationality].pollution / 10) +
    round(nation[person[i].nationality].security / 10) + round(nation[person[i].nationality].crime / 10) + person[i].employed * 10;
    return happiness;
}

This computes someone’s happiness based on personal health, stress levels, creativity, religiosity, and his nation’s standard of living, pollution levels, national security, crime levels, etc.  It also relies on whether someone is employed or not.  Obviously this evolution needs a ton of work and far more variables.

My "EUDAIMONIA" Tattoo

The happiness metric and the actual/potential well-being ratio are key metrics that I want to spend more time nailing down.  I think these metrics are chasing Aristotle’s concept of eudaimonia, which I also have tattooed on my arm.  There’s more to life than money.  There’s all these other variables.  It could be said we are happiest (in a bigger sense) when we feel we are running at our maximum potential and can contribute to the world.  We need to be able to measure this and push it down to the individual level, so people can make better choices towards bettering themselves, and up to government level, so policymakers can make better policy to maximize a nation’s human and social capital.

Download/View

The code is too long to post here, but here’s a direct .txt link to the source .pde (w/ combined classes).  You can go see the sketch running at OpenProcessing.org!  Only thing about that is that it will run in a reduced-size window.  You can try to view the Mac .app version or the Windows .exe version, too.

The code is also now at Github.

Difficulties and Lessons Learned

I used a Hashtable at first, to try it out, but I quickly ran into limitations I didn’t know how to get around.  I would use pretty length functions to recast strings as integers and vice versa, and so on.  Eventually I got so pissed that I rewrote a lot of the code and Person classes so that everything was saved as an integer and then I could look up its “name” in a table via a function.  So the nations are coded as 0-5 or whatever, with 1 equaling the UK, etc.  Much easier to manipulate.  It also meant I could use the ID integer with arrays.

My code got long and complex quickly, so I had to split everything up into classes, just for organization’s sake:  Death, DrawFuncs, Evolutions, GetFuncs, MatingDance, Nation, Person, Religion.   I don’t think at this level of sophistication, I could really build more objects into the sketch.  I wanted to practice inheritance and polymorphism stuff but it didn’t come up.  Any ideas for refactoring?

I really hated recasting strings and integers.

I want to spend more time coding on happiness and actuality vs. potentiality.  What I learned was that you have to build a really large system sandbox before you can begin to tackle those metrics.  This includes modeling and simulating an environment to such a degree that it can begin to calculate and visualize your concept of what happiness is, since it pulls from so many dimensions of one’s life. (not just money, but also charity, family life, employment, etc.)

Ways to Expand

Still want to use real-time data from Galapag.us, fed in from its database into Processing.  Too much to do right now though.  I’d have to redesign my database as well as fix the sketch variables!

The algorithms and equations need a lot of tweaking to be more realistic.  For Galapag.us, I’m hoping to crowdsource algorithms for the most accurate ways to calculate somewhat qualitative figures.

I wanted to be able to introduce outside shocks (natural disasters, etc.) into the system, to see how it would affect various nations and personality types, to see who would be more resilient.

I would like to give random people innate superpowers or traits that are unique or very rare.  So that maybe when they turn 30, something is unlocked within them.  I guess I could also give them random diseases and genetic predispositions.

Conclusion

This project helped me get pretty solid on classes and functions and how to organize a sketch.  If I were to rewrite this, it would be far cleaner and more compact.  Mostly I’m appreciative of how much work it takes just to get to a level where you can start doing interesting network effects on large systems.  I barely scratched the surface, in about 1,590 lines of code, but I did manage to achieve perhaps 90% of the infrastructure that I hoped to build.  All of this helps me build a better reputation and identity system for Galapag.us and for my thesis.  I’m hoping the more solid I get on the infrastructure, the bigger breakthroughs I will have on the algorithms and crowdsourcing enablers that will be at the heart of Galapag.us.