Skip to content

Big Brother

October 18, 2010

I spent the weekend trying out a couple of background programs designed to track my behavior at my computer while I’m paying attention to other things.

Keystroke Logging

The first is a keystroke logging program called “logKext”, available at http://code.google.com/p/logkext/.  This is a simple program and the documentation is good.  It has to be installed at the system level, and you have to be in an Administrator account to control and access it.  If you want to analyze it from a personal account, just move the data file (out_logFile.txt) to the Shared folder.

Dan O’Sullivan has some Processing code for parsing it (http://itp.nyu.edu/~dbo3/roy/?p=414), and this is my first pass:

Something’s wrong, though, with the way I’m parsing the file.  It’s dumping a whole slew of very interesting words.  Once I’ve made sense of that, I’ll come back to this.

Mouse Movements

For this, I brought Dan’s MouseLocation code into Eclipse (it’s available at http://itp.nyu.edu/~dbo3/roy/?p=418).  Running that in the background works quite while, although it does eventually encounter a runtime error:

Nonetheless, here are three sketches of my mouse movements over the past two days:

Margie says I’m really coming to specialize in information for which I have no seeming purpose.

This, by the way, is the code for the mouse sketches I posted.  The x- and y-values need to be manually pasted from the console into a text file, and then the path needs to be specified.  Here I’ve put it in a folder called “data”.  This could be improved by drawing it live from DanO’s sketch.  Sorry for the ransom-note quality of the following:

/*
Mouse Movements v001
October 17, 2010
Morgen Fleisig

Draws mouse path based on outputted x- & y-values
from DanO's MouseLocation sketch (http://itp.nyu.edu/~dbo3/roy/?p=418)
*/

void setup()
{
size(1280,800);
background(255);
}

void draw()
{
String[] lines = loadStrings("data/mousePoints003.txt");

int [] xValues = new int [lines.length];
int [] yValues = new int [lines.length];

for (int i=0; i<lines.length; i++)
{
int startX = lines[i].indexOf("(");
int endX = lines[i].indexOf(",");
int startY = lines[i].indexOf(", ");
int endY = lines[i].indexOf(")");

String X = lines[i].substring(startX+1,endX);
String Y = lines[i].substring(startY+2,endY);

xValues[i] = int(X);
yValues[i] = int(Y);

}

for (int i=0; i<lines.length-1; i++)
{
stroke(0);
line(xValues[i],yValues[i],xValues[i+1],yValues[i+1]);
}

}

 

Advertisements

From → Rest of You

Leave a Comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: