Hipsters Inc http://hipstersinc.com http://hipstersinc.com/rss/ Hipsters Incorporated http://hipstersinc.com//blog/2008/4/10/been_busy/ Been Busy <p>I've been busy.</p> <p>Sometime back in February or March, I took up tenure at <a href="http://www.invitemedia.com/">Invite Media</a> in Philadelphia. Remember all that pissing and moaning I was doing about startups in Philadelphia? Yeah. Turns out I was wrong. This operation is a full-out Paul Graham party. There's not all too many people working here, but rest assured they're all bell-curve-busting smart. The kind of people where your jaw drops just a bit more every day you work with them. I had to interview and hire a lot of people at my last job, and I'm kind of in awe that these guys were able to pull that off. I was certainly never able to do so.</p> <p>It's a nice place. I take smoke breaks on the roof. I see a lot of stray balloons. Here's a picture.</p> <p><img src="/images/work_roof.jpg" alt="Smoke Breaks"/></p> <p>The work I do is the kind of work I dream of doing in my free time. They buy all the food. They buy whatever beers I want to drink. Now all I have to is make a convincing argument for the need of data visualization for the scale of raw data we are crunching. One track mind? Perhaps.</p> <p>We have interesting traffic patterns. These are really quick sketches, but here's how I see it in my mind:</p> <p><object type="application/x-shockwave-flash" width="389" height="300" data="http://vimeo.com/moogaloop.swf?clip_id=868319&amp;server=vimeo.com&amp;fullscreen=1&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=dddddd"> <param name="quality" value="best" /> <param name="allowfullscreen" value="true" /> <param name="scale" value="showAll" /> <param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=868319&amp;server=vimeo.com&amp;fullscreen=1&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=dddddd" /></object></p> <p>And here's how I want other people to see it:</p> <p><object type="application/x-shockwave-flash" width="389" height="300" data="http://vimeo.com/moogaloop.swf?clip_id=871298&amp;server=vimeo.com&amp;fullscreen=1&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=dddddd"> <param name="quality" value="best" /> <param name="allowfullscreen" value="true" /> <param name="scale" value="showAll" /> <param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=871298&amp;server=vimeo.com&amp;fullscreen=1&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=dddddd" /></object></p> <p>Or something close to that. People will sometimes call Tufte out for one reason or another. I often have a hard time disagreeing. He is a bit of an idealist. Regardless, visualization is the quickest and most efficient route between mounds of data and a concrete understanding. Often times, rules of business (read: over-the-top presentation) come in to play, and they can't be ignored on any practical scale. Tufte is a lever to pull -- an invaluable counterbalance you can't ignore while pursuing the flashier side of the art.</p> <p>That's just kind of rambling garbage, though. I'm still piecing together my thoughts on the subject. I believe the top 10% of people who have honed the skill of properly visualizing massive sets of data are going to be in a pretty sweet boat in the coming years, and I've been spending a lot of time sharpening that axe.</p> <p>But, mostly, there are a lot of posts I wanted to make, but felt that I shouldn't post them until remarking on the new job. A hasty, rambling post is sometimes needed.</p> http://hipstersinc.com//blog/2008/4/10/been_busy// Fri, 11 Apr 2008 04:00:00 +0000 http://hipstersinc.com//blog/2008/1/23/scala_and_processing/ New Toy: Scala and Processing <p>Now, I'm not claiming to be a <a href="http://www.scala-lang.org/">Scala</a> master, but hey. If I can half-heartedly try to tech people to code using <a href="http://processing.org">Processing</a>, maybe I can eat my own dog food. Scala, by the way, runs in the Java VM, and seems to integrate with Java mighty well. If functional languages make no sense to you, Scala is a nice stepping stone.</p> <p><img src="/images/p5_scala.jpg" alt="Running Code"/></p> <p>Aaaanyway...If you'd like to hop aboard my train of Scala education, here's how I'll be paying my way.</p> <h2>Path to Awesome</h2> <ul> <li><a href="http://processing.org/download/index.html">Snag Processing</a>. <a href="http://www.scala-lang.org/downloads/index.html">Snag Scala</a>.</li> <li>Make a new directory. Copy <code>core.jar</code> from Processings's <code>lib</code> folder.</li> <li>On a Unix-y system, run something like: <code>export CLASSPATH=.:core.jar</code></li> <li>If you're Windows, I <em>think</em> it goes: <code>set CLASSPATH=.;core.jar</code> -- but I could be wrong</li> <li>Crack open a new file. Let's call it <code>processingtest.scala</code>. Punch in the following:</li> </ul> <p><pre><code class="ruby">object <span class="co">ProcessingTest</span> extends processing.core.<span class="co">PApplet</span> { import processing.core._; override <span class="r">def</span> <span class="fu">setup</span>(): unit = { size(<span class="i">400</span>, <span class="i">300</span>, <span class="co">PConstants</span>.<span class="co">P3D</span>) noLoop } override <span class="r">def</span> <span class="fu">draw</span>(): unit = { background(<span class="i">51</span>) var i=<span class="i">0</span> <span class="r">while</span>(i &lt; <span class="i">100</span>) { pushMatrix fill(random(<span class="i">255</span>)) translate(random(width), random(height), random(<span class="i">-30</span>, <span class="i">30</span>)) box(random(<span class="i">10</span>, <span class="i">70</span>)); popMatrix i += <span class="i">1</span> } } <span class="r">def</span> <span class="fu">main</span>(args: <span class="co">Array</span>[<span class="co">String</span>]): unit = { var frame = new javax.swing.JFrame(<span class="s"><span class="dl">&quot;</span><span class="k">Test</span><span class="dl">&quot;</span></span>) var applet = <span class="co">ProcessingTest</span> frame.getContentPane().add(applet) applet.init frame.pack frame.setVisible(<span class="pc">true</span>) } } </code></pre><a class="small" href="javascript:toggle('10467380');">Copy/Paste</a><br/><textarea style="display:none" class="codebox" id="10467380">object ProcessingTest extends processing.core.PApplet { import processing.core._; override def setup(): unit = { size(400, 300, PConstants.P3D) noLoop } override def draw(): unit = { background(51) var i=0 while(i &lt; 100) { pushMatrix fill(random(255)) translate(random(width), random(height), random(-30, 30)) box(random(10, 70)); popMatrix i += 1 } } def main(args: Array[String]): unit = { var frame = new javax.swing.JFrame("Test") var applet = ProcessingTest frame.getContentPane().add(applet) applet.init frame.pack frame.setVisible(true) } } </textarea></p> <ul> <li>Run something along the lines of: <code>scalac processingtest.scala &amp;&amp; scala ProcessingTest</code></li> </ul> <p>Lovely. If you take out that <code>noLoop</code> statement, you'll see that the ol' girl is actually pretty quick. As for me, the big thing I'm getting out of this: Mixins. Holy crap. That's going to be awesome. And the ability to move back and forth...man.</p> <p>If/When this Scala Eclipse plugin gets semi-decent auto-completion, I'll probably just start screaming. Probably pretty loud. Auto-completion in my IDE is about the only reason I'll still defend Java.</p> <p>Oh, and sorry if I owe you an email. I've been all over the place. She's-a-comin'</p> http://hipstersinc.com//blog/2008/1/23/scala_and_processing// Wed, 23 Jan 2008 05:00:00 +0000 http://hipstersinc.com//blog/2008/1/18/pattern_matching/ An Interesting Algorithm: Pattern Matching Mosaic <p>A week or so ago, <a href="http://www.muralmosaic.com/adam.html">this</a> picture was making the rounds. A couple different people had smaller copies of it, but I was unable to find out who actually made it. Because the instances of the picture I saw were quite small, I assumed it was assembled by some crazy algorithm with a huge corpus of art to compare.</p> <p>So, of course, I spent the next day or two thinking about what that algorithm would look like. My friend, <a href="http://www.jnovatnack.com/">John</a>, lent me a number of really interesting Computer Vision books when he moved over the summer. I remembered reading a chapter on <a href="http://en.wikipedia.org/wiki/Template_matching">template matching</a>. Turns out that won't really do the trick, but it's close.</p> <p>Long story short: The original picture that was floating around was actually just planned out and painted, so I tried to implement my algorithm.</p> <p><a href="/images/pattern_matching_large.jpg"><img src="/images/pattern_matching_small.jpg"/></a></p> <p>The <a href="http://flickr.com/photos/stehcw/165961469/">test picture</a> was taken by <a href="http://flickr.com/photos/stehcw/">Steh</a>. It's pretty high up on the list when you look for "interesting" photos tagged "face" on Flickr.</p> <p>Anyway, the corpus of search images was entirely too small for this undertaking. However, after browsing through the output, I believe it's probably close to correct. If not, it's on the right path. If you click on the image above, you can see some neat things going on. For example, on both sides of her neck, the algorithm found hair in a similar alignment. Man. That sounded a bit creepier than I wanted.</p> <p>But! The fun part! I've been looking for a good excuse to start playing with <a href="http://lucene.apache.org/hadoop/">Hadoop</a> for a while. I've gone through their grep example and all that, but that just doesn't give the kind of joy I was expecting. Hadoop, by the way, is more-or-less a Java implementation of Google's Map Reduce algorithm. And, it's sweet.</p> <p>There is a level of nirvana you never know until you get 12 CPUs absolutely pegged. I can only imagine the euphoria of having access to a proper cluster.</p> <p>So, I'm going to keep working on this. Right now, I'm trying to have transforms not love contrast so damn much. I think a once-over with the ol' profiler could also do some good.</p> http://hipstersinc.com//blog/2008/1/18/pattern_matching// Fri, 18 Jan 2008 05:00:00 +0000 http://hipstersinc.com//blog/2008/1/13/tilley/ Tilley <p>So, I read that The New Yorker was having some manner of <a href="http://www.newyorker.com/online/covers/slideshow_tilleycovers">cover competition</a>. Seeing as my illustrative talents end with Wolf Blizter's glorious, glorious face, I though I'd try something a bit more algorithmic. Whelp.</p> <p><a href="/images/tilley_large.jpg"><img src="/images/tilley.jpg" alt="Tilley"/></a></p> <p>It's all the New Yorker covers arranged chronologically. There are important historical events along the left spine, and little lines connecting them to the proper issues. See?</p> <p><img src="/images/tilley_zoom.jpg" alt="Tilley Zoom"/></p> <p>I know it doesn't look like I spent the whole weekend on it, but hey. We all make mistakes. Did you know there's somewhere around 3,700 issues of the New Yorker? Did you know they skip a semi-random number of issues per year in some semi-random fashion? Given a flat set of images of issue covers, how would you figure out which issues fell on which dates? I'll give you a hint: It's really fun.</p> <p><object type="application/x-shockwave-flash" width="389" height="300" data="http://vimeo.com/moogaloop.swf?clip_id=606798&amp;server=vimeo.com&amp;fullscreen=1&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=dddddd"> <param name="quality" value="best" /> <param name="allowfullscreen" value="true" /> <param name="scale" value="showAll" /> <param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=606798&amp;server=vimeo.com&amp;fullscreen=1&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=dddddd" /></object></p> http://hipstersinc.com//blog/2008/1/13/tilley// Sun, 13 Jan 2008 05:00:00 +0000 http://hipstersinc.com//blog/2008/1/4/flocking/ Getting some flocking out of my system <p>I felt like blowing off some thinking-too-hard steam by whipping up a little gravity/flocking sketch. After using Processing for a little under a year now, it's amazing how quickly sketches like this come together. For example, I have a Target3D interface with a couple different implementations...this one just uses some Brownian motion. It gives the particles something to steer towards. There's the hacked up Vector3 class, and an often-reached-for <a href="/src/RingList.java">RingList.java</a>. It's a few lines of glue, and you're off.</p> <p>It's just nice to crack open Eclipse, and go straight to tweaking The Interesting Stuff.</p> <p>I tried focusing only on color for the first one.</p> <p><object type="application/x-shockwave-flash" width="389" height="300" data="http://vimeo.com/moogaloop.swf?clip_id=467076&amp;server=vimeo.com&amp;fullscreen=1&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=dddddd"> <param name="quality" value="best" /> <param name="allowfullscreen" value="true" /> <param name="scale" value="showAll" /> <param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=467076&amp;server=vimeo.com&amp;fullscreen=1&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=dddddd" /></object></p> <p>Then, I tried focusing only on shape for the second fellow. Totally inspired by Robert Hodgin's batshit <a href="http://www.flight404.com/blog/?p=83">prints shown here</a> (the non-butterfly ones).</p> <p><a href="/images/rayswarm.jpg"><img src="/images/rayswarm_small.jpg"/></a></p> <p>That shallow depth of field really gets me going. These are both the same chunk of code, with the same random seed, so there's some spot where the line up, but I didn't really feel like tracing that down. I have a feeling I edited that out of the color one.</p> <p><object type="application/x-shockwave-flash" width="389" height="300" data="http://vimeo.com/moogaloop.swf?clip_id=469680&amp;server=vimeo.com&amp;fullscreen=1&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=dddddd"> <param name="quality" value="best" /> <param name="allowfullscreen" value="true" /> <param name="scale" value="showAll" /> <param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=469680&amp;server=vimeo.com&amp;fullscreen=1&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=dddddd" /></object></p> <p>Yeah, it's quick. I think I'm entirely incapable of waiting longer than an evening for something to render.</p> <p>Oh, yeah. And careful with that RingList. It's <em>barely</em> implemented. I just thought I'd share. I'm using it for the tails in this code.</p> http://hipstersinc.com//blog/2008/1/4/flocking// Fri, 04 Jan 2008 05:00:00 +0000 http://hipstersinc.com//blog/2007/12/28/wolf_blitzer_speaks/ Wolf Blitzer Speaks <p>Ladies and Gentleman, your 2008 wallpaper.</p> <p><a href="/images/blitzer_large.jpg"><img src="/images/blitzer_small.jpg" alt="Wolf Blitzer"/></a></p> http://hipstersinc.com//blog/2007/12/28/wolf_blitzer_speaks// Fri, 28 Dec 2007 05:00:00 +0000 http://hipstersinc.com//blog/2007/12/24/big_squiggle/ Big Squiggle <p>I was working on tracking down the memory leak in <a href="/p5sunflow">P5Sunflow</a>, so I needed some large input. Well, that and I wanted to dust off the printer from the <a href="/blog/2007/6/10/another_music_visualization/">days of yore</a>. So, what would a ball of squiggles look like when the target is 24 by 24 inches at 300 DPI? Well...</p> <p><img src="/images/squiggle_big.jpg" alt="Big Squiggle with Detail"/></p> <p>And even the detailed box is scaled down quite a bit. Here's a neat Google Maps style thing to play with:</p> <iframe align="center" src="/squigglemap/" frameBorder="0" width="385" scrolling="no" height="385"></iframe> <p><a href="/squigglemap/">Same thing, full page</a>.</p> <p>2,500 ribbons. The scene file was just under 300M. It took Sunflow about 7 hours to do the whole thing. I have to say, that is a fine piece of software. I was watching its memory very closely. I gave it 2 gigs of RAM to use, it shot up to 908M after a minute or two, and just stayed there. I don't know if you've ever seen the tell-tale sawtooth of your average Java program's memory usage, but this wasn't it. Sunflow, literally, throughout the 7 hours, didn't deviate more than a megabyte. There is truly some magic going on in there.</p> <p>So, I just printed this fella out. After seeing it on paper, looking at it on a computer feels pretty stupid. There's something neat about huge high-resolution prints. You can so easily juggle the scale and the detail at the same time. It kind of seems impossible on a monitor. That, and anything will look good on watercolor paper. You can quote me on that.</p> <p>Also, I fiddled with the RSS feed the other day. Sorry if I spammed you.</p> http://hipstersinc.com//blog/2007/12/24/big_squiggle// Mon, 24 Dec 2007 05:00:00 +0000 http://hipstersinc.com//blog/2007/12/20/notaproblem/ A Little Freaky <p>I just got an email from a fine fellow by the name of <a href="http://www.mohdi.com/">Drew</a>. He sent me a link to one of his pieces, <a href="http://flickr.com/photos/mohdi/1893309170/">Not a problem</a>.</p> <p><img src="/images/not_a_problem.jpg" alt="Not A Problem by Drew Anderson"/></p> <p>Fucking freaky. There's something about that one in particular that seems so personal to me.</p> <p>That Internet. That shit'll get you every time. Whenever you think you did something neat, someone will always remind you that you're just dicking around.</p> <p>If none of this makes any sense to you, it's in reference to <a href="/blog/2007/12/19/reverse_engineering_visuals/">yesterday's post</a>.</p> http://hipstersinc.com//blog/2007/12/20/notaproblem// Thu, 20 Dec 2007 05:00:00 +0000 http://hipstersinc.com//blog/2007/12/19/reverse_engineering_visuals/ Reverse Engineering Visuals <p>My obsessions ebb and flow like the goddamn moon was tugging at them. It's not that I don't have the attention span, it's just that the further you dig into something, the more you discover. The deeper you dive, the greater the chance you'll find some gem that puts everything else on the back burner. Maybe not the back burner, but certainly applies a gaussian blur with a sizable kernel.</p> <p>I've become enthralled with reverse engineering visuals. You know, looking at some nondescript collection of pigment or concrete, and feeling an overwhelming need to pick it apart. Not in a critical sense, just in an algorithmic sense.</p> <p>During a cleaning spree in the not-too-distant past, I started scanning my old notebooks so I could throw them away. The high-school era ones were filled with squiggles like the following.</p> <p><img src="/images/squiggle.png" alt="Squigglething"/></p> <p>They're pretty ugly, and scream of being bored to tears, but I can't stop myself from dissecting their rules. The bands have a particular z-ordering. The curves have a pattern. The pen on paper produces a certain bit of semi-random noise. The kind of thing you start drawing on napkins and discussing with your girlfriend over dinner.</p> <p>As silly of an exercise as it may be, it needed to get worked out. And, of course, once you've approximated the algorithm, you can take it far beyond the original.</p> <p><img src="/images/squiggle2.png" alt="Rendered Squigglething"/></p> <p>When it comes to free time, I'm a big fan of taking something only as far as it makes you happy. This is such an example. It's not exact, but I've gotten the enjoyment of looking at it.</p> <p>I'm thinking about writing a book about reverse engineering things. Mainly visuals. Not because I have any talent for it, but because I find it so interesting. It also seems to be one of the few things I've ended up working on that I can explain to anyone at all.</p> <p>I don't really want to sell a book, I just want to write it. Cohesively. Seeing as my writing skills are so poor, I'd need an editor. I can dump information to a certain extent, but I'd never be able to assemble it.</p> <p>For example, I wear a lot of hats at my current place of employment. I gave <em>lookin' around notice</em> pretty recently. Among other things, I started assembling a huge document of everything one would need to know to do my job. It's an absolute mess. All cross-references and bullshit.</p> <p>Ramble.</p> <p><object type="application/x-shockwave-flash" width="389" height="300" data="http://vimeo.com/moogaloop.swf?clip_id=443646&amp;server=vimeo.com&amp;fullscreen=1&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=dddddd"> <param name="quality" value="best" /> <param name="allowfullscreen" value="true" /> <param name="scale" value="showAll" /> <param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=443646&amp;server=vimeo.com&amp;fullscreen=1&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=dddddd" /></object></p> <h2>P5Sunflow Things</h2> <p>This is the first project where I've had to eat my own dog food in regards to <a href="/p5sunflow">P5Sunflow</a>. Let it be known that, embarrassingly enough, it leaks massive amounts of memory between frames. If you're rendering one frame, there's not too big of a difference. If you have rendered multiple in one shot, I apologize profusely. That slightly-more-than-linear growth in your render time wasn't ray-tracing magic, it was your garbage collector. My bad.</p> <p>Another glaring bug...if you were getting out-of-bounds exceptions occasionally, that's also my fault. After looking at the code again, it's a really, really obvious bug that no one could have ever conceivably written. The most astonishing part is that it ran at all.</p> <p>I wanted to have a lot more glitter and glitz when moving the code from proof-of-concept to 0.0.1, but this is going to have to be a premature release. I'm going to try to find the time this weekend to track down the former. Observe! Subversion prowess! Regardless, I thank you for your enthusiasm up to this point.</p> http://hipstersinc.com//blog/2007/12/19/reverse_engineering_visuals// Wed, 19 Dec 2007 05:00:00 +0000 http://hipstersinc.com//blog/2007/12/16/hockey_chain/ Meg's Pretty Awesome <p>So, after a long night of drinking and juvenile fun with friends, I head back to <a href="http://ihearyoulikestories.com/">Meg's</a> place. We're just sitting in her room settling down. I'm at her desk with a pen trying to draw her some Perlin noise displaced line thing I was screwing with earlier in the day. Romantic, no?</p> <p>Anyway, she suddenly springs into action. "Hold on! I made you something!"</p> <p>And she hands me this:</p> <p><img src="/images/markov1.jpg" alt="Hockey Chain"/></p> <p>So, I get a good chuckle just because it's some silly thing. I'm playing with it in my hands, and she's still giving me a look like I'm missing something. She says "Look at the end."</p> <p><img src="/images/markov2.jpg" alt="Markov Chain"/></p> <p>A <a href="http://en.wikipedia.org/wiki/Markov_chain">Markov Chain</a>. I probably woke up the neighbors with the laugh that followed. Sorry fellas, she's spoken for.</p> http://hipstersinc.com//blog/2007/12/16/hockey_chain// Sun, 16 Dec 2007 05:00:00 +0000 http://hipstersinc.com//blog/2007/12/10/graffiti_particles/ Graffiti Input Particles <p>As noted all too often, I'm working a (what turns out to be very large) ruleset for graffiti. I'm not a huge fan of graffiti or anything, but it seems interesting. If you see generative graffiti on television, you'll immediately notice that it looks, well, generative. It's this neat little corner of art that people just can't seem to get right. How do the angles interact with each other? How often to the character glyphs alternate which angle the lean? What is the exact probability that a terminating line will end with an arrow?</p> <p>I've been measuring images for the past couple weeks trying to get the ruleset down.</p> <p>Anyway, to test this code, I needed some incoming paths. I set up a quick particle system that respondeds to music. Turns out, I liked how that looked on its own. This isn't supposed to look like graffiti, mind you. Just the shapes and motions being described.</p> <p><object type="application/x-shockwave-flash" width="389" height="300" data="http://vimeo.com/moogaloop.swf?clip_id=426612&amp;server=vimeo.com&amp;fullscreen=1&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=dddddd"> <param name="quality" value="best" /> <param name="allowfullscreen" value="true" /> <param name="scale" value="showAll" /> <param name="movie" value="http://vimeo.com/moogaloop.swf?clip_id=426612&amp;server=vimeo.com&amp;fullscreen=1&amp;show_title=0&amp;show_byline=0&amp;show_portrait=0&amp;color=dddddd" /></object></p> <p>Unrelated: Vimeo is really nice. The UI is incredible. They'll even let you upload crap in HD (as the above video has been). They have forums where they respond (and sometimes fix) your problems. Often within the day. I can't get that from places I pay money to. I don't have a point. I was just impressed.</p> <p>Also Unrelated: I'll be seeking employment around the new year.</p> http://hipstersinc.com//blog/2007/12/10/graffiti_particles// Mon, 10 Dec 2007 05:00:00 +0000