<?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/"
	>

<channel>
	<title>The Nerdiest Place on Earth</title>
	<atom:link href="http://jasonswett.net/feed/" rel="self" type="application/rss+xml" />
	<link>http://jasonswett.net</link>
	<description>A Blog About Software Development, Databases, And Stuff That Doesn&#039;t Have To Do With Computers</description>
	<lastBuildDate>Mon, 21 Jun 2010 21:36:00 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.1</generator>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
			<item>
		<title>Niki at the beach</title>
		<link>http://jasonswett.net/niki-at-the-beach/</link>
		<comments>http://jasonswett.net/niki-at-the-beach/#comments</comments>
		<pubDate>Mon, 21 Jun 2010 21:36:00 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[Photography]]></category>

		<guid isPermaLink="false">http://jasonswett.net/?p=933</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/filthyj/4721756847/" title="beach4 by Filthy J, on Flickr"><img src="http://farm2.static.flickr.com/1309/4721756847_352f45171f.jpg" width="500" height="334" alt="beach4" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://jasonswett.net/niki-at-the-beach/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Some folks in a tree</title>
		<link>http://jasonswett.net/some-folks-in-a-tree/</link>
		<comments>http://jasonswett.net/some-folks-in-a-tree/#comments</comments>
		<pubDate>Tue, 15 Jun 2010 02:02:07 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[Photography]]></category>

		<guid isPermaLink="false">http://jasonswett.net/?p=906</guid>
		<description><![CDATA[
]]></description>
			<content:encoded><![CDATA[<p><a href="http://www.flickr.com/photos/filthyj/4701406607/" title="tree by Filthy J, on Flickr"><img src="http://farm5.static.flickr.com/4052/4701406607_60856ddea8.jpg" width="335" height="500" alt="tree" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://jasonswett.net/some-folks-in-a-tree/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Guitar lessons available!</title>
		<link>http://jasonswett.net/guitar-lessons-available/</link>
		<comments>http://jasonswett.net/guitar-lessons-available/#comments</comments>
		<pubDate>Tue, 01 Jun 2010 20:13:35 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[Music]]></category>

		<guid isPermaLink="false">http://jasonswett.net/?p=882</guid>
		<description><![CDATA[Has your son been hounding you for an electric guitar, but now that you&#8217;ve finally bought him one, you can&#8217;t stand the sounds you&#8217;re hearing from the garage? Or maybe you&#8217;ve picked up an axe yourself and realized you don&#8217;t know how to shred. Or perhaps you can pluck the old six-string cowboy okay but [...]]]></description>
			<content:encoded><![CDATA[<p>Has your son been hounding you for an electric guitar, but now that you&#8217;ve finally bought him one, you can&#8217;t stand the sounds you&#8217;re hearing from the garage? Or maybe you&#8217;ve picked up an axe yourself and realized you don&#8217;t know how to shred. Or perhaps you can pluck the old six-string cowboy okay but every time you try to play your favorite tune, it sounds a little off. I can help you fix these problems!</p>
<p>Why should you choose me for guitar lessons?</p>
<ol>
<li>Instead of teaching you Mary Had a Little Lamb or other tired songs no  one actually wants to play, I&#8217;ll teach you whatever songs you want to learn. The Beatles? Rage Against The Machine? Lady Gaga? In the words of Roy Orbison, &#8220;You got it.&#8221;</li>
<li>Whether you want to wail on the electric Van Halen-style or you&#8217;re more into Simon &amp; Garfunkel, I can show you how to fine-tune your style.</li>
<li>You&#8217;ll be learning from someone with over 10 years of playing  experience.</li>
<li>Your age and skill level don&#8217;t matter. I&#8217;ve taught both kids and adults, both novices and absolute beginners.</li>
<li>It won&#8217;t cost you an arm and a leg. $10 per half hour and the first half-hour lesson is FREE!</li>
</ol>
<p>So if you or someone you know is in desperate need of guitar lessons, why not get a hold of me and schedule your first free guitar lesson? Paired with a new guitar, you couldn&#8217;t ask for a better Father&#8217;s Day gift! Call or e-mail today:</p>
<p>Phone: (616) 856-8075</p>
<p>E-mail: jason.swett@gmail.com</p>
<p><a href="http://www.flickr.com/photos/filthyj/4660561789/" title="eddie_van_halen_7 by Filthy J, on Flickr"><img src="http://farm5.static.flickr.com/4035/4660561789_531f4c9253_o.jpg" width="348" height="448" alt="eddie_van_halen_7" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://jasonswett.net/guitar-lessons-available/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to validate and sanitize a phone number in symfony</title>
		<link>http://jasonswett.net/how-to-validate-and-sanitize-a-phone-number-in-symfony/</link>
		<comments>http://jasonswett.net/how-to-validate-and-sanitize-a-phone-number-in-symfony/#comments</comments>
		<pubDate>Mon, 31 May 2010 18:59:03 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://jasonswett.net/?p=875</guid>
		<description><![CDATA[This validator works for symfony 1.4 and is not necessarily backward compatible.
If you&#8217;d like to both validate and sanitize a phone number in symfony, it&#8217;s pretty easy. First, put the following code in lib/sfValidatorPhone.class.php:

&#60;?php
&#160;
/**
 * sfValidatorPhone validates a phone number.
 *
 * @author Jason Swett (http://jasonswett.net/how-to-validate-a-phone-number-in-symfony)
 */
class sfValidatorPhone extends sfValidatorBase
&#123;
  protected function doClean&#40;$value&#41;
  [...]]]></description>
			<content:encoded><![CDATA[<p>This validator works for symfony 1.4 and is not necessarily backward compatible.</p>
<p>If you&#8217;d like to both validate and sanitize a phone number in symfony, it&#8217;s pretty easy. First, put the following code in <code>lib/sfValidatorPhone.class.php</code>:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span>
&nbsp;
<span style="color: #009933; font-style: italic;">/**
 * sfValidatorPhone validates a phone number.
 *
 * @author Jason Swett (http://jasonswett.net/how-to-validate-a-phone-number-in-symfony)
 */</span>
<span style="color: #000000; font-weight: bold;">class</span> sfValidatorPhone <span style="color: #000000; font-weight: bold;">extends</span> sfValidatorBase
<span style="color: #009900;">&#123;</span>
  protected <span style="color: #000000; font-weight: bold;">function</span> doClean<span style="color: #009900;">&#40;</span><span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span>
  <span style="color: #009900;">&#123;</span>
    <span style="color: #000088;">$clean</span> <span style="color: #339933;">=</span> <span style="color: #009900;">&#40;</span>string<span style="color: #009900;">&#41;</span> <span style="color: #000088;">$value</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #000088;">$phone_number_pattern</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'/^(^(1\s*[-\/\.]?)?(\((\d{3})\)|(\d{3}))\s*[-\/\.]?\s*(\d{3})\s*[-\/\.]?\s*(\d{4})\s*(([xX]|[eE][xX][tT])\.?\s*(\d+))*$)*$/'</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// If the value isn't a phone number, throw an error.</span>
    <span style="color: #b1b100;">if</span> <span style="color: #009900;">&#40;</span><span style="color: #339933;">!</span><span style="color: #990000;">preg_match</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$phone_number_pattern</span><span style="color: #339933;">,</span> <span style="color: #000088;">$clean</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span>
    <span style="color: #009900;">&#123;</span>
      throw <span style="color: #000000; font-weight: bold;">new</span> sfValidatorError<span style="color: #009900;">&#40;</span><span style="color: #000088;">$this</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">'invalid'</span><span style="color: #339933;">,</span> <span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'value'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #000088;">$value</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #009900;">&#125;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// Take out anything that's not a number.</span>
    <span style="color: #000088;">$clean</span> <span style="color: #339933;">=</span> <span style="color: #990000;">preg_replace</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'/[^0-9]/'</span><span style="color: #339933;">,</span> <span style="color: #0000ff;">''</span><span style="color: #339933;">,</span> <span style="color: #000088;">$clean</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// Split the phone number into its three parts.</span>
    <span style="color: #000088;">$first_part</span> <span style="color: #339933;">=</span> <span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$clean</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">0</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">3</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$second_part</span> <span style="color: #339933;">=</span> <span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$clean</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">3</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">3</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
    <span style="color: #000088;">$third_part</span> <span style="color: #339933;">=</span> <span style="color: #990000;">substr</span><span style="color: #009900;">&#40;</span><span style="color: #000088;">$clean</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">6</span><span style="color: #339933;">,</span> <span style="color: #cc66cc;">4</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #666666; font-style: italic;">// Format the phone number.</span>
    <span style="color: #000088;">$clean</span> <span style="color: #339933;">=</span> <span style="color: #0000ff;">'('</span><span style="color: #339933;">.</span><span style="color: #000088;">$first_part</span><span style="color: #339933;">.</span><span style="color: #0000ff;">') '</span><span style="color: #339933;">.</span><span style="color: #000088;">$second_part</span><span style="color: #339933;">.</span><span style="color: #0000ff;">'-'</span><span style="color: #339933;">.</span><span style="color: #000088;">$third_part</span><span style="color: #339933;">;</span>
&nbsp;
    <span style="color: #b1b100;">return</span> <span style="color: #000088;">$clean</span><span style="color: #339933;">;</span>
  <span style="color: #009900;">&#125;</span>
<span style="color: #009900;">&#125;</span></pre></div></div>

<p>Then, in the form where you have your phone number field, add the following line to your <code>configure()</code> method:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">validatorSchema</span><span style="color: #009900;">&#91;</span><span style="color: #0000ff;">'phone'</span><span style="color: #009900;">&#93;</span> <span style="color: #339933;">=</span> <span style="color: #000000; font-weight: bold;">new</span> sfValidatorPhone<span style="color: #009900;">&#40;</span><span style="color: #990000;">array</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'required'</span> <span style="color: #339933;">=&gt;</span> <span style="color: #009900; font-weight: bold;">false</span><span style="color: #009900;">&#41;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>That&#8217;s all! Now, if someone enters a number like 123.456.7890, it will get saved as (123) 456-7890.</p>
]]></content:encoded>
			<wfw:commentRss>http://jasonswett.net/how-to-validate-and-sanitize-a-phone-number-in-symfony/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Improved search, new sellers on Food Near You</title>
		<link>http://jasonswett.net/improved-search-new-sellers-on-food-near-you/</link>
		<comments>http://jasonswett.net/improved-search-new-sellers-on-food-near-you/#comments</comments>
		<pubDate>Mon, 31 May 2010 14:24:44 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Eating Local]]></category>
		<category><![CDATA[Food Near You]]></category>

		<guid isPermaLink="false">http://jasonswett.net/?p=862</guid>
		<description><![CDATA[I&#8217;ve improved the search and added some new sellers on Food Near You. Let me cover the new sellers first:
West Michigan Cooperative
West Michigan Cooperative is an &#8220;online farmers market&#8221; in Grand Rapids, Michigan. Their sellers include Crane Dance Farm where you can get beef, chicken, pork, duck, turkey and more; Mud Lake Farm where you [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve improved the search and added some new sellers on Food Near You. Let me cover the new sellers first:</p>
<h3>West Michigan Cooperative</h3>
<p><a href="http://foodnearyou.org/farmers-market/west-michigan-cooperative">West Michigan Cooperative</a> is an &#8220;online farmers market&#8221; in Grand Rapids, Michigan. Their sellers include <a href="http://foodnearyou.org/farm/crane-dance-farm">Crane Dance Farm</a> where you can get beef, chicken, pork, duck, turkey and more; <a href="http://foodnearyou.org/farm/mud-lake-farm">Mud Lake Farm</a> where you can get lettuce and all that stuff; and three newcomers to FNY: <a href="http://foodnearyou.org/farm/h-w-farms">H&#038;W Farms</a>, <a href="http://foodnearyou.org/farm/jennings-bros-stone-ground-grains">Jennings Bros. Stone Ground Grains</a> and <a href="http://foodnearyou.org/farm/joint-wells-orchards">Joint Wells Orchards</a>.</p>
<h3>H&#038;W Farms</h3>
<p><a href="http://foodnearyou.org/farm/h-w-farms">H&#038;W Farms</a> sells mostly cherries. In addition to regular old cherries, they sell cherry juice and dried cherries. If you go there, I&#8217;m sure you will have a cherry good time!</p>
<h3>Joint Wells Orchards</h3>
<p><a href="http://foodnearyou.org/farm/joint-wells-orchards">Joint Wells Orchards</a> has apples, apricots, cherries, nectarines, peaches, pears, plums and a bunch of other stuff!</p>
<h3>Jennings Bros. Stone Ground Grains</h3>
<p>Despite the flour-ey descriptions of farm life you might hear, these guys are putting their noses to the grindstone to bring you several different types of flour and corn meal. If you&#8217;d like to go against the grain and buy your flour direct from the farm instead of at the supermarket, check out <a href="http://foodnearyou.org/farm/jennings-bros-stone-ground-grains">Jennings Bros. Stone Ground Grains</a>.</p>
<h3>Improved Search</h3>
<p>A few days ago I announced that I had <a href="http://jasonswett.net/food-near-you-search-just-got-smarter/">improved the FNY search</a>. One of the half-measures of the improved search was that if you wanted to search for &#8220;Bob&#8217;s Farm,&#8221; you could do that, but you couldn&#8217;t search for grocers, restaurants or farmers markets by name. Just farms. Now you can search for anything by name. What&#8217;s more, if FNY can figure out exactly which place you&#8217;re talking about, it just cut to the chase and take you straight there. For example, searching for &#8220;jennings&#8221; puts you right on the Jennings Bros. page and searching for &#8220;fulton&#8221; takes you straight to Fulton Street Farmers Market. It&#8217;s a miracle of technology!</p>
<p>I&#8217;ll be adding more stuff soon, so keep your eyes peeled.</p>
]]></content:encoded>
			<wfw:commentRss>http://jasonswett.net/improved-search-new-sellers-on-food-near-you/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>A dream I had last night</title>
		<link>http://jasonswett.net/a-retarded-dream-i-had-last-night/</link>
		<comments>http://jasonswett.net/a-retarded-dream-i-had-last-night/#comments</comments>
		<pubDate>Sun, 30 May 2010 01:46:42 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jasonswett.net/?p=857</guid>
		<description><![CDATA[Last night I had a dream that I was in a house with a fly problem. Flies everywhere. My solution to this problem was to buy about half a dozen frogs and set them on the table. After I did this, I crouched over the table and stared intently at  the frogs. &#8220;I can&#8217;t [...]]]></description>
			<content:encoded><![CDATA[<p>Last night I had a dream that I was in a house with a fly problem. Flies everywhere. My solution to this problem was to buy about half a dozen frogs and set them on the table. After I did this, I crouched over the table and stared intently at  the frogs. &#8220;I can&#8217;t wait to see these guys go to work!&#8221; I thought. I watched them snap up the flies with their crazy little tongues. Eventually the frogs all turned into people, but they kept slapping up flies with their tongues, but now in super-slow-motion. Whoa!</p>
<p>The second part of the dream was even weirder and dumber. I had these frozen pizzas and each pizza had a little tab on the crust. The idea was that you had to shove it down just right in order to &#8220;start&#8221; the pizza, kind of like starting a dirt bike. If you shoved the tab down too soft or too hard, the pizza wouldn&#8217;t start. It really took some finesse. The instructions for starting the pizza were &#8220;1. Hold the pizza perfectly level and 2. Make sure the pizza knows that you&#8217;re bringing it into a loving world.&#8221; The idea with that second one is that you have to telepathically communicate your emotions to the pizza. That part was <em>really </em>tough. Eventually my friend Pat showed up with a pizza and we were both trying really hard to start our frozen pizzas. Eventually mine got too warm, the tab got all floppy and I said, &#8220;Screw it! I can&#8217;t start this pizza with this floppy tab!&#8221;</p>
]]></content:encoded>
			<wfw:commentRss>http://jasonswett.net/a-retarded-dream-i-had-last-night/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>If you used to skateboard and stopped skating, you should start skating again!</title>
		<link>http://jasonswett.net/if-you-used-to-skateboard-and-stopped-skating-you-should-start-skating-again/</link>
		<comments>http://jasonswett.net/if-you-used-to-skateboard-and-stopped-skating-you-should-start-skating-again/#comments</comments>
		<pubDate>Sun, 30 May 2010 01:22:45 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[Uncategorized]]></category>

		<guid isPermaLink="false">http://jasonswett.net/?p=849</guid>
		<description><![CDATA[As people get older, their priorities always seem to shift. After I got my first real adult job, I found that I &#8220;didn&#8217;t have time&#8221; for most of the things I used to like to do, like drawing, music, and especially skateboarding. In fact it was really during college when I fell off the shred [...]]]></description>
			<content:encoded><![CDATA[<p>As people get older, their priorities always seem to shift. After I got my first real adult job, I found that I &#8220;didn&#8217;t have time&#8221; for most of the things I used to like to do, like drawing, music, and especially skateboarding. In fact it was really during college when I fell off the shred wagon. And whenever you ask somebody who used to skate why they stopped skating, they almost always say, &#8220;Not enough time.&#8221;</p>
<p>Not enough time? Bullshit! You do have time! Especially if you&#8217;re like me: you&#8217;re done with college and your friend group has slowly dwindled to a number you can count on one hand. And even if that&#8217;s not the case, it&#8217;s a fact that <em>you make time for what&#8217;s important to you.</em> If you haven&#8217;t made time for skateboarding, it just means it&#8217;s not that important to you.</p>
<p>My advice is to make skateboarding important again. Remember how fun it is to skate! Remember what it feels like to catch a kickflip in the air and stomp it to the ground. Remember what it feels like to get exercise and feel good.</p>
<p>About a month and a half ago, I got mad at myself for going all these years without skating and I bought a new skateboard. It took me a little bit to get back into the swing of things but it really doesn&#8217;t take that long to get good again. After a few days, I could kickflip, 180, backside 180, nollie and ollie at least a deck high. After a few weeks I could kickflip up and down curbs, fakie kickflip and fakie frontside flip. And that&#8217;s after taking a pretty solid two-year break!</p>
<p>So what excuse do you really have not to skate anymore? It&#8217;s not because it&#8217;s not fun. It&#8217;s not that hard to get good again. And you <em>do</em> have time. The exercise will make you feel good and help you get in shape. If you feel like something is missing from your life and things aren&#8217;t that fun anymore, remember that skateboarding is always a fun thing you can do. So please, go skate!</p>
]]></content:encoded>
			<wfw:commentRss>http://jasonswett.net/if-you-used-to-skateboard-and-stopped-skating-you-should-start-skating-again/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Changing your title in symfony</title>
		<link>http://jasonswett.net/changing-your-title-in-symfony/</link>
		<comments>http://jasonswett.net/changing-your-title-in-symfony/#comments</comments>
		<pubDate>Fri, 28 May 2010 21:42:09 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[symfony]]></category>

		<guid isPermaLink="false">http://jasonswett.net/?p=834</guid>
		<description><![CDATA[The following is for symfony 1.4 and is not necessarily backward compatible.
If you just want to completely change your title in symfony and you&#8217;re okay with wiping out whatever&#8217;s already there, it&#8217;s simple. Just use this in your action:

$this-&#62;getResponse&#40;&#41;-&#62;setTitle&#40;'My New Title'&#41;;

But what if you want to keep the first part of your app&#8217;s title and [...]]]></description>
			<content:encoded><![CDATA[<p>The following is for symfony 1.4 and is not necessarily backward compatible.</p>
<p>If you just want to completely change your title in symfony and you&#8217;re okay with wiping out whatever&#8217;s already there, it&#8217;s simple. Just use this in your action:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getResponse</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setTitle</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'My New Title'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>But what if you want to keep the first part of your app&#8217;s title and only change the rest? That&#8217;s also pretty easy. In <code>apps/frontend/templates/layout.php</code>, just change this</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000000; font-weight: bold;">&lt;?php</span> include_title<span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span></pre></div></div>

<p>to this:</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;">&lt;title&gt;The Static Part of Your Title <span style="color: #000000; font-weight: bold;">&lt;?php</span> <span style="color: #b1b100;">echo</span> <span style="color: #000088;">$sf_response</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getTitle</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span> <span style="color: #000000; font-weight: bold;">?&gt;</span>&lt;/title&gt;</pre></div></div>

<p>Now when you do this in your action</p>

<div class="wp_syntax"><div class="code"><pre class="php" style="font-family:monospace;"><span style="color: #000088;">$this</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">getResponse</span><span style="color: #009900;">&#40;</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">-&gt;</span><span style="color: #004000;">setTitle</span><span style="color: #009900;">&#40;</span><span style="color: #0000ff;">'My New Title'</span><span style="color: #009900;">&#41;</span><span style="color: #339933;">;</span></pre></div></div>

<p>The &#8220;The Static Part of Your Title&#8221; will still be there and only the rest of it will have changed.</p>
]]></content:encoded>
			<wfw:commentRss>http://jasonswett.net/changing-your-title-in-symfony/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Food Near You search just got smarter</title>
		<link>http://jasonswett.net/food-near-you-search-just-got-smarter/</link>
		<comments>http://jasonswett.net/food-near-you-search-just-got-smarter/#comments</comments>
		<pubDate>Fri, 28 May 2010 16:52:09 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Eating Local]]></category>
		<category><![CDATA[Food]]></category>
		<category><![CDATA[Food Near You]]></category>

		<guid isPermaLink="false">http://jasonswett.net/?p=801</guid>
		<description><![CDATA[Before today, the Food Near You search worked like this: you could enter your address or ZIP code and it would find local food sellers for you. It was okay, but if you wanted to find Bob&#8217;s Farm or find places close to you that sold eggs, you were out of luck. But now you [...]]]></description>
			<content:encoded><![CDATA[<p>Before today, the <a href="http://foodnearyou.org/">Food Near You</a> search worked like this: you could enter your address or ZIP code and it would find local food sellers for you. It was okay, but if you wanted to find Bob&#8217;s Farm or find places close to you that sold eggs, you were out of luck. But now you can search in exciting new ways!</p>
<p>If you&#8217;re unfamiliar with Food Near You, you might want to read <a href="http://jasonswett.net/food-near-you/">this</a>.</p>
<p>Let&#8217;s say you&#8217;d like to find places that sell eggs near 49505. You can do this:<br />
<img src="http://jasonswett.net/wp-content/uploads/2010/05/49505-eggs.png" alt="" /></p>
<p>Since FNY is only keeping track of what produce is offered by farms and farmers markets right now (not restaurants or grocers yet), those are the only types of results you&#8217;ll see when you search this way.</p>
<p>And you can go ahead and get crazy with the ingredients. You can list as many as you want:<br />
<img src="http://jasonswett.net/wp-content/uploads/2010/05/49505-peas-and-carrots.png" alt="" /></p>
<p>And if it&#8217;s more important to you to find everything in one place than it is to find the closest possible places, you can leave out the location and search for products only:<br />
<img src="http://jasonswett.net/wp-content/uploads/2010/05/apples-strawberries-peaches.png" alt="" /></p>
<p>Want to find a farm by name? You can do that. (Right now, this only works with farms. Eventually you&#8217;ll be able to do this with any kind of seller.)<br />
<img src="http://jasonswett.net/wp-content/uploads/2010/05/earth.png" alt="" /></p>
<p>And of course, you can still search by just location and see everything near you.<br />
<img src="http://jasonswett.net/wp-content/uploads/2010/05/49505.png" alt="" /></p>
<p><a href="http://foodnearyou.org/">Visit Food Near You</a> to see the search in action!</p>
<p>What do you think of the new search? What else would you like to see from Food Near You? I would really appreciate any feedback. If you&#8217;d like to tell me what you think, you can leave a comment here or use the <a href="http://foodnearyou.org/contact">Food Near You contact form</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://jasonswett.net/food-near-you-search-just-got-smarter/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Food Near You</title>
		<link>http://jasonswett.net/food-near-you/</link>
		<comments>http://jasonswett.net/food-near-you/#comments</comments>
		<pubDate>Thu, 20 May 2010 00:06:39 +0000</pubDate>
		<dc:creator>jason</dc:creator>
				<category><![CDATA[Business]]></category>
		<category><![CDATA[Eating Local]]></category>
		<category><![CDATA[Food]]></category>
		<category><![CDATA[Food Near You]]></category>

		<guid isPermaLink="false">http://jasonswett.net/?p=789</guid>
		<description><![CDATA[Around the end of April 2010, I launched my latest project, Food Near You.
About Food Near You
What is Food Near You? Like it says on the website&#8217;s about page, Food Near You is a tool to help you find:

Farmers markets
Farms
Restaurants that serve locally-grown food
Grocers that sell local produce in their stores

Right now you can find [...]]]></description>
			<content:encoded><![CDATA[<p>Around the end of April 2010, I launched my latest project, <a href="http://foodnearyou.org/">Food Near You</a>.</p>
<h3>About Food Near You</h3>
<p>What is Food Near You? Like it says on the website&#8217;s <a href="http://foodnearyou.org/about">about page</a>, Food Near You is a tool to help you find:</p>
<ul>
<li>Farmers markets</li>
<li>Farms</li>
<li>Restaurants that serve locally-grown food</li>
<li>Grocers that sell local produce in their stores</li>
</ul>
<p>Right now you can find all those things on Food Near You, with an emphasis on farms and farmers markets. Aren&#8217;t there already sites that do this? Yes, but none of them meet all these criteria:</p>
<ul>
<li>The site is easy to use</li>
<li>The site is filled with high-quality data including pictures</li>
<li>The site covers the entire United States</li>
</ul>
<p>I still have a ways to go with the quality of my data but I&#8217;m working on it. I definitely don&#8217;t have data for all of the United States yet but I&#8217;m starting where I live and working my way out. Ease of use is something I&#8217;ve planned in from the very beginning and that&#8217;s where I believe I have the real leg up. Sites like <a href="http://www.localharvest.org/">Local Harvest</a> and the <a href="http://www.eatwellguide.org/">Eat Well Guide</a> have similar goals to Food Near You but they&#8217;re frustrating to use. If Food Near You has better data, it covers all the same areas as the competitors and it&#8217;s easier to use, why would people use anything other than Food Near You?</p>
<h3>Why Eat Locally?</h3>
<p>Why would people go out of their way to purchase locally-grown food? Entire books have been written on the topic, but in a nutshell:</p>
<ul>
<li>Locally-grown food travels a shorter distance from farm to plate, burning less fuel in transportation.</li>
<li>Because it doesn&#8217;t have to embark on a long journey, locally-grown food can be grown for flavor and nutrition rather than durability.</li>
<li>Locally-grown food is typically fresher than food you would buy at a supermarket.</li>
<li>If you know the sources from which you&#8217;re buying, you know whether you&#8217;re buying food that was grown in a way with which you agree. (For example, is the produce organic or was it grown with pesticides? Is the beef grass-fed or grain-fed?)</li>
</ul>
<h3>Focusing on West Michigan First</h3>
<p>Right now I&#8217;m focusing on West Michigan, especially the Grand Rapids, Michigan area. I can get the highest-quality data if I can actually go visit the farms, talk to the farmers and take pictures myself. Local Harvest has a lot of data, but it&#8217;s not all very good. I&#8217;d rather have a Michigan-only site with awesome data than have a country-wide site with just-okay data.</p>
<h3>What&#8217;s New With Food Near You</h3>
<p>I&#8217;ve been spending a lot of my free time on Food Near You, both on the programming and on collecting data on local food sellers. I&#8217;m also getting a lot of great help and advice from my girlfriend and my friend Zach. Without them, it wouldn&#8217;t be possible for Food Near You to be what it is. In the beginning (which was a few weeks ago), you could search for local food sellers by typing in your zip code or address and Food Near You would give you a list. Each seller&#8217;s page would have a blurb talking about that particular seller, the seller&#8217;s address, phone number, website and hours (but not every seller has all those things &#8211; for example, most farms don&#8217;t have hours).</p>
<p>In the last week or so, I&#8217;ve added:</p>
<ul>
<li>Tons of new local food sellers, especially farms and farmers markets</li>
<li>A <a href="http://foodnearyou.org/contact">contact page</a> (feedback is greatly appreciated!)</li>
<li>Farms: I&#8217;ve added a list of what the farm produces and which farmers markets carry their produce (see <a href="http://foodnearyou.org/farm/trillium-haven-farm">Trillium Haven Farm</a> in Jenison for a good example)</li>
<li>Farmers Markets: I&#8217;ve added a list of farmers who bring produce to the farmers market (see <a href="http://foodnearyou.org/farmers-market/fulton-street-farmers-market">Fulton Street Farmers Market</a> in Grand Rapids for a good example)</li>
</ul>
<p>I have a long list of features I plan on adding but I&#8217;d rather talk about things I&#8217;ve already done than things I plan on doing. When there&#8217;s more news, I&#8217;ll let you know. For now, why not hop on <a href="http://foodnearyou.org">Food Near You</a> and see what&#8217;s in your area?</p>
<p><a href="http://foodnearyou.org">Visit Food Near You</a></p>
]]></content:encoded>
			<wfw:commentRss>http://jasonswett.net/food-near-you/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
	</channel>
</rss>
