<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:wfw="http://wellformedweb.org/CommentAPI/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	xmlns:slash="http://purl.org/rss/1.0/modules/slash/"
	xmlns:georss="http://www.georss.org/georss" xmlns:geo="http://www.w3.org/2003/01/geo/wgs84_pos#" xmlns:media="http://search.yahoo.com/mrss/"
	>

<channel>
	<title>Code and Flames</title>
	<atom:link href="http://philippp.wordpress.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://philippp.wordpress.com</link>
	<description>The art of imperfect software and the habits that ruin it.</description>
	<lastBuildDate>Tue, 29 Jun 2010 06:27:32 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.com/</generator>
<cloud domain='philippp.wordpress.com' port='80' path='/?rsscloud=notify' registerProcedure='' protocol='http-post' />
<image>
		<url>http://s2.wp.com/i/buttonw-com.png</url>
		<title>Code and Flames</title>
		<link>http://philippp.wordpress.com</link>
	</image>
	<atom:link rel="search" type="application/opensearchdescription+xml" href="http://philippp.wordpress.com/osd.xml" title="Code and Flames" />
	<atom:link rel='hub' href='http://philippp.wordpress.com/?pushpress=hub'/>
		<item>
		<title>MySQLdb under OS X Leopard</title>
		<link>http://philippp.wordpress.com/2010/06/29/mysqldb-under-os-x-leopard/</link>
		<comments>http://philippp.wordpress.com/2010/06/29/mysqldb-under-os-x-leopard/#comments</comments>
		<pubDate>Tue, 29 Jun 2010 06:26:01 +0000</pubDate>
		<dc:creator>philippp</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Mysql]]></category>
		<category><![CDATA[OS X]]></category>
		<category><![CDATA[Python]]></category>

		<guid isPermaLink="false">http://philippp.wordpress.com/?p=66</guid>
		<description><![CDATA[Stubbed my toe on this earlier today: The MySQLdb adapter must be compiled using the same architecture as the python you want to use it with. OS X Leopard ships with 32-bit Python, so to install it I had to manually set ARCHFLAGS=&#8221;-arch i386&#8243; before building. Also, for some reason clean did not empty the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=philippp.wordpress.com&amp;blog=1238517&amp;post=66&amp;subd=philippp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Stubbed my toe on this earlier today: The MySQLdb adapter must be compiled using the same architecture as the python you want to use it with. OS X Leopard ships with 32-bit Python, so to install it I had to manually set<em> ARCHFLAGS=&#8221;-arch i386&#8243;</em> before building.</p>
<p>Also, for some reason clean did not empty the build directories. If you see a very short build (i.e. no compiler messages), manually clear the ./build directory.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/philippp.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/philippp.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/philippp.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/philippp.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/philippp.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/philippp.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/philippp.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/philippp.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/philippp.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/philippp.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/philippp.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/philippp.wordpress.com/66/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/philippp.wordpress.com/66/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/philippp.wordpress.com/66/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=philippp.wordpress.com&amp;blog=1238517&amp;post=66&amp;subd=philippp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://philippp.wordpress.com/2010/06/29/mysqldb-under-os-x-leopard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7e07c71cf34bb4a020a8fb2c81570dee?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">philippp</media:title>
		</media:content>
	</item>
		<item>
		<title>Improving the FB developer ecosystem</title>
		<link>http://philippp.wordpress.com/2010/05/31/improving-the-fb-developer-ecosystem/</link>
		<comments>http://philippp.wordpress.com/2010/05/31/improving-the-fb-developer-ecosystem/#comments</comments>
		<pubDate>Mon, 31 May 2010 10:16:08 +0000</pubDate>
		<dc:creator>philippp</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[developers]]></category>
		<category><![CDATA[facebook]]></category>
		<category><![CDATA[FB]]></category>
		<category><![CDATA[programming]]></category>

		<guid isPermaLink="false">http://philippp.wordpress.com/?p=64</guid>
		<description><![CDATA[Facebook and its third-party developers have certainly had their conflicts, and I admire facebook for attempting to herd such a wild bunch of cats. Still, there are some minor features that could significantly improve the developer experience AND the quality of user statistics facebook is able to gather. Facebook desires true user statistics &#8212; what [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=philippp.wordpress.com&amp;blog=1238517&amp;post=64&amp;subd=philippp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Facebook and its third-party developers have certainly had their conflicts, and I admire facebook for attempting to herd such a wild bunch of cats. Still, there are some minor features that could significantly improve the developer experience AND the quality of user statistics facebook is able to gather. Facebook desires true user statistics &#8212; what user behavior is by demographic, for instance. Facebook has made it known that it does not want developers to link their developer accounts to &#8220;real&#8221; accounts, and its recent moves to &#8220;auto-correct&#8221; email addresses that are close matches to known email addresses has presented a burden to developers that follow an account&#8211;1@mail.net, account&#8211;2@mail.net, etc pattern.</p>
<p>I would love to see Facebook designate developer accounts and integrate these into the app development interface. Facebook users that have the developer application installed, should be able to create new developer accounts from within the developer app. These special developer accounts would only be friend-able with other developer accounts, and would allow easy account switching from within the Facebook chrome. These accounts would have auto-generated passwords and derivative email address (e.g. original&#8211;fbdev1@originalmail.com) and that can be used to recreate the conventional log-in experience.</p>
<p>Facebook would get clean user statistics by delineating a clear fake-account population, and developers would have an easy way to manage their various developer personas when developing multi-user experiences.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/philippp.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/philippp.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/philippp.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/philippp.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/philippp.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/philippp.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/philippp.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/philippp.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/philippp.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/philippp.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/philippp.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/philippp.wordpress.com/64/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/philippp.wordpress.com/64/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/philippp.wordpress.com/64/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=philippp.wordpress.com&amp;blog=1238517&amp;post=64&amp;subd=philippp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://philippp.wordpress.com/2010/05/31/improving-the-fb-developer-ecosystem/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7e07c71cf34bb4a020a8fb2c81570dee?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">philippp</media:title>
		</media:content>
	</item>
		<item>
		<title>As f8 has it, FB seems to hate map-reduce</title>
		<link>http://philippp.wordpress.com/2010/04/22/as-f8-has-it-fb-seems-to-hate-map-reduce/</link>
		<comments>http://philippp.wordpress.com/2010/04/22/as-f8-has-it-fb-seems-to-hate-map-reduce/#comments</comments>
		<pubDate>Thu, 22 Apr 2010 16:53:53 +0000</pubDate>
		<dc:creator>philippp</dc:creator>
				<category><![CDATA[Uncategorized]]></category>
		<category><![CDATA[Graph API]]></category>
		<category><![CDATA[FB Connect]]></category>
		<category><![CDATA[F8]]></category>

		<guid isPermaLink="false">http://philippp.wordpress.com/2010/04/22/as-f8-has-it-fb-seems-to-hate-map-reduce/</guid>
		<description><![CDATA[With the new Facebook Connect API, a lot of cool things are possible &#8212; updating a user&#8217;s profile metadata (such as favorite books or movies), simplification of authentication and simpler permissions, but there has been one major step back that I haven&#8217;t heard much about. It used to be possible (and still is, using the [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=philippp.wordpress.com&amp;blog=1238517&amp;post=61&amp;subd=philippp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>With the new Facebook Connect API, a lot of cool things are possible &#8212; updating a user&#8217;s profile metadata (such as favorite books or movies), simplification of authentication and simpler permissions, but there has been one major step back that I haven&#8217;t heard much about.</p>
<p>It used to be possible (and still is, using the old APIs) to simply request all of a users&#8217; friends, including their favorite movies, music, books, etc. This is powerful: For example, if you are planning a party using FB invites, and Pandora uses the FB Connect API, Pandora could make two calls to get the list of confirmed attendees&#8217;, and another to get the attendee&#8217;s favorite music &#8212; and generate a playlist that features at least some of their favorite tunes.</p>
<p>In the graph API, music is a &#8216;connection&#8217; between users, and there&#8217;s no obvious way to query for connections for a set of users. So instead of two calls, it&#8217;s one call to get the list of attendees, and N calls to get the favorite artists for N attendees.</p>
<p>I understand if FB wants to simplify their API to reduce their computational cost, but doing what&#8217;s effectively map-reduce makes more sense on the side where the data is available locally, all other things being equal.</p>
<p>I&#8217;d love to get their official stance on this, but the FB Dev Forums are effectively down: The FB Connect button doesn&#8217;t respond, and a manual registration leads to a &#8220;could not open socket&#8221; 500 error.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/philippp.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/philippp.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/philippp.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/philippp.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/philippp.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/philippp.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/philippp.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/philippp.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/philippp.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/philippp.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/philippp.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/philippp.wordpress.com/61/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/philippp.wordpress.com/61/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/philippp.wordpress.com/61/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=philippp.wordpress.com&amp;blog=1238517&amp;post=61&amp;subd=philippp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://philippp.wordpress.com/2010/04/22/as-f8-has-it-fb-seems-to-hate-map-reduce/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7e07c71cf34bb4a020a8fb2c81570dee?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">philippp</media:title>
		</media:content>
	</item>
		<item>
		<title>Using onKeyDown to check for form submission is bad, mmk?</title>
		<link>http://philippp.wordpress.com/2009/03/04/using-onkeydown-to-check-for-form-submission-is-bad-mmk/</link>
		<comments>http://philippp.wordpress.com/2009/03/04/using-onkeydown-to-check-for-form-submission-is-bad-mmk/#comments</comments>
		<pubDate>Thu, 05 Mar 2009 01:31:36 +0000</pubDate>
		<dc:creator>philippp</dc:creator>
				<category><![CDATA[Flames]]></category>

		<guid isPermaLink="false">http://philippp.wordpress.com/?p=53</guid>
		<description><![CDATA[Always use onsubmit on your surrounding form element. Web browsers are not uniform in their interpretation of events registered to input elements outside of forms.<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=philippp.wordpress.com&amp;blog=1238517&amp;post=53&amp;subd=philippp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p><img class="alignright size-full wp-image-54" title="Virgin America Screencap" src="http://philippp.files.wordpress.com/2009/03/picture-1.png?w=342&#038;h=440" alt="Virgin America Screencap" width="342" height="440" />I&#8217;m a big fan of AJAX submission of forms. Recently I&#8217;ve gotten lazy and omitted the FORM tag for single (and dual) input interfaces, instead checking for enter-keypress form submission using the onKeyDown event on my form elements.</p>
<p>This lazyness is now biting me in the butt when using Virgin America, Washington Mutual, and many other commercial sites. When the user is entering text into a text input element, many browsers present a pull-down menu of previous inputs for similar fields.</p>
<p>Using latest FireFox on OS X, the enter event on the browser&#8217;s drop down menu is propagated to the HTML input element. Although I pressed enter in the context of a browser interface component, the event is propagated to the page element, where it triggers form submission.</p>
<p>Lesson learned: Always use onsubmit on your surrounding form element. Don&#8217;t have a form element? You might be unpleasantly surprised that IE6 will create one for you, using all input elements on the page as form elements and the page&#8217;s URL as the POST destination. Remove ambiguity, remove fail.</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/philippp.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/philippp.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/philippp.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/philippp.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/philippp.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/philippp.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/philippp.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/philippp.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/philippp.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/philippp.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/philippp.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/philippp.wordpress.com/53/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/philippp.wordpress.com/53/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/philippp.wordpress.com/53/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=philippp.wordpress.com&amp;blog=1238517&amp;post=53&amp;subd=philippp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://philippp.wordpress.com/2009/03/04/using-onkeydown-to-check-for-form-submission-is-bad-mmk/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7e07c71cf34bb4a020a8fb2c81570dee?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">philippp</media:title>
		</media:content>

		<media:content url="http://philippp.files.wordpress.com/2009/03/picture-1.png" medium="image">
			<media:title type="html">Virgin America Screencap</media:title>
		</media:content>
	</item>
		<item>
		<title>New Challenge: ID3v2.4 autotagging w/ cover art in Python</title>
		<link>http://philippp.wordpress.com/2009/03/04/new-challenge-id3v24-autotagging-w-cover-art-in-python/</link>
		<comments>http://philippp.wordpress.com/2009/03/04/new-challenge-id3v24-autotagging-w-cover-art-in-python/#comments</comments>
		<pubDate>Wed, 04 Mar 2009 09:29:18 +0000</pubDate>
		<dc:creator>philippp</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://philippp.wordpress.com/?p=50</guid>
		<description><![CDATA[I&#8217;ve been ripping my CDs into directories for years, mostly keeping an Artist / Album structure. This has worked for almost a decade, as I&#8217;d invariably use a folder-based browser to choose music to listen to. I&#8217;ve recently migrated to using Apple products, including iTunes, and am missing out on a good portion of my [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=philippp.wordpress.com&amp;blog=1238517&amp;post=50&amp;subd=philippp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been ripping my CDs into directories for years, mostly keeping an Artist / Album structure. This has worked for almost a decade, as I&#8217;d invariably use a folder-based browser to choose music to listen to. I&#8217;ve recently migrated to using Apple products, including iTunes, and am missing out on a good portion of my archived music collection. I could go through the albums by hand, but would prefer a scalable solution.</p>
<h3>Existing tools:</h3>
<p><a href="http://code.google.com/p/quodlibet/wiki/Mutagen">Mutagen</a>: http://code.google.com/p/quodlibet/wiki/Mutagen<br />
Reads and writes ID3v2 and parses ID3v2.4 tags. Well-documented, clean code. I have not seen any code samples for writing the frame that holds the image, but this seems to be the best library out. If it doesn&#8217;t support it out of the box, it&#8217;d provide a great starting point for the feature.</p>
<p><a href="http://www.freedb.org/">FreeDB</a>: http://www.freedb.org/<br />
FreeDB is the public-domain offshoot of CDDB, a database of CD-media information (metadata). People add CDs into the system by scanning the CD and entering the Artist/Album/Tracks/etc by hand. CDDB then matches the starting/ending times of the individual tracks to the information provided by the user, and the next person who scans their CD gets that information for free. Although CDDB was bought by <a href="http://www.gracenote.com/">Gracenote</a>, the user-contributed information continues to be available through FreeDB.</p>
<p><a href="http://spacepants.org/src/pymad/">Pymad</a> and <a href="http://www.underbit.com/products/mad/">MAD</a>: http://spacepants.org/src/pymad/ and http://www.underbit.com/products/mad/<br />
Mpeg Audio Decoder and Python interface. Although I&#8217;m not terribly interested in playing MP3 files at the moment, this lets me measure the start and end times of each track. Since I ripped the tracks in full, I retrieve the album metadata using FreeDB.</p>
<p>My own <a href="http://github.com/philippp/albumparser/tree/master">directory parsing</a> code: http://github.com/philippp/albumparser/tree/master<br />
Parses a directory tree for groups of audio files and tries to infer Artist &#8211; Album information from the directory names.</p>
<h3>Strategy:</h3>
<p>Use my directory parser and mutagen to determine which albums need tagging<br />
Use pymad and freedb to retrieve neccessary metadata<br />
Use Amazon to retrieve cover art where available<br />
Use mutagen to write new metadata</p>
<br />  <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/philippp.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/philippp.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/philippp.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/philippp.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/philippp.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/philippp.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/philippp.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/philippp.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/philippp.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/philippp.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/philippp.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/philippp.wordpress.com/50/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/philippp.wordpress.com/50/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/philippp.wordpress.com/50/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=philippp.wordpress.com&amp;blog=1238517&amp;post=50&amp;subd=philippp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://philippp.wordpress.com/2009/03/04/new-challenge-id3v24-autotagging-w-cover-art-in-python/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7e07c71cf34bb4a020a8fb2c81570dee?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">philippp</media:title>
		</media:content>
	</item>
		<item>
		<title>Day 7: User-side walkthrough</title>
		<link>http://philippp.wordpress.com/2007/06/22/28/</link>
		<comments>http://philippp.wordpress.com/2007/06/22/28/#comments</comments>
		<pubDate>Fri, 22 Jun 2007 05:33:01 +0000</pubDate>
		<dc:creator>philippp</dc:creator>
				<category><![CDATA[Basecamp Visualization in Ruby on Rails]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://philippp.wordpress.com/2007/06/22/28/</guid>
		<description><![CDATA[The home view of the application presents two lists: People that are employed by Basecamp-account-owner company are shown on the left; Projects that exist in basecamp are listed on the right. Both lists have a special column that presents the link &#8220;View Time&#8221; for every row. The &#8220;View Time&#8221; link triggers a view showing detailed [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=philippp.wordpress.com&amp;blog=1238517&amp;post=28&amp;subd=philippp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The home view of the application presents two lists: People that are employed by Basecamp-account-owner company are shown on the left; Projects that exist in basecamp are listed on the right.  Both lists have a special column that presents the link &#8220;View Time&#8221; for every row.</p>
<p><a title="step-1_cropped.png" href="http://philippp.files.wordpress.com/2007/06/step-1_cropped.png"><img src="http://philippp.files.wordpress.com/2007/06/step-1_cropped.png?w=565&#038;h=184" border="0" alt="step-1_cropped.png" width="565" height="184" /></a><br />
The &#8220;View Time&#8221; link triggers a view showing detailed time information for the selected row. If the user clicks on &#8220;View Time&#8221; for a Person, the total hours logged on each date, against each project is presented as a line graph. Each line (data series) represents one Project on which the person worked, and dates increase along the x-axis. The sum of hours logged is shown along the Y-axis.</p>
<p>A list of all timeentries for this Person AND this Project is shown below the graph. The Person and Project columns are hidden automatically by ActiveScaffold (they are filter criteria and therefore all the same).</p>
<p><a title="step2_cropped.png" href="http://philippp.files.wordpress.com/2007/06/step2_cropped.png"><img src="http://philippp.files.wordpress.com/2007/06/step2_cropped.png?w=563&#038;h=467" border="0" alt="step2_cropped.png" width="563" height="467" /></a></p>
<p>Lastly, clicking on &#8220;View Time&#8221; for a Project shows the total number of hours logged by each Person that worked on the Project, per date. As in the previous graph, the date increases along then x-axis and the y-axis shows the total number of hours worked. In this view, the lines (data series) correspond to individuals who worked on the Project.</p>
<p><a title="step3_cropped.png" href="http://philippp.files.wordpress.com/2007/06/step3_cropped.png"><img src="http://philippp.files.wordpress.com/2007/06/step3_cropped.png?w=610&#038;h=442" border="0" alt="step3_cropped.png" width="610" height="442" /></a></p>
<p><em>That&#8217;s it!</em> There are a few things that need to be done before this project is &#8220;presentable,&#8221; but IMHO these are eventualities and do not invalidate my proof of concept:</p>
<ul>
<li>Functional testing
<ul>
<li>Improve abstraction of controller functions</li>
<li>Subclassing the graphing controller from Person and Project</li>
<li>Automated Functional test scripts</li>
</ul>
</li>
<li> Graph Readability
<ul>
<li>Resize, rotate, or filter the dates so they are readable</li>
</ul>
<ul>
<li>Resize the series legend so it fits on screen</li>
</ul>
</li>
<li>Basecamp object support
<ul>
<li>Expand beyond current set
<ul>
<li>Milestone</li>
<li>Todo-list, Todo-item</li>
</ul>
</li>
<li>Dynamic background (not at-once) caching</li>
<li>Logging/Study of bandwidth usage</li>
</ul>
</li>
</ul>
<p>&#8230;and many more. It&#8217;s not about that though &#8211;</p>
<p>I learned Ruby <em>and </em>Rails this week and am now ready to start a &#8220;real&#8221; project with it. Luckily I&#8217;ll be traveling for the next 3 weeks <em>without</em> a laptop and will have plenty of time to think of new challenges.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/philippp.wordpress.com/28/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/philippp.wordpress.com/28/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/philippp.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/philippp.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/philippp.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/philippp.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/philippp.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/philippp.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/philippp.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/philippp.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/philippp.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/philippp.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/philippp.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/philippp.wordpress.com/28/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/philippp.wordpress.com/28/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/philippp.wordpress.com/28/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=philippp.wordpress.com&amp;blog=1238517&amp;post=28&amp;subd=philippp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://philippp.wordpress.com/2007/06/22/28/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7e07c71cf34bb4a020a8fb2c81570dee?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">philippp</media:title>
		</media:content>

		<media:content url="http://philippp.files.wordpress.com/2007/06/step-1_cropped.png" medium="image">
			<media:title type="html">step-1_cropped.png</media:title>
		</media:content>

		<media:content url="http://philippp.files.wordpress.com/2007/06/step2_cropped.png" medium="image">
			<media:title type="html">step2_cropped.png</media:title>
		</media:content>

		<media:content url="http://philippp.files.wordpress.com/2007/06/step3_cropped.png" medium="image">
			<media:title type="html">step3_cropped.png</media:title>
		</media:content>
	</item>
		<item>
		<title>Day 7: The fix is in</title>
		<link>http://philippp.wordpress.com/2007/06/21/day-7-last-work/</link>
		<comments>http://philippp.wordpress.com/2007/06/21/day-7-last-work/#comments</comments>
		<pubDate>Fri, 22 Jun 2007 03:28:30 +0000</pubDate>
		<dc:creator>philippp</dc:creator>
				<category><![CDATA[Basecamp Visualization in Ruby on Rails]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://philippp.wordpress.com/2007/06/21/day-7-last-work/</guid>
		<description><![CDATA[Got back from Sumeet&#8217;s at 11:15 PM, determined to resolve the last issue barring me from displaying proper basecamp data. Discovered that &#8220;breakpointer&#8221; is un-officially broken in Ruby 1.8.5 &#8212; The official answer is that Ruby 1.8.5 fixes a bug that allowed breakpointer to work. Using script/console I was able to produce the following, which [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=philippp.wordpress.com&amp;blog=1238517&amp;post=20&amp;subd=philippp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>Got back from Sumeet&#8217;s at 11:15 PM, determined to resolve the last issue barring me from displaying proper basecamp data. Discovered that <a href="http://www.google.com/search?q=breakpointer+Ruby+1.8.5">&#8220;breakpointer&#8221; is un-officially broken in Ruby 1.8.5</a> &#8212; The official answer is that Ruby 1.8.5 fixes a bug that allowed breakpointer to work.</p>
<p>Using script/console I was able to produce the following, which could explain my problem:</p>
<pre>
&gt;&gt; date_hash = {}
=&gt; {}
&gt;&gt; (0..30).step(1) do |day_offset|
?&gt; date_hash[(Date.today-day_offset).to_s] = 0
&gt;&gt; end
=&gt; 0..30
&gt;&gt; date_hash
=&gt; {"2007-05-22"=&gt;0, "2007-06-01"=&gt;0, "2007-06-12"=&gt;0, "2007-05-23"=&gt;0, "2007-06-02"=&gt;0, "2007-06-13"=&gt;0, "2007-05-24"=&gt;0, "2007-06-03"=&gt;0, "2007-06-14"=&gt;0, "2007-05-25"=&gt;0, "2007-06-04"=&gt;0, "2007-06-15"=&gt;0, "2007-05-26"=&gt;0, "2007-06-05"=&gt;0, "2007-06-16"=&gt;0, "2007-05-27"=&gt;0, "2007-06-06"=&gt;0, "2007-06-17"=&gt;0, "2007-05-28"=&gt;0, "2007-06-07"=&gt;0, "2007-06-18"=&gt;0, "2007-05-29"=&gt;0, "2007-05-30"=&gt;0, "2007-06-08"=&gt;0, "2007-06-19"=&gt;0, "2007-06-20"=&gt;0, "2007-05-31"=&gt;0, "2007-06-09"=&gt;0, "2007-06-10"=&gt;0, "2007-06-21"=&gt;0, "2007-06-11"=&gt;0}
&gt;&gt;</pre>
<p>The date strings are not stored in the order that they are set (or sorted), but that is fixed easily enough with the Hash sort method.</p>
<p>This is the total time logged by a gentleman who works 8 hours a day and took a few days off &#8212; the different color lines are different projects he logged time to.</p>
<p><a href="http://philippp.files.wordpress.com/2007/06/correct.png" title="correct.png"><img src="http://philippp.files.wordpress.com/2007/06/correct.png?w=497" alt="correct.png" border="0" /></a></p>
<p>The next graph shows the time logged to a single project by everyone who logged time against it:</p>
<p><a href="http://philippp.files.wordpress.com/2007/06/project_correct.png" title="project_correct.png"><img src="http://philippp.files.wordpress.com/2007/06/project_correct.png?w=497" alt="project_correct.png" border="0" /></a></p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/philippp.wordpress.com/20/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/philippp.wordpress.com/20/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/philippp.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/philippp.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/philippp.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/philippp.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/philippp.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/philippp.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/philippp.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/philippp.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/philippp.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/philippp.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/philippp.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/philippp.wordpress.com/20/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/philippp.wordpress.com/20/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/philippp.wordpress.com/20/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=philippp.wordpress.com&amp;blog=1238517&amp;post=20&amp;subd=philippp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://philippp.wordpress.com/2007/06/21/day-7-last-work/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7e07c71cf34bb4a020a8fb2c81570dee?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">philippp</media:title>
		</media:content>

		<media:content url="http://philippp.files.wordpress.com/2007/06/correct.png" medium="image">
			<media:title type="html">correct.png</media:title>
		</media:content>

		<media:content url="http://philippp.files.wordpress.com/2007/06/project_correct.png" medium="image">
			<media:title type="html">project_correct.png</media:title>
		</media:content>
	</item>
		<item>
		<title>Day 7: One last issue</title>
		<link>http://philippp.wordpress.com/2007/06/21/day-7-one-last-issue/</link>
		<comments>http://philippp.wordpress.com/2007/06/21/day-7-one-last-issue/#comments</comments>
		<pubDate>Thu, 21 Jun 2007 20:46:47 +0000</pubDate>
		<dc:creator>philippp</dc:creator>
				<category><![CDATA[Basecamp Visualization in Ruby on Rails]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://philippp.wordpress.com/2007/06/21/day-7-one-last-issue/</guid>
		<description><![CDATA[I&#8217;ve written the controller logic to generate the graph. The controller filters the model data and configures the graph and tabulated time data for the view. One issue remains before I can call this a success: 0 values are generated for certain dates in the graph, although time data does not exhibit this pattern. I&#8217;ll [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=philippp.wordpress.com&amp;blog=1238517&amp;post=18&amp;subd=philippp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve written the controller logic to generate the graph. The controller filters the model data and configures the graph and tabulated time data for the view. One issue remains before I can call this a success: 0 values are generated for certain dates in the graph, although time data does not exhibit this pattern.</p>
<p><a href="http://philippp.files.wordpress.com/2007/06/extra0.png" title="extra0.png"><img src="http://philippp.files.wordpress.com/2007/06/extra0.png?w=497" alt="extra0.png" border="0" /></a></p>
<p>I&#8217;ll figure this out tonight with <strong>breakpoint</strong> (about time I learned that tool, anyway ;] ); right now I need to whip up some Dolmades for a dinner party and refresh my mind with good company. =)</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/philippp.wordpress.com/18/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/philippp.wordpress.com/18/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/philippp.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/philippp.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/philippp.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/philippp.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/philippp.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/philippp.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/philippp.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/philippp.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/philippp.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/philippp.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/philippp.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/philippp.wordpress.com/18/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/philippp.wordpress.com/18/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/philippp.wordpress.com/18/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=philippp.wordpress.com&amp;blog=1238517&amp;post=18&amp;subd=philippp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://philippp.wordpress.com/2007/06/21/day-7-one-last-issue/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7e07c71cf34bb4a020a8fb2c81570dee?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">philippp</media:title>
		</media:content>

		<media:content url="http://philippp.files.wordpress.com/2007/06/extra0.png" medium="image">
			<media:title type="html">extra0.png</media:title>
		</media:content>
	</item>
		<item>
		<title>Day 6: ActiveScaffold Snag: config.actions.exclude :edit vs. :update</title>
		<link>http://philippp.wordpress.com/2007/06/21/day-6-activescaffold-snag-configactionsexclude-edit-vs-update/</link>
		<comments>http://philippp.wordpress.com/2007/06/21/day-6-activescaffold-snag-configactionsexclude-edit-vs-update/#comments</comments>
		<pubDate>Thu, 21 Jun 2007 05:30:05 +0000</pubDate>
		<dc:creator>philippp</dc:creator>
				<category><![CDATA[Basecamp Visualization in Ruby on Rails]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://philippp.wordpress.com/2007/06/21/day-6-activescaffold-snag-configactionsexclude-edit-vs-update/</guid>
		<description><![CDATA[This is kind of annoying: To hide the &#8220;delete&#8221; button, exclude :delete; to hide the &#8220;search&#8221; button, disable :search; to hide the &#8220;show&#8221; button, exclude :show; to hide the &#8220;edit&#8221; button, disable :update. Come on guys!<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=philippp.wordpress.com&amp;blog=1238517&amp;post=15&amp;subd=philippp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>This is kind of annoying: To hide the &#8220;delete&#8221; button, exclude :delete; to hide the &#8220;search&#8221; button, disable :search; to hide the &#8220;show&#8221; button, exclude :show; <em>to hide the &#8220;edit&#8221; button, disable :update</em>. Come on guys!</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/philippp.wordpress.com/15/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/philippp.wordpress.com/15/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/philippp.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/philippp.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/philippp.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/philippp.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/philippp.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/philippp.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/philippp.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/philippp.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/philippp.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/philippp.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/philippp.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/philippp.wordpress.com/15/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/philippp.wordpress.com/15/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/philippp.wordpress.com/15/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=philippp.wordpress.com&amp;blog=1238517&amp;post=15&amp;subd=philippp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://philippp.wordpress.com/2007/06/21/day-6-activescaffold-snag-configactionsexclude-edit-vs-update/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7e07c71cf34bb4a020a8fb2c81570dee?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">philippp</media:title>
		</media:content>
	</item>
		<item>
		<title>Day 6: Custom action_links in ActiveScaffold</title>
		<link>http://philippp.wordpress.com/2007/06/20/day-6-custom-action_links-in-activescaffold/</link>
		<comments>http://philippp.wordpress.com/2007/06/20/day-6-custom-action_links-in-activescaffold/#comments</comments>
		<pubDate>Wed, 20 Jun 2007 19:01:48 +0000</pubDate>
		<dc:creator>philippp</dc:creator>
				<category><![CDATA[Basecamp Visualization in Ruby on Rails]]></category>
		<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://philippp.wordpress.com/2007/06/20/day-6-custom-action_links-in-activescaffold/</guid>
		<description><![CDATA[The Basecamp visualization application will provide time views for each Person and Project. The user selects the Person or Project from a table (rendered by ActiveScaffold) and indicates that statistics are to be shown by clicking a link in the cell. To link this view change to the ActiveScaffold row, we will use the action_link [...]<img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=philippp.wordpress.com&amp;blog=1238517&amp;post=14&amp;subd=philippp&amp;ref=&amp;feed=1" width="1" height="1" />]]></description>
			<content:encoded><![CDATA[<p>The Basecamp visualization application will provide time views for each Person and Project. The user selects the Person or Project from a table (rendered by ActiveScaffold) and indicates that statistics are to be shown by clicking a link in the cell.</p>
<p>To link this view change to the ActiveScaffold row, we will use the <a href="http://activescaffold.com/docs/api-action-link">action_link</a> property of our configuration. The API is regrettably sparse, but a little bit of digging brought up this <a href="http://wiki.activescaffold.com/wiki/show/Customizing+Links+in+ActiveScaffold">ActiveScaffold wiki entry</a> and an <a href="http://wiki.activescaffold.com/wiki/show/NewbieHelp">example at the end of the newbie guide</a>.</p>
<p>To keep things simple, I am currently presenting the data as a seperate barebones view. My Person controller code is:</p>
<p><strong>app/controllers/people_controller.rb</strong></p>
<pre>
class PeopleController &lt; ApplicationControllerlayout "activescaffold"
  active_scaffold(:person) do |config|
    config.label = "People"
    config.columns = [:first_name, :last_name, :title, :im_handle]
    config.columns[:im_handle].label = "IM Handle"
    config.actions.exclude :create, :delete, :edit, :show, :search
    config.action_links.add 'time_per_person', :label =&gt; "Time", :type =&gt; :record, :page =&gt; true
    list.columns.exclude :timeentries
    list.sorting = {:last_name =&gt; 'ASC'}
  end

  def time_per_person
    @buns = "foo"
  end

end</pre>
<p><em>config.action_links.add</em> breaks down like this:<br />
<em>Parameter 0</em>: String of the controller method to invoke (Ex: &#8216;time_per_person&#8217;)<br />
<em>:label </em>: Displayed label for the link (Ex: &#8220;Time&#8221;)<br />
<em>:type</em> : Is this link shown once per :record (row) or once per :table?<br />
<em>:page</em> : Load the result as a new view?<br />
time_per_person currently sets a test variable that is shown in the view:</p>
<p><strong>app/views/people/time_per_person.rhtml</strong></p>
<pre>&lt;%= @buns %&gt;</pre>
<p>This variable will hold my generated image&#8217;s filename and will be presented as an embedded image.</p>
<br /><img alt="" border="0" src="http://feeds.wordpress.com/1.0/categories/philippp.wordpress.com/14/" /> <img alt="" border="0" src="http://feeds.wordpress.com/1.0/tags/philippp.wordpress.com/14/" /> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gocomments/philippp.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/comments/philippp.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godelicious/philippp.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/delicious/philippp.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gofacebook/philippp.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/facebook/philippp.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gotwitter/philippp.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/twitter/philippp.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/gostumble/philippp.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/stumble/philippp.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/godigg/philippp.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/digg/philippp.wordpress.com/14/" /></a> <a rel="nofollow" href="http://feeds.wordpress.com/1.0/goreddit/philippp.wordpress.com/14/"><img alt="" border="0" src="http://feeds.wordpress.com/1.0/reddit/philippp.wordpress.com/14/" /></a> <img alt="" border="0" src="http://stats.wordpress.com/b.gif?host=philippp.wordpress.com&amp;blog=1238517&amp;post=14&amp;subd=philippp&amp;ref=&amp;feed=1" width="1" height="1" />]]></content:encoded>
			<wfw:commentRss>http://philippp.wordpress.com/2007/06/20/day-6-custom-action_links-in-activescaffold/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
	
		<media:content url="http://1.gravatar.com/avatar/7e07c71cf34bb4a020a8fb2c81570dee?s=96&#38;d=identicon&#38;r=G" medium="image">
			<media:title type="html">philippp</media:title>
		</media:content>
	</item>
	</channel>
</rss>
