badge aggregator 1

Posted by Don Sat, 27 Feb 2010 22:09:00 GMT

a new site where a 'badge' or goal could be defined by the user with
  • a name
  • a logo/icon
  • criteria for achievement

    the aggregation site would read activitystreams from users and determine if the actions in that stream qualify them for any of the defined badges. the participating sites would need to provide an activitystream for each user. the aggregation site would provide a reputation document or list of earned badges.

    a site could make use of badges earned from other sites, or look at more general badges that the aggregation site itself defines.

  • The Operator

    Posted by Don Sat, 27 Feb 2010 21:19:00 GMT

    There is something unexplored about the model presented in Max Headroom and The Diamond Age. A person living life, and another person that gives up part of their life to be a bridge between the first person and the world of the Internet.

    The wikipedia article on The Diamond Age puts it best: "AI being depicted in the novel as having failed in its goal of creating software capable of passing the Turing Test. ... humans are able to earn a living as "ractors", interacting with customers in virtual reality entertainments. "

    The field journalist in Max Headroom, has a constant voice link to his operator. The operator is an intelligent and intuitive person with excellent internet search skills. The journalist relies on the operator to answer questions and provide information that gives the journalist an advantage over other humans. The amazing communication power of cell phones is still awkward and too slow to respond to integrate into many daily activities. An operator could become a real job for people to service other wealthier people who want such a service.

    When I was building EveryoneDelivers I though about an operator. A human that was aware of local jobs and alerted deliverers to jobs based on criteria that was too complex to code into the site itself. The operator in this case could work for a single delivery person or possibly as a dispatcher for a group of delivery people - an added service that delivery people would pay for since the operator is always online and looking out for their interests. Reminds me of a stock broker in a way.

    badges and points

    Posted by Don Mon, 22 Feb 2010 21:01:00 GMT

    i watched this exceptional talk on game mechanics in popular web apps today : Is your life just one big RPG. The second half talks about how through badges and points everyday systems can have a game element to it.

    Badges are predefined. Points are a severity total. Badges + Points is similar to jyte's cred concept. With cred, a badge is created on the fly with a key word, and a value is calculated for that keyword based on a participation algorithm. This reignited an older idea of an API for badges that exist beyond a single website. A service that makes it easy to add a badge/point system to an existing, and not necessarily game-oriented, website. A mostly API company, similar in that regard to Urban Airship.

    Our Deepest Fear

    Posted by Don Wed, 17 Feb 2010 22:57:00 GMT

    “Our deepest fear is not that we are inadequate. Our deepest fear is that we are powerful beyond measure. It is our light, not our darkness that most frightens us. We ask ourselves, Who am I to be brilliant, gorgeous, talented, fabulous? Actually, who are you not to be? You are a child of God. Your playing small does not serve the world. There is nothing enlightened about shrinking so that other people won't feel insecure around you. We are all meant to shine, as children do. We were born to make manifest the glory of God that is within us. It's not just in some of us; it's in everyone. And as we let our own light shine, we unconsciously give other people permission to do the same. As we are liberated from our own fear, our presence automatically liberates others.” -- Marianne Williamson

    directed graphs and document storage 1

    Posted by Don Sat, 13 Feb 2010 21:46:00 GMT

    With the release of Google Buzz, i was reminded of the XFN friends network. I dusted off my XFN Spider and thought about replacing the SQL storage with a document database. There are many options for data storage these days, as described in this writeup

    I'm still trying to fundamentally understand the differences between document storage and relational/sql storage. I figure this directed graph is a good opportunity to go further with that. I've decided to stick with couchdb as my document system of choice because its only retrieval mechanism is map/reduce. Once i get that down, i'll look at mongodb further and its custom query language with optional map/reduce.

    A directed graph has nodes and links between nodes. Its a directed graph because a link goes from one node and to another node. A social network has people that "follow" each other. This can be modeled by two SQL tables.

    CREATE TABLE nodes
    (id int,
    name text);
    
    CREATE TABLE links
    (id int,
     from_node_id int,
    to_node_id int)

    The following is a graph from my home page to twitter and delicious. My twitter page links back to my homepage while the delicious page does not.

    nodes

    idname
    1donpark.org
    2twitter.com
    3delicious.com

    links

    idfrom_node_idto_node_id
    11 2
    12 1
    11 3

    Modeling this data with documents is remarkably similar to the SQL case. Here I'm focusing on creating relationships between documents. Documents can also contain entire related records but thats another topic. A database in couchdb holds documents. A document is a set of key/value pairs. Couchdb gives every document an ID automatically. Since couchdb has no schema, I'll list the data directly.

    nodes

    {_id: "ad7b377d501ae5f17f623e7853f89ccc", name: "donpark.org"}
    {_id: "49c02d3dbffe3649cc9f1dbf99827d97", name: "twitter.com"}
    {_id: "5b5a99f6799bbf984da4b11e62a434ab", name: "delicious.com"}

    links

    {_id: "9efd0174f043dead5319aaee3ac9df92", from_node_id: "ad7b377d501ae5f17f623e7853f89ccc", to_node_id: "49c02d3dbffe3649cc9f1dbf99827d97"}
    {_id: "a227c15681639f83e26a93c2a6aa3522", _rev: "1-76c2de7086aa314f0971e41043b34924", from_node_id: "49c02d3dbffe3649cc9f1dbf99827d97", to_node_id: "ad7b377d501ae5f17f623e7853f89ccc"}
    {_id: "dc77b57e71bb9b05af7bdd0ab7eb1001", _rev: "1-fe817df1eb7d6e5208f3ce1be2d622ab", from_node_id: "ad7b377d501ae5f17f623e7853f89ccc", to_node_id: "5b5a99f6799bbf984da4b11e62a434ab"}
    Here I'm already exposing my newbieness with document storage. I created two databases, one for nodes and one for links. I'm not sure if thats a good division or not. Another approach is one database and a 'type' field so that both node and link records are in the same database. That means each view has to filter to that type which is what lead me to separate databases.

    In each case, given a starting node, I want to follow the links to get each targeted node and return a list of those nodes, or at least a list of the IDs of those nodes.

    Given a starting string of "donpark.org", the SQL solution is

    SELECT id FROM nodes WHERE name="donpark.org";
    SELECT to_node_id FROM links WHERE from_node_id=1;
    The couchdb view solution is
    function(doc) {
      emit(doc.name, null);
    }
    then HTTP query this view, and use a key parameter of ?key="donpark.org".
    $ curl http://localhost:5984/directedgraphs/_design/nodes/_view/select
    {"total_rows":3,"offset":0,"rows":[
    {"id":"5b5a99f6799bbf984da4b11e62a434ab","key":"delicious.com","value":null},
    {"id":"ad7b377d501ae5f17f623e7853f89ccc","key":"donpark.org","value":null},
    {"id":"49c02d3dbffe3649cc9f1dbf99827d97","key":"twitter.com","value":null}
    ]}
    $ curl http://localhost:5984/directedgraphs/_design/nodes/_view/select?key='"donpark.org"'
    {"total_rows":3,"offset":1,"rows":[
    {"id":"ad7b377d501ae5f17f623e7853f89ccc","key":"donpark.org","value":null}
    ]}
    
    The point of a view is to take pieces of the document to be the key and value in a list of key/values. The key is strategically chosen to support finding a match for the question being asked, while the value is strategically chosen to be the answer. The second view is
    function(doc) {
      emit(doc.from_node_id, doc.to_node_id)
    }
    and query this view with ?key="ad7b377d501ae5f17f623e7853f89ccc"
    $ curl http://localhost:5984/links/_design/links/_view/fromto
    {"total_rows":3,"offset":0,"rows":[
    {"id":"a227c15681639f83e26a93c2a6aa3522","key":"49c02d3dbffe3649cc9f1dbf99827d97","value":"ad7b377d501ae5f17f623e7853f89ccc"},
    {"id":"9efd0174f043dead5319aaee3ac9df92","key":"ad7b377d501ae5f17f623e7853f89ccc","value":"49c02d3dbffe3649cc9f1dbf99827d97"},
    {"id":"dc77b57e71bb9b05af7bdd0ab7eb1001","key":"ad7b377d501ae5f17f623e7853f89ccc","value":"5b5a99f6799bbf984da4b11e62a434ab"}
    ]}
    $ curl http://localhost:5984/links/_design/links/_view/fromto?key='"ad7b377d501ae5f17f623e7853f89ccc"'
    {"total_rows":3,"offset":1,"rows":[
    {"id":"9efd0174f043dead5319aaee3ac9df92","key":"ad7b377d501ae5f17f623e7853f89ccc","value":"49c02d3dbffe3649cc9f1dbf99827d97"},
    {"id":"dc77b57e71bb9b05af7bdd0ab7eb1001","key":"ad7b377d501ae5f17f623e7853f89ccc","value":"5b5a99f6799bbf984da4b11e62a434ab"}
    ]}
    The two value fields are the IDs of the nodes which donpark.org points to.

    If they both do the same thing, with SQL being easier to do general queries with, why use a document storage system like couchdb? It is supposed to be simple to setup any number of couchdb instances to scale both the read load and the write load. Couchdb is multi-master and rather than locking on writes, it lets writes happen simultaneously and does a conflict resolution process later. For a social network graph, its enough to simply let the most recent information win in the event of a conflict.

    In theory, reads are supposed to scale not only with more boxes answering queries (each having their own copy of the data), but the work of the query itself can be divided and spread amongst boxes. Though I don't think couchdb supports this, that I believe is the whole point of using a map/reduce framework. An overly broad statement but in the right ballpark is: Five servers can handle five times the number of queries sure, but they can also answer a single query five times as fast. That needs more looking into.

    update: the solution for distributing a single query across multiple servers is to use couchdb-lounge

    Android Multicast/Zeroconf

    Posted by Don Tue, 02 Feb 2010 23:40:00 GMT

    I'm working with SwipSwap to create an android port of an iPhone app that does group contact swaps. The group is discovered using zeroconf over a wifi connection. There has been some confusion about the state of multicast support in android, as documented in Ticket #2917. It was cleared up recently.

    Android 1.5 and 1.6 devices look to support the reception of multicast packets under some unknown condition - they cant be relied upon to always work. On android 1.6 or later, an explicit multicast lock must be requested in order to receive multicast packets.

    AndroidManifest.xml:
    <uses-permission android:name="android.permission.CHANGE_WIFI_MULTICAST_STATE" />
    
    Networking code:
    WifiManager wifi = (WifiManager)getSystemService(Context.WIFI_SERVICE);
    MulticastLock lock = wifi.createMulticastLock("mylock");
    lock.acquire();
    

    Multicast is the foundation for peer discovery using zeroconf. We're using the JmDNS java package to make this work. Registering a service on the network is working. Receiving a neighbor announcement, even with the wifi multicast lock, is not working yet.

    multi-year exercise

    Posted by Don Mon, 25 Jan 2010 01:16:00 GMT

    I tend to run in the winter, mostly to participate in the Shamrock run. Then I stop and forget about running by the end of spring and start again in the fall or next January. This year I'm a bit behind on my running schedule from what I remember of last year. That was a banner year as I was running in december and could do 5 miles by now. I have been off to a very slow start - weeks of going out the door one day and running 20 blocks and saying "meh" and being bored and giving up. A big motivation for me is to simply run on the dirt trails of mt tabor. its beautiful up there amongst the trees and the wind and the reservoirs. In stead of running out my door up to mt tabor, i biked up there as kind of a kick start. It worked. I ran 3 miles that day and it reminded me of what I liked about running. After another week of false starts, I made it from my house on 20th to the entrance of mt tabor on 60th - a two mile run, which there and back is four miles.

    After another slop week I did a 20th-60th trip and felt good about it but was not ready to enter mt tabor yet. It rained hard during my run but running makes one exothermic so the rain was mostly ignorable. What I noticed was that I am basically starting my training at a 4 mile distance. Its the left-over conditioning from last year. That means exercise can have benefits that last for years.

    the future 2

    Posted by Don Tue, 12 Jan 2010 00:07:00 GMT

    blah blah blah.

    to be led by hope or fear.

    blah blah blah

    whats keeping the next minute of your life from being the happiest one you have known?

    i've been using that mantra lately. thinking about it and remember it at random times. Its useful for looking at one's mindset at that moment. Sometimes it seems like opportunities are hard to come by.

    blah blah blah blah

    I'm looking for a particular feeling of connectedness and warmth. Do I look internally? Do I simply realize the truth - that the universe is one. The only illusion is that of disconnection. I have trouble creating and maintaining emotional relationships. I tend to be informational rather than emotional. I place great value on the personal relatioships I have. So if you've spent time with me in the last week, know that you mean more than you know.

    conversion

    Posted by Don Thu, 07 Jan 2010 22:01:00 GMT

    I will convert this pain into insight.

    I will convert this longing into understanding the internal deprivation it represents.

    Avatar

    Posted by Don Tue, 22 Dec 2009 03:52:00 GMT

    Two days ago I saw James Cameron's film Avatar. Released 12 years after his previous feature film, Titanic. I am writing about it because the film moved me so. I'm not sure it will affect everyone the way it did me. I think I got very lucky in this regard as it hit a mark on a handful of themes. If a movie hits even one of these themes, its an entertaining film. This film hit two or three and hit them hard. I was in open-mouthed wonder at some of the user interface and ship technology at the start, and again at the sheer force of beauty on planet Pandora. As a real story progressed with the marine being taught the ways of the Na'vi, I enjoyed the ride. I cried when Home Tree was destroyed.

    I thought Id write about some of my thinking during the movie and after.

    One striking similarity is to the Night Elf race in World of Warcraft. The Na'vi look like them with their slender bodies, pointed ears, and minimal dress. The bodies of the navi move with tremendous fluidity and strength, like yoga gurus.

    When I saw Toy Story for the first time I was amazed. Pixar had taken animation to the next level. Watching Avatar I had the same feeling. This is a brave new world of photorealistic animation.

    My best short description of this film is it is Princess Mononoke plus The Matrix plus Minority Report rolled into one. Primarily Mononoke because the bulk of the story is the tremendous sense of love and unity that humanity, we imagine, had with the earth and with each other when we lived a more organic life. The Matrix comes from the total connection between a human mind and a being outside its body. In The Matrix the connection was to a virtual character in an electronic world. Avatar is quite different because the target body is in the same reality as the human. And Minority Report because of the fun user interface/heads up displays used in the base, also because of the extreme action scenes at the end of the film.

    My largest criticism is the final third of the film. It becomes a shoot-em-up, blow-em-up action flick. Basically when the head researcher dies, the movie swerves off the road and crashes. The body-transformation and the circles of seated Navi connected to the ground becomes too woo-woo to take the film seriously. It was so good up to that point.

    I just saw a making-of video for Avatar which made a great point - the actors are much more than voice actors. They physically acted out every scene in the movie. Through motion capture the CG characters repeated that same performance. Wireframe full-size winged beasts for instance were built and the actors rode on those and had their motion captured along with the dialog. The CG has nothing to do with artificial intelligence and everything to do with very good observation, very good skeleton simulation, and very good physics simulation.

    Thats all for now.