<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	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/"
		>
<channel>
	<title>Comments on: Calling all (Django) programmers&#8230; (I need advice)</title>
	<atom:link href="http://blog.localkinegrinds.com/2007/10/10/calling-all-django-programmers-i-need-advice/feed/" rel="self" type="application/rss+xml" />
	<link>http://blog.localkinegrinds.com/2007/10/10/calling-all-django-programmers-i-need-advice/</link>
	<description>Everything you&#039;ve ever thought, but never had the balls to say.</description>
	<lastBuildDate>Tue, 22 Nov 2011 07:17:58 +0000</lastBuildDate>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Garth Kidd</title>
		<link>http://blog.localkinegrinds.com/2007/10/10/calling-all-django-programmers-i-need-advice/comment-page-1/#comment-8270</link>
		<dc:creator>Garth Kidd</dc:creator>
		<pubDate>Fri, 19 Oct 2007 01:15:29 +0000</pubDate>
		<guid isPermaLink="false">http://blog.localkinegrinds.com/2007/10/10/calling-all-django-programmers-i-need-advice/#comment-8270</guid>
		<description>I love Ryan&#039;s proposal. Make sure you sort the ids. Thinking aloud in code... 

import md5
def friendlist_hash(friends): 
    &quot;&quot;&quot;Returns a 32-character digest based on `friends`, a 
    sequence of friend identifiers for which str() works.&quot;&quot;&quot;
    friendlist = list(friends)
    friendlist.sort()
    friendlist_text = &#039;, &#039;.join(&quot;%s&quot; % f for f in friendlist)
    return md5.md5(friendlist_text).digest().encode(&#039;hex&#039;)</description>
		<content:encoded><![CDATA[<p>I love Ryan&#8217;s proposal. Make sure you sort the ids. Thinking aloud in code&#8230; </p>
<p>import md5<br />
def friendlist_hash(friends):<br />
    &#8220;&#8221;"Returns a 32-character digest based on `friends`, a<br />
    sequence of friend identifiers for which str() works.&#8221;"&#8221;<br />
    friendlist = list(friends)<br />
    friendlist.sort()<br />
    friendlist_text = &#8216;, &#8216;.join(&#8220;%s&#8221; % f for f in friendlist)<br />
    return md5.md5(friendlist_text).digest().encode(&#8216;hex&#8217;)</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: ryankanno</title>
		<link>http://blog.localkinegrinds.com/2007/10/10/calling-all-django-programmers-i-need-advice/comment-page-1/#comment-8118</link>
		<dc:creator>ryankanno</dc:creator>
		<pubDate>Tue, 16 Oct 2007 19:12:33 +0000</pubDate>
		<guid isPermaLink="false">http://blog.localkinegrinds.com/2007/10/10/calling-all-django-programmers-i-need-advice/#comment-8118</guid>
		<description>Don&#039;t get me wrong, I love Python sets. :)

I was just curious to see of any unique solutions ie, along the trail of Ryan&#039;s.</description>
		<content:encoded><![CDATA[<p>Don&#8217;t get me wrong, I love Python sets. <img src='http://blog.localkinegrinds.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>I was just curious to see of any unique solutions ie, along the trail of Ryan&#8217;s.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Ryan Berg</title>
		<link>http://blog.localkinegrinds.com/2007/10/10/calling-all-django-programmers-i-need-advice/comment-page-1/#comment-7791</link>
		<dc:creator>Ryan Berg</dc:creator>
		<pubDate>Thu, 11 Oct 2007 14:47:40 +0000</pubDate>
		<guid isPermaLink="false">http://blog.localkinegrinds.com/2007/10/10/calling-all-django-programmers-i-need-advice/#comment-7791</guid>
		<description>Well you can&#039;t cache the IDs themselves per the TOS, but what about storing a sum of each user&#039;s friend IDs? Then you can check to see if the sum has changed.

I&#039;m itching to do some more Django/Facebook work. Fun stuff.</description>
		<content:encoded><![CDATA[<p>Well you can&#8217;t cache the IDs themselves per the TOS, but what about storing a sum of each user&#8217;s friend IDs? Then you can check to see if the sum has changed.</p>
<p>I&#8217;m itching to do some more Django/Facebook work. Fun stuff.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Marty Alchin</title>
		<link>http://blog.localkinegrinds.com/2007/10/10/calling-all-django-programmers-i-need-advice/comment-page-1/#comment-7780</link>
		<dc:creator>Marty Alchin</dc:creator>
		<pubDate>Thu, 11 Oct 2007 11:37:53 +0000</pubDate>
		<guid isPermaLink="false">http://blog.localkinegrinds.com/2007/10/10/calling-all-django-programmers-i-need-advice/#comment-7780</guid>
		<description>I don&#039;t know about the legal issues Max mentioned, but you might look into Python sets. As far as I can tell, it does all the hard work for you.

http://docs.python.org/lib/types-set.html</description>
		<content:encoded><![CDATA[<p>I don&#8217;t know about the legal issues Max mentioned, but you might look into Python sets. As far as I can tell, it does all the hard work for you.</p>
<p><a href="http://docs.python.org/lib/types-set.html" rel="nofollow">http://docs.python.org/lib/types-set.html</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Max Battcher</title>
		<link>http://blog.localkinegrinds.com/2007/10/10/calling-all-django-programmers-i-need-advice/comment-page-1/#comment-7773</link>
		<dc:creator>Max Battcher</dc:creator>
		<pubDate>Thu, 11 Oct 2007 07:22:24 +0000</pubDate>
		<guid isPermaLink="false">http://blog.localkinegrinds.com/2007/10/10/calling-all-django-programmers-i-need-advice/#comment-7773</guid>
		<description>I hate to burst bubbles, but you realize that you are not allowed to cache friend IDs?  It&#039;s against the current Facebook API terms and conditions.  I&#039;m betting some do it anyway, but Facebook sees it&#039;s bread and butter as master repository of that friend knowledge and are apparently trying to be pretty strict about it.  You should review the list of things you can and can&#039;t cache, it&#039;s quite enlightening.  Most API pages also discuss the information from that API call that can or can&#039;t be cached.

They want you to query for it everytime...  I think you can cache API calls for up to 24 hours to avoid calling *too* often, but storing things long term in your database is generally a big NO.

That said, I would probably use a Python list and some simple in/not in Logic, but I might also use it as a excuse to play more with Python&#039;s sets:

http://docs.python.org/lib/types-set.html</description>
		<content:encoded><![CDATA[<p>I hate to burst bubbles, but you realize that you are not allowed to cache friend IDs?  It&#8217;s against the current Facebook API terms and conditions.  I&#8217;m betting some do it anyway, but Facebook sees it&#8217;s bread and butter as master repository of that friend knowledge and are apparently trying to be pretty strict about it.  You should review the list of things you can and can&#8217;t cache, it&#8217;s quite enlightening.  Most API pages also discuss the information from that API call that can or can&#8217;t be cached.</p>
<p>They want you to query for it everytime&#8230;  I think you can cache API calls for up to 24 hours to avoid calling *too* often, but storing things long term in your database is generally a big NO.</p>
<p>That said, I would probably use a Python list and some simple in/not in Logic, but I might also use it as a excuse to play more with Python&#8217;s sets:</p>
<p><a href="http://docs.python.org/lib/types-set.html" rel="nofollow">http://docs.python.org/lib/types-set.html</a></p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Served from: blog.localkinegrinds.com @ 2012-02-07 21:38:38 -->
