" /> Notebook: August 2008 Archives

« May 2008 | Main

August 9, 2008

making

making is hard. Its hard because there are always things to do that pull you away from making. I haven't spent nearly as much time making photographs as i have reading or working.

Now, for me, working is making. I make software. Big software that involves big money, big headaches and big fun in interesting proportions. My sense of balance is skewed lately (for a long time now, really) and i have been trying to reprioritize.

A recent twitter quote from why the lucky stiff and the recent making series on 43folders (part 1 - Bad Correspondence, part 2 - The Job You Think You Have and part 3 - One Clear Line) were very refreshing because they are very close to what i have been thinking about lately.

when you don't create things, you become defined by your tastes rather than ability. your tastes only narrow & exclude people. so create.

from http://twitter.com/_why/statuses/881768089

I am making the normal (read, ridiculous) amount of stuff at work and re-evaluating everything else to make more at home. Working less outside of normal hours, ignoring other stuff and just making time to work on stuff i have been neglecting. Wish me luck!

August 4, 2008

Growth, Creativity and Failure is OK

From the NYTimes early in July, If You're Open to Growth, You Tend to Grow. The gist of this article is that your attitude towards your potential has a huge impact on how you grow in your career. I have certainly seen that in my professional life. The people i have the easiest time working with have a real can-do attitude and a positive attitude about problem solving. Nothing makes me cringe more than "I don't know how to do that. Period. End of discussion." There are thousands of things i don't know, but very few of them stop me from thinking about a problem or trying to tackle it if i need to.

Also, a radio interview with the amazing Andrew Stanton, of Pixar and Innovation lessons from Pixar: An interview with Oscar-winning director Brad Bird from the McKinsey Quarterly. The thing i like about reading about Pixar is that they have an amazing ability to try things and fail in private before releasing something successful. Pixar seems to take a long view to team building and employee development and their work shows the difference between 'projects' (most films animated or otherwise) and something built by a real team that grows over the long term.

August 3, 2008

First Visualizing Data Nodebox Conversions

I spent some time this evening with Nodebox and "Visualizing Data" by Ben Fry. I did encounter a couple of quirks and a few things i needed to re-implement in python, but i managed to get through the first couple of example applications in the book. Basically, i can load the map graphic, load the center point and the random data tab-delimited text files and plot circles on the center points of the map.

Nodebox Map Example Output

I had to reimplement a few things:

  • the Table class from the book was ported (mostly) to python. The API is a bit simpler since python is more flexible with types.
  • i built a processing module in python with the following methods:
  • processing.lerp - linear interpolation between two values
  • processing.norm - figures out the relative position of a value in a range (ie, norm(2, 0.0, 4.0) is 0.5
  • processing.map - Takes a value between 1 range of values and maps it to the equivalent spot in another range. This method is poorly named since python has a map method that does what a programming language should do for map().

The processing module will hold most of the stuff i needed to reimplement from processing.

I have posted the Nodebox Project and required libraries for you to download and play with. I should probably clarify the license on this code and put it in version control, but that is a task for another time.

August 1, 2008

Processing and NodeBox

I have played around with processing on and off for a few years now. setpixel told me about the app pretty soon after it came out. I have never spent much concentrated time working with it, though. This year, at pycon, i learned about NodeBox, which is essentially processing for mac os x using python instead of java. I have also dabbled a bit with that app, but to no real end.

I have a copy of Ben Fry's new book Visualizing Data and have been reading through it every once and a while. I decided today to try to work through that book and translate the examples to python along the way so i can learn nodebox a bit better and get through some more hands on processing work.

This morning at the coffee shop, i made a quick example app to run in both nodebox and processing just to get things started. The design is a simple stairstep of squares with changing fill and stroke colors. Even this simple application shows some interesting differences between nodebox and processing (as well as java and python).

Processing

Processing Design

Code sample:

    int sizeWidth = 600;
    int sizeHeight = 600;

    void setup() 
    {
      size(sizeWidth, sizeHeight);
      background(.7*255);
      noLoop();
    }

    void draw() {
      for (int i = 0;  i<20; i++) {
        fill(ceiling(i*40,255));
        stroke(ceiling(i*20,255));
        rect(i*40, i*40, 40, 40);
      }
    }

    int ceiling(int inputVal, int ceilingVal) {
     if ( inputVal > ceilingVal ) {
      return ceilingVal;
     } else {
      return inputVal;
     } 
    }

Nodebox

Nodebox Design

Code Sample:

    sizeheight = 600
    sizewidth = 600

    def background (w,h):
        size(w, h)
        fill(.7, .7, .7)
        rect(0, 0, w, h)

    background(sizewidth, sizeheight)

    for i in range(20):
        fill(i*40/255.0, i*40/255.0, i*40/255.0)
        stroke(i*20/255.0, i*20/255.0, i*20/255.0)
        rect(i*40, i*40, 40, 40)

While this sample design is very simplistic, there are a few interesting points that i learned while making this example.

  • processing will not automatically cap color values at 255 if given numbers > 255, so i needed to make the ceiling() function to keep the behaviour between processing and nodebox the same.
  • nodebox has a richer rect() method that lets you specify corner radius. The stroke will follow the corner radius settings. I haven't dug into processing enough yet to figure out the equivalent method for drawing rounded rectangles, but it is definitely possible.