<?xml version="1.0" encoding="utf-8"?>
<!-- generator="wordpress/2.0.4" -->
<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/"
	>

<channel>
	<title>Software over the rainbow</title>
	<link>http://www.jesusgollonet.com/blog</link>
	<description>desearch and revelopment</description>
	<pubDate>Sat, 03 May 2008 16:33:48 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.0.4</generator>
	<language>en</language>
			<item>
		<title>instructions, limitations</title>
		<link>http://www.jesusgollonet.com/blog/2008/05/03/instructions-limitations/</link>
		<comments>http://www.jesusgollonet.com/blog/2008/05/03/instructions-limitations/#comments</comments>
		<pubDate>Sat, 03 May 2008 16:24:21 +0000</pubDate>
		<dc:creator>jesus gollonet</dc:creator>
		
	<dc:subject>Web</dc:subject>
	<dc:subject>Programming</dc:subject>
	<dc:subject>Art</dc:subject><dc:subject>conceptual art</dc:subject><dc:subject>instruction set</dc:subject><dc:subject>instructions</dc:subject><dc:subject>limitations</dc:subject>
		<guid isPermaLink="false">http://www.jesusgollonet.com/blog/2008/05/03/instructions-limitations/</guid>
		<description><![CDATA[<p><a href="http://instructionset.org">Instruction set</a> is a recently launched site that gives some instructions every month and asks for implementations in code. Think Sol Lewitt goes 2.0 (sorry I couldn&#8217;t resist). It is a beautiful simple idea and It&#8217;s stealing me lots of braincycles (<a href="http://www.flickr.com/photos/jesusgollonet/2441375721/">see</a>).</p>
<p>I&#8217;ve heard raindrops here and there about design by limitation lately. Number of chars in twitter, flickr video length, 1 photo/day in fotolog&#8230; There are a couple of limitations in instructionset which I missed at first but on a second thought I found interesting:</p>
<ul>
<li><strong>There&#8217;s no clear way to post a result</strong>(images, applets, audio&#8230;).
<p>You can always give a url, but it is not even suggested. I thought it might be an obvious improvement, but after trying to come up with solutions for the 2 first instructions, I&#8217;ve discovered that results could be a distraction. Instructions are about language and interpretation. I&#8217;ve found myself repeating the sentence, trying to define exactly every word, looking for a fold, or a flaw in which to introduce a deviation&#8230; Thinking how they relate to the programming language, how I relate to the programming language (specially with the first one &#8220;draw a straight line and follow it&#8221;)&#8230; I think that this relationship between everyday and programming language is a powerful one to explore.</li>
<li><strong>There is no form of comments/discussion</strong> other than the description of you implementation.
<p>After seeing some of the contributions, I&#8217;ve found interesting approaches and I&#8217;d like to give feedback, but given the overwhelming noise ratio in today&#8217;s software playgrounds, I appreciate that there&#8217;s no way to do it. Paraphrasing Cage: just respond with your implementation. </li>
</ul>
<p>Now, I don&#8217;t know if these are intended features or result of an early release, but if one could vote against new features&#8230; :)
</p>
tags:<a href="http://www.jesusgollonet.com/blog/index.php?tag=conceptual-art" rel="tag">conceptual art</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=instruction-set" rel="tag">instruction set</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=instructions" rel="tag">instructions</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=limitations" rel="tag">limitations</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=conceptual-art" rel="tag">conceptual art</a>, <a href="http://www.jesusgollonet.com/blog/index.php?tag=instruction-set" rel="tag">instruction set</a>, <a href="http://www.jesusgollonet.com/blog/index.php?tag=instructions" rel="tag">instructions</a>, <a href="http://www.jesusgollonet.com/blog/index.php?tag=limitations" rel="tag">limitations</a>]]></description>
			<content:encoded><![CDATA[<p><a href="http://instructionset.org">Instruction set</a> is a recently launched site that gives some instructions every month and asks for implementations in code. Think Sol Lewitt goes 2.0 (sorry I couldn&#8217;t resist). It is a beautiful simple idea and It&#8217;s stealing me lots of braincycles (<a href="http://www.flickr.com/photos/jesusgollonet/2441375721/">see</a>).</p>
<p>I&#8217;ve heard raindrops here and there about design by limitation lately. Number of chars in twitter, flickr video length, 1 photo/day in fotolog&#8230; There are a couple of limitations in instructionset which I missed at first but on a second thought I found interesting:</p>
<ul>
<li><strong>There&#8217;s no clear way to post a result</strong>(images, applets, audio&#8230;).
<p>You can always give a url, but it is not even suggested. I thought it might be an obvious improvement, but after trying to come up with solutions for the 2 first instructions, I&#8217;ve discovered that results could be a distraction. Instructions are about language and interpretation. I&#8217;ve found myself repeating the sentence, trying to define exactly every word, looking for a fold, or a flaw in which to introduce a deviation&#8230; Thinking how they relate to the programming language, how I relate to the programming language (specially with the first one &#8220;draw a straight line and follow it&#8221;)&#8230; I think that this relationship between everyday and programming language is a powerful one to explore.</li>
<li><strong>There is no form of comments/discussion</strong> other than the description of you implementation.
<p>After seeing some of the contributions, I&#8217;ve found interesting approaches and I&#8217;d like to give feedback, but given the overwhelming noise ratio in today&#8217;s software playgrounds, I appreciate that there&#8217;s no way to do it. Paraphrasing Cage: just respond with your implementation. </li>
</ul>
<p>Now, I don&#8217;t know if these are intended features or result of an early release, but if one could vote against new features&#8230; :)
</p>
tags:<a href="http://www.jesusgollonet.com/blog/index.php?tag=conceptual-art" rel="tag">conceptual art</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=instruction-set" rel="tag">instruction set</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=instructions" rel="tag">instructions</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=limitations" rel="tag">limitations</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=conceptual-art" rel="tag">conceptual art</a>, <a href="http://www.jesusgollonet.com/blog/index.php?tag=instruction-set" rel="tag">instruction set</a>, <a href="http://www.jesusgollonet.com/blog/index.php?tag=instructions" rel="tag">instructions</a>, <a href="http://www.jesusgollonet.com/blog/index.php?tag=limitations" rel="tag">limitations</a>]]></content:encoded>
			<wfw:commentRSS>http://www.jesusgollonet.com/blog/2008/05/03/instructions-limitations/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>A timestamped generation</title>
		<link>http://www.jesusgollonet.com/blog/2008/04/28/a-timestamped-generation/</link>
		<comments>http://www.jesusgollonet.com/blog/2008/04/28/a-timestamped-generation/#comments</comments>
		<pubDate>Mon, 28 Apr 2008 22:06:23 +0000</pubDate>
		<dc:creator>jesus gollonet</dc:creator>
		
	<dc:subject>Web</dc:subject>
	<dc:subject>Thoughts</dc:subject>
	<dc:subject>Software</dc:subject><dc:subject>biography</dc:subject><dc:subject>future</dc:subject><dc:subject>timestamped generation</dc:subject>
		<guid isPermaLink="false">http://www.jesusgollonet.com/blog/2008/04/28/a-timestamped-generation/</guid>
		<description><![CDATA[<p>Thinking about the traces we leave behind in all the software we use, I was wondering: </p>
<p>How will the biography of a data-intensive person - you know, blogs, twitter, delicious, tumblr, last.fm&#8230;- look like in the future? Will those &#8220;<a href="http://en.wikipedia.org/wiki/Biography#Modern_biography"><em>domestic privacies</em></a>&#8221; be taken into account?</p>
<p>How will the fact that we have a clear, unambiguous point of reference for our own thoughts, places visited, people met, images, consumed products&#8230; affect the way we perceive ourselves? or the way we will be perceived in the future? </p>
<p>Just thinking out loud, to hear how it sounds like.
</p>
tags:<a href="http://www.jesusgollonet.com/blog/index.php?tag=biography" rel="tag">biography</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=future" rel="tag">future</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=timestamped-generation" rel="tag">timestamped generation</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=biography" rel="tag">biography</a>, <a href="http://www.jesusgollonet.com/blog/index.php?tag=future" rel="tag">future</a>, <a href="http://www.jesusgollonet.com/blog/index.php?tag=timestamped-generation" rel="tag">timestamped generation</a>]]></description>
			<content:encoded><![CDATA[<p>Thinking about the traces we leave behind in all the software we use, I was wondering: </p>
<p>How will the biography of a data-intensive person - you know, blogs, twitter, delicious, tumblr, last.fm&#8230;- look like in the future? Will those &#8220;<a href="http://en.wikipedia.org/wiki/Biography#Modern_biography"><em>domestic privacies</em></a>&#8221; be taken into account?</p>
<p>How will the fact that we have a clear, unambiguous point of reference for our own thoughts, places visited, people met, images, consumed products&#8230; affect the way we perceive ourselves? or the way we will be perceived in the future? </p>
<p>Just thinking out loud, to hear how it sounds like.
</p>
tags:<a href="http://www.jesusgollonet.com/blog/index.php?tag=biography" rel="tag">biography</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=future" rel="tag">future</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=timestamped-generation" rel="tag">timestamped generation</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=biography" rel="tag">biography</a>, <a href="http://www.jesusgollonet.com/blog/index.php?tag=future" rel="tag">future</a>, <a href="http://www.jesusgollonet.com/blog/index.php?tag=timestamped-generation" rel="tag">timestamped generation</a>]]></content:encoded>
			<wfw:commentRSS>http://www.jesusgollonet.com/blog/2008/04/28/a-timestamped-generation/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>La metatortilla</title>
		<link>http://www.jesusgollonet.com/blog/2008/03/11/metatortilla/</link>
		<comments>http://www.jesusgollonet.com/blog/2008/03/11/metatortilla/#comments</comments>
		<pubDate>Tue, 11 Mar 2008 20:46:35 +0000</pubDate>
		<dc:creator>jesus gollonet</dc:creator>
		
	<dc:subject>General</dc:subject><dc:subject>pataphysics</dc:subject>
		<guid isPermaLink="false">http://www.jesusgollonet.com/blog/2008/03/11/metatortilla/</guid>
		<description><![CDATA[<p>o de cómo se me cayó un trozo de la tortilla que estaba friendo en el plato de la que estaba batiendo.
</p>
tags:<a href="http://www.jesusgollonet.com/blog/index.php?tag=pataphysics" rel="tag">pataphysics</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=pataphysics" rel="tag">pataphysics</a>]]></description>
			<content:encoded><![CDATA[<p>o de cómo se me cayó un trozo de la tortilla que estaba friendo en el plato de la que estaba batiendo.
</p>
tags:<a href="http://www.jesusgollonet.com/blog/index.php?tag=pataphysics" rel="tag">pataphysics</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=pataphysics" rel="tag">pataphysics</a>]]></content:encoded>
			<wfw:commentRSS>http://www.jesusgollonet.com/blog/2008/03/11/metatortilla/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Mess up, dig for context, scatter&#8230; and find your stuff</title>
		<link>http://www.jesusgollonet.com/blog/2008/02/02/mes-up-context-scatter-find/</link>
		<comments>http://www.jesusgollonet.com/blog/2008/02/02/mes-up-context-scatter-find/#comments</comments>
		<pubDate>Sat, 02 Feb 2008 18:06:07 +0000</pubDate>
		<dc:creator>jesus gollonet</dc:creator>
		
	<dc:subject>Web</dc:subject>
	<dc:subject>Thoughts</dc:subject>
	<dc:subject>Software</dc:subject><dc:subject>context</dc:subject><dc:subject>delicious</dc:subject><dc:subject>digital identity</dc:subject><dc:subject>personal information management</dc:subject><dc:subject>tumblr</dc:subject>
		<guid isPermaLink="false">http://www.jesusgollonet.com/blog/2008/02/02/mes-up-context-scatter-find/</guid>
		<description><![CDATA[<p>So I bit the bullet and have just opened a <a href="http://jesusgollonet.tumblr.com">tumblr</a> account. I&#8217;ve been somehow reluctant to try just another service (despite passionate,  reliable <a href="http://missha.tumblr.com">recommendations</a>). The way I use delicious (keeping an annotated track of interesting stuff) is pretty similar to what I could get using tumblr, so why should I add another tool?</p>
<p>The main point for <a href="http://www.jesusgollonet.com/blog/2006/07/12/%c2%bfpor-que-guardar/">storing things (es)</a> is retrieving them. Common sense dictates that to find your things easily (and I&#8217;m rather obsessed with that), you should keep similar things in the same place, so the use of multiple services to keep track of similar information might seem counterproductive. </p>
<p>I have the tentative feeling that this is not so: </p>
<blockquote><p>The richness of our homes results from our influence over their every characteristics and their accumulation of the traces of our activities. This richness is missing from our digital dwellings (by which I mean file systems, application windows, blogs, and mobile phones as well as the virtual locations in online worlds that more closely mimic physical homes).</p></blockquote>
<p><a href="http://dam.mellis.org/2006/02/exploring_personal_digital_archives_for_nonfunctional_purposes/"><br />
<em>Exploring personal digital archives for non-functional purposes.</em></a> David A. Mellis.</p>
<p>One of the things I&#8217;ve learned to love about storing bookmarks in delicious is to forget about being organised at all. Taking advantage of idiosincracies related to personal experience, jokes, fuzzy relationships, ongoing thoughts etc. in titles descriptions and tags helps me <a href="http://www.jesusgollonet.com/blog/2006/11/13/sharing-is-for-oneself-bookmarks/">find my information more easily</a>. It adds the rich trace of my activities that software usually lacks.</p>
<p>Then, using different services adds, I believe, an additional layer of context. <a href="http://ajp.psychiatryonline.org/cgi/content/full/156/9/1311">Episodic memory</a> <em>is characterized by having a unique context associated with a learning episode.</em> The context of storing a bit of information is both physical (at work, at home&#8230;) and digital (where it comes from, where you store it&#8230;). Adding variety at this level might help a bit. You&#8217;ll save it in a slightly different way, and to a different place, for a peculiar reason. The little thoughts that you have when deciding to store it in either place will also be part of its context.</p>
<p>So my experimental feeling is that a reasonable amount (it&#8217;s not necessary to become <a href="http://www.youtube.com/watch?v=1TZrPfKIAyw">francis bacon</a>) of scattering could inject some healthy variety to our experience of digital information, giving us a richer context in which to manage our own data. To put it <a href="http://dam.mellis.org/2006/11/the_difference_between_memory_and_storage/">Mellis words</a> again, we might be making our storage less efficient, but we&#8217;d be improving our memory of it.</p>
<p>And after all, the honorable 2.0 tradition of giving outer access to personal data makes scattering a simple problem of aggregation. You can always centralize your traces.</p>
<p>Let&#8217;s see how it goes.
</p>
tags:<a href="http://www.jesusgollonet.com/blog/index.php?tag=context" rel="tag">context</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=delicious" rel="tag">delicious</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=digital-identity" rel="tag">digital identity</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=personal-information-management" rel="tag">personal information management</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=tumblr" rel="tag">tumblr</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=context" rel="tag">context</a>, <a href="http://www.jesusgollonet.com/blog/index.php?tag=delicious" rel="tag">delicious</a>, <a href="http://www.jesusgollonet.com/blog/index.php?tag=digital-identity" rel="tag">digital identity</a>, <a href="http://www.jesusgollonet.com/blog/index.php?tag=personal-information-management" rel="tag">personal information management</a>, <a href="http://www.jesusgollonet.com/blog/index.php?tag=tumblr" rel="tag">tumblr</a>]]></description>
			<content:encoded><![CDATA[<p>So I bit the bullet and have just opened a <a href="http://jesusgollonet.tumblr.com">tumblr</a> account. I&#8217;ve been somehow reluctant to try just another service (despite passionate,  reliable <a href="http://missha.tumblr.com">recommendations</a>). The way I use delicious (keeping an annotated track of interesting stuff) is pretty similar to what I could get using tumblr, so why should I add another tool?</p>
<p>The main point for <a href="http://www.jesusgollonet.com/blog/2006/07/12/%c2%bfpor-que-guardar/">storing things (es)</a> is retrieving them. Common sense dictates that to find your things easily (and I&#8217;m rather obsessed with that), you should keep similar things in the same place, so the use of multiple services to keep track of similar information might seem counterproductive. </p>
<p>I have the tentative feeling that this is not so: </p>
<blockquote><p>The richness of our homes results from our influence over their every characteristics and their accumulation of the traces of our activities. This richness is missing from our digital dwellings (by which I mean file systems, application windows, blogs, and mobile phones as well as the virtual locations in online worlds that more closely mimic physical homes).</p></blockquote>
<p><a href="http://dam.mellis.org/2006/02/exploring_personal_digital_archives_for_nonfunctional_purposes/"><br />
<em>Exploring personal digital archives for non-functional purposes.</em></a> David A. Mellis.</p>
<p>One of the things I&#8217;ve learned to love about storing bookmarks in delicious is to forget about being organised at all. Taking advantage of idiosincracies related to personal experience, jokes, fuzzy relationships, ongoing thoughts etc. in titles descriptions and tags helps me <a href="http://www.jesusgollonet.com/blog/2006/11/13/sharing-is-for-oneself-bookmarks/">find my information more easily</a>. It adds the rich trace of my activities that software usually lacks.</p>
<p>Then, using different services adds, I believe, an additional layer of context. <a href="http://ajp.psychiatryonline.org/cgi/content/full/156/9/1311">Episodic memory</a> <em>is characterized by having a unique context associated with a learning episode.</em> The context of storing a bit of information is both physical (at work, at home&#8230;) and digital (where it comes from, where you store it&#8230;). Adding variety at this level might help a bit. You&#8217;ll save it in a slightly different way, and to a different place, for a peculiar reason. The little thoughts that you have when deciding to store it in either place will also be part of its context.</p>
<p>So my experimental feeling is that a reasonable amount (it&#8217;s not necessary to become <a href="http://www.youtube.com/watch?v=1TZrPfKIAyw">francis bacon</a>) of scattering could inject some healthy variety to our experience of digital information, giving us a richer context in which to manage our own data. To put it <a href="http://dam.mellis.org/2006/11/the_difference_between_memory_and_storage/">Mellis words</a> again, we might be making our storage less efficient, but we&#8217;d be improving our memory of it.</p>
<p>And after all, the honorable 2.0 tradition of giving outer access to personal data makes scattering a simple problem of aggregation. You can always centralize your traces.</p>
<p>Let&#8217;s see how it goes.
</p>
tags:<a href="http://www.jesusgollonet.com/blog/index.php?tag=context" rel="tag">context</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=delicious" rel="tag">delicious</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=digital-identity" rel="tag">digital identity</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=personal-information-management" rel="tag">personal information management</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=tumblr" rel="tag">tumblr</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=context" rel="tag">context</a>, <a href="http://www.jesusgollonet.com/blog/index.php?tag=delicious" rel="tag">delicious</a>, <a href="http://www.jesusgollonet.com/blog/index.php?tag=digital-identity" rel="tag">digital identity</a>, <a href="http://www.jesusgollonet.com/blog/index.php?tag=personal-information-management" rel="tag">personal information management</a>, <a href="http://www.jesusgollonet.com/blog/index.php?tag=tumblr" rel="tag">tumblr</a>]]></content:encoded>
			<wfw:commentRSS>http://www.jesusgollonet.com/blog/2008/02/02/mes-up-context-scatter-find/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Support dublab!</title>
		<link>http://www.jesusgollonet.com/blog/2007/11/14/support-dublab/</link>
		<comments>http://www.jesusgollonet.com/blog/2007/11/14/support-dublab/#comments</comments>
		<pubDate>Wed, 14 Nov 2007 16:10:02 +0000</pubDate>
		<dc:creator>jesus gollonet</dc:creator>
		
	<dc:subject>Music</dc:subject>
	<dc:subject>Announcements</dc:subject><dc:subject>dublab</dc:subject><dc:subject>radio</dc:subject>
		<guid isPermaLink="false">http://www.jesusgollonet.com/blog/2007/11/14/support-dublab/</guid>
		<description><![CDATA[<p>For those of you who don&#8217;t know, L.A.&#8217;s <a href="http://dublab.com/">dublab.com</a> is simply the best radio station of the internets. </p>
<p>I still remember that glorious day that my brother told me &#8220;hey you must come and see that!, I&#8217;ve discovered a radio station and they&#8217;re playing Sun ra&#8217;s &#8216;Space is the Place&#8217;. Full length!!&#8221; (gracias nono). That was like 5 or 6 years ago, and in this time my debt for them has only grown.  I&#8217;ve discovered there tons of my favorite musicians&#8230;</p>
<p>So I thought that you could go there, tune in to the stream or download some podcasts, fall in love with their music and <a href="http://www.dublab.com/protondrive/">donate some money to support their expenses</a>, could you?</p>
<p><a href="http://www.dublab.com/protondrive/"><img src="http://jesusgollonet.com/blog/imagenes/dublab.gif" alt="dublab proton drive poster" /></a>
</p>
tags:<a href="http://www.jesusgollonet.com/blog/index.php?tag=dublab" rel="tag">dublab</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=radio" rel="tag">radio</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=dublab" rel="tag">dublab</a>, <a href="http://www.jesusgollonet.com/blog/index.php?tag=radio" rel="tag">radio</a>]]></description>
			<content:encoded><![CDATA[<p>For those of you who don&#8217;t know, L.A.&#8217;s <a href="http://dublab.com/">dublab.com</a> is simply the best radio station of the internets. </p>
<p>I still remember that glorious day that my brother told me &#8220;hey you must come and see that!, I&#8217;ve discovered a radio station and they&#8217;re playing Sun ra&#8217;s &#8216;Space is the Place&#8217;. Full length!!&#8221; (gracias nono). That was like 5 or 6 years ago, and in this time my debt for them has only grown.  I&#8217;ve discovered there tons of my favorite musicians&#8230;</p>
<p>So I thought that you could go there, tune in to the stream or download some podcasts, fall in love with their music and <a href="http://www.dublab.com/protondrive/">donate some money to support their expenses</a>, could you?</p>
<p><a href="http://www.dublab.com/protondrive/"><img src="http://jesusgollonet.com/blog/imagenes/dublab.gif" alt="dublab proton drive poster" /></a>
</p>
tags:<a href="http://www.jesusgollonet.com/blog/index.php?tag=dublab" rel="tag">dublab</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=radio" rel="tag">radio</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=dublab" rel="tag">dublab</a>, <a href="http://www.jesusgollonet.com/blog/index.php?tag=radio" rel="tag">radio</a>]]></content:encoded>
			<wfw:commentRSS>http://www.jesusgollonet.com/blog/2007/11/14/support-dublab/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>Penner easing for c++</title>
		<link>http://www.jesusgollonet.com/blog/2007/09/24/penner-easing-cpp/</link>
		<comments>http://www.jesusgollonet.com/blog/2007/09/24/penner-easing-cpp/#comments</comments>
		<pubDate>Mon, 24 Sep 2007 17:53:31 +0000</pubDate>
		<dc:creator>jesus gollonet</dc:creator>
		
	<dc:subject>Programming</dc:subject>
	<dc:subject>output</dc:subject><dc:subject>c++</dc:subject><dc:subject>easing</dc:subject><dc:subject>openframeworks</dc:subject>
		<guid isPermaLink="false">http://www.jesusgollonet.com/blog/2007/09/24/penner-easing-cpp/</guid>
		<description><![CDATA[<p>As <a href="http://www.jesusgollonet.com/blog/2007/09/16/penner-easing-processing-library/">I said last week</a>, I&#8217;m also using <a href="http://robertpenner.com/easing/">robert penner&#8217;s easing equations</a> in <a href="http://openframeworks.cc">openFrameworks</a>, so I&#8217;ve ported them to c++. </p>
<p>This has been relatively straightforward, but, as with the actionscript to java conversion, I&#8217;ve run into some nuances between languages and I&#8217;ve definitely learned the hard way (read &#8220;wasting some hours of my life&#8221;) why <a href="http://www.adp-gmbh.ch/blog/2005/march/17.html">pre and post increment operators can be evil</a>. </p>
<p><a href="http://jesusgollonet.com/openFrameworks/cppPennerEasing.zip">Grab them here</a></p>
<p>For usage, you can have a look at the openFrameworks app provided. If you want to have a quick glance at the types of movement, see the <a href="http://jesusgollonet.com/processing/pennerEasing/">easing applet (p5 version)</a>.</p>
<p>Being this a programming exercise, it will have improvable things for sure. I&#8217;m thinking of some, but if you know anything, please let me know.
</p>
tags:<a href="http://www.jesusgollonet.com/blog/index.php?tag=c%2B%2B" rel="tag">c++</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=easing" rel="tag">easing</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=openframeworks" rel="tag">openframeworks</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=c%2B%2B" rel="tag">c++</a>, <a href="http://www.jesusgollonet.com/blog/index.php?tag=easing" rel="tag">easing</a>, <a href="http://www.jesusgollonet.com/blog/index.php?tag=openframeworks" rel="tag">openframeworks</a>]]></description>
			<content:encoded><![CDATA[<p>As <a href="http://www.jesusgollonet.com/blog/2007/09/16/penner-easing-processing-library/">I said last week</a>, I&#8217;m also using <a href="http://robertpenner.com/easing/">robert penner&#8217;s easing equations</a> in <a href="http://openframeworks.cc">openFrameworks</a>, so I&#8217;ve ported them to c++. </p>
<p>This has been relatively straightforward, but, as with the actionscript to java conversion, I&#8217;ve run into some nuances between languages and I&#8217;ve definitely learned the hard way (read &#8220;wasting some hours of my life&#8221;) why <a href="http://www.adp-gmbh.ch/blog/2005/march/17.html">pre and post increment operators can be evil</a>. </p>
<p><a href="http://jesusgollonet.com/openFrameworks/cppPennerEasing.zip">Grab them here</a></p>
<p>For usage, you can have a look at the openFrameworks app provided. If you want to have a quick glance at the types of movement, see the <a href="http://jesusgollonet.com/processing/pennerEasing/">easing applet (p5 version)</a>.</p>
<p>Being this a programming exercise, it will have improvable things for sure. I&#8217;m thinking of some, but if you know anything, please let me know.
</p>
tags:<a href="http://www.jesusgollonet.com/blog/index.php?tag=c%2B%2B" rel="tag">c++</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=easing" rel="tag">easing</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=openframeworks" rel="tag">openframeworks</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=c%2B%2B" rel="tag">c++</a>, <a href="http://www.jesusgollonet.com/blog/index.php?tag=easing" rel="tag">easing</a>, <a href="http://www.jesusgollonet.com/blog/index.php?tag=openframeworks" rel="tag">openframeworks</a>]]></content:encoded>
			<wfw:commentRSS>http://www.jesusgollonet.com/blog/2007/09/24/penner-easing-cpp/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>taking notes about what you are listening to on last.fm: the hacky way</title>
		<link>http://www.jesusgollonet.com/blog/2007/09/17/hacky-notetaking-lastfm/</link>
		<comments>http://www.jesusgollonet.com/blog/2007/09/17/hacky-notetaking-lastfm/#comments</comments>
		<pubDate>Mon, 17 Sep 2007 22:39:39 +0000</pubDate>
		<dc:creator>jesus gollonet</dc:creator>
		
	<dc:subject>Music</dc:subject>
	<dc:subject>Thoughts</dc:subject>
	<dc:subject>Software</dc:subject><dc:subject>last.fm</dc:subject><dc:subject>notetaking</dc:subject>
		<guid isPermaLink="false">http://www.jesusgollonet.com/blog/2007/09/17/hacky-notetaking-lastfm/</guid>
		<description><![CDATA[<p>Some time ago, I wondered <a href="http://www.jesusgollonet.com/blog/2007/01/14/lang_enwouldnt-it-be-nice-iflang_enlang_esno-estaria-bien-silang_es/">how could I take some notes about the music I was listening to</a>.  </p>
<p>After having a look at the last.fm player source code* I instantly saw what a stupid thing I had suggested. In no way I&#8217;d be able to figure out that bunch of c++ classes (not that it made any sense to try, just to implement such a simple thing). </p>
<p>I thought of some other alternatives, mostly involving desktop widgets, but as far as I could see, none of the options could cover both my local music and the last.fm player (for when I&#8217;m listening to radio). I gave up the idea.</p>
<p>But one day, while sending a recommendation to a friend via the player I realized that I could write some text in that text box. Could I send recommendations to myself? Yes. And how could I take those recommendations out of last.fm? Luckily, they offer an rss feed for manual recommendations in their <a href="http://www.audioscrobbler.net/data/webservices/">web services</a>.</p>
<p><img src="http://jesusgollonet.com/blog/imagenes/last.fm-note.gif" alt="auto recommendation on last.fm" /></p>
<p>So I hacked together some code that parsed my recommendations and sent the ones with my username to my helipad notebook (not public, so I don&#8217;t have much to show). I set up a cron job and&#8230;  You can see that I still use it in <a href="http://ws.audioscrobbler.com/1.0/user/jesusgollonet/manualrecs.rss">my rss feed</a>.</p>
<p>The code is so trivial (and so tied to helipad in my case) that I&#8217;m sure you can do it better quickly, but in case you are interested, I could try to clean some of the php mess and send it upon request. </p>
<p>Although they are kind of personal, I&#8217;ve been thinking of publishing the notes directly here, since the rss feed is public anyway (and explicit sharing can improve your personal content, <a href="http://www.jesusgollonet.com/blog/2006/11/13/sharing-is-for-oneself-bookmarks/">I think</a>)</p>
<p>As a side note, I think last.fm could get some value of implementing such a thing. On one hand users could get some sort of musical microblogging, like a contextual twitter. On the other hand, since the info is always from last.fm, it could really enrich artists, songs and album pages, and more seamlesly than the current shoutbox, in my humble opinion.</p>
<p><em>* yes, I learned how to use subversion. Now I can&#8217;t live without it.</em>
</p>
tags:<a href="http://www.jesusgollonet.com/blog/index.php?tag=last.fm" rel="tag">last.fm</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=notetaking" rel="tag">notetaking</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=last.fm" rel="tag">last.fm</a>, <a href="http://www.jesusgollonet.com/blog/index.php?tag=notetaking" rel="tag">notetaking</a>]]></description>
			<content:encoded><![CDATA[<p>Some time ago, I wondered <a href="http://www.jesusgollonet.com/blog/2007/01/14/lang_enwouldnt-it-be-nice-iflang_enlang_esno-estaria-bien-silang_es/">how could I take some notes about the music I was listening to</a>.  </p>
<p>After having a look at the last.fm player source code* I instantly saw what a stupid thing I had suggested. In no way I&#8217;d be able to figure out that bunch of c++ classes (not that it made any sense to try, just to implement such a simple thing). </p>
<p>I thought of some other alternatives, mostly involving desktop widgets, but as far as I could see, none of the options could cover both my local music and the last.fm player (for when I&#8217;m listening to radio). I gave up the idea.</p>
<p>But one day, while sending a recommendation to a friend via the player I realized that I could write some text in that text box. Could I send recommendations to myself? Yes. And how could I take those recommendations out of last.fm? Luckily, they offer an rss feed for manual recommendations in their <a href="http://www.audioscrobbler.net/data/webservices/">web services</a>.</p>
<p><img src="http://jesusgollonet.com/blog/imagenes/last.fm-note.gif" alt="auto recommendation on last.fm" /></p>
<p>So I hacked together some code that parsed my recommendations and sent the ones with my username to my helipad notebook (not public, so I don&#8217;t have much to show). I set up a cron job and&#8230;  You can see that I still use it in <a href="http://ws.audioscrobbler.com/1.0/user/jesusgollonet/manualrecs.rss">my rss feed</a>.</p>
<p>The code is so trivial (and so tied to helipad in my case) that I&#8217;m sure you can do it better quickly, but in case you are interested, I could try to clean some of the php mess and send it upon request. </p>
<p>Although they are kind of personal, I&#8217;ve been thinking of publishing the notes directly here, since the rss feed is public anyway (and explicit sharing can improve your personal content, <a href="http://www.jesusgollonet.com/blog/2006/11/13/sharing-is-for-oneself-bookmarks/">I think</a>)</p>
<p>As a side note, I think last.fm could get some value of implementing such a thing. On one hand users could get some sort of musical microblogging, like a contextual twitter. On the other hand, since the info is always from last.fm, it could really enrich artists, songs and album pages, and more seamlesly than the current shoutbox, in my humble opinion.</p>
<p><em>* yes, I learned how to use subversion. Now I can&#8217;t live without it.</em>
</p>
tags:<a href="http://www.jesusgollonet.com/blog/index.php?tag=last.fm" rel="tag">last.fm</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=notetaking" rel="tag">notetaking</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=last.fm" rel="tag">last.fm</a>, <a href="http://www.jesusgollonet.com/blog/index.php?tag=notetaking" rel="tag">notetaking</a>]]></content:encoded>
			<wfw:commentRSS>http://www.jesusgollonet.com/blog/2007/09/17/hacky-notetaking-lastfm/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>penner&#8217;s easing equations processing library</title>
		<link>http://www.jesusgollonet.com/blog/2007/09/16/penner-easing-processing-library/</link>
		<comments>http://www.jesusgollonet.com/blog/2007/09/16/penner-easing-processing-library/#comments</comments>
		<pubDate>Sun, 16 Sep 2007 18:43:19 +0000</pubDate>
		<dc:creator>jesus gollonet</dc:creator>
		
	<dc:subject>Programming</dc:subject>
	<dc:subject>Processing</dc:subject>
	<dc:subject>output</dc:subject><dc:subject>easing</dc:subject><dc:subject>library</dc:subject><dc:subject>processing.org</dc:subject>
		<guid isPermaLink="false">http://www.jesusgollonet.com/blog/2007/09/16/penner-easing-processing-library/</guid>
		<description><![CDATA[<p>Being an actionscript head, I&#8217;ve frequently used <a href="http://robertpenner.com/easing">rober penner&#8217;s easing equations</a> in processing*. To avoid copy/paste each time I&#8217;ve packed them as a processing library. </p>
<p>While I was at it, I discovered a couple of implementations (<a href="http://media.quilime.com/files/tweening/">1</a>, <a href="http://seizethedave.com/etc/penner-easing/">2</a>), but I was almost done, and wanted to learn how to make processing libraries anyway.</p>
<p>So in the hope that it is useful to somebody, here it is:<br />
<a href="http://jesusgollonet.com/processing/pennerEasing/">http://jesusgollonet.com/processing/pennerEasing/</a></p>
<p><em>*I&#8217;m also using them in openFrameworks, so I&#8217;ve begun porting them to c++ too. They&#8217;ll be here when I&#8217;m done.</em>
</p>
tags:<a href="http://www.jesusgollonet.com/blog/index.php?tag=easing" rel="tag">easing</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=library" rel="tag">library</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=processing.org" rel="tag">processing.org</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=easing" rel="tag">easing</a>, <a href="http://www.jesusgollonet.com/blog/index.php?tag=library" rel="tag">library</a>, <a href="http://www.jesusgollonet.com/blog/index.php?tag=processing.org" rel="tag">processing.org</a>]]></description>
			<content:encoded><![CDATA[<p>Being an actionscript head, I&#8217;ve frequently used <a href="http://robertpenner.com/easing">rober penner&#8217;s easing equations</a> in processing*. To avoid copy/paste each time I&#8217;ve packed them as a processing library. </p>
<p>While I was at it, I discovered a couple of implementations (<a href="http://media.quilime.com/files/tweening/">1</a>, <a href="http://seizethedave.com/etc/penner-easing/">2</a>), but I was almost done, and wanted to learn how to make processing libraries anyway.</p>
<p>So in the hope that it is useful to somebody, here it is:<br />
<a href="http://jesusgollonet.com/processing/pennerEasing/">http://jesusgollonet.com/processing/pennerEasing/</a></p>
<p><em>*I&#8217;m also using them in openFrameworks, so I&#8217;ve begun porting them to c++ too. They&#8217;ll be here when I&#8217;m done.</em>
</p>
tags:<a href="http://www.jesusgollonet.com/blog/index.php?tag=easing" rel="tag">easing</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=library" rel="tag">library</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=processing.org" rel="tag">processing.org</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=easing" rel="tag">easing</a>, <a href="http://www.jesusgollonet.com/blog/index.php?tag=library" rel="tag">library</a>, <a href="http://www.jesusgollonet.com/blog/index.php?tag=processing.org" rel="tag">processing.org</a>]]></content:encoded>
			<wfw:commentRSS>http://www.jesusgollonet.com/blog/2007/09/16/penner-easing-processing-library/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>actionscript 3 syntax highlighting for jEdit</title>
		<link>http://www.jesusgollonet.com/blog/2007/08/28/actionscript-3-edit-mode-jedit/</link>
		<comments>http://www.jesusgollonet.com/blog/2007/08/28/actionscript-3-edit-mode-jedit/#comments</comments>
		<pubDate>Tue, 28 Aug 2007 21:44:33 +0000</pubDate>
		<dc:creator>jesus gollonet</dc:creator>
		
	<dc:subject>Programming</dc:subject>
	<dc:subject>Actionscript</dc:subject>
	<dc:subject>Software</dc:subject>
	<dc:subject>output</dc:subject><dc:subject>actionscript</dc:subject><dc:subject>jedit</dc:subject>
		<guid isPermaLink="false">http://www.jesusgollonet.com/blog/2007/08/28/actionscript-3-edit-mode-jedit/</guid>
		<description><![CDATA[<p>Still happily living on <a href="http://www.jedit.org/">jEdit</a> for most of my scripting. I haven&#8217;t found an actionscript 3 edit mode, so I&#8217;ve made one. It is based on the original actionscript.xml and the Flash CS3 AsColorSyntax_3.xml file so it should have everything you can see colored on the IDE. </p>
<p>This edit mode doesn&#8217;t have any as2 specific keywords, so if you have to work on as2 don&#8217;t delete the original. Otherwise, you can just replace your original actionscript.xml file (you&#8217;ll find it problably in &#8220;c:\program files\jEdit\modes&#8221; if you&#8217;re on win xp) with this one. Make a backup of the original, just in case.</p>
<p>Grab the <a href="http://jesusgollonet.com/blog/recursos/actionscript.xml">actionscript 3 edit mode for jEdit</a>
</p>
tags:<a href="http://www.jesusgollonet.com/blog/index.php?tag=actionscript" rel="tag">actionscript</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=jedit" rel="tag">jedit</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=actionscript" rel="tag">actionscript</a>, <a href="http://www.jesusgollonet.com/blog/index.php?tag=jedit" rel="tag">jedit</a>]]></description>
			<content:encoded><![CDATA[<p>Still happily living on <a href="http://www.jedit.org/">jEdit</a> for most of my scripting. I haven&#8217;t found an actionscript 3 edit mode, so I&#8217;ve made one. It is based on the original actionscript.xml and the Flash CS3 AsColorSyntax_3.xml file so it should have everything you can see colored on the IDE. </p>
<p>This edit mode doesn&#8217;t have any as2 specific keywords, so if you have to work on as2 don&#8217;t delete the original. Otherwise, you can just replace your original actionscript.xml file (you&#8217;ll find it problably in &#8220;c:\program files\jEdit\modes&#8221; if you&#8217;re on win xp) with this one. Make a backup of the original, just in case.</p>
<p>Grab the <a href="http://jesusgollonet.com/blog/recursos/actionscript.xml">actionscript 3 edit mode for jEdit</a>
</p>
tags:<a href="http://www.jesusgollonet.com/blog/index.php?tag=actionscript" rel="tag">actionscript</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=jedit" rel="tag">jedit</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=actionscript" rel="tag">actionscript</a>, <a href="http://www.jesusgollonet.com/blog/index.php?tag=jedit" rel="tag">jedit</a>]]></content:encoded>
			<wfw:commentRSS>http://www.jesusgollonet.com/blog/2007/08/28/actionscript-3-edit-mode-jedit/feed/</wfw:commentRSS>
		</item>
		<item>
		<title>php and mysql in different time zones</title>
		<link>http://www.jesusgollonet.com/blog/2007/04/13/php-mysql-different-time-zone/</link>
		<comments>http://www.jesusgollonet.com/blog/2007/04/13/php-mysql-different-time-zone/#comments</comments>
		<pubDate>Fri, 13 Apr 2007 11:00:33 +0000</pubDate>
		<dc:creator>jesus gollonet</dc:creator>
		
	<dc:subject>Web</dc:subject>
	<dc:subject>Programming</dc:subject><dc:subject>date</dc:subject><dc:subject>last.fm</dc:subject><dc:subject>mysql</dc:subject><dc:subject>php</dc:subject><dc:subject>time</dc:subject><dc:subject>timezones</dc:subject>
		<guid isPermaLink="false">http://www.jesusgollonet.com/blog/2007/04/13/php-mysql-time-zone/</guid>
		<description><![CDATA[<p>Just a quick code tip for working with dates in mysql and php. </p>
<p>I&#8217;m building a script to regularly mirror my last.fm recent tracks to a mysql database of my own. I&#8217;m interested in experimenting with daily and hourly statistics.</p>
<p>One problem that has taken me some head scratching has been the fact that the <a href="http://audioscrobbler.net/data/webservices/#User%20Profile%20Data">last.fm recentracks web service</a> gives me the date a given track was played in a timestamp of my current timezone (+02:00 , Europe/Paris, as I&#8217;ve just learnt), but my web server is on a different timezone (-05:00, America/Los_Angeles), so when I try to insert a date in the database, even though I&#8217;m giving it a timestamp, it gets interpreted as being 7 hours less than it actually is. So a track played at let&#8217;s say <em>31 Mar 2007, 23:55</em> would be stored as having been played at <em>31 Mar 2007, 16:55</em>. Not good.</p>
<p>Not wanting to fiddle with configurations or anything beyond my knowledge, I discovered that I could set the timezone in both php and mysql for a given script or db query. </p>
<h3>Setting the timezone in php</h3>
<p>If you want to know which timezone your server is in, you can guess it with</p>
<p><code><br />
date_default_timezone_get();<br />
</code></p>
<p>Which should give you a string like &#8220;America/Los_Angeles&#8221; or any other of the <a href="http://es.php.net/manual/en/timezones.php">supported timezones list</a></p>
<p>If it is different than your desired timezone, look for the one you want in the list and before doing any time operation, call:</p>
<p><code><br />
// set your timezone as gmt +02:00<br />
date_default_timezone_set("Europe/Paris");<br />
</code></p>
<p>From then on, all your php code should understand timestamps and dates in that timezone.</p>
<h3>Then for mysql use CONVERT_TZ</h3>
<p>Even though it is corrected in php, you&#8217;ll have to do it also when inserting information on you mysql db, because it will interpret timestamps again in its time zone. You can guess which is it by having a look at the system time zone variable.</p>
<p>In my case, after trying some hacky alternatives I discovered CONVERT_TZ in one of the latest comments in <a href="http://www.modwest.com/help/kb6-256.html" title ="how do I change mysql timezone">this post</a></p>
<p>From the <a href="http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_convert-tz">mysql manual</a></p>
<p><code><br />
CONVERT_TZ(dt,from_tz,to_tz)<br />
</code></p>
<blockquote><p>CONVERT_TZ() converts a datetime value dt from the time zone given by from_tz to the time zone given by to_tz and returns the resulting value. </p></blockquote>
<p>You have to pass it the timestamp, current timezone (&#8217;SYSTEM&#8217; is the server time zone) and target timezone and it happily converts between them.</p>
<p>So now my query would look like this:</p>
<pre>
<code>
$query = "INSERT INTO recenttracks (artist, name, url, date, type)
	VALUES ( '$lastFmTrack->artist',
	'$lastFmTrack->name',
	'$lastFmTrack->url',
	<strong>CONVERT_TZ(FROM_UNIXTIME(&#8217;$lastFmTrack->playDate&#8217;), &#8216;SYSTEM&#8217;, &#8216;+02:00&#8242;), </strong>
	&#8216;$lastFmTrack->type&#8217;)&#8221;;

</code>
</pre>
<p>Basically that&#8217;s it. Hope it is useful for someone.</p>
<p><em>Mind you, I&#8217;m nothing of an expert in php or mysql, this is just a method which worked for me. Corrections are welcome.</em>
</p>
tags:<a href="http://www.jesusgollonet.com/blog/index.php?tag=date" rel="tag">date</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=last.fm" rel="tag">last.fm</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=mysql" rel="tag">mysql</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=php" rel="tag">php</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=time" rel="tag">time</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=timezones" rel="tag">timezones</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=date" rel="tag">date</a>, <a href="http://www.jesusgollonet.com/blog/index.php?tag=last.fm" rel="tag">last.fm</a>, <a href="http://www.jesusgollonet.com/blog/index.php?tag=mysql" rel="tag">mysql</a>, <a href="http://www.jesusgollonet.com/blog/index.php?tag=php" rel="tag">php</a>, <a href="http://www.jesusgollonet.com/blog/index.php?tag=time" rel="tag">time</a>, <a href="http://www.jesusgollonet.com/blog/index.php?tag=timezones" rel="tag">timezones</a>]]></description>
			<content:encoded><![CDATA[<p>Just a quick code tip for working with dates in mysql and php. </p>
<p>I&#8217;m building a script to regularly mirror my last.fm recent tracks to a mysql database of my own. I&#8217;m interested in experimenting with daily and hourly statistics.</p>
<p>One problem that has taken me some head scratching has been the fact that the <a href="http://audioscrobbler.net/data/webservices/#User%20Profile%20Data">last.fm recentracks web service</a> gives me the date a given track was played in a timestamp of my current timezone (+02:00 , Europe/Paris, as I&#8217;ve just learnt), but my web server is on a different timezone (-05:00, America/Los_Angeles), so when I try to insert a date in the database, even though I&#8217;m giving it a timestamp, it gets interpreted as being 7 hours less than it actually is. So a track played at let&#8217;s say <em>31 Mar 2007, 23:55</em> would be stored as having been played at <em>31 Mar 2007, 16:55</em>. Not good.</p>
<p>Not wanting to fiddle with configurations or anything beyond my knowledge, I discovered that I could set the timezone in both php and mysql for a given script or db query. </p>
<h3>Setting the timezone in php</h3>
<p>If you want to know which timezone your server is in, you can guess it with</p>
<p><code><br />
date_default_timezone_get();<br />
</code></p>
<p>Which should give you a string like &#8220;America/Los_Angeles&#8221; or any other of the <a href="http://es.php.net/manual/en/timezones.php">supported timezones list</a></p>
<p>If it is different than your desired timezone, look for the one you want in the list and before doing any time operation, call:</p>
<p><code><br />
// set your timezone as gmt +02:00<br />
date_default_timezone_set("Europe/Paris");<br />
</code></p>
<p>From then on, all your php code should understand timestamps and dates in that timezone.</p>
<h3>Then for mysql use CONVERT_TZ</h3>
<p>Even though it is corrected in php, you&#8217;ll have to do it also when inserting information on you mysql db, because it will interpret timestamps again in its time zone. You can guess which is it by having a look at the system time zone variable.</p>
<p>In my case, after trying some hacky alternatives I discovered CONVERT_TZ in one of the latest comments in <a href="http://www.modwest.com/help/kb6-256.html" title ="how do I change mysql timezone">this post</a></p>
<p>From the <a href="http://dev.mysql.com/doc/refman/5.0/en/date-and-time-functions.html#function_convert-tz">mysql manual</a></p>
<p><code><br />
CONVERT_TZ(dt,from_tz,to_tz)<br />
</code></p>
<blockquote><p>CONVERT_TZ() converts a datetime value dt from the time zone given by from_tz to the time zone given by to_tz and returns the resulting value. </p></blockquote>
<p>You have to pass it the timestamp, current timezone (&#8217;SYSTEM&#8217; is the server time zone) and target timezone and it happily converts between them.</p>
<p>So now my query would look like this:</p>
<pre>
<code>
$query = "INSERT INTO recenttracks (artist, name, url, date, type)
	VALUES ( '$lastFmTrack->artist',
	'$lastFmTrack->name',
	'$lastFmTrack->url',
	<strong>CONVERT_TZ(FROM_UNIXTIME(&#8217;$lastFmTrack->playDate&#8217;), &#8216;SYSTEM&#8217;, &#8216;+02:00&#8242;), </strong>
	&#8216;$lastFmTrack->type&#8217;)&#8221;;

</code>
</pre>
<p>Basically that&#8217;s it. Hope it is useful for someone.</p>
<p><em>Mind you, I&#8217;m nothing of an expert in php or mysql, this is just a method which worked for me. Corrections are welcome.</em>
</p>
tags:<a href="http://www.jesusgollonet.com/blog/index.php?tag=date" rel="tag">date</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=last.fm" rel="tag">last.fm</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=mysql" rel="tag">mysql</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=php" rel="tag">php</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=time" rel="tag">time</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=timezones" rel="tag">timezones</a> <a href="http://www.jesusgollonet.com/blog/index.php?tag=date" rel="tag">date</a>, <a href="http://www.jesusgollonet.com/blog/index.php?tag=last.fm" rel="tag">last.fm</a>, <a href="http://www.jesusgollonet.com/blog/index.php?tag=mysql" rel="tag">mysql</a>, <a href="http://www.jesusgollonet.com/blog/index.php?tag=php" rel="tag">php</a>, <a href="http://www.jesusgollonet.com/blog/index.php?tag=time" rel="tag">time</a>, <a href="http://www.jesusgollonet.com/blog/index.php?tag=timezones" rel="tag">timezones</a>]]></content:encoded>
			<wfw:commentRSS>http://www.jesusgollonet.com/blog/2007/04/13/php-mysql-different-time-zone/feed/</wfw:commentRSS>
		</item>
	</channel>
</rss>
