<?xml version="1.0" encoding="UTF-8"?>
<?xml-stylesheet href="http://feeds.feedburner.com/~d/styles/itemcontent.css" type="text/css" media="screen"?><feed xmlns="http://www.w3.org/2005/Atom" xmlns:openSearch="http://a9.com/-/spec/opensearchrss/1.0/" xmlns:feedburner="http://rssnamespace.org/feedburner/ext/1.0"><id>tag:blogger.com,1999:blog-6938684</id><updated>2008-07-06T23:17:46.924-07:00</updated><title type="text">Kunal Anand - Blog</title><link rel="alternate" type="text/html" href="http://www.whatspop.com/blog/index.cfm" /><link rel="next" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default?start-index=26&amp;max-results=25" /><link rel="http://schemas.google.com/g/2005#feed" type="application/atom+xml" href="http://www.whatspop.com/blog/atom.xml" /><author><name>Kunal</name><uri>http://www.blogger.com/profile/03112009577236570204</uri><email>noreply@blogger.com</email></author><generator version="7.00" uri="http://www.blogger.com">Blogger</generator><openSearch:totalResults>96</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>25</openSearch:itemsPerPage><link rel="license" type="text/html" href="http://creativecommons.org/licenses/by-nc-sa/2.0/" /><logo>http://creativecommons.org/images/public/somerights20.gif</logo><link rel="self" href="http://feeds.feedburner.com/KunalAnand" type="application/atom+xml" /><feedburner:browserFriendly>This is an XML content feed. It is intended to be viewed in a newsreader or syndicated to another site.</feedburner:browserFriendly><entry><id>tag:blogger.com,1999:blog-6938684.post-1195059468525928595</id><published>2008-07-06T23:16:00.000-07:00</published><updated>2008-07-06T23:17:46.944-07:00</updated><title type="text">Six Strings and Virtualization</title><content type="html">I made two more mixed media pieces this long weekend, "Six Strings" and "Virtualization". To prevent streamlining the process, I really pushed myself to explore different colors, paper, imagery, and brush strokes.&lt;br /&gt;&lt;br /&gt;Here is "Six Strings":&lt;br /&gt;&lt;br /&gt;&lt;img src="http://www.whatspop.com/blog/uploads/sixstrings-small.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;Here is "Virtualization":&lt;br /&gt;&lt;br /&gt;&lt;img src="http://www.whatspop.com/blog/uploads/virtualization-small.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;Virtualization is probably my favorite of the lot. Nonetheless, I plan on shooting formal photos of the series and sending them off to various zines and creative outlets.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/KunalAnand?a=EJHhoJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/KunalAnand?i=EJHhoJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/KunalAnand/~3/328625784/six-strings-and-virtualization.cfm" title="Six Strings and Virtualization" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6938684&amp;postID=1195059468525928595" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://www.whatspop.com/blog/atom.xml" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default/1195059468525928595" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default/1195059468525928595" /><author><name>Kunal</name><uri>http://www.blogger.com/profile/03112009577236570204</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://www.whatspop.com/blog/2008/07/six-strings-and-virtualization.cfm</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6938684.post-9095964215978202175</id><published>2008-07-04T10:48:00.000-07:00</published><updated>2008-07-04T10:52:09.274-07:00</updated><title type="text">Source Monitor</title><content type="html">&lt;img src="http://www.whatspop.com/blog/uploads/source_monitor_small.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;A while ago, I decided to write a simple monitoring tool for check-ins into a source control repository. I debated for weeks on what medium I wanted to use: Flash, JavaScript, Processing, or Cocoa.&lt;br /&gt;&lt;br /&gt;I ended up selecting JavaScript, which allowed me to hone my &lt;a href="http://jquery.com/"&gt;jQuery&lt;/a&gt; skills. Unsurprisingly, the hardest part of this process was extracting metadata out of the source repository. I wrote a super simple change-set parser that targeted SVN repository (&lt;a href="http://pysvn.tigris.org/"&gt;pysvn&lt;/a&gt; came in handy). The parser was subsequently wrapped within a simple Python web server that output an appropriate JSON data structure. Let me tell you, jQuery loves munching on JSON.&lt;br /&gt;&lt;br /&gt;I ended up bringing this code base to MySpace, the land of TFS. It was astounding to see dozens of change-sets fly across the screen in such a short period of time. While I cannot offer up the code, here is a &lt;a href="http://www.whatspop.com/blog/uploads/source_monitor.mov"&gt;link to a video of a demo in action&lt;/a&gt;. The data in this demo is sliced from a local &lt;a href="http://newspyle.com"&gt;Newspyle&lt;/a&gt; repository.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/KunalAnand?a=aufvsJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/KunalAnand?i=aufvsJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/KunalAnand/~3/326808294/source-monitor.cfm" title="Source Monitor" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6938684&amp;postID=9095964215978202175" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://www.whatspop.com/blog/atom.xml" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default/9095964215978202175" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default/9095964215978202175" /><author><name>Kunal</name><uri>http://www.blogger.com/profile/03112009577236570204</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://www.whatspop.com/blog/2008/07/source-monitor.cfm</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6938684.post-4407787102995654387</id><published>2008-07-02T10:05:00.000-07:00</published><updated>2008-07-02T10:09:13.572-07:00</updated><title type="text">Open and Therapy</title><content type="html">Astute readers will notice that I've already posted various camera shots of "Open" before. I realized that those photos were not well composed and did not do the piece justice. That post was consequently summoned to the abyss. Since then, I worked on another collage, entitled "Therapy." The constraint for each was to not rely on a computer or digital graphics at all.&lt;br /&gt;&lt;br /&gt;Here is "Open":&lt;br /&gt;&lt;br /&gt;&lt;img src="http://www.whatspop.com/blog/uploads/open-small.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;Here is "Therapy":&lt;br /&gt;&lt;br /&gt;&lt;img src="http://www.whatspop.com/blog/uploads/therapy-small.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;Creating a piece like the above is simple yet involving. The basic tools required are: a sharp precision knife, a small cutting board, and a non-toxic glue stick. I already had a blank canvas and acrylics/brushes lying around from another abandoned traditional project. I wanted to try cardboard but felt that the acrylics would have done some funky things.&lt;br /&gt;&lt;br /&gt;There important lesson from creating these pieces is that there is no undo button, making planning the composition paramount. Forcing myself to be creative away from the computer feels great.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/KunalAnand?a=yW3rcJ"&gt;&lt;img src="http://feeds.feedburner.com/~f/KunalAnand?i=yW3rcJ" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/KunalAnand/~3/325045917/open-and-therapy.cfm" title="Open and Therapy" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6938684&amp;postID=4407787102995654387" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://www.whatspop.com/blog/atom.xml" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default/4407787102995654387" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default/4407787102995654387" /><author><name>Kunal</name><uri>http://www.blogger.com/profile/03112009577236570204</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://www.whatspop.com/blog/2008/07/open-and-therapy.cfm</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6938684.post-6333675981951449619</id><published>2008-06-20T15:38:00.000-07:00</published><updated>2008-06-20T15:45:18.375-07:00</updated><title type="text">Gamma</title><content type="html">&lt;img src="http://www.whatspop.com/blog/uploads/gamma-small.jpg" alt="Gamma" /&gt;&lt;br /&gt;&lt;br /&gt;I had a few moments last night and was able to generate another sketch for another &lt;a href="http://youtube.com/watch?v=xrd5VXNVp2I"&gt;iTunes advertisement&lt;/a&gt;. I managed to mix in some alpha channels of Photoshop brushes and am quite pleased with the output. I think it is time to move onto incorporating these techniques into a bigger project.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/KunalAnand?a=Z4oDbI"&gt;&lt;img src="http://feeds.feedburner.com/~f/KunalAnand?i=Z4oDbI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/KunalAnand/~3/316522671/gamma.cfm" title="Gamma" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6938684&amp;postID=6333675981951449619" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://www.whatspop.com/blog/atom.xml" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default/6333675981951449619" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default/6333675981951449619" /><author><name>Kunal</name><uri>http://www.blogger.com/profile/03112009577236570204</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://www.whatspop.com/blog/2008/06/gamma.cfm</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6938684.post-643607584855097484</id><published>2008-06-19T19:41:00.000-07:00</published><updated>2008-06-19T19:44:34.780-07:00</updated><title type="text">Brian Eno knows all</title><content type="html">Brian Eno's &lt;a href="http://kk.org/ct2/2008/06/unthinkable-futures.php"&gt;predictions from 1993&lt;/a&gt; are intriguing. What follows are a list of particular predictions and my thoughts.&lt;br /&gt;&lt;blockquote&gt;Abandoned highrise projects become the residence of choice for the new urban chic, changing hands for ever-increasing sums, until finally only lawyers and stockbrokers (skillfully posing as members of dispossessed minority groups) are able to afford them.&lt;/blockquote&gt;Abandoned industrial projects and warehouses are now being mildly renovated and re-branded as cool. Perhaps this is due to current economic pressures or another hipster trend. Whatever the case, I have seen this in both Los Angeles and Seattle.&lt;br /&gt;&lt;blockquote&gt;A new profession, meme-inspector, comes into being.&lt;/blockquote&gt;Eno was right on! First we had feed aggregators. As content became less scarce, new sites that performed low quantities of link mining and clustering popped up - these agents were forced to adopt filters. Eventually, big media businessmen grafted "produced" content (the ever nebulous word) into the news.&lt;br /&gt;&lt;blockquote&gt;News is understood to be a creation of our attention and interests (rather than "the truth") and news shows are redesigned as "thinktanks," where four interesting minds from different disciplines are asked the question, "So what do YOU think happened today?"&lt;/blockquote&gt;Another news-related prediction, but this one has not quite come to fruition. I would definitely enjoy watching people from different backgrounds talk and debate the daily headlines. Why has this not been done?&lt;br /&gt;&lt;br /&gt;I am inspired to put on the futurist hat and take a stab at a few predictions.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/KunalAnand?a=1EKnrI"&gt;&lt;img src="http://feeds.feedburner.com/~f/KunalAnand?i=1EKnrI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/KunalAnand/~3/315905728/brian-eno-knows-all.cfm" title="Brian Eno knows all" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6938684&amp;postID=643607584855097484" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://www.whatspop.com/blog/atom.xml" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default/643607584855097484" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default/643607584855097484" /><author><name>Kunal</name><uri>http://www.blogger.com/profile/03112009577236570204</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://www.whatspop.com/blog/2008/06/brian-eno-knows-all.cfm</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6938684.post-599076714234835321</id><published>2008-06-15T23:03:00.000-07:00</published><updated>2008-06-15T23:07:58.795-07:00</updated><title type="text">Mandolin</title><content type="html">&lt;img src="http://www.whatspop.com/blog/uploads/mandolin-small.jpg" alt="Mandolin" /&gt;&lt;br /&gt;&lt;br /&gt;This particular post is a continuation of a previous exploration of Core Graphics. The above snapshot is another piece of random output of a &lt;a href="http://www.youtube.com/watch?v=7gF7WuJMNlk"&gt;Paul McCartney iTunes advertisement&lt;/a&gt;. I love how grungy this one turned out. I can picture doing an entire graphic novel with this kind of treatment.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/KunalAnand?a=J2wveI"&gt;&lt;img src="http://feeds.feedburner.com/~f/KunalAnand?i=J2wveI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/KunalAnand/~3/312811825/mandolin.cfm" title="Mandolin" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6938684&amp;postID=599076714234835321" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://www.whatspop.com/blog/atom.xml" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default/599076714234835321" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default/599076714234835321" /><author><name>Kunal</name><uri>http://www.blogger.com/profile/03112009577236570204</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://www.whatspop.com/blog/2008/06/mandolin.cfm</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6938684.post-8063026734532758136</id><published>2008-06-15T22:59:00.000-07:00</published><updated>2008-06-15T23:08:33.624-07:00</updated><title type="text">Sonic</title><content type="html">&lt;img src="http://www.whatspop.com/blog/uploads/sonic-small.jpg" alt="Sonic" /&gt;&lt;br /&gt;&lt;br /&gt;I was playing around with some Objective-C this afternoon and ended up having some fun with Core Graphics the recent iTunes advertisement - you know, &lt;a href="http://www.youtube.com/watch?v=O3mYc1m3lsM"&gt;the one featuring Coldplay&lt;/a&gt;. Featured above is one of dozens of random experiments gone completely out of control. I will post another similar experiment shortly.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/KunalAnand?a=6PRxVI"&gt;&lt;img src="http://feeds.feedburner.com/~f/KunalAnand?i=6PRxVI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/KunalAnand/~3/312811826/sonic.cfm" title="Sonic" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6938684&amp;postID=8063026734532758136" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://www.whatspop.com/blog/atom.xml" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default/8063026734532758136" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default/8063026734532758136" /><author><name>Kunal</name><uri>http://www.blogger.com/profile/03112009577236570204</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://www.whatspop.com/blog/2008/06/sonic.cfm</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6938684.post-8523418058060460156</id><published>2008-06-04T08:42:00.001-07:00</published><updated>2008-06-19T17:14:51.931-07:00</updated><title type="text">Trying out Twitter</title><content type="html">As the title states, I'm giving the microblogging service a try. As of now, I'm planning on using Twitter to informally rant about my creative and development process. Feel free to &lt;a href="http://twitter.com/anandkunal"&gt;follow me&lt;/a&gt; (anandkunal).&lt;br /&gt;&lt;br /&gt;&lt;span style="font-weight:bold;"&gt;Update&lt;/span&gt; - After a few weeks of playing with the service, I am quitting Twitter. At the end of the day, I don't want to be broadcasting an imperial ton of signals into the web. I prefer taking the time to craft meaningful posts over bantering about random things. &lt;br /&gt;&lt;br /&gt;For the past six months I have been wanting to collapse all my online identities. Leaving Twitter is merely the start of something bigger; Flickr, Last.fm, and a bunch of other services are virtually useless to me. Even with all of its buzz, a service like FriendFeed just feels like a message board that has been decoupled from its content.&lt;br /&gt;&lt;br /&gt;I think it is safe to assume that my productivity will probably increase from these actions.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/KunalAnand?a=i3jmtI"&gt;&lt;img src="http://feeds.feedburner.com/~f/KunalAnand?i=i3jmtI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/KunalAnand/~3/304643376/trying-out-twitter.cfm" title="Trying out Twitter" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6938684&amp;postID=8523418058060460156" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://www.whatspop.com/blog/atom.xml" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default/8523418058060460156" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default/8523418058060460156" /><author><name>Kunal</name><uri>http://www.blogger.com/profile/03112009577236570204</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://www.whatspop.com/blog/2008/06/trying-out-twitter.cfm</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6938684.post-497983689545951227</id><published>2008-06-01T22:08:00.000-07:00</published><updated>2008-06-01T22:17:37.437-07:00</updated><title type="text">MySpace Status Typography Experiments</title><content type="html">&lt;a href="http://kunalanand.com/status/"&gt;&lt;img src="http://kunalanand.com/status/images/myspace-status-thin.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;I have been feeling a bit under the weather this weekend and decided to experiment with Quartz 2D, part of the Core Graphics framework. While these experiments aren't useful in understanding the data, they are quite pleasant to look at. I plan on printing these out as large posters and hanging them in the hallway at MySpace.&lt;br /&gt;&lt;br /&gt;Feel free to go ahead and &lt;a href="http://kunalanand.com/status/"&gt;view the project page&lt;/a&gt;.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/KunalAnand?a=oQVfHI"&gt;&lt;img src="http://feeds.feedburner.com/~f/KunalAnand?i=oQVfHI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/KunalAnand/~3/302744776/myspace-status-typography-experiments.cfm" title="MySpace Status Typography Experiments" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6938684&amp;postID=497983689545951227" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://www.whatspop.com/blog/atom.xml" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default/497983689545951227" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default/497983689545951227" /><author><name>Kunal</name><uri>http://www.blogger.com/profile/03112009577236570204</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://www.whatspop.com/blog/2008/06/myspace-status-typography-experiments.cfm</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6938684.post-6031435242685607903</id><published>2008-05-30T17:40:00.001-07:00</published><updated>2008-05-30T17:43:02.244-07:00</updated><title type="text">Abbey Road</title><content type="html">I came across this fantastic photo of Abbey Road:&lt;br /&gt;&lt;br /&gt;&lt;img src="http://farm3.static.flickr.com/2277/1732837188_30fd612456.jpg" /&gt;&lt;br /&gt;&lt;br /&gt;How would you classify this piece? The best that I could come up with is: traditional (non-digital) photo manipulation.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/KunalAnand?a=sdGeoH"&gt;&lt;img src="http://feeds.feedburner.com/~f/KunalAnand?i=sdGeoH" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/KunalAnand/~3/301583810/abbey-road.cfm" title="Abbey Road" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6938684&amp;postID=6031435242685607903" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://www.whatspop.com/blog/atom.xml" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default/6031435242685607903" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default/6031435242685607903" /><author><name>Kunal</name><uri>http://www.blogger.com/profile/03112009577236570204</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://www.whatspop.com/blog/2008/05/abbey-road.cfm</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6938684.post-8487231861079537247</id><published>2008-05-26T08:44:00.000-07:00</published><updated>2008-05-26T08:45:45.738-07:00</updated><title type="text">Static tweets</title><content type="html">It is pretty clear that Twitter has scalability problems these days. As an outsider looking in, I can only assume that their bottleneck has something to do with their infrastructure, comprised of cache(s) + database(s) + queue(s). This is of course nothing new. Organizations like MySpace and Facebook battle infrastructure scalability on a daily basis. I am ruling out Rails being a concern only because Twitter, like its Web 2.0 counterparts, has the option of allocating a brigade of web servers.&lt;br /&gt;&lt;br /&gt;User landing pages are probably the most hit pages. I think it's safe to assume that Twitter has probably already primed these to be served entirely from cache. Upon looking at the Twitter design a bit closer there is one thing that boggles my mind: pagination on user pages. As people tend to look through the long tail of tweets, Twitter's database has to get slammed; storing every tweet in cache is an awful waste of good memory.&lt;br /&gt;&lt;br /&gt;If this is in fact a pain point for Twitter then I propose adapting the site to follow the publishing model, which is something that Blogger already does today. Rather than having older/newer links at the bottom of every page, why not default to weekly/monthly archives that are statically generated? Otherwise, the publishing model falls apart. Imagine having to re-build more than one page for every user just for a single tweet. That could be some pretty high disk activity.&lt;br /&gt;&lt;br /&gt;They could even present a message at the top of the page to indicate that they are still processing/distributing tweets. But this is where it gets personal. I think it's better to have a full featured site that's a bit behind on data absorption than it is to disable features.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/KunalAnand?a=sytuuH"&gt;&lt;img src="http://feeds.feedburner.com/~f/KunalAnand?i=sytuuH" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/KunalAnand/~3/298464696/static-tweets.cfm" title="Static tweets" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6938684&amp;postID=8487231861079537247" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://www.whatspop.com/blog/atom.xml" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default/8487231861079537247" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default/8487231861079537247" /><author><name>Kunal</name><uri>http://www.blogger.com/profile/03112009577236570204</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://www.whatspop.com/blog/2008/05/static-tweets.cfm</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6938684.post-6398132609666004775</id><published>2008-05-24T18:20:00.000-07:00</published><updated>2008-05-24T18:21:00.879-07:00</updated><title type="text">Two kinds of hackers</title><content type="html">I have been able to observe two kinds of hackers in the field. The first is the independent hacker. This breed is capable of completing entire projects, from the spec to deployment, all on their own. The second is the group hacker. This subset becomes a better hacker when they are integrated within a small group of other hackers. As much as I want to be the former, I draw a great deal of inspiration from working with interesting people.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/KunalAnand?a=zn9rFH"&gt;&lt;img src="http://feeds.feedburner.com/~f/KunalAnand?i=zn9rFH" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/KunalAnand/~3/297493972/two-kinds-of-hackers.cfm" title="Two kinds of hackers" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6938684&amp;postID=6398132609666004775" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://www.whatspop.com/blog/atom.xml" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default/6398132609666004775" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default/6398132609666004775" /><author><name>Kunal</name><uri>http://www.blogger.com/profile/03112009577236570204</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://www.whatspop.com/blog/2008/05/two-kinds-of-hackers.cfm</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6938684.post-6218117971007045675</id><published>2008-04-13T22:24:00.000-07:00</published><updated>2008-04-13T22:26:19.637-07:00</updated><title type="text">Newspyle upgrades</title><content type="html">I finally got around to using the &lt;a href="http://apidoc.digg.com/"&gt;Digg API&lt;/a&gt;, which is superior to scraping the site. The change has prompted me to redesign the entire get/write process, which is a good thing. Also, I am starting to dig into the quirky JavaScript behavior in &lt;a href="http://webkit.org/projects/javascript/index.html"&gt;WebKit&lt;/a&gt;. Since I am using Safari as my default browser, I feel compelled to get this working properly. Finally, expect a mobile version of Newspyle soon.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/KunalAnand?a=WknBxI"&gt;&lt;img src="http://feeds.feedburner.com/~f/KunalAnand?i=WknBxI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/KunalAnand/~3/269804527/newspyle-upgrades.cfm" title="Newspyle upgrades" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6938684&amp;postID=6218117971007045675" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://www.whatspop.com/blog/atom.xml" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default/6218117971007045675" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default/6218117971007045675" /><author><name>Kunal</name><uri>http://www.blogger.com/profile/03112009577236570204</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://www.whatspop.com/blog/2008/04/newspyle-upgrades.cfm</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6938684.post-8431643920556245278</id><published>2008-04-13T11:52:00.000-07:00</published><updated>2008-04-13T12:03:51.132-07:00</updated><title type="text">looks del.icio.us</title><content type="html">&lt;a href="http://www.kunalanand.com/delicious"&gt;&lt;img src="http://www.kunalanand.com/delicious/images/looks_delicious_1.jpg" /&gt;&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;About a year and a half ago, I worked on a project to &lt;a href="http://whatspop.com/blog/2006/03/visualizing-my-delicious-tags.cfm"&gt;visualize del.icio.us tags&lt;/a&gt;. I created a layout engine and a neato graphics library in Python. A few weeks after the initial batch, I lost 90% of the code due to a hard disk failure. &lt;br /&gt;&lt;br /&gt;While I have not bothered to recreate the code, I want to showcase a fun little experiment. I asked a bunch of notable bloggers/friends/peeps to give me a dump of their del.icio.us links/tags. I proceeded to visualize their tag intersections while keeping an emphasis on aesthetics. Even though it was a long time ago, I am very pleased with the results!&lt;br /&gt;&lt;br /&gt;Go ahead and &lt;a href="http://www.kunalanand.com/delicious"&gt;view the project page&lt;/a&gt; for more awesomeness.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/KunalAnand?a=dGbbCI"&gt;&lt;img src="http://feeds.feedburner.com/~f/KunalAnand?i=dGbbCI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/KunalAnand/~3/269577326/looks-delicious.cfm" title="looks del.icio.us" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6938684&amp;postID=8431643920556245278" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://www.whatspop.com/blog/atom.xml" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default/8431643920556245278" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default/8431643920556245278" /><author><name>Kunal</name><uri>http://www.blogger.com/profile/03112009577236570204</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://www.whatspop.com/blog/2008/04/looks-delicious.cfm</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6938684.post-7647206692893242207</id><published>2008-03-28T20:30:00.001-07:00</published><updated>2008-03-28T20:30:31.830-07:00</updated><title type="text">Dependency management needed for JavaScript</title><content type="html">It would be interesting if someone created a dependency management system like "apt" for JavaScript libraries.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/KunalAnand?a=2N0P1I"&gt;&lt;img src="http://feeds.feedburner.com/~f/KunalAnand?i=2N0P1I" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/KunalAnand/~3/260017661/dependency-management-needed-for.cfm" title="Dependency management needed for JavaScript" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6938684&amp;postID=7647206692893242207" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://www.whatspop.com/blog/atom.xml" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default/7647206692893242207" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default/7647206692893242207" /><author><name>Kunal</name><uri>http://www.blogger.com/profile/03112009577236570204</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://www.whatspop.com/blog/2008/03/dependency-management-needed-for.cfm</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6938684.post-3532164173196856263</id><published>2008-03-09T23:34:00.000-07:00</published><updated>2008-03-09T23:47:52.876-07:00</updated><title type="text">My take on failure</title><content type="html">Up until taking his Series 7 examination, my younger brother was really nervous about failing. He asked me for preparation advice just two days shy of the exam. Rather than recanting study rituals or memorization tips, I confidently translated my core belief into English:&lt;br /&gt;&lt;blockquote&gt;In a world without failure, there is only hard work and success.&lt;/blockquote&gt;This is something that has resonated with me for years. I am impressed that I was able to distill this idea into few words.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/KunalAnand?a=oEcuXI"&gt;&lt;img src="http://feeds.feedburner.com/~f/KunalAnand?i=oEcuXI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/KunalAnand/~3/248713323/my-take-on-failure.cfm" title="My take on failure" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6938684&amp;postID=3532164173196856263" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://www.whatspop.com/blog/atom.xml" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default/3532164173196856263" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default/3532164173196856263" /><author><name>Kunal</name><uri>http://www.blogger.com/profile/03112009577236570204</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://www.whatspop.com/blog/2008/03/my-take-on-failure.cfm</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6938684.post-7047967514536732801</id><published>2008-03-09T23:25:00.000-07:00</published><updated>2008-03-09T23:29:42.211-07:00</updated><title type="text">Remembering old data</title><content type="html">So I caved in and picked up a new MacBook Pro. Having recently abandoned my iMac, this new laptop has become my primary workhorse. In the process of migrating data, I came across an old folder called "End of Babson Docs." Despite the descriptive label, I was curious as to what was stuffed in there...&lt;br /&gt;&lt;br /&gt;It turns out that in my final hours of graduating college I copied/pasted everything on my desktop, bookmarks, fonts, various Photoshop Tennis files, random digital experiments, 2-3 web server root directories, and a bunch of of stray documents. The crazy thing about looking at this old data is that I actually remember the significance of most of the 1,500+ files.&lt;br /&gt;&lt;br /&gt;The sad realization from all of this is that I may not be good with remembering names of acquaintances but I have no problem with recognizing old files and directory layouts. This is a new world.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/KunalAnand?a=TEcrLI"&gt;&lt;img src="http://feeds.feedburner.com/~f/KunalAnand?i=TEcrLI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/KunalAnand/~3/248707101/remembering-old-data.cfm" title="Remembering old data" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6938684&amp;postID=7047967514536732801" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://www.whatspop.com/blog/atom.xml" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default/7047967514536732801" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default/7047967514536732801" /><author><name>Kunal</name><uri>http://www.blogger.com/profile/03112009577236570204</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://www.whatspop.com/blog/2008/03/remembering-old-data.cfm</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6938684.post-7470927717575400740</id><published>2008-01-12T23:13:00.000-08:00</published><updated>2008-01-12T23:14:33.607-08:00</updated><title type="text">Developing Super Mario Galaxy</title><content type="html">Here is a taste from an &lt;a href="http://us.wii.com/iwata_asks_vol1_index.jsp"&gt;excellent series of interviews&lt;/a&gt; conducted by Nintendo President Satoru Iwata:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;I look at this as if I had borrowed a vegetable garden from Miyamoto-san. It was as if I had asked him, "Please let me borrow your secret garden. From it, I promise I will produce great things." Then I started sowing the seeds with my staff members, and after harvesting the crops and cooking the dish, we decided to have Miyamoto-san be the first one to taste it. He is the owner of the garden, after all. We sent every plate to Kyoto for him to sample, and he would comment back by saying things like, "this is a little too hot" or, "this tastes better". Towards the end of development, we had him come visit our "restaurant" in Tokyo. While he was here, we had him sample an unbelievable number of dishes. We had him eat until he was very full.&lt;/blockquote&gt;&lt;br /&gt;I am inspired to hunt down more game development interviews.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/KunalAnand?a=7YmJtI"&gt;&lt;img src="http://feeds.feedburner.com/~f/KunalAnand?i=7YmJtI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/KunalAnand/~3/215836610/developing-super-mario-galaxy.cfm" title="Developing Super Mario Galaxy" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6938684&amp;postID=7470927717575400740" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://www.whatspop.com/blog/atom.xml" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default/7470927717575400740" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default/7470927717575400740" /><author><name>Kunal</name><uri>http://www.blogger.com/profile/03112009577236570204</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://www.whatspop.com/blog/2008/01/developing-super-mario-galaxy.cfm</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6938684.post-4923722441329202020</id><published>2007-12-25T15:39:00.000-08:00</published><updated>2007-12-25T15:45:40.318-08:00</updated><title type="text">Hacking up Gmail macros for pagination</title><content type="html">I have spent the last few days cleaning out my Gmail with a little help from &lt;a href="http://blog.persistent.info/2007/11/macros-for-new-version-of-gmail.html"&gt;Mihais' macros&lt;/a&gt;. I love spelunking through email using nothing but the keyboard - it takes me back to my Stanford days when I mucked around with Pine.&lt;br /&gt;&lt;br /&gt;Despite the shortcuts, one thing has continuously irked me about Gmail - having to use the mouse to paginate. So, I hacked up Mihai's script to do pagination from the keyboard (using 1/2). Simply copy/paste the following blocks into 'actions': &lt;br /&gt;&lt;br /&gt;&lt;pre&gt;// 1: older page for all mail&lt;br /&gt;49: function() {&lt;br /&gt;    currentPage = GrabCurrentAllMailPage();&lt;br /&gt;    if (currentPage &gt;= 2) {&lt;br /&gt;        window.location.hash = "#all/p" + (currentPage-1);&lt;br /&gt;    }&lt;br /&gt;},&lt;br /&gt;&lt;br /&gt;// 2: newer page for all mail&lt;br /&gt;50: function() {&lt;br /&gt;    currentPage = GrabCurrentAllMailPage();&lt;br /&gt;    if (currentPage)&lt;br /&gt;    {&lt;br /&gt;        window.location.hash = "#all/p" + (currentPage+1);&lt;br /&gt;    }&lt;br /&gt;    else&lt;br /&gt;    {&lt;br /&gt;        window.location.hash = "#all/p2";&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;As you can see, both of those actions depend on the following helper function:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;// Check the url for a pagination link - if you see /p# extract the #&lt;br /&gt;// I should get a bit smarter and check the current page to do inbox routing&lt;br /&gt;function GrabCurrentAllMailPage() {&lt;br /&gt;    var pageArray = window.location.hash.match(/^(.*)(\/)(p)([0-9]+)(.*)$/);&lt;br /&gt;    // If there is no hash, or the regex fails, then test for properties&lt;br /&gt;    if (pageArray)&lt;br /&gt;    {&lt;br /&gt;        if (pageArray.length != 6) {&lt;br /&gt;            return 1;&lt;br /&gt;        }&lt;br /&gt;        else {&lt;br /&gt;            return parseInt(pageArray[4]);&lt;br /&gt;        }&lt;br /&gt;    }&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;I had previously used -/+ for pagination, but the - key code is 0 - which was getting in the way of deleting, which is #. Oddly, that key code is also zero. Is it because of the shift key modifier?&lt;br /&gt;&lt;br /&gt;Note, you must be on the all mail page for this to work properly. If you hit next page from the inbox, you will be routed to page 2 of all mail. Yeah, this is a bug and the code is totally ugly, but it's Christmas and I just want to read/clean my mail.&lt;br /&gt;&lt;br /&gt;Happy holidays to all!&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/KunalAnand?a=7suXZI"&gt;&lt;img src="http://feeds.feedburner.com/~f/KunalAnand?i=7suXZI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/KunalAnand/~3/206272814/hacking-up-gmail-macros-for-pagination.cfm" title="Hacking up Gmail macros for pagination" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6938684&amp;postID=4923722441329202020" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://www.whatspop.com/blog/atom.xml" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default/4923722441329202020" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default/4923722441329202020" /><author><name>Kunal</name><uri>http://www.blogger.com/profile/03112009577236570204</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://www.whatspop.com/blog/2007/12/hacking-up-gmail-macros-for-pagination.cfm</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6938684.post-6499281975002271780</id><published>2007-12-18T23:10:00.000-08:00</published><updated>2007-12-18T23:19:46.668-08:00</updated><title type="text">List methods that handle predicates in Python</title><content type="html">In continuation of a &lt;a href="http://www.whatspop.com/blog/2007/12/simple-predicates-using-lambdas-in.cfm"&gt;previous post&lt;/a&gt; of using predicates/lambdas in Python, I prepared some helpful list methods that you can drop into your current and future Python scripts. What follows in an introduction/walk-through of the five methods. Note, when I say predicate, I am referring to a literal value or a function pointer.&lt;br /&gt;&lt;br /&gt;Exists(predicate)&lt;br /&gt;* Returns true if the predicate is satisfied by at least one list member.&lt;br /&gt;&lt;br /&gt;FirstIndex(predicate)&lt;br /&gt;* Returns the first integer position in the list that satisfies the predicate.&lt;br /&gt;&lt;br /&gt;FirstValue(predicate)&lt;br /&gt;* Returns the first value in the list that satisfies the predicate.&lt;br /&gt;* Note, the returned value may be a complex object.&lt;br /&gt;&lt;br /&gt;LastIndex(predicate)&lt;br /&gt;* Returns the last integer position in the list that satisfies the predicate.&lt;br /&gt;&lt;br /&gt;LastValue(predicate)&lt;br /&gt;* Returns the last value in the list that satisfies the predicate.&lt;br /&gt;* Like FirstValue, the returned value may be complex.&lt;br /&gt;&lt;br /&gt;Bored? Here is the overloaded list, which I am dubbing 'PredicateList':&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;from types import FunctionType&lt;br /&gt;from UserList import UserList&lt;br /&gt;&lt;br /&gt;class PredicateList(UserList):&lt;br /&gt;    def Exists(self, predicate):&lt;br /&gt;        """Returns true if the predicate is satisfied by at least one list member."""&lt;br /&gt;        if type(predicate) is FunctionType:&lt;br /&gt;            for item in self.data:&lt;br /&gt;                if predicate(item):&lt;br /&gt;                    return True&lt;br /&gt;            return False&lt;br /&gt;        else:&lt;br /&gt;            return predicate in self.data&lt;br /&gt;&lt;br /&gt;    def GetIndex(self, predicate, reversed):&lt;br /&gt;        """Common functionality shared by FirstIndex and LastIndex."""&lt;br /&gt;        xr = xrange(len(self.data))&lt;br /&gt;        if reversed:&lt;br /&gt;            xr = xr.__reversed__()&lt;br /&gt;        for i in xr:&lt;br /&gt;            try:&lt;br /&gt;                if type(predicate) == FunctionType:&lt;br /&gt;                    if predicate(self.data[i]):&lt;br /&gt;                        return i&lt;br /&gt;                else:&lt;br /&gt;                    if self.data[i] == predicate:&lt;br /&gt;                        return i&lt;br /&gt;            # Function predicates that check object properties will fail on simple &lt;br /&gt;            # types like strings. This is rather unelegant, but works.&lt;br /&gt;            except AttributeError:&lt;br /&gt;                pass&lt;br /&gt;        return None&lt;br /&gt;    &lt;br /&gt;    def FirstIndex(self, predicate):&lt;br /&gt;        """Returns the first integer position in the list that satisfies the predicate."""&lt;br /&gt;        return self.GetIndex(predicate, False)&lt;br /&gt;    &lt;br /&gt;    def FirstValue(self, predicate):&lt;br /&gt;        """Returns the first value in the list that satisfies the predicate."""&lt;br /&gt;        firstObjectIndex = self.FirstIndex(predicate)&lt;br /&gt;        if not firstObjectIndex is None:&lt;br /&gt;            return self.data[firstObjectIndex]&lt;br /&gt;        else:&lt;br /&gt;            return None&lt;br /&gt;    &lt;br /&gt;    def LastIndex(self, predicate):&lt;br /&gt;        """Returns the last integer position in the list that satisfies the predicate."""&lt;br /&gt;        return self.GetIndex(predicate, True)&lt;br /&gt;    &lt;br /&gt;    def LastValue(self, predicate):&lt;br /&gt;        """Returns the last value in the list that satisfies the predicate."""&lt;br /&gt;        lastObjectIndex = self.LastIndex(predicate)&lt;br /&gt;        if not lastObjectIndex is None:&lt;br /&gt;            return self.data[lastObjectIndex]&lt;br /&gt;        else:&lt;br /&gt;            return None&lt;/pre&gt;&lt;br /&gt;Note, PredicateList extends UserList (this is found under your Python installation's lib/), which happens to be a Python wrapper for the list type. If you are curious, there is also a UserDict class that acts congruently for dictionaries. As you can see, everything above is straight-forward. I am however a bit embarrassed by catching the AttributeError exception; there is certainly a better way of accomplishing that - one way that comes to mind is to do a type check prior to grabbing the property value.&lt;br /&gt;&lt;br /&gt;Alright, with that out of the way here is an example use-case. Suppose I had a Person class that looked like the following:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;class Person():&lt;br /&gt;    def __init__(self, firstName, lastName):&lt;br /&gt;        self.firstName = firstName&lt;br /&gt;        self.lastName = lastName&lt;br /&gt;    def __str__(self):&lt;br /&gt;        return '%s %s' % (self.firstName, self.lastName)&lt;/pre&gt;&lt;br /&gt;Now let's initialize a PredicateList and append some members. Note, I would have preferred to have simply used the [] notation, but this will have to suffice:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;sampleList = PredicateList()&lt;br /&gt;&lt;br /&gt;sampleList.append('3')&lt;br /&gt;sampleList.append('2')&lt;br /&gt;sampleList.append('1')&lt;br /&gt;sampleList.append(Person('Joe', 'Shmoe'))&lt;br /&gt;sampleList.append('5')&lt;br /&gt;sampleList.append('2')&lt;br /&gt;&lt;br /&gt;print sampleList&lt;/pre&gt;&lt;br /&gt;Now, we can use the PredicateList like so:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;# Existence checks&lt;br /&gt;print sampleList.Exists('2')&lt;br /&gt;print sampleList.Exists(lambda x: x == '2')&lt;br /&gt;&lt;br /&gt;# First index checks&lt;br /&gt;print sampleList.FirstIndex('2')&lt;br /&gt;print sampleList.FirstIndex(lambda x: x == '2')&lt;br /&gt;&lt;br /&gt;# First object checks&lt;br /&gt;print sampleList.FirstValue('2')&lt;br /&gt;print sampleList.FirstValue(lambda person: person.firstName == 'Joe')&lt;br /&gt;&lt;br /&gt;# Last index checks&lt;br /&gt;print sampleList.LastIndex('2')&lt;br /&gt;print sampleList.LastIndex(lambda x: x == '2')&lt;br /&gt;&lt;br /&gt;# Last object checks&lt;br /&gt;print sampleList.LastValue('2')&lt;br /&gt;print sampleList.LastValue(lambda person: person.lastName == 'Shmoe')&lt;/pre&gt;&lt;br /&gt;There were things that I obviously omitted from this class. For instance, map() and filter() already take lambdas as function arguments, making operations like value casting and spawning new lists seem relatively simple. &lt;br /&gt;&lt;br /&gt;There may be an oversight in the code above as this was a really fun 10 minute exercise with the REPL. I always appreciate feedback, so feel free to &lt;a href="mailto:kunal.r.anand@gmail.com"&gt;drop me a line&lt;/a&gt;.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/KunalAnand?a=Q85DDI"&gt;&lt;img src="http://feeds.feedburner.com/~f/KunalAnand?i=Q85DDI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/KunalAnand/~3/202601717/list-methods-that-handle-predicates-in.cfm" title="List methods that handle predicates in Python" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6938684&amp;postID=6499281975002271780" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://www.whatspop.com/blog/atom.xml" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default/6499281975002271780" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default/6499281975002271780" /><author><name>Kunal</name><uri>http://www.blogger.com/profile/03112009577236570204</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://www.whatspop.com/blog/2007/12/list-methods-that-handle-predicates-in.cfm</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6938684.post-1617690700087925970</id><published>2007-12-10T09:54:00.001-08:00</published><updated>2007-12-10T10:01:35.780-08:00</updated><title type="text">An awesome Zune commercial</title><content type="html">&lt;embed src="http://zune-arts.net/flvplayer.swf" width="533" height="318" allowfullscreen="true" allowscriptaccess="always" flashvars="&amp;displayheight=300&amp;file=http://zune-arts.net/media/Films/swapmeet/IneterSwap_533.flv&amp;height=318&amp;width=533&amp;frontcolor=0xFFFFFF&amp;backcolor=0x888888&amp;lightcolor=0x888888&amp;showdigits=false"&gt;&lt;/embed&gt;&lt;br /&gt;&lt;br /&gt;I cannot express how much I love this clip - it's beautiful and has a great message. Whoever is heading the Zune marketing campaign at Microsoft seriously gets it. To me, this spot has much more personality than any iPod propaganda in the past few years. If you're curious, you can visit &lt;a href="http://zune-arts.net/"&gt;Zune Arts&lt;/a&gt;.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/KunalAnand?a=r6fLII"&gt;&lt;img src="http://feeds.feedburner.com/~f/KunalAnand?i=r6fLII" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/KunalAnand/~3/198167670/awesome-zune-commercial.cfm" title="An awesome Zune commercial" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6938684&amp;postID=1617690700087925970" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://www.whatspop.com/blog/atom.xml" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default/1617690700087925970" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default/1617690700087925970" /><author><name>Kunal</name><uri>http://www.blogger.com/profile/03112009577236570204</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://www.whatspop.com/blog/2007/12/awesome-zune-commercial.cfm</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6938684.post-5313303917574769101</id><published>2007-12-04T20:42:00.000-08:00</published><updated>2007-12-05T01:08:12.003-08:00</updated><title type="text">Simple predicates using lambdas in Python</title><content type="html">I have been spinning in Python for a few days now in an attempt to port some C# bits. In the C# codebase, I typically exercised the following:&lt;br /&gt;&lt;br /&gt;&lt;pre class="codeblock"&gt;List&lt;T&gt; list = new List&lt;T&gt;();&lt;br /&gt;list.Add(PreviouslyInstantiatedType); // Imagine many populators&lt;br /&gt;list.FindIndex(delegate(T) { T.someProperty == true; });&lt;/pre&gt;&lt;br /&gt;I love being able to pass in anonymous functions or function pointers around. Imagine building up a tree of nodes and returning the position in the tree where a given node's property has a specific value or a combination of values. Of course, the beauty of this relies on the underlying looping - boring stuff to constantly copy/paste throughout your code.&lt;br /&gt;&lt;br /&gt;So as I was writing the equivalent Python, I came up with:&lt;br /&gt;&lt;br /&gt;&lt;pre class="codeblock"&gt;list = []&lt;br /&gt;list.append(PreviouslyInstantiatedType)&lt;br /&gt;list.index(lambda x: x.someProperty == True)&lt;/pre&gt;&lt;br /&gt;Everything looks cool - right? Well, that doesn't seem to work. It turns out that index does not seem to like functions/lambdas as evaluators.&lt;br /&gt;&lt;br /&gt;Here is a first stab at implementing something for this. Note, I am just trying to cheaply clone C#'s list method "FindIndex" and have not checked out Python's list method "index."&lt;br /&gt;&lt;br /&gt;&lt;pre class="codeblock"&gt;def fIndex(f, list):&lt;br /&gt;    for i in xrange(len(list)):&lt;br /&gt;        if f(list[i]):&lt;br /&gt;            return i&lt;br /&gt;    return -1&lt;/pre&gt;&lt;br /&gt;This iterates through the provided list, and applies the function for every item. In this case, there should be some sort of type checking that the function is a boolean - rather than error catching.&lt;br /&gt;&lt;br /&gt;In putting all of this together, imagine the following object and list:&lt;br /&gt; &lt;br /&gt;&lt;pre class="codeblock"&gt;class person:&lt;br /&gt;    def __init__(self, firstName, lastName):&lt;br /&gt;        self.firstName = firstName&lt;br /&gt;        self.lastName = lastName&lt;br /&gt;&lt;br /&gt;people = [person('j','h'),person('k','a'),person('n','g')]&lt;/pre&gt;&lt;br /&gt;If someone asked me to print out the first position in the list where the person's last name is 'a', I would do:&lt;br /&gt;&lt;br /&gt;&lt;pre class="codeblock"&gt;print fIndex(lambda p: p.lastName == 'a', people)&lt;/pre&gt;&lt;br /&gt;This whole thing is extremely simple - but I am loving it.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/KunalAnand?a=Q4JNRI"&gt;&lt;img src="http://feeds.feedburner.com/~f/KunalAnand?i=Q4JNRI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/KunalAnand/~3/195338897/simple-predicates-using-lambdas-in.cfm" title="Simple predicates using lambdas in Python" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6938684&amp;postID=5313303917574769101" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://www.whatspop.com/blog/atom.xml" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default/5313303917574769101" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default/5313303917574769101" /><author><name>Kunal</name><uri>http://www.blogger.com/profile/03112009577236570204</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://www.whatspop.com/blog/2007/12/simple-predicates-using-lambdas-in.cfm</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6938684.post-1657621348713659834</id><published>2007-11-24T00:44:00.000-08:00</published><updated>2007-11-24T00:46:19.540-08:00</updated><title type="text">Meet Xavier</title><content type="html">I almost forgot to mention - I built a tiny Blogger-like thing called Xavier. It is written in Python and the entire source code (quite tiny) is &lt;a href="http://code.google.com/p/xavier/"&gt;available at Google Code&lt;/a&gt;. It's minimal and missing nearly everything (I did not even add syndication support) that a modern blog has. Once I clean/improve/expand code and features, I will convert my blog over to it.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/KunalAnand?a=OGglsI"&gt;&lt;img src="http://feeds.feedburner.com/~f/KunalAnand?i=OGglsI" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/KunalAnand/~3/189723013/meet-xavier.cfm" title="Meet Xavier" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6938684&amp;postID=1657621348713659834" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://www.whatspop.com/blog/atom.xml" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default/1657621348713659834" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default/1657621348713659834" /><author><name>Kunal</name><uri>http://www.blogger.com/profile/03112009577236570204</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://www.whatspop.com/blog/2007/11/meet-xavier.cfm</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6938684.post-163068413480606949</id><published>2007-04-09T23:22:00.000-07:00</published><updated>2007-04-09T23:23:31.618-07:00</updated><title type="text">JavaScript nulls</title><content type="html">I got burned by JavaScript today. Here is some code - note, I've reduced the code to the pedagogical issue:&lt;br /&gt;&lt;br /&gt;&lt;pre class="codeblock"&gt;function RunTest(a, b)&lt;br /&gt;{&lt;br /&gt;    test = null;&lt;br /&gt;&lt;br /&gt;    if (a == b) {&lt;br /&gt;        test = "They are the same.";&lt;br /&gt;    }&lt;br /&gt;&lt;br /&gt;    return escape(test);&lt;br /&gt;}&lt;/pre&gt;&lt;br /&gt;Provided the comparison fails, the returned value should be null. Yet in a failing case, JavaScript returns a string with the value of "null" - weird. I expected an exception, or even an empty string to be returned. As a tangent, you know you've spent a lot of time in a strongly typed language when you start complaining about throwing exceptions for functions that deal with nulls.&lt;br /&gt;&lt;br /&gt;In this case, if you have conditional logic that invokes the RunTest function, then testing for a null value (failing case) is useless. Fundamentally, you will never want to structure your workflow around nulls, but in case you do - just be careful.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/KunalAnand?a=aJMN3Yi2"&gt;&lt;img src="http://feeds.feedburner.com/~f/KunalAnand?i=aJMN3Yi2" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/KunalAnand/~3/107899203/javascript-nulls.cfm" title="JavaScript nulls" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6938684&amp;postID=163068413480606949" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://www.whatspop.com/blog/atom.xml" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default/163068413480606949" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default/163068413480606949" /><author><name>Kunal</name><uri>http://www.blogger.com/profile/03112009577236570204</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://www.whatspop.com/blog/2007/04/javascript-nulls.cfm</feedburner:origLink></entry><entry><id>tag:blogger.com,1999:blog-6938684.post-117074447178543434</id><published>2007-02-05T22:35:00.000-08:00</published><updated>2007-02-05T22:55:11.910-08:00</updated><title type="text">Failure -&gt; creativity -&gt; innovation</title><content type="html">My awesome co-worker &lt;a href="http://blog.heatxsink.com/"&gt;Nick&lt;/a&gt; just posted an entry entitled &lt;a href="http://blog.heatxsink.com/archives/2007/02/change_1.html"&gt;"Rush To Failure"&lt;/a&gt;, which is absolutely a must read. Here's an anecdotal excerpt to whet your appetite:&lt;br /&gt;&lt;blockquote&gt;...He said that when the four star general originally asked him how long it would take, he responded with 6 months. The general stated that you have one month, and you should use the "Rush to Failure" method. It's a method in which you get there as quick as you can, and try to make the thing break as many times as you can. With one other programmer he set out to do it. In exactly one month, he got it right, and got on a plane to the pentagon to demo his success. He was awarded a 5 million dollar contract, and the rest is history...&lt;/blockquote&gt;If there is one thing that I have realized while studying at colleges, running a startup, and working, is that it is &lt;em&gt;okay&lt;/em&gt; to fail. Through a wide array of problem-solving, failure has forced me to throw away principal approaches and be fearless to try something radically different. Besides, what's the worst that can happen? Failure leads to creativity, which can lead to innovation.&lt;div class="feedflare"&gt;
&lt;a href="http://feeds.feedburner.com/~f/KunalAnand?a=O5uSayN8"&gt;&lt;img src="http://feeds.feedburner.com/~f/KunalAnand?i=O5uSayN8" border="0"&gt;&lt;/img&gt;&lt;/a&gt;
&lt;/div&gt;</content><link rel="alternate" type="text/html" href="http://feeds.feedburner.com/~r/KunalAnand/~3/87101685/failure-creativity-innovation.cfm" title="Failure -&gt; creativity -&gt; innovation" /><link rel="replies" type="text/html" href="http://www.blogger.com/comment.g?blogID=6938684&amp;postID=117074447178543434" title="0 Comments" /><link rel="replies" type="application/atom+xml" href="http://www.whatspop.com/blog/atom.xml" title="Post Comments" /><link rel="self" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default/117074447178543434" /><link rel="edit" type="application/atom+xml" href="http://www.blogger.com/feeds/6938684/posts/default/117074447178543434" /><author><name>Kunal</name><uri>http://www.blogger.com/profile/03112009577236570204</uri><email>noreply@blogger.com</email></author><feedburner:origLink>http://www.whatspop.com/blog/2007/02/failure-creativity-innovation.cfm</feedburner:origLink></entry></feed>
