Pie Charts in AS3
April 30th, 2008 by Jarret

Sorry it’s been a while since myself or anyone else posted. To make up for it, I thought I’d share my Actionscript 3 code for a pie chart generator from an external xml file. In AS2 there was a wedge drawing class that made this whole thing a lot easier, and while I couldn’t find anything like that for my pie chart generator, I basically just made my own. So, here’s the code:

var titles:Array = new Array();
var values:Array = new Array();var xmlLoader:URLLoader = new URLLoader();
var xmlData:XML = new XML();
xmlLoader.addEventListener(Event.COMPLETE, LoadXML);
xmlLoader.load(new URLRequest(HTTP://YOUR_XML_URL_HERE));function LoadXML(e:Event):void {
xmlData = new XML(e.target.data);
buildPieChart(xmlData);
}

function buildPieChart(xmlData:XML):void {
 var titleList:XMLList = xmlData.item.title;
 var valueList:XMLList = xmlData.item.value;

for each (var titleElement:XML in titleList) {
  titles.push(titleElement);
}
for each (var valueElement:XML in valueList) {
  values.push(valueElement);
 }

var colors:Array = new Array();
 colors.push(0xff0000);
 colors.push(0xff9900);
 colors.push(0xffff00);
 colors.push(0×00ff00);
 colors.push(0×0000ff);
 colors.push(0xff00ff);
 colors.push(0×330000);
 colors.push(0×003300);
 colors.push(0×000033);
 colors.push(0×333300);
 colors.push(0×330033);

var radians:Array = new Array();
var totalValue:Number = 0;
for(var i:int = 0; i < values.length; i++) {
  totalValue = totalValue + Number(values[i]);
 }

for(i =0; i < values.length; i++) {
  radians.push(Number(values[i])/totalValue*2);
 }

drawlines(250, 250, 120, radians);

function drawlines(centerx, centery, radius, radians) {
  var radiansSoFar:Number = 0;
  var piechart:MovieClip = new MovieClip();
  piechart.x = stage.stageWidth/2;
  piechart.y = stage.stageHeight/2;
  stage.addChild(piechart);
  piechart.graphics.lineStyle(2, 0×000000);
  var colorkey:Number = 0;
  var coloralpha:Number = 1;
  for(var i:int = 0; i < radians.length; i++) {
    piechart.graphics.beginFill(colors[colorkey], coloralpha);
    piechart.graphics.moveTo(0,0);
    piechart.graphics.lineTo(Math.sin(radiansSoFar*Math.PI)*radius, Math.cos(radiansSoFar*Math.PI)*radius);
    for(var n:Number = 0; n <= radians[i]; n += .0001) {
      piechart.graphics.lineTo(Math.sin((radiansSoFar+n)*Math.PI)*radius, Math.cos((radiansSoFar+n)*Math.PI)*radius);
    }
    radiansSoFar += radians[i];
    piechart.graphics.lineTo(0,0);
    piechart.graphics.endFill();
    addLabel(radians[i], titles[i], radiansSoFar, radius, colors[colorkey], coloralpha);
    if(colorkey == colors.length-1) {
      colorkey = 0;
      coloralpha -= .25;
    } else {
      colorkey += 1;
    }
  }
 }

function addLabel(radians, itemtitle, radiansSoFar:Number, radius:Number, color, coloralpha) {
  var format:TextFormat = new TextFormat();
  format.align = “left”;
  format.font = “Verdana”;
  format.size = 9;
  format.bold = true;
  var label:TextField = new TextField();
  label.width = 1;
  label.height = 1;
  label.autoSize = “left”;
  label.antiAliasType = “advanced”;
  label.text = itemtitle + ” (” + Math.round((radians/2*100)).toString() + “%)”;
  label.border = false;
  label.setTextFormat(format);
  var textRadians:Number = radiansSoFar-(radians/2);
  label.x = (stage.stageWidth/2)+Math.sin(textRadians*Math.PI)*radius;
  label.y = (stage.stageHeight/2)+Math.cos(textRadians*Math.PI)*radius;
  if(textRadians > 0 && textRadians < .5) {
    label.y -= label.height/2;
    label.y += 10;
    label.x += 10;
  }
  if(textRadians > .5 && textRadians < 1) {
    label.y -= label.height/2;
    label.x += 10;
    label.y -= 10;
  }
  if(textRadians > 1 && textRadians < 1.5) {
    label.y -= label.height/2;
    label.x -= label.width;
    label.x -= 10;
    label.y -= 10;
  }
  if(textRadians > 1.5 && textRadians <= 2) {
    label.y -= label.height/2;
    label.x -= label.width;
    label.x -= 10;
    label.y += 10;
  }
  if(textRadians == 0 || textRadians == 2) {
    label.y += 10+label.height/2;
  }
  if(textRadians == .5) {
    label.x += 10+label.width/2;
  }
  if(textRadians == 1) {
    label.y -= 10+label.height/2;
  }
  if(textRadians == 1.5) {
    label.x -= 10+label.width/2;
  }
  stage.addChild(label);
 }

}

Okay, now to explain the above code. I think any moderately experienced actionscripter can figure it out pretty quickly, if not instantly. One thing I should mention before going on is the structure of the xml, even though again, an experienced actionscripter can figure it out from the above code. Nonetheless, here is it:

<?xml version=”1.0″ encoding=”utf-8″?>
<items>
    <item>
        <title>First Title</title>
        <value>First Value</value>
    </item>
    <item>
        <title>Second Title</title>
        <value>Second Value</value>
    </item>
    etc.
</items>

Okay, now on to the code.

var titles:Array = new Array();
var values:Array = new Array();

These are the arrays that will ultimately hold the titles and values that the pie chart generator will loop through. I like to create them at the outset. It’s just a personal preference.

var xmlLoader:URLLoader = new URLLoader();
var xmlData:XML = new XML();
 
xmlLoader.addEventListener(Event.COMPLETE, LoadXML);
 
xmlLoader.load(new URLRequest(HTTP://YOUR_XML_URL_HERE));
 
function LoadXML(e:Event):void {
xmlData = new XML(e.target.data);
buildPieChart(xmlData);
}

The above code deals entirely with retrieving the XML file we’ll be using to build our pie charts. Why use an external xml file? Well, besides all of the advantages of XML, I can use the same flash file to build an infinite number of pie charts. The reason I programmed this pie chart generator was to create a human readable snapshot of data from my Fire-EMS database. There are lots of views I want, so I just need to point to a different php page that generates the view I need and reports that information in formated XML. The last peice of the puzzle that is not included in the above code yet, is taking the url to my xml and making it a variable I can pass to the flash movie when I embed it into an html document or php page. If you need to know how to do that, then by all means leave me a comment asking, and I will let you know. Anyway, what this chunk of code does specifically is create a new loader and xml object, and creates an event listener to tell flash what to do when the xml file is completely loaded (which is to run the LoadXML function). We then load the xml file, and define the LoadXML function that will run when loading is complete. All this function does is take the loaded data and place it into an xml object and then calls the buildPieChart function which we’ll define next.

There’s an awful lot to the buildPieChart function, so let’s take it peice by peice:

function buildPieChart(xmlData:XML):void {   
 var titleList:XMLList = xmlData.item.title;
 var valueList:XMLList = xmlData.item.value;
  
 for each (var titleElement:XML in titleList) {
  titles.push(titleElement);
 }
 for each (var valueElement:XML in valueList) {
  values.push(valueElement);
 }

The above first defines the buildPieChart function. From there we parse out the xml, garnering both our titles and values from the single xmlData object we passed in. The two for-each-loops go through the list of titles and values, respectively, and puts all the information into the two arrays we created at the outset, titles and values.

var colors:Array = new Array();
 colors.push(0xff0000);
 colors.push(0xff9900);
 colors.push(0xffff00);
 colors.push(0×00ff00);
 colors.push(0×0000ff);
 colors.push(0xff00ff);
 colors.push(0×330000);
 colors.push(0×003300);
 colors.push(0×000033);
 colors.push(0×333300);
 colors.push(0×330033);

This next part defines an array of colors we’ll be filling out wedges with. The colors are as follows: red, orange, yellow, green, blue, violet, deep red, deep orange, deep yellow, deep green, deep blue, and deep violet. You can add or remove whatever colors you like. The more colors you add the more items the pie chart can support before it just starts filling in white or throwing errors. So there are some limits to this pie chart, but as you’ll see later, there is a function that extends this small number of colors into about 4 times as many colors by playing with the alpha. I’ll explain that more when I get there.

var radians:Array = new Array();
 var totalValue:Number = 0;
 for(var i:int = 0; i < values.length; i++) {
  totalValue = totalValue + Number(values[i]);
 }for(i =0; i < values.length; i++) {
  radians.push(Number(values[i])/totalValue*2);
 }

drawlines(250, 250, 120, radians);

If you remember your trigonometry, you’ll surely remember radians. Radians are a measure of degrees made relative to Pi. For example, 2Π = 360°, Π = 180°, and .5Π = 90°. We’ll be using trigonometric functions later to draw our wedges, and they only respond to radians, so we do some quick math to create an array that saves radian values. Here’s the specifics: we create an array to house our radian values; create a variable that represents the total value of all the values added together, which we’ll use to figure out what percent of the circle each wedge represents, or the number of radians; loop through the value array adding each value to our totalValue variable; then loop through each value again, this time figuring out what percentage of the 2Π radians that comprise a circle each wedge is. We push these values into our radian array for use later. As this is all the information we need, I can call the drawlines function, which is the function that really builds the chart, which we’ll define next.

function drawlines(centerx, centery, radius, radians) {
  var radiansSoFar:Number = 0;
  var piechart:MovieClip = new MovieClip();
  piechart.x = stage.stageWidth/2;
  piechart.y = stage.stageHeight/2;
  stage.addChild(piechart);
  piechart.graphics.lineStyle(2, 0×000000);  
  var colorkey:Number = 0;
  var coloralpha:Number = 1;

This isn’t all of the function, but since it’s large we’ll tackle it peicemiel. The first variable is the number of radians we’ve gone through so far. This will be used in a loop later, but what it amounts to is this: when we draw the first wedge, if we don’t add it’s radian value to the next radian value then we’ll draw our next wedge on top of our last wedge, instead of next to it. We then create the piechart movie clip that will house our pie chart, put it’s center in the middle of the stage, define the style for the lines we’ll be drawing, and set the colorkey to 0, since we’ll start going through our color array starting with the first, or 0 key. You’ll see this in action later. Coloralpha is set to 1 since alpha is represented as a value from 0 to 1. We start with the max opacity here. You’ll notice we passed in centerx and centery and haven’t used them. We won’t. They were there from my initial programming, and I didn’t end up using them as I thought I would, but I haven’t taken them out either. Feel free to take it out, just make sure you adjust your drawlines function call above.

for(var i:int = 0; i < radians.length; i++) {
   piechart.graphics.beginFill(colors[colorkey], coloralpha);  
   piechart.graphics.moveTo(0,0);
   piechart.graphics.lineTo(Math.sin(radiansSoFar*Math.PI)*radius, Math.cos(radiansSoFar*Math.PI)*radius);
   for(var n:Number = 0; n <= radians[i]; n += .0001) {
    piechart.graphics.lineTo(Math.sin((radiansSoFar+n)*Math.PI)*radius, Math.cos((radiansSoFar+n)*Math.PI)*radius);
   }
   radiansSoFar += radians[i];
   piechart.graphics.lineTo(0,0);
   piechart.graphics.endFill();
   addLabel(radians[i], titles[i], radiansSoFar, radius, colors[colorkey], coloralpha);
   if(colorkey == colors.length-1) {
    colorkey = 0;
    coloralpha -= .25;
   } else {
    colorkey += 1;
   }
  }
 }

Okay, there’s a lot going on here. This loop literally builds our pie chart. Generally, we loop through every radian value and draw a line from the center of the circle to the first point at the edge of our circle, which we find using sin and cos. The sin of a radian value will give you your x coordinate on the unit circle, and the cos of a radian value will give you your y coordinate on the unit circle. Now, the unit circle has a radius of 1, but we want our chart to be bigger, depending on what you pass into the function for your desired radius. All we need to do is multiply the sin and cos values by our desired radius. Once we’ve drawn that line, we need to trace the curve of the circle. We can accomplish this with the curveTo function, but the amount of geometry and trigonometry required to do this perfectly isn’t worth the time. Instead we draw a whole lot of really tiny lines - so tiny that it just looks like a curved surface unless you could zoom in further than flash will let you. We do this by increasing our radian value by .01 until we reach however many radians the wedge we’re drawing actually represents. Once we reach that point, we just draw a line back to the center of the circle (0,0). Now, before we started drawing lines, we called the beginFill function, and we passed to it colors[colorkey] and coloralpha. Colors was the array we created with all the colors we wanted to fill wedges with. So the first wedge will get colors[0] (red), the second will get colors[1] (orange), so on and so forth. So what if we have more wedges than colors? Our if statement at the end checks to see if the color we just used was the last one. If it was, we go back to the first color, but we decrease the alpha by a quarter (.25). So now we can use all the colors again, but they’ll be lighter, so we have new colors. If we still have more values, it’ll decrease the alpha by .25 again. Eventually this will start throwing errors as our alpha dips below 0, but that’s an awful lot of pie chart values, which will make it hard to read anyway. You’ll notice before we started into the if statement, we called addLabel, which I’ll explain next. It essentially adds the value’s title to the out of the wedge. Be sure to call endFill, or no wedges will actually get filled with color.

function addLabel(radians, itemtitle, radiansSoFar:Number, radius:Number, color, coloralpha) {
  var format:TextFormat = new TextFormat();
  format.align = “left”;
  format.font = “Verdana”;
  format.size = 9;
  format.bold = true;
  var label:TextField = new TextField();
  label.width = 1;
  label.height = 1;
  label.autoSize = “left”;
  label.antiAliasType = “advanced”;
  label.text = itemtitle + ” (” + Math.round((radians/2*100)).toString() + “%)”;
  label.border = false;
  label.setTextFormat(format);
  var textRadians:Number = radiansSoFar-(radians/2);
  label.x = (stage.stageWidth/2)+Math.sin(textRadians*Math.PI)*radius;
  label.y = (stage.stageHeight/2)+Math.cos(textRadians*Math.PI)*radius;
  if(textRadians > 0 && textRadians < .5) {
   label.y -= label.height/2;
   label.y += 10;
   label.x += 10;
  }
  if(textRadians > .5 && textRadians < 1) {
   label.y -= label.height/2;
   label.x += 10;
   label.y -= 10;
  }
  if(textRadians > 1 && textRadians < 1.5) {
   label.y -= label.height/2;
   label.x -= label.width;
   label.x -= 10;
   label.y -= 10;
   
  }
  if(textRadians > 1.5 && textRadians <= 2) {
   label.y -= label.height/2;
   label.x -= label.width;
   label.x -= 10;
   label.y += 10;
  }  
  if(textRadians == 0 || textRadians == 2) {
   label.y += 10+label.height/2;
  }
  if(textRadians == .5) {
   label.x += 10+label.width/2;
  }
  if(textRadians == 1) {
   label.y -= 10+label.height/2;
  }
  if(textRadians == 1.5) {
   label.x -= 10+label.width/2;
  }
  stage.addChild(label);
 }
}

Okay, this is our last function, so this is the final stretch. Considering all the if statements at the end, this can be intimidating, but it’s not all the difficult. We start by creating the formating for the labels we’ll be creating. I’ve set mine to align left, Verdana, 9 pt, and bold. Next we create the actual text field and assign some more parameters. I set the autosize to left after setting the width and height to 1. The idea is that the autosize will expand the text field to the size of the text, and no additional whitespace, which is important for positioning later. The value left means that the text will align left, and the field will expand to the right and down. We then add our text into the field, which is the title, and then the percentage that that item represents of the pie in parenthesis. This requires a little math, which I think is fairly self explanatory. We then calculate which radian value represents the center of our wedge, since we’ll want our label to appear on the outside of the circle, but in the center of the wedge it corresponds to. The final parts of this function position the text field properly, which requires some accounting for separate scenarios, since a label in the top right of the circle needs to be moved up and to the right to not be on the circle, but on the top left the label needs to be moved left and up. So all these if statements do is make sure the label gets positioned correctly. Nothing more, really. You shouldn’t have to play with this, but feel free to, just to get a feel for what I did.

And that’s it. One pie chart generating script. If you have any questions or comments on how to optimize this, please don’t hesitate to leave a comment.

Facebook Chat?
April 23rd, 2008 by Jarret

In checking on my Fire-EMS application today I stumbled over something new residing on the bottom frame of every Facebook page. Confused, I started clicking wildly, of course. Come to find out that Facebook has instituted a new chat feature, akin to Gmail’s, where now you know what friends are actively on Facebook at all times if you so choose to know such information, and you can speak with them straight through Facebook, instantly. It’s like having a private wall with instantaneous updates, which is great assuming you have no cell phone, no AIM, no MSN Messenger, no Gmail, and no life, really.

I understand the boardroom conversation that would have spawned something like this. “What do other services that link people do that we don’t do, that’ll get someone to come back to our website and generate more ad revenue?” While this is a sound question in internet business principle, it’s just another example of services being provided that erode what is left of our humanity. That’s right, even I, who loves me my technology, must admit that there needs to be some restraint shown occassionally in what we developers unleash upon the world. Every step we take to being that much more compelled to not even call someone is a little scary to me. To not even hear a voice? If we should learn anything from our parents’ technology frustrations, let it be that there needs to be some human in the process somewhere. And while, as an introvert, I am often compelled to stay in and not speak to anyone, the least thing I really need is for Facebook to be my enabler.

It’s beautiful outside, so honestly, rather than worry about this, I hope you all don’t mind if I just cut it here and go out to play some football. You have, at least, been informed, so my job is complete.

The Artist and the Digital Artist
April 18th, 2008 by Jarret

For those of you who know Adam and I, you know that Adam is an amazing designer or digital media, and I’m an avid black and white, though occasionally in color, sketch artist. One thing the two of us have found since working together is that while we’re are still both functionally producing art, we have very different rules (indeed), and that clash has in the past sometimes reared it’s ugly head. In pondering it, I’ve discovered that there are some stark differences between the way a traditional artist and a digital artist approach their canvases, based upon the ultimate goals of each, and I thought I’d explore that a bit tonight, perhaps more as a musing than anything. I only ask that you please indulge me this once (more).

First of all, how a digital artist accounts for eye movements on a screen boggles my mind. Ask any traditional artist, and I’m sure they’ll explain to you that you normally want the focus of your work in one of the corners of the thirds, you want your background to be cool colors and foreground mostly warm colors, and that the eye will move towards warm colors, mostly in a circular pattern from corner of a third, to corner of a third. What do I mean by a corner of a third? Well, basically, the idea is if you take a piece of paper and fold it into thirds both horizontally and vertically you’ll have two lines going across the paper lengthwise and width-wise. This creates nine boxes in your piece of paper. The four corners of the center box are the points where traditional artists put the main subjects of their works, because these are the first places the eye sees, and because it’s much easier to create an impression on the viewer. If you look at my crudely constructed example picture to the left, you’ll see four red circles. These are the points I’m talking about. If you didn’t already know this, I invite you to peruse your local art gallery and you’ll see how prolific a technique this is. Want to make your family photos 100% better than they currently are? Take this principle to heart. Enough of putting your daughter at the center of the picture, put her face in that top left corner third, and you’ll have a real winning photo, one assumes.

Anyhow, this technique is not really something I see much in design these days, least not in design for websites. When we think of art, we don’t think of it as a conduit for information, but really, what is art if not a conduit for information (ie symbolism)? Website design, on the other hand, does not really have the luxury or just being nice looking, it has to be functional as well, meaning it has to be easy to navigate, it has to represent an organization or individual, and it has to work. The first two are fairly easily defined, but the third is not. This is an individual interpretation, in my opinion, and it’s this principle above all that separates good digital artists from great digital artists.

Now, think of the two most common website layouts on the Internet: Navigation bar down the left or along the header, whole page aligned to the left side, content rests under the header and just to the right of the left nav-bar; or the whole content is a fixed width across that rests in the center, with a tiled or solid background that fills in the extra space on the left and the right of the design. Anything that breaks out of this paradigm is edgy, unconventional, and frankly snubbed by any mainstream websites, short of mainstream anti-mainstream sites. There’s certainly a lot of play there, but as an traditional artist I’m a little confused. My canvas is white, clear, clean, pristine. It’s awaiting the first stroke of my F-type Derwent graphic pencil, and until then, I can do whatever I please. Website designers don’t have this luxury. They get a template, and while they’re not asked to color in the lines necessarily, they are still asked to at least be careful about it. For me, this is maddening.

In a word I sort of feel bad for digital designers. They’re artists at heart, but artists with fairly defined rules, I think. Adam and I, for example, have been working on a new design for Solvo because the old design was just thrown together piecemeal. I sketched something out I thought was going to be dynamite, but as I worked on it in photoshop I realized fairly early that it was horrid. We’re talking vomit inducing. Every shred of artistic premise was smashed to ribbons, outside of maybe some color theory. It was a fairly crushing defeat. I decided that working on it as a whole was probably a bad idea, and decided to break the design apart into functional members and just work on those as separate works of art, and that has worked out much better thus far, but I’ll have to put it all together eventually, and when I do, guess what I’ll do?

That’s right, I’ll dump them on Adam’s lap, because what I’ve learned is that I’m working in a parallel world that mirrors but does not reflect my values, and so long as the Internet doesn’t go retro and start asking for sketched websites, I lack the fundamental theory to produce anything that combines my traditional training, and the ultimate functional elements that a good designer and fuse.

I should probably buy a digital art theory book, but then I’d have nothing to needlessly philosophize about.

An Introvert? Who? Me? Nooooooo…
April 16th, 2008 by Jarret

Seeing as how everyone else has been so busy lately, including myself, our posts have been rather few and far between, and I figured that despite how tired I am, I’d at least try and post something tonight. I can’t promise that the following will be coherant and rational, but I’ll give it a shot. You’ve been warned…

I’ve been taking a principles of management class at Worcester State College this semester, more because taking three classes has let me keep my health insurance than anything, but this class has proven genuinely interesting. Not to mention management is management, I’m sometimes in a leadership role at the fire department, and I’m going for my Masters in Public Administration at NIU in the fall, it just seemed like a good idea to take the class. I’m over-joyed at the prospect of being able to use the knowledge I’m gaining in various other applications besides just business.

Anyhow, tonight we did personality types, oddly enough. The professor is big on people knowing themselves, and I basically agree with the tenet. A few weeks ago we all took the famed DISC personality test, and he gave us back our results tonight and we went over all the personality types, including their descriptions, strengths, weaknesses, and how to deal with our traits and the traits of others.

Turns out that there are two extroverted personalities, D and I, and two introverted personalities, S and C. I, much to no ones surprise at all, am both S (<– dominant personality) and C, with only a tiny bit of D, and negative I. What does this mean for me? Well, here’s a summary:

S = Steady personality type, sometimes reffered to as the Phlegmatic
We S’s are submissive, stable, supportive, shy, prefer the status quo, and are often specialists.
Consistent, like stability.
Accommodating, peace-seeking.
Like helping and supporting others. Good listeners and counselors.
Close relationships with few friends.
Ask, rather than tell.
Ask ‘How?’ and ‘When?’

The Wikipedia page on the four-personalities system describes me as such:
“A phlegmatic person is calm and unemotional. Phlegmatic means “pertaining to phlegm”, corresponds to the season of winter (wet and cold), and connotes the element of water.

“While phlegmatics are generally self-content and kind, their shy personality can often inhibit enthusiasm in others and make themselves lazy and resistant to change. They are very consistent, relaxed, rational, curious, and observant, making them good administrators and diplomats. Like the sanguine personality, the phlegmatic has many friends. However the phlegmatic is more reliable and compassionate; these characteristics typically make the phlegmatic a more dependable friend.”

I personally find the personality system to be pretty fascinating, because it puts all of my relationships into perspective when I look at them through this lense. Naturally, it’s not perfect, but it’s still interesting. I at least understand why, since that definition fits me so well, a lot of people get pissed off at my seeming lack of enthusiam and emotion for things others get way over hyped about, or my inability to express myself in any way, shape, or form.

Well, there you have it, you now know more about me than you ever really wanted to know. At least my post-apolocyptical-me-and-my-friends-verse-a-world-of-zombies fantasy is easily explained as my need to help my close friends in a world of no other real people. That’s rational, right?

I invite you to read the Wikipedia page and learn more because, who knows, you might learn something new about yourself, or someone else, or your relationships. At the very least you’ll become knowledgeable about something new, and in the end, isn’t that the point?

I’m not the only one.
April 14th, 2008 by Jamie

I saw this just this morning, and had to post it immediately as a follow-up to my last post.

Questionable Content

(Comic by Jeffrey Rowland of Overcompensating).

Honest Graft and Dishonest Graft
April 10th, 2008 by Jarret

Every so often I feel the need to go back and reread some of my favorite books, as if I might forget their importance if I didn’t. It’s probably why I don’t get to as much new stuff as most people otherwise do in a year. Nonetheless, I have a great appreciation for the books on my shelf, so much so I’m sometimes afraid to lend them out to anyone. Frodo has his ring, I have my bookshelf (which, ironically, does not contain a single work by Tolkien).

One of the books I’ve been indulging in over the past few days has been Plunkitt of Tammany Hall, which is more of a series of spoken essays than anything else. I thought that I might make a series of posts going through each major chapter in this short book, explaining what Plunkitt has to say, and then trying to make it relevant to present day society, since in the end, isn’t that what makes a book valuable?

Before I begin with his first diatribe, let me explain a little bit about George Washington Plunkitt. Born almost twenty years before the Civil War to an Irish family, Plunkitt had no real education to speak of, instead he began working in various jobs at a young age in New York City, ultimately ending up as a butcher, before, perhaps appropriately, going into politics. About this time, Plunkitt’s generation was on the verge of experiencing the hayday of machine politics, and Plunkitt, as his talks clearly illustrate, was all about machine politics. Besides becoming a millionaire off of insider political knowledge (which I’ll cover in a moment since it’s the first chapter), Plunkitt became one of the highest ranking members of his party, Tammany Hall, as well as a State Senator, Assemblyman, Police Magistrate, Alderman, and County Supervisor. He would pass away in 1924.

Honest and Dishonest Graft

In Plunkitt’s first talk, he discusses the difference between honest and dishonest graft. For Plunkitt, dishonest graft included activities like blackmailing, or stealing money from the treasury. Honest graft on the other hand, well, Plunkitt says it best: “I seen my opportunities, and I took ‘em.” As examples of honest graft, Plunkitt talks about how a friend of his tipped him off to the location of a new park that was about to be proposed, so he bought up all the land in that area dirt cheap, and when the city went to build the park, they had to buy Plunkitt out at the price he set. He also postulates that building a bridge requires waterfront land he’d be wise to purchase while it’s cheap and sell later at a much higher price to the city. Additionally, he relates a particularly amusing story where the state was selling granite blocks at auction to make back revenue, so he goes to the auction and convinces other potential buyers to let him purchase all the blocks, and he would give them the specific amounts they needed for free and keep the rest to sell at fair market price. When it came time to bid only Plunkitt chose to do so, and he walked away with the entire stock for only $2.50.

Plunkitt Today

I think there’s few people who would think that Plunkitt’s distinction between honest and dishonest graft is valid or even moral. In a world that is so fearful of insider trading, clearly this kind of insider information trading would especially scare people. Nonetheless, this kind of machine politics certainly does still exist, and it does have at least one merit. Individuals who understand that they can get rich, let’s say, off the building of a park, will build that park and make the money off of it. To the inhabitants of that neighborhood, who really cares if a politician or his friend made off like bandits? After all, they did build a new local park that everyone can benefit from. The other side of the coin, of course, is that your tax dollars were just spent to buy land at a much higher price than they should have been, but if you’re not very well off, and don’t pay much in taxes, then it’s not your concern. So, naturally, there is a duality. Politicians like Plunkitt are both angels and devils, delivering services to the poor, often neglected folks, on the dimes of the middle and upper classes. This is, in my opinion, the only true example of trickle-down.

But Plunkitt tells us something else very important about our society, and that’s the value of information. It’s little wonder that businesses cannot usually quantify, but at least acknowledge that there is a value assigned to the information they control. We go to school to gain information, some of us get jobs that deal in information, and our entire infrastructure is designed to facilitate the flow of information. And information for the sake of information isn’t even practical anymore. Fact checking is an entire department, displays of information have to be intelligible, concise, and avoid the pitfalls of misinterpretation of the information, or data, available to us. Verified information is the difference between going to war in Iraq or not. Information is also transferable and alterable, and, perhaps most importantly, susceptible to perception.

After all, the numbers tell us we’re safer, so why don’t we feel safer?

Facebook Profiles (Non)Updates
April 9th, 2008 by Jarret

I think I’m following the development of the new Facebook profile system way closer than I really need to be, but I have been all for a redesign of Facebook profiles for a really long time, and it’s nice to have a look into the thoughts and minds of the Facebook development team. Developing an application is more about the process than it is about the actual writing of the code, and every person or team has their own way of doing things. For my own part, most of my projects do not require the massive public feedback that Facebook is seeking throughout the profile redesign process. So it’s interesting for me to see what they put out each week, since it reflects their design process.

This week they didn’t really have much of anything to say, specifically, and no new screen shots to show. This was a nonupdate, but important for public relations. They basically let all of us developers and users know that they have monitored the comments we’ve made and reacted accordingly, but reminded people that though they may provide a glimpse into their designs and thoughts from time to time, that the glimpses may not represent the ultimate reality, but, and this really what’s important, the core concepts will survive. While it would be nice to have some new images to show you, and more information, I’m afriad I don’t have much. I will filter out some the extra verbage and present some of the key points from their most recent update in their own words:

“We posted a few screen shots last week of filters on your ‘Feed’ tab. We want to give you an easy way to only see Wall posts, or only see Mini-Feed stories if you want. Overall we received really positive comments, and definitely plan on providing an option similar to this. However, this design isn’t perfect, and we are currently working on making the whole thing more seamless and intuitive. We also received valuable feedback that the icons didn’t make sense or correctly represent the action they were supposed to describe.

“Something else we heard when we posted these same screen shots, is that people didn’t care for the speech bubbles.

“Something else that people have been asking for is someplace on the profile for the majority of your application boxes. A few weeks ago, we asked if people would like an extra tab just for all of their third party applications and we received very supportive responses…We’re working on some design iterations to accommodate this, and we look forward to sharing our ideas with you soon.”

So there you have it, Facebook is listening.

A Rare Restraint
April 5th, 2008 by Jarret

We here at Nerds and Co. remember a simpler time, when all we did was draw an enormous amount of gore into a simple comic strip, threw it up on the internet, and instantly gained the approval of your internet troll-friends. Times, they are a changin’, however. To celebrate a new and rare event (founding a blog is new to us, at least), we would like to offer up a comic that shows something else new to us: restraint. Yes, we could have gone the route of blood and gore, but we thought that for our inaugural comic on the new blog we would keep it PG for at least one comic.

Rest assured, however, that the geyser of violence is poised to erupt. We recommend you buy an umbrella.

There’s a reason I hate everyone.
March 30th, 2008 by Jamie

Okay, I’d like to start with some personal outrage: How do you not believe in evolution?! You can’t just decide not to see all the evidence in the world all around you! Selective sight doesn’t give you the right to discredit the theory of evolution, and hope anyone who thinks so will accidentally put both hands into a meat grinder.

So, I just read about this movie called Expelled.  It was originally supposed to be called “Crossroads,” because it was intended to explore the “intersection of science and religion,” and even had the consent of Dr. Dawkins. Apparently, though, the title and production company changed, and the people that were interviewed were not informed of this.

To me, this is kind of like when I walk outside of a bar or restaurant and get a faceful of smoke, I think, People still smoke? This time, it’s just getting an eyeful of things like this:

Photobucket

And I have to wonder, People are still arguing about this stuff?

For God’s sake (pun quite intended), take a damn biology class.

I think the worst thing is the movie.  I haven’t seen it, but I’ve watch both the trailer and extended trailer.  This movie isn’t about the difference between Intelligent Design and Darwinism; no, it’s about how society attacks and discriminates against anyone that believes in Intelligent Design.  Look:

Ben Stein warns you in the extended trailer that by watching this movie you may lose your friends or your job.  I wouldn’t be against it if it was an actual intelligent film that explores two different views, but it isn’t.  It’s fine that the ID people want to have their say, but it isn’t fine that they make everyone else out to be bad guys.  “Oh, you believe in evolution?  You’ll probably discriminate against me because I don’t.”

Maybe it’s true.  Okay, fine.  Then why aren’t you advertising a movie that talks about the hardships of ID believers in society?  Why are you claiming to discuss the similarities and differences of two different theories?

Robot Apocalypse Soundtrack
March 23rd, 2008 by Adam

This is what the robots will listen to as they exterminate all hu-mans. Likely on iPods made from our kidneys.

Incidentally, this is from Japan, whence killer robots will likely originate. Ponder the irony as your precious soft tissue is ground into biomass to feed the Overmind.