Dave Young - Incremental Developments

From XPUB & Lens-Based wiki
Revision as of 11:58, 7 October 2012 by Dave Young (talk | contribs) (Created page with "==About== I have begun development on a simple webchat application built with nodejs, and inspired by the structure of the feedback sessions used in the communes in the early 197...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)

About

I have begun development on a simple webchat application built with nodejs, and inspired by the structure of the feedback sessions used in the communes in the early 1970s. I am interested in how they aspired to create a hyper-democratic social system built on the foundations of countercultural politics and cybernetic theory, yet failed spectacularly in this ambition.

3-10

Began looking at php/javascript chat client examples and reading tutorials in order to get a good understanding of the ideas involved with creating a basic chat application. This tutorial was useful.

4-10

Swapped to nodejs. I followed this tutorial, and I read up on the nodejs documentation.

5-10

Began to deconstruct the example from the tutorial I completed on the previous day. I removed certain parts (usernames, colours, text formatting in the chat window) that were not necessary for my intentions. In the original example, all this data is communicated between the server and client using JSON, as follows:

var obj = {
    time: (new Date()).getTime(),
    text: htmlEntities(message.utf8Data),
    author: userName,
    color: userColor
};

history.push(obj);
history = history.slice(-100);

var json = JSON.stringify({ type:'message', data: obj });
for (var i=0; i < clients.length; i++) {
    clients[i].sendUTF(json);
}

I tried to modify the JSON structure, but obviously made an error, as the code broke :(

6-10

Chat-screenshot.png I rewrote the code from the start, completely omitting any functions/variables etc that I did not need for my own application, and made a working example that I could run on a local node server. At the moment, users are unnamed authors, with no distinguishing styling features. Text is not added to the chat window in a top-to-bottom manner typical to chat clients, instead it follows left-to-right, as it would in an ordinary text editor.