Author: Fred

  • The Art and Science of Counting Pixels: Behind the Math of the game Figment

    The Art and Science of Counting Pixels: Behind the Math of the game Figment

    “What’s the fastest and most accurate way to calculate the exact area of a pink in this design?”

    That was the question my friend Alex Hague asked me when he was developing the game Figment for his tabletop company CMYK Games.

    It’s a deceptively simple request, but answering it formally or even technically is quite difficult.

    Before we try to answer it, here’s a little more on one of CMYK’s newest games: Figment is a brilliantly simple and fun game that challenges us to to estimate the area of shapes and then use those estimates to sort a set of cards. The twist is that when a card appears to have more one color than another, it is sometimes merely an optical illusion exploiting our visual system’s difficulty estimating the area of arbitrary shapes.

    This is the perceptual challenge that makes Figment challenging (and therefore fun to play) but it also meant CMYK needed an objective “ground truth” for each color on every card in order to make the game fair. And with dozens of cards, that meant we need an automated way to calculate the exact percentages for each card’s answer key.

    Alex explained to me that what had initially seemed like a straightforward design task and something easy to prototype had turned out to be a fiendishly annoying problem. He approached me because he knows I love these types of problems and wondered whether it could be solved with some computational creativity.

    And indeed, as soon as he explained it to me, I jumped at the opportunity to start puzzling through how we might do it algorithmically.

    The challenge behind the game

    Before we get to the mathy stuff, let’s go over the rules for playing Figment. 

    In each round of Figment, players are tasked with ranking cards based on one of the 4 main colors of the game – simply laying out 5 cards ranked by which ones have the “most” of the round’s arrow color.

    Sounds simple, right? Well, it turns out it’s pretty tricky in practice which is what makes the game fun.

    The back of each card reveals each color’s percentage relative to the entire surface area of the card including the white background. 

    The task Alex and his design team were struggling with was systematically calculating the exact percentages of the card that each color occupies on the card face. This was crucial because the entire point of the game is to rank the cards based on their color percentages – if the numbers were wrong, the game wouldn’t be fair nor fun. 

    Alex needed a method that was:

    • Accurate down to a couple decimal points: If a card were 25.51% blue and another was 25.49% blue, they need to be rounded properly
    • Consistent across all cards: Checking the values manually in Illustrator turned out to be a total chore and sometimes yielded different results. Online tools were no better.
    • Verifiable: We wanted the process to be data driven so we could easily audit the entire deck in a spreadsheet
    • Automated: Sometimes card designs changed, and being able to quickly process all 100 designs efficiently in one task would be ideal 

    You’d think there would be good tools for this, but they’re harder to use than you’d expect.

    Our first instinct was to look for existing tools that could batch process the color analysis. Adobe Illustrator offers one-off estimates for the area of vector shapes when a single color is selected but seeing as Figment ships with 100 distinct cards (some with hideously complex designs) we wanted to avoid the manual and error prone labor required with that approach, especially considering it would have involved manually compiling the results into a separate spreadsheet. Automating Illustrator to “pick” the color areas automatically also seemed like a nightmare if it was even possible.

    A computational method would mean implementing an automated way to mathematically derive the surface area of each color. This approach would also have the added benefit that we could apply exactly the same algorithm to each card systematically.

    If you try digging around the web for this kind of tool, you’ll find there are apps and online services that will analyze images for their color distribution, but we found them to be consistently unreliable when compared to Illustrator and not much more efficient either. Even more annoyingly, we found ourselves getting occasionally inconsistent results from the same tools with the same card, which was very frustrating.

    This kind of thing actually really matters for a game like Figment.

    Without a rigorously tested ground truth for each color on each card, we knew shipping the game would feel sketchy at best and dishonest at worst. In particular, it’d be problematic for the really close calls where players were forced to choose between two cards with 6% pink vs. 5% pink, for example. A rounding error of 0.5% could determine the entirety of a game’s outcome. 

    If you’ve ever participated in a particularly competitive board game session, you’ll know how important it is to have a definitively, objectively correct outcome for a given rule. 

    All this meant that I was very excited to see if I could figure out a comprehensive computational approach using mathematics.

    I initially considered calculating the area of vector shapes directly. In theory, you could calculate the exact area of each shape based on its geometry using pure math (e.g. calculating the area of a circle is given by a simple algorithm A = π * r2 ). 

    Sadly this approach quickly falls apart when dealing with complex, overlapping shapes.

    The more I thought about it, the more I realized that this must be an established problem in mathematics, similar to the coastline paradox:

    It’s not hard to see how the coastline paradox applies here: if the same shapes has different perimeters based on the units you measure them with, then you’ll end up with different areas!

    The challenge with Figment is similar and it turns out this is a non-trivial problem in higher order math. There’s even a field dedicated to it called measurement theory! 

    Here’s a relevant excerpt from the mathematics Stack Overflow discussing the difficulty in calculating the area of an arbitrary shape:

    This happens to be a surprisingly difficult problem. In 1890 Karl Hermann Amandus Schwarz (1843-1921) published an example that showed the accepted definition of surface area gives an infinite area for a cylinder by showing there exists a sequence of inscribed polyhedra that converge uniformly to a cylinder such that the areas of the polyhedra diverge to infinity. 

    Thankfully I didn’t need a PhD in mathematics to get any further – some basic problem solving landed me with a really solid solution. 

    The Pixel-Counting Solution

    The original designs of Figment’s cards, created and stored as vector graphics in Adobe Illustrator, are the closest to pure shapes inside a computer’s mind. But remember, because virtually all of these shapes are irregular they don’t have easily computable areas, so while the computer can render them, it doesn’t actually know their area initially! 

    How would you estimate the area of the pink line?

    That’s the beguiling paradox that’s at the heart of the Figment game mechanic: we can perceive the boundaries and edges of these shapes both digitally and visually, but neither our minds nor our computers have a precise way to determine their area. 

    However, I realized that the key to computing their areas could rely on rasterization, the process of turning a vector image into a pixel-based raster image. 

    In order for a shape to be displayed on your computer’s LCD screen or static raster image, it must follow a transformation from its theoretical representation consisting of lines, curves, and fills, into individual pixels. So whether your computer is displaying a vector shape on an LCD screen, saving it as a PNG, or printing it out on an inkjet printer, the same underlying process is at work: fill up a grid of pixels in such a way that it resembles the underlying shape defined in the vector file and let our eyes do the rest. The original information of the vector image defined by splines and shapes gets discarded in lieu of a finite set of pixels on a grid that has a limited resolution. 

    I realized that we could piggyback off this foundational process in computer science to solve the problem for Figment, as once we had a pixel representation of each card, we could merely count the number of pixels per color, something standard image processing libraries can all do. 

    Just count the pixels per color, then you’ll your answer, right? 


    Unfortunately, while this was the right path to the correct solution, it turned out to be a more difficult problem than meets the eye.

    Here’s why: while vector images offer a ton of value to designers, they must eventually always go through a rasterization process to make them look appealing to human eyes and not just computer systems. This rasterization step introduces a whole set of ambiguous colors via something anti-aliasing.

    Anti-aliasing is its own topic in computer graphics but here’s a quick explanation:

    Anti-aliasing smooths jagged edges by creating intermediate colors between shapes, making edges look smoother to the human eye but creating a gradient of ‘in-between’ colors that complicate pixel counting.

    Anti-aliasing initially became a huge problem for this approach as it results in a bunch of “in between” colors on the border of edges:

    How would you count the pixels in this cropped portion of a card? Inevitably, you’d end up with some tough calls when it comes to these edge pixels – they’re essentially indeterminate colors for the purposes of playing Figment. 

    This posed a problem for the naive pixel counting approach as we’d end up with a lot of colors that were similar to the main colors, but not actually the game’s primary colors. These indeterminate lost pixels ended up adding up to single digit percentages, which in a game that comes down to small differences, could be a huge issue.

    Put another way, if you had to look at each of these pixels and answer the question: which pixels “belong” to Figment’s pink color, you’d have a hell of a time.

    However, thinking about it this way gave me the clue I needed for the solution: I could use a simple distance metric to chart a line in RGB color space between each indeterminate pixel and one of our 5 colors.

    The Figment color that was closest (e.g. the shortest line) to the ambiguous pixel would yield the color that the pixel “belonged to”. 

    Here’s how I did it in code – it’s an algorithm that effectively forces each pixel to the closest of our four target colors using Euclidean distance in RGB space:

    def get_color_name(rgb_triplet, target_colors):
        min_distance = float('inf')
        closest_color = None
        for color_name, target_rgb in target_colors.items():
        # Calculate Euclidean distance between the pixel and target color   
        # in 3D RGB space (treating R, G, B as x, y, z coordinates)
            dist = sum([(a - b) ** 2 for a, b in zip(rgb_triplet, target_rgb)])
            if dist < min_distance:
                min_distance = dist
                closest_color = color_name
        return closest_color

    This ensured that light pink pixels were counted as pink, slightly off-green pixels were counted as green, and so on.

    It also meant that there were no pixels left behind – every pixel would get assigned into one and only one of the five main colors. 

    Put really simply, you can think of this algorithm as “rounding” the pixels to their nearest Figment color by using geometry in a 3D color cube. Neat!

    The Results

    The algorithm performed perfectly. For each card, we derived precise percentages that we could verify visually and mathematically. The whole deck was processed in under a minute, generating a spreadsheet with color percentages accurate to two decimal places.

    We were even able to use these percentages to rank cards by difficulty, with cards having more evenly distributed colors being harder to guess than those dominated by one color.

    Open-Sourcing the Tool

    I’m excited to open-source my pixel counting tool for others to use and modify. Whether you’re developing a game, analyzing designs, or just curious about color distribution in images, the core algorithm is now available on GitHub.

    Feel free to adapt it to your needs—maybe you need to analyze more colors, process different file types, or integrate it into a larger workflow.

    All the pixels that are fit to count

    Sometimes the simplest approach is the most effective but it can take a while to whittle down a problem to it’s core before you get there. 

    This project also reminded me that game design is often as much about solving technical problems as it is about creating engaging gameplay. The pixel-counting algorithm might be invisible to players, but it’s woven into every guess they make and every point they score.

    If you’re curious about the algorithm or want to try it yourself, check out the code on GitHub.

    And if you’re interested in seeing the results in action, grab a copy of Figment and start guessing those color percentages!

  • Getting Caught on the Inside

    When you’re surfing and get caught in the whitewater after a big wave, the feeling can be terrifying – you’re “caught on the inside.” I love this phrase because it conveys a feeling all humans have felt some version of: when things get a little intense, your body is burning oxygen, and you lose track of which way is up. This is how I’ve begun to reflect on my time this summer while attempting to launch my own VC fund: staring down the barrel of the gun of raising 7 or 8 figures of other people’s money became a bit overwhelming, if not intimidating. 

    I found myself procrastinating by spending a lot of time writing code with the help of AI. And eventually I realized that maybe I should be riding this wave myself, not as an investor, but as a builder.

    My git contributions have benefited significantly from AI

    If you’ve followed my career at all, you’ll know I’ve always been a builder at heart, and the more time I spent organizing the preliminary work for a fund, the clearer that vein of my identity became.


    The Builder-Investor

    In late 2024, I stepped away from my role as a General Partner at TwentyTwo Ventures after helping Katey close out the final batch of investments in our Fund VI. We haddeployed more than $15 million into dozens of really exciting Y Combinator startups, and it was so exhilarating helping support founders right at the beginning of their journey once again after having worked at Kickstarter and Y Combinator.

    And even though I came to it with a decent understanding of VC and lots of experience with past investments, my time at TwentyTwo really helped me cement my understanding of seed capital from the inside of a small seed stage fund. It was also so refreshing to be back in the saddle of the startup-world alongside some really exciting ideas and great founders. But I felt myself getting a little antsy, and after some encouragement from friends and family, the natural next step felt obvious: raise my own fund. 

    I spent the first half of 2025 exploring that idea with a trusted friend and a handful of incredible advisors. We made a deck, refined a thesis, tried to agree on a name, and generated a ton of interest from my network.

    A few months in, I hosted a dinner with potential LPs and advisors that galvanized me. The conversation jumped from AI’s impact on labor markets and its possible cultural implications, to the future of human creativity and what we really want from technology. The mood in the room was obvious: with the advent of LLMs, we’ve arrived at a spooky inflection point in human history – we’re simultaneously surrounded by an undeniable wave of opportunity but also wary about what is about to change.

    I didn’t quite realize it at the time, but this wave had begun to pull me under.

    I’ll never forget the first time when I started up Claude Code in early 2025 and kicked off rehabilitating an old project. A week or two later I looked up and realized I could build things in a week that would have taken 3-4 developers a month. Like many other people over the last year, this drive overtook me. I started pushing out side projects left and right: a cat breed analyzer, a prototype of a 15th anniversary edition of Emoji Dick translated by Claude, a number of open source libraries, and countless other quick hack projects that seemed to just keep coming.

    The most engrossing project has been a digital version of the tabletop game Monikers for my dear friends over at CMYK games. Though I had never written an iOS app before, I built it in Swift. In only a couple of months, I’ve shipped a stable beta to a dozen play-testers, built on top of a robust Rails backend. I’ve even incorporated a complex translation management engine that handles internationalization for thousands of cards across a dozen languages, from Thai to Hebrew. 

    So, that same week as our pre-fund dinner, when I found myself losing track of time, shipping things at an embarrassing pace, my partner Louise said something that hit home:

    You LOVE it, you love building things, just admit it.

    She was right.


    Money, what is it good for (especially now)?

    Amidst all the code projects and VC conversations, I began to get the sense that AI had begun shifting the ground under venture capital itself.

    While trying to distill our best guess at what the next generation of companies would look like for the fund, I wanted to focus on:

    • Companies using AI to exploit a vertical their founders were experts in;
    • Products that differentiated on something other than shipping software fast – cultural savviness, human factors, hardware, etc.;
    • Teams that understood the new bottlenecks, like the exhaustion of publicly available data to train on.

    But we kept returning to the same question: when AI tools can almost replace a full engineering team, what exactly is the VC model solving for? If founders can validate ideas with $50K instead of $500K – and can reach profitability – what’s the venture money value prop?

    Capital used to be a scarce resource but even in this post-ZIRP world, money and frothy valuations feel abundant for founders. But now MVPs can be built with minimal headcount. Founders who could get funded by anyone are choosing their investors based on everything except the check size – domain expertise, distribution channels, talent networks. And while I was confident I could bring lots of value across those dimensions, it became clear that AI is accelerating venture capital’s transformation from a financial product into an even thinner service business.

    For someone who’s happiest in build mode, it started to feel strange to focus on investing during the most exciting moment for builders in a generation.


    A pivot, of sorts

    I’m not abandoning investing and I don’t think VC is going anywhere anytime soon. There are lots of crazy ideas out there that need a lot of money quickly, and VC will always be great for that. I just realized I didn’t want to be fighting these headwinds while missing out on doing what I enjoy most.

    So the good news is that I’m going to continue backing exceptional founders shipping great ideas and I’m lucky enough to be able to do it using my own capital. But I’m going to be doing it as someone who’s building alongside them, not as someone managing other people’s money through a traditional fund structure.

    I’m still figuring it out, but this will probably be some combination of angel investing, syndicating deals to friends who had expressed interest in my fund, partner-investing in projects where I can contribute technically and building products that demonstrate a thesis rather than just funding it.


    What’s Next

    For the foreseeable future I want to be heads-down building the kinds of products I can’t stop thinking about – the technically complex learn-as-you-go and creatively weird projects that only someone with my particular blend of interests would pursue. The kind of stuff that pulls you in for hours and helps you understand a new corner of the universe. 

    Over the last year, sometimes this has meant developing games, other times it has been complex financial modeling software. I’ve even gotten into modeling power demand curves for a friend’s energy company. It’s exhilarating and I’m totally hooked.

    In terms of investing, I’m most interested in strategically backing founders attacking problems I can get viscerally excited about. But I also love the weird stuff that breaks my brain in the best way – projects at the intersection of art and technology, tools that shouldn’t exist but do, gutsy movies, and whatever else grabs me.

    To those who were ready to back our fund – thank you. I’d love to bring you into specific deals as they arise. To those building weird and/or great things at this moment – let’s talk. The builder-investor model might not be for everyone, but for those of us who can’t stop shipping and have the resources to do it, it feels like the only honest way forward.

    Look around, this couldn’t be a more exciting time to build things – I’ll see you on the inside.


    Playa Marbella, Costa Rica



  • Big Data Review in Emoji

    I’m on the board of Rhizome.org, a great non-profit focused on technology and art. We do an event every year called Seven on Seven where we pair seven technologists with seven artists.

    Saturday was the fifth anniversary of the event, and this year one of the teams paired NYT writer and author Nick Bilton with artist Simon Denny.

    Around 5pm on Friday, I got an email from Nick offering to pay me $5 for an emoji version of the White House’s report on Big Data:

    Email from Nick

    The entire report is 85 pages, but they asked for a summary of page 55, a chart showing how federal dollars are being spent on privacy and data research:

    bigdatagraphic2

    Here’s what I came up with (click for a larger version):

    Big Data Emoji

    I’m particularly proud of my emoji-fication of homomorphic encryption:

    Homomorphic Encryption

    I highly recommend watching the whole event, but Nick and Simon’s presentation of the other reports they solicited begins around at the 3 hours and 25 minute mark of the live stream:

    Nick, I know you said you’d pay cash, but I’d really prefer to accept the $5 in DOGE.

    Please send 10,526.32 DOGE to DKQJsavxSdF381Mn3qZpyehsBzCX3QXzA2. Thanks!

  • Proving Rancid filmed “Time Bomb” at Kickstarter’s Old HQ

    A month or so ago, Andy Baio was watching 120 Minutes and thought he recognized the wall moulding in Rancid’s Time Bomb video:

    Here’s the video:

    Rancid was playing on the 4th Floor of 155 Rivington, Kickstarter’s former home on the Lower East Side.

    Andy sent it around to everyone at Kickstarter and it was obvious — it had to be the building we had spent the last 4 years in.

    I watched the video repeatedly, and knew it too, but I wanted proof.

    So I started digging through my photos of the place.

    When we first moved into the 4th floor of 155 Rivington, a decision was made to take down some of the drywall on the west wall:

    REAS / 155 Rivington
    The wall on the 4th floor after we removed the sheetrock in February 2012

    Underneath we discovered graffiti that must have been at least 15 years old, probably older. My colleagues Alex and Tieg recognized the H₂O H/C/N/Y tag as from the band H₂O, a punk rock band started in NYC in 1995. Ensign, in the upper right, was also an local hardcore punk band, so they must have been there too.

    Other tags were easily Googleable. One was Lord Ezec is Danny Diablo, a famous underground recording artist, who is still very active in the scene (@dannydiablo on Twitter):

    Lord Ezec

    Danny was Sick of It All‘s roadie around the same time, which explains the “Alleyway Crew” tag, the story of which is referenced in this biography of the band:

    Numerous Sick of It All fans have tattoos of the “Alleyway Dragon”, the band’s official logo. The Dragon is from a sheet of Greg Irons flash. It is not, as some people have claimed, a misappropriated gang symbol, but then the Alleyway Crew was never a gang to begin with. It was, and is, a group of friends. The dragon is a symbol of friendship as well as a way that members would relate who was hanging out at a particular gathering. The “Alleyway” is in a school yard in Flushing, Queens, where the band and all of their friends would gather.

    The other acronyms, such as C.C.C. and D.M.S. and SNS are too hard to Google, but I’m sure if you were in the scene at the time you’d recognize them.

    The biggest piece, however, was the big white REAS tag

    REAS was a well known NYC graffiti artist who hit tons of spots in Manhattan and around NYC:

    Screen Shot 2014-01-19 at 12.33.38 PM

    Rumor has it REAS still painting, and he even recently collaborated with the well known artist KAWS on a vinyl toy:

    KAWS / REAS Toy

    Something told me that if I looked hard enough in the Rancid video, that REAS’ tag might be there.

    Sure enough, around 1 minute and 17 seconds in, it makes an appearance.

    I transformed my photo onto a screen grab from the video and mapped it onto an animation:

    So barring an explanation involving REAS and a time machine, I’d say this is proof that Rancid shot their video at Kickstarter HQ.

    If you want to learn more about the making of video, check out Flaming Pablum’s post from October 2013 on it here.

  • Visualizing CitiBike Share Station Data

    CitiBike Share launched yesterday. I finally got my fob activated, but since its raining, I haven’t had a chance to take the bikes out for a spin, so I decided to take their data for a spin instead.

    Jer RT’d Chris Shiflett’s link to the CitiBike Share JSON data:


    asking for a “decent visualization” within half an hour:

    So I fired up R and after a couple of minutes of JSON-munging, threw together this graph plotting the # of available bikes per station against the total number of docks of that station:


    Not surprisingly, there’s a positive correlation with the number of docks a station has and the number of bikes available for that station.

    But some of the outliers represent stations that are popular and have fewer bikes available, places where CitiBike Share might consider adding capacity. For example, East 33rd street and 1st avenue had 60 total docks, but 0 available bikes.

    In contrast, stations like Park Place & Church Street (middle of the graph) lie on the identity line and represent stations with close (or exactly) 100% available bikes for their docks. They may be examples of over-provisioned stations.

    I also colored the name of the station based on its latitude to give for a very rough proxy for how “downtown” the station was. This glosses over the fact that Brooklyn has a downtown which is distinct from what people normally consider NYC’s downtown, but is interesting to note that some uptown stations (lighter blue) appear to cluster towards the right of the graph indicating uptown stations have been granted more total docks overall. More space in midtown I guess.

    I’m not proud of the R code I used to hack this together, but I spent about 10 minutes on it:

  • The Data Behind My Ideal Bookshelf

    Thessaly La Force, recently published a book with the artist Jane Mount called “My Ideal Bookshelf.” In it, Thessaly interviews over 100 people and Jane paints their bookshelves:

    The books that we choose to keep –let alone read– can say a lot about who we are and how we see ourselves. In My Ideal Bookshelf, dozens of leading cultural figures share the books that matter to them most; books that define their dreams and ambitions and in many cases helped them find their way in the world. Contributors include Malcolm Gladwell, Thomas Keller, Michael Chabon, Alice Waters, and Tony Hawk among many others.

    As I observed Jane and Thessaly compile the book over the last year, I couldn’t help but think about all the fun opportunities I could have exploring the data behind the shelves.

    Contributor Neighbors

    Each of the 101 contributors Thessaly interviewed picked as many books as they thought represented their ideal bookshelf, and I knew some of them would pick identical books.

    So what would a taste graph linking contributors to each other using the books on their shelves look like?

    Previously, I had worked with Cytoscape to render a network graphs, but this seemed like a good opportunity to make something interactive and also a perfect first project to really use d3. I can’t wait to do more with it.

    Hover over each node to see the contributor’s neighbors.

    The layout of the graph is done using d3’s force-directed graph layout implementation and each node represents a contributor’s shelf and is colored by the contributor’s profession.

    Each active link is then colored by the neighbor’s profession. The nodes at the center of the graph have the most neighbors and exert the most pull over the rest of the graph. Try clicking and dragging a node to get a good feel for its centrality.

    Genres and Professions

    click for larger
    The distribution of contributors professions skews heavily toward writers so all the professions aren’t evenly represented: 41 out of the 101 bookshelves were from writers, and there were a total of total of 35 unique professions represented.

    click for larger

    In the graph above, I picked books chosen by professions which were represented by two or more contributors. Each circle is proportionally sized with the share of books chosen by the profession of the contributor.

    For example, fiction books make up the plurality — 31% — of books chosen by writers. Similarly, 55% of the books chosen by photographers were classified as photography.

    This next graph is a violin plot showing the distribution of page counts of the books chosen by each profession:

    click for larger
    Excluding the Oxford English Dictionary which comes in at 22,000 pages, legal scholars (Larry Lessig & Jonathan Zittrain) earned the highest average page count of 475, and all the books chosen by the two photographers had page counts under 500.

    Year vs. Page Count

    Taking it a step farther, here is almost every book (again, excluding the OED) based on the year it was published (X-axis) against the log10 of its page count (Y-axis).

    The size of each point represents the number of ratings the book had accumulated on Google Books, and its color represents the book order the contributor placed it on their shelf.

    click for larger
    The darker the point, the farther on the left of the shelf the book was ordered. Conversely, small teal dots represent books with relatively fewer ratings which were placed towards the right of contributor’s shelf.

    Unfortunately, not all the books had publishing dates that made sense — Google reported the dates of Shakespeare’s works anywhere from 1853 to 1970 to 2010, and when would you say the Bible was published? 1380? 1450?

    Excusing these erroneous points, I think the graph still works — checkout the cluster of books published in the early 20th century chosen by the writers in the upper left of the graph: they represent popular early 20th century books with page counts between 200 and 500.

    Summary Stats

    • Number of shelves: 101
    • Number of Books Chosen: 1,645
    • Unique Books According to Google’s API: 1,431
    • Average number of books chosen:16.28
    • Average Pagecount: 381.2
    • Average Year of Publication: 1992
    • Top 5 Chosen Books:
      1. Lolita chosen by 8 contributors
      2. Moby Dick (chosen by 7)
      3. Jesus’ Son (chosen by 5 contributors)
      4. The Wind-Up Bird Chronicle (chosen by 5 contributors)
      5. Ulysses (chosen by 5 contributors)
    • Top 5 Authors:
      1. William Shakespeare (10 different books)
      2. Ernest Hemingway (7 different books)
      3. Graham Green (7 different books)
      4. Anton Chekov (6 different books)
      5. Edith Wharton (6 different books)
    • Contributor with the most number of books: James Franco
    • Contributor with the most number of shared books: James Franco
    • Longest Book: The Oxford English Dictionary, Second Edition: Volume XX* chosen by Stephin Merritt, 22,000 pages.
    • Shortest Book: Pac-Mastery: Observations and Critical Discourse by C.F. Gordon chosen by Tauba Auerbach, 12 pages

    * Jane was only able to paint one volume of Stephen’s OED for his shelf, but the authors agreed it could stand as a synedoche for his choice of the entire edition.

    Overall…

    The data I cobbled together from My Ideal Bookshelf is far from perfect, but I think it does a good job of illustrating some of the larger themes and relationships behind the book.

    For example, the books of the two legal scholars tended to picked on average some of the longest books in the set, and that professionals tend to pick books related to their jobs (checkout the large proportion of photography books chosen by photographers). Also: if you’re James Franco and pick a ton of books, you’re gonna have a lot of neighbors in a network graph.

    I also discovered how skewed the dataset was towards the choices of writers — I jumped in expecting a diverse set of contributors which might be useful for representing an ideal ideal bookshelf — but that would have been a difficult case to make when 40% of the contributors were from one profession.

    This might sound like an obvious observation (and something I should have known having spent so much time thinking about the book), but it wasn’t something I was able to really observe until looking at simple histogram of their professions. So remember: its always worth thinking critically about whether your samples are representative of the underlying distribution, and simple exploratory data analysis can really help you out there.

    Bigger picture, I think this skew demonstrates the nature of coming up with an ideal list of anything: no matter who you ask, the task is essentially a subjective one. Here, it’s biased towards the network Thessaly and Jane were able to tap to make the book.

    Cleaning and Reconciling the Data

    While creating the book Thessaly and Jane had carefully compiled an organized spreadsheet listing each contributor and their chosen books, but I knew there could be subtle typos here and there. These typos could possibly throw off the larger analysis: if the title of two books was even slightly off or missing some punctuation, then aggregating based on their titles would be problematic. I also wanted additional data about the books (data which Thessaly and Jane didn’t record), such as the year the book was published, or the number of pages in the book.

    So I figured I’d kill two birds with one stone and look for an API which I could automatically search using the title they had entered into the spreadsheet, and get a best-guess at the “true” book it represented. The API would also hopefully return a lot of useful metadata that I could use down the line.

    It turns out Google’s Book API is the perfect tool for such a job. I could send a book title to it and get back the book that Google thought I was looking for. This allowed me to lean heavily on Google’s excellent search technology to reconcile book titles that might have had typos, while also retrieving the individual book’s metadata. While I could have used something like Levenshtein distance to try to find book titles that were close to each other in the original dataset, I wouldn’t have been able to retrieve any additional metadata.

    A quick side note for copyright nerds: the Google Books API played into the HathiTrust case recently, and I’d like to imagine use cases like this were part of the reasoning behind declaring the Google’s use of copyrighted materials a fair use.

    Google’s Book API allows 1,000 queries a day, but since the list contained thousands, I had to write in and ask for a quota-extension — thanks to whomever at Google granted that — I now get to hit it 10,000 times a day, which was enough to iterate building a script to compile the data.

    Not surprisingly, Google’s API returns a ton of metadata. Everything from a thumbnail representing the book’s cover, to the number of pages, to the medium it was originally published, to its ISBN10 and ISBN13 … the list goes on. I tried to choose fields that I knew would be interesting to aggregate on, but also ones that would help me uniquely identify the books.

    One particular piece of metadata that was missing was the genre of the book — only 28% of the books returned from Google had category information. Another option would have been to set up a Mechanical Turk Task to ask humans to try to determine the books’ genres. This kind of book ontology is actually a very difficult and somewhat subjective problem. Just think of how complicated the Dewey Decimal system is.

    Finally, not all data is created equal — I’ve manually corrected a handful of incorrect classifications from Google where the search results clearly did return the right book, but its certainly possible not all books were recognized or reconciled properly.

    The tools

    Aside from d3 for the interactive plot at the top of this post, I used R and ggplot2 to create the static graphs.

    The script I used to query the Google Books API was written in Ruby, and exported the data to a CSV which I then loaded into MySQL and Google Docs to manually review and spot check.

    Here’s the query I used to generate the data necessary for the force-directed graph:

    SELECT
      ideal_bookshelf_one.contributor_id as source,
      ideal_bookshelf_one.google_title as book,
      ideal_bookshelf_two.contributor_id as target
    FROM 
      ideal_bookshelf as ideal_bookshelf_one,
      ideal_bookshelf as ideal_bookshelf_two
    WHERE
      ideal_bookshelf_one.google_book_id = ideal_bookshelf_two.google_book_id
      AND ideal_bookshelf_one.contributor_id != ideal_bookshelf_two.contributor_id
    

    Sequel Pro’s “Copy as JSON” was extremely helpful here — it took relatively little effort to munge the SQL results into an array of nodes and links required by d3’s force layout.

    If you liked this post…

    Pickup a copy of Thessaly and Jane’s book today!

  • Kickstarter Fulfillment and Product Development: A story of Dogfood and Data Validation

    You could think of this post as telling the story of two Kickstarter projects. Since its a long post, here’s a quick summary:

    1. I recently ran a Kickstarter project.
    2. I wanted to share all the financials and details of how I shipped my rewards.
    3. I discovered we could do a better job helping creators process their backer’s addresses.
    4. We recently deployed a change to backer surveys that should do just that.

    So I hope this post will educate Kickstarter creators on how to smoothly fulfill their rewards, but also shed a little light on how we do product development at Kickstarter.

    The Kickstarter project was pretty simple — I FOUGHT SOPA AND ALL I GOT WAS THIS STUPID T-SHIRT— and the other project was actually a Kickstarter built by our product team, which we (and I use “we” loosely, Jed, Tieg, Daniella and Meaghan did all the work) shipped last week:

    The address confirmation tool helps backers validate their addresses when filling out reward surveys from creators.

    Just as Netflix or Amazon ask you to confirm your shipping address if it doesn’t precisely match an exact address, Kickstarter will now ask backers to confirm a more precise one so that creators can feel more confident about shipping their rewards off. This feature also has the benefit of cutting down some of the data correction creators might face when shipping rewards.

    The development of this feature is a good example of the of “dogfooding” your own product, which is software jargon for the act of actually using the tools you’ve built.

    Dogfooding is one of the best possible ways to understand and improve your product, so I’m always interested in getting feedback from people that have run their own Kickstarter projects.

    The SOPA shirt project was pretty straightforward. It only really had two reward tiers, but as with all Kickstarter fulfillment, there were a lot of details to get right.

    Getting one of those details right — backer addresses — made me realize we needed a better way to ensure we were delivering valid backer mailing addresses to project creators at the most crucial part of their project: reward fulfillment.

    I also want this post to serve as a bit of a guide for fulfilling Kickstarter projects on a similar scale. So first, some details on how I planned to fulfill my rewards.

    Estimating Income and Costs

    To determine my actual net dollars from Kickstarter, Amazon, and the credit card fees, I had to download a CSV of my account activity from Amazon’s FPS platform, sum the pledges and subtract the credit card fees for each pledge.

    The total cost of CC fees was 4.8%, Kickstarter’s fee was 5%, so I yielded 90.2% of actual pledges, or $3,497.

    I had a chicken and egg problem trying to estimate which shirts to even offer in the survey.

    Since different shirt sizes and different colors were different prices (the cost per shirt varies from $6.32 for a Grey Small, to $12.95 for a White XXL), it was crucial to a rough estimate of what the shirt size and color choice distribution would be.

    I knew a lot of people were going to order large and medium shirts, but if I had too many XXLs, it might not have been affordable to offer the white shirts. And if it turned out that I couldn’t afford the white shirts, I didn’t want to even offer the white shirts in the survey.

    So I took a look at Yancey’s shirt distribution. For his project he had the following distribution of sizes:

    • S: 13%
    • M: 26%
    • L: 30%
    • XL: 21%
    • XXL: 10%

    These ratios enabled me to estimate what the distribution of sizes would be for my shirts. I guessed that 2/3rds of my backers would want the grey shirt, and the rest would want the white shirt.

    Using these numbers and the bulk costs from ApparelSource.com, I was able to determine that I could afford to offer both the grey and white shirts in my survey.

    Here’s what the actual distribution of sizes turned out to be:

    • S 13.85%
    • M 29.44%
    • L 32.90%
    • XL 15.58%
    • XXL 4.33%

    My numbers weren’t far off from Yancey’s — I ended up having fewer XXL than me which surprised me. The grey / white distribution ended up being 77% grey, 23% white.

    I threw together a quick graph using ggplot2:

    One observation is that the distribution of white shirts looks like it skews smaller. Anecdotally, that might be explained by women preferring the white shirt (again, anecdotal), and since women’s sizes tend to run smaller, the distribution of white shirts had proportionally more smaller sizes.

    Buying the Shirts

    ApparelSource seems to operate multiple websites with basically the same layout and offerings. They had the best prices on CANVAS shirts I could find, though oddly, the prices varied between their different sites by a couple of cents. Some sites had them in stock and others didn’t. This made no sense to me because they’re all being shipped from the same warehouse.

    I ordered one of each shirt style to confirm they were the style I wanted, and then prepared to make the bulk order.

    My order was extremely specific (13 Small White, etc.) so I think it raised some flags on ApparelSource’s side. I had to spend some time working out the best way to pay them. It turned out paying them via PayPal was the easiest way.

    This is a version of the sheet I used to calculate costs. I think working with something like this sheet is crucial for staying sane when fulfilling any Kickstarter project.

    Printing

    Yancey had also suggested I check out Kayrock so I dropped them a line to get a quote. Kayrock had a source they recommended for buying the actual shirts which would have saved me over $1,000, but I wanted to stick with my choice of CANVAS shirts from ApparelSource because I had already tested their quality.

    In the original email Kayrock had quoted the print job as “plastisol ink, no shirt rolling, no double hit, no handling fee, no rush fee, no production prepress, no color change fee“, and gave me the quote of $479 + $80 for printing and setup.

    What they didn’t tell me, was that if I didn’t use their apparel quote and instead had the shirts shipped to them directly, they were going to charge me $0.40 cents per shirt of handling. This added $100 to the total cost, so my Kayrock fees were $660.

    Despite this issue, their work and responsiveness over e-mail was very good, and I would recommend checking them out if you’re interested in some great NY screen printing.

    Once Kayrock finished printing the shirts that I had shipped directly to them, I headed to Greenpoint to pick them up myself so I could start packing and sending t-shirts from Kickstarter HQ.

    Backer Addresses and Postage

    In general, backer addresses tended to be malformed in a couple of ways. The first was that people tended confuse “Line 1” and “Line 2” — they either put their Apt # first, then street, or their Street then company.

    I also ran into problems with 20+ addresses from the North East because their zip-codes were had their leading zeros removed.

    Zip codes like 06897 became 6897 when opened in Google Docs or Excel because they were converted to numbers.

    In addition someone put “Meow, Meow” as their address. They didn’t get their shirt.

    To save on shipping, I did my research and chose First Class mail, which let me specify the ounces for each package. After weighing each style of shirt in an envelope (I correctly assumed the labels weren’t going to add any more weight), I had three tiers:

    • S / M white – 5oz – $1.98 postage
    • M / L shirts – 6oz – $2.15 postage
    • XL, XXL shirts – 7oz – $2.31 postage

    Sorting by whose shirts had already been delivered (all KSR staff, some friends and family), and removing those people from my CSV yielded 183 packages, summing to $370. I’d recommend keeping careful track of the rewards you ship vs. the rewards you intend to hand deliver.

    The cost to ship the same shirts using flat rate envelopes would have been $942.45, so I managed to save a lot by carefully weighing and picking First Class mail instead.

    After having lunch with my mom on a Saturday, she offered to help me stuff envelopes and ship the shirts. This was actually a lot of fun and I always forget how rewarding manual labor can be when the majority of my day to day work involves keyboards and LCD screens.

    My mom suggested to come up with a color coded system to manage shirt sizes & colors (envelopes marked with Blue represented a Large White shirt, for example). This worked well, but only because I had access to many different colored Sharpies.

    Fulfillment would have been chaos without some kind of organized system for tracking sizes and colors.

    Tyvek envelopes are great, until you realize they’re a little pricey; Staples sold 50 for $28, so $0.56 per envelope which added to the shipping cost. I probably could have ordered them for free from USPS if I had planned the shipping session in advance. In general I highly recommend using Tyvek envelopes as they’re much lighter, waterproof, and probably more durable than the cardboard flat-rate envelopes.

    Endicia Software

    I’m not sure how I would have addressed and processed all the envelopes without Endicia which is batch mailing software. I get the feeling many other creators have used it to fulfill their rewards. Endicia is free to use for 30 days, and then $15 a month to keep using it afterwards.

    The software allows you to import a CSV, but the requirements are very strict. The fields must be (in the following order):

    • Name
    • Company
    • Address1
    • Address2
    • City
    • State
    • Zip

    In order to correlate each person with a label and envelope with a t-shirt, I merged their size and color selection into the name field. So it looked like this for a XXL Grey shirt:

    John Smith XXL/G
    3105 Sturges Ridge
    Santa Rosa, California 95401

    This might have been a little odd for backers (are there privacy implications for exposing their shirt size to the post master?), but Endicia didn’t allow any other fields, so there was no where else to put this information on the label.

    I bought $500 worth of postage, but only ended up using $370, and was able to get a refund for the left over balance when I canceled my Endicia account.

    Printing Labels

    Printing labels from Endicia is very scary. You are shown this dialog box (but replace 7 with 180, worth $370):

    I did one test print of a label and it seemed OK, so I went with through with the big batch. After that Endicia automatically opened a file inside my /tmp/private directory with a number of rejected addresses, most of which had the ZIP code problem. This was a time consuming and stressful process because any mistake would mean lost money on postage.

    After I was done printing the postage from Endicia, I realized I could have sent the batch to a PDF instead of the actual printer, and it would have mitigated some of the risk. Without storing my labels somewhere, if my printer had gone off line or my computer would have crashed, it was unclear how I would recover labels that were still stuck in the queue. I hated trusting the printer software this much, but the overall process went pretty smoothly.

    Internal Kickstarter Post-Mortem

    Once I shipped my shirts, I wrote up an internal email to Kickstarter staff detailing my fulfillment process. That email became the kernel for a number of discussions about how we could better improve the data processing creators face when delivering their rewards to backers.

    One solution to the dirty-address problem was to use an external service to validate the addresses supplied by backers.

    Using an external service to validate backer addresses turned out to solve two problems.

    First, it would ensure backers had the chance to confirm a valid address, which is always a good thing. Second, it would add a hyphen and the 4-digit add-on to US zip-codes, converting zip-codes like 11217 to strings such as 11217-1142.

    That extra hyphen would prevent applications like Google Docs and Excel from converting zip-codes like 06897 into numbers like 6897 (technically, the application would recognize the cell as containing a string so it wouldn’t attempt integer coercion).

    Preventing zip-codes from losing their preceding zero would mean software like Endicia wouldn’t reject addresses from the North East. So we decided to give it a shot.

    First, Jed did research on what external services we might like to use. Strike Iron emerged as one of the best options, so we began sending legacy addresses to their API in order to evaluate how many they’d be able to validate and correct. This back testing showed that Strike Iron would be able to supply valid addresses for the vast majority of the sample of the surveys we tried. It also showed that Strike Iron would even be able to suggest corrections for many otherwise undeliverable addresses.

    Since then, its been really exciting to watch Jed and Tieg build the actual data flow, and I’m super proud of how it turned out.

    So even though this is a somewhat behind-the-scenes change in the way Kickstarter processes data, its exciting to know that it will make the lives of many creators just a little bit easier.

  • Visualizing SOPA on Twitter

    When I heard that Tyler Gray at Public Knowledge was looking for someone to do some analysis on tweets that mentioned SOPA, I thought I might try Cytoscape (an open source tool used for biomedical research, but handy for large scale data visualization) to show some of the relationships between people discussing the controversial bill on Twitter.

    The result is a graph of the most active users referencing SOPA

    Public Knowledge worked with the Brick Factory to set up their slurp140 tool to record approximately 1.5 million tweets which Tyler sent me in the form 350mb CSV file. I first used Google Refine to clean and narrow the set down to only tweets which were replies to someone else. This left approximately 80,000 tweets which I then imported into R. I then ranked all of usernames by how often they appeared both as senders and recipients, and then picked the approximate top 1,000 users. Since replies are sent from one user to another, the graph is directed: each edge has a direction with an origin and an arrow pointing at the recipient. There are 1,021 nodes identified by their Twitter usernames, and 1,757 edges a good portion of which are labeled with the content of their tweet.

    Visualizing networks this large is more of an art than a science

    I’ve tried to strike a balance between visual complexity, aesthetics and readability of tweets, but you’ll find that this isn’t always successful. Sometimes tweets run into nodes, sometimes edges run into labels, and sometimes the graph feels like a total mess. But that messiness is part of what made the SOPA debate on so interesting over the last month.

    Thousands of people participating with plenty of cross talk.

    The colors and sizes of the nodes and edges are coded in the following ways:

    • A node and its label size is maps to the number of tweets both posted by a user and and mentioning a user. (Ex: @BarackObama is a huge node because so many people were tweeting at him about SOPA).
    • Node color represents the number of outgoing tweets. The greener the node, the more replies a user posted. (Ex: @Digiphile sent a lot of tweets mentioning SOPA.)
    • Edge thickness represents “edge betweeness” which is how many “shortest paths” that run through it. This is a rough measure of how central a given tweet is in a network. (Ex: @declanm and @mmasnick have a thick line connecting them because many other nodes are connected to the two through that tweet.)
    • Edge color represents the language of the tweet. (Ex: Tweets in English are blue, Spanish are yellow.)

    The nodes are positioned using an “force directed” algorithm which is typically designed for undirected graphs, but I found it to be the most visually compelling of Cytoscape’s layout options. To learn more about force directed graphs, take a look at this d3 tutorial visualizing the characters in Victor Hugo’s Les Misérables.

    To really browse the graph visit GigaPan where I’ve uploaded a 32,000 x 32,000 pixel version.

    I highly recommend GigaPan’s full screen mode. I’ve also created a couple snapshots on GigaPan that highlight interesting nodes: @BarackObama, @GoDaddy, and @LamarSmithTX21 and @DarellIssa.

    If you really want, you can also download the 36mb gigapixel file, the Cytoscape source file, and the PDF vector version of the network graph.

    Thanks again to Public Knowledge, The Brick Factory for providing the infrastructure to record the tweets, and everyone who has helped fight against SOPA and PIPA over the last couple of months, especially those who tweeted about it.

  • There’s No Such Thing as a Compulsory License for a Photo

    My friend Andy has a terrific post up about his ordeal settling with the photographer Jay Maisel over the threat of a copyright lawsuit. Chances are if, you’re reading this, you know about that. If you haven’t ready Andy’s story, go and read it and then come back.

    There’s one pointed question I’ve seen crop up in a number of conversations about the settlement:

    Isn’t it wrong that Andy chose to pay the licensing fees for the music but not for the photograph?

    This question makes the assumption that Andy could have paid the licensing fees to Maisel like he did for the music. He couldn’t have. This is because Jay Maisel refused to license the image and there’s no compulsory license for photography like there is for musical compositions.

    A compulsory license is what it sounds like: the owner of the underlying musical composition is required, by law, to license it to anyone who wants to use it at a predetermined rate. This prohibits song writers from picking and choosing who gets to perform their works. It also allows Andy to license, at a fair rate, the underlying song compositions from a Miles Davis album to make a new album of original recordings (remember, copyrights to recordings are different from copyrights to the compositions of a song).

    The copyright of photographic works, unlike works of music composition, is not subject to a compulsory license.

    This means that photographers, unlike song writers, can forbid anyone from reusing their work, whether it is for a poster or for an album cover.

    Now, artists like Jay Maisel obviously enjoy this absolute control over their work because it lets them dictate who uses their art and when. Song writers, unfortunately aren’t afforded to this their published works.

    So while no one could have prevented Andy from recording an album of remixed music written by Miles Davis — not even Miles Davis himself if he were alive — the same does not hold for a photo of Miles Davis.

    Remember, Maisel admitted he would have refused to license to Andy the rights to the photo. So Andy’s only option, short of not using the photo at all, was to use the 8-bit remix cover and wager it was a fair use.

    That Andy could, in one case, hire artists to legally remix music by paying a compulsory license, but in another case had to make an expensive and risky bet on fair use (a bet that didn’t pan out) feels unfair.

    Put another way: why are composers required to license their compositions at a fair rate to anyone, but yet virtually every other type of artist doesn’t have to play by the same rule?

    I doubt anyone would argue that song composition is a lesser art or any less deserving of full royalties than other arts.

    One reason is that the practicalities of compulsory rights for photographs (and other works) are hard to imagine. Music compositions are written, then performed, then recorded, whereas photographs are snapped and then printed. There’s no underlying right in a photograph (thank goodness) to its “composition” like there is for a piece of music. So that is part of why compulsory licenses for photos don’t exist.

    But I think another part of the story is that the law has evolved the musical compulsory license as an implicit acknowledgement that music compositions are both maleable and fundamental components to our culture. Compulsory licenses make possible everything from karaoke bars to cover bands to remixes like Andy’s. The alternative — allocating complete power to composers over who reuses their work — yields transactional costs on culture that are simply too high. The law hasn’t felt the same way for the visual works.

    So will other art forms, like photography, adopt compulsory licenses? I doubt it, but I can’t help but they’d be a great compromise in light of Andy’s settlement. I asked Andy over email whether he would have paid a mechanical license for the photo:

    “Absolutely. If the laws and protocols for remixing photos were as clear and fair as covering music, I would’ve bought a mechanical license for the photo in a heartbeat. But the laws around visual art are frustratingly vague, and requiring someone’s permission to create art that doesn’t affect the market for the original doesn’t seem right. I didn’t think it would be a problem, especially considering the scope of my project, but I was wrong. Nobody should need a law degree to understand whether art is legal or not.”

  • CrowdFlower NYU Event

    I did a panel on Crowdsourcing at SXSW this spring with Lukas, the CEO of CrowdFlower. Even if you made it to that, you should definitely know about this great event at NYU on April 13th:

    CrowdFlower and NYU present: NYC Crowdsourcing Meetup
    Join CrowdFlower for its first ever New York City meetup co-hosted with NYU

    Wednesday, April 13
    6:30-9pm
    44 West 4th Street, room M3-110

    Pizza, beer, and thought provoking conversation about the future of work.
    Come listen, ask, and debate how crowdsourcing is changing everything from philanthropy and urban planing to creative design and enterprise solutions.

    Confirmed Speakers:

    Bartek Ringwelski, CEO and Co-Founder of SkillSlate
    Panos Ipeirotis, Associate Professor at Stern School of Business, NYU
    Lukas Biewald, CEO and Co-Founder of CrowdFlower
    Amanda Michel, Director of Distributed Reporting at ProPublica
    Trebor Scholz, Associate Professor in Media & Culture at The New School University
    Todd Carter, CEO and Co-Founder of Tagasauris

    See you there!