<?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>Matt Mazur &#187; Programming</title>
	<atom:link href="http://www.mattmazur.com/category/programming/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.mattmazur.com</link>
	<description>Let's see what happens</description>
	<lastBuildDate>Tue, 07 Feb 2012 01:32:51 +0000</lastBuildDate>
	<language>en</language>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
	<generator>http://wordpress.org/?v=3.3.1</generator>
		<item>
		<title>How to Switch Your Cedar Heroku App from Webrick to Thin</title>
		<link>http://www.mattmazur.com/2012/01/how-to-switch-your-cedar-heroku-app-from-webrick-to-thin/</link>
		<comments>http://www.mattmazur.com/2012/01/how-to-switch-your-cedar-heroku-app-from-webrick-to-thin/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 14:42:38 +0000</pubDate>
		<dc:creator>mattm</dc:creator>
				<category><![CDATA[Lean Domain Search]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.mattmazur.com/?p=1724</guid>
		<description><![CDATA[Received an en email today from Cody K on my use of Webrick in production for Lean Domain Search: Hey Matt, Lean Domain Search is really neat &#8211; thanks for making it available. Just wanted to let you know that it&#8217;s a really bad idea to run Ruby web apps with Webrick in production &#8211; [...]]]></description>
			<content:encoded><![CDATA[<p>Received an en email today from Cody K on my use of Webrick in production for Lean Domain Search:</p>
<blockquote><p>Hey Matt,</p>
<p>Lean Domain Search is really neat &#8211; thanks for making it available.</p>
<p>Just wanted to let you know that it&#8217;s a really bad idea to run Ruby web apps with Webrick in production &#8211; you should be using something like nginx and either Unicorn or Passenger. Those are battle-hardened and production-ready, whereas Webrick&#8217;s sole purpose is for development environments, and, as such, is not heavily tested (if at all) for security issues and whatnot.</p>
<p>Just a friendly heads up. :) Thanks again.</p></blockquote>
<p>Heroku&#8217;s <a href="http://devcenter.heroku.com/articles/rails3">Rails 3 docs</a> are also pretty clear on this and I remember reading it during my initial upgrade, but never got around to actually doing it.</p>
<blockquote><p>Thin is a recommended app server over Webrick (the default for rails). </p></blockquote>
<p>Switching to Thin is pretty easy:</p>
<p>1. Add <code>gem 'thin'</code> to your Gemfile:</p>
<p><a href="http://www.mattmazur.com/wp/wp-content/uploads/2012/01/gemfile_thin.png"><img src="http://www.mattmazur.com/wp/wp-content/uploads/2012/01/gemfile_thin.png" alt="" title="gemfile_thin" width="425" height="497" class="alignnone size-full wp-image-1725" /></a></p>
<p>I added it to the production group because I want to keep using Webrick in development for now.</p>
<p>2. Make sure that you run <code>bundle install</code> to update your Gemfile otherwise you&#8217;ll receive a warning like this when you push to Heroku:</p>
<pre>You are trying to install in deployment mode after changing
your Gemfile. Run `bundle install` elsewhere and add the
updated Gemfile.lock to version control.
You have added to the Gemfile:
* thin</pre>
<p>3. Add a <a href="http://devcenter.heroku.com/articles/procfile">Procfile</a> to your root directory to instruct Heroku to use Thin instead of Webrick:</p>
<p><a href="http://www.mattmazur.com/wp/wp-content/uploads/2012/01/procfile_thin.png"><img src="http://www.mattmazur.com/wp/wp-content/uploads/2012/01/procfile_thin.png" alt="" title="procfile_thin" width="430" height="61" class="alignnone size-full wp-image-1738" /></a></p>
<p>4. Commit and push your updated app to Heroku.</p>
<p>If all went well, you should see something like this in your logs:</p>
<p>2012-01-18T12:44:33+00:00 app[web.1]: >> Using rack adapter<br />
2012-01-18T12:44:33+00:00 app[web.1]: >> <b>Thin web server (v1.3.1 codename Triple Espresso)</b><br />
2012-01-18T12:44:33+00:00 app[web.1]: >> Listening on 0.0.0.0:38951, CTRL+C to stop<br />
2012-01-18T12:44:33+00:00 app[web.1]: >> Maximum connections set to 1024<br />
2012-01-18T12:44:34+00:00 heroku[web.1]: State changed from starting to up</p>
<p>Too easy.</p>
<p>One thing confused me though: How did Cody know that I was using Webrick? I emailed him and asked. </p>
<p>His response:</p>
<blockquote><p>I mistakenly typed some bogus characters in at the end of my address bar while I was on your site&#8230;something like this:  http://www.leandomainsearch.com/search?q=up^jf </p></blockquote>
<p>Sure enough, Webrick fails loudly when the URL includes a caret:</p>
<p><a href="http://www.mattmazur.com/wp/wp-content/uploads/2012/01/webrick_error.png"><img src="http://www.mattmazur.com/wp/wp-content/uploads/2012/01/webrick_error.png" alt="" title="webrick_error" width="278" height="107" class="alignnone size-full wp-image-1743" /></a></p>
<p>Touché.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mattmazur.com/2012/01/how-to-switch-your-cedar-heroku-app-from-webrick-to-thin/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Integrating Big Huge Thesaurus&#8217;s API into Lean Domain Search</title>
		<link>http://www.mattmazur.com/2012/01/integrating-big-huge-thesauruss-api-into-lean-domain-search/</link>
		<comments>http://www.mattmazur.com/2012/01/integrating-big-huge-thesauruss-api-into-lean-domain-search/#comments</comments>
		<pubDate>Wed, 18 Jan 2012 14:27:24 +0000</pubDate>
		<dc:creator>mattm</dc:creator>
				<category><![CDATA[Lean Domain Search]]></category>
		<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.mattmazur.com/?p=1727</guid>
		<description><![CDATA[Big Huge Thesaurus by John Watson provides an excellent thesaurus API that can be quickly integrated into any app. The first step is to sign up for an API key which takes less than a minute. The API is free up to 10,000 requests per day and cheap if you need more than that. After [...]]]></description>
			<content:encoded><![CDATA[<p><a href="http://words.bighugelabs.com/">Big Huge Thesaurus</a> by <a href="http://watson-net.com/">John Watson</a> provides an excellent <a href="http://words.bighugelabs.com/api.php">thesaurus API</a> that can be quickly integrated into any app.</p>
<p>The first step is to <a href="http://words.bighugelabs.com/getkey.php">sign up for an API key</a> which takes less than a minute. The API is free up to 10,000 requests per day and cheap if you need more than that. </p>
<p>After you fill out the required information the site will generate an API key for you which you can use to access the API.</p>
<p>Here&#8217;s a simplified example of how I&#8217;m using it with in Lean Domain Search via jQuery:</p>
<pre class="brush: jscript; title: ; notranslate">
$.ajax({
  url : &quot;http://words.bighugelabs.com/api/2/youapikey/&quot; + word + &quot;/json?callback=?&quot;,
  dataType : 'json',
  complete : function(jqXHR, textStatus) {
    if (textStatus == 'parsererror') {
      // Did not find any synonyms
    }
  },
  success : function(data) {
    // Found synonyms
    alert(data);
  }
});
</pre>
<p>(<a href="https://gist.github.com/1633149">View Gist</a>)</p>
<p>Here&#8217;s an example of the returned JSON data for the word &#8220;open&#8221;:</p>
<p><a href="http://www.mattmazur.com/wp/wp-content/uploads/2012/01/thesaurus_json.png"><img src="http://www.mattmazur.com/wp/wp-content/uploads/2012/01/thesaurus_json.png" alt="" title="thesaurus_json" width="227" height="498" class="alignnone size-full wp-image-1731" /></a></p>
<p>Note that the results are broken up by part of speech (noun, adjective, etc) and are further broken up into groups (&#8220;ant&#8221; for antonyms, &#8220;rel&#8221; for related terms, &#8220;sim&#8221; for similar terms, &#8220;syn&#8221; for synonyms).</p>
<p>All in all it took about two hours to integrate the Big Huge Thesaurus API into Lean Domain Search and only because I added some extra functionality (sorting and filtering the synonym list, tracking what % of the searches are discovered via the synonym list, etc). </p>
<p>Here&#8217;s what Lean Domain Search looks like now &#8212; note the synonym list in the right column:</p>
<p><a href="http://www.mattmazur.com/wp/wp-content/uploads/2012/01/lds_thesaurus.png"><img src="http://www.mattmazur.com/wp/wp-content/uploads/2012/01/lds_thesaurus-500x616.png" alt="" title="lds_thesaurus" width="500" height="616" class="alignnone size-Screenshot wp-image-1732" /></a></p>
<p><a href="http://leandomainsearch.com/search?q=open">Click here</a> to check out the results for &#8220;open&#8221;.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mattmazur.com/2012/01/integrating-big-huge-thesauruss-api-into-lean-domain-search/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>How to Automatically Back Up your Heroku site to Dropbox</title>
		<link>http://www.mattmazur.com/2010/10/how-to-automatically-back-up-your-heroku-site-to-dropbox/</link>
		<comments>http://www.mattmazur.com/2010/10/how-to-automatically-back-up-your-heroku-site-to-dropbox/#comments</comments>
		<pubDate>Mon, 11 Oct 2010 15:47:03 +0000</pubDate>
		<dc:creator>mattm</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.mattmazur.com/?p=1486</guid>
		<description><![CDATA[This post will explain how you can configure your machine to automatically back up your Heroku site each night and save the bundle to your Dropbox folder. At a high level, here&#8217;s how it works: 1) Each night at 11pm, a cron job executes a Ruby script that tells Heroku to create a bundle of [...]]]></description>
			<content:encoded><![CDATA[<p>This post will explain how you can configure your machine to automatically back up your Heroku site each night and save the bundle to your Dropbox folder.</p>
<p>At a high level, here&#8217;s how it works:</p>
<p>1) Each night at 11pm, a cron job executes a Ruby script that tells Heroku to create a bundle of your site</p>
<p>2) At midnight, the same script downloads the bundle and moves it to your backup folder, which can either be a local directory or your Dropbox folder</p>
<p><strong>Creating and Downloading a Heroku Bundle</strong></p>
<p>The following Ruby script does one of things depending on whether a bundle exists or not.</p>
<p>If a bundle <em>does not</em> exist, the script tells Heroku to create one. If one <em>does</em> exist, the script will download it and move it to your backup location.</p>
<p>Creating a bundle can take some time depending on how large your site is, so you should wait a while before running the script again to download it, which is why we&#8217;re going to tell the cron job to wait an hour before downloading it.</p>
<p>The script takes two arguments:</p>
<ol>
<li>The full path to your local Heroku application</li>
<li>The full path of your backup folder</li>
</ol>
<p>For example, here&#8217;s how I would have the script back up jMockups:</p>
<p><code>ruby heroku_backup.rb /Users/Matt/jmockups /Users/Matt/Dropbox/Backups/</code></p>
<p>This tells the script that my app is located in <code>/Users/Matt/jmockups</code> and I want to save the bundle to <code>/Users/Matt/Dropbox/Backups/<code>.</code></code></p>
<p>The code:</p>
<pre class="brush: ruby; title: ; notranslate">

APP_DIR = ARGV[0]
BACKUP_DIR = ARGV[1]

# run a command from your app's root directory
def cmd(str)
  return `cd #{APP_DIR}; #{str}`.sub(10.chr, '')
end

puts('* Determining bundle status...')
status = cmd('heroku bundles')

unless status.index(&quot;has no bundles.&quot;).nil?
  # No bundle currently exists, so have Heroku create one
  puts('*** Capturing bundle because none exist...')
  capture = cmd('heroku bundles:capture')
else

  bundle_name = status.split.first

  unless status.index('complete').nil?
    puts('*** Bundle was captured successfully')
    puts('* Downloading bundle...')

    download = cmd('heroku bundles:download')

    puts(&quot;*** Moving #{bundle_name} to backup location...&quot;)
    filename = download.split.last
    newname = &quot;#{bundle_name} (#{Time.now.strftime('%Y-%m-%d %H%M%S')}).tar.gz&quot;

    move = `mv #{APP_DIR}/#{filename} &quot;#{BACKUP_DIR}/#{newname}&quot;`

    puts('*** Destroying remote bundle...')
    destroy = cmd(&quot;heroku bundles:destroy #{bundle_name}&quot;)

    puts('* Done')

  end

  unless status.index('capturing').nil?
    puts('*** Still capturing. Try again in a bit...')
  end

end
</pre>
<p><strong>Automating the Backup Process with Cron<br />
</strong></p>
<p>Once you&#8217;re convinced this works as advertised, you can automate this process with <a href="http://en.wikipedia.org/wiki/Cron">cron</a>:</p>
<ol>
<li>Delete any existing bundles using the <code>heroku bundles:destroy</code> command. If you don&#8217;t the script will download the bundle at 11pm and capture it at midnight, which will work, but is probably opposite of what you intend</li>
<li>At the command line, type <code>crontab -e</code></li>
<li>Add the following line to the crontab file, replacing the paths with your own:</li>
</ol>
<p><code>0 0,23 * * * /usr/bin/ruby /Users/Matt/Documents/Backups/heroku_backup.rb /Users/Matt/jmockups /Users/Matt/Dropbox/Backups</code></p>
<p>This basically says &#8220;<em>When the minute value of the current time is 0 and the hour is 0 or 23 (midnight or 11pm), use Ruby to run heroku_backup.rb with these parameters.</em>&#8221;</p>
<p>With automatic daily backups, you can rest easier by knowing that if your site gets obliterated things will suck a little bit less. And if you have additional sites, you can simply add multiple lines to the crontab file with the information for your other apps.</p>
<p>Plus, it beats paying <a href="http://addons.heroku.com/bundles">$20/month</a> for unlimited bundles with the Heroku addon. :)</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mattmazur.com/2010/10/how-to-automatically-back-up-your-heroku-site-to-dropbox/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Django Masterpiece</title>
		<link>http://www.mattmazur.com/2009/06/django-masterpiece/</link>
		<comments>http://www.mattmazur.com/2009/06/django-masterpiece/#comments</comments>
		<pubDate>Tue, 02 Jun 2009 23:29:41 +0000</pubDate>
		<dc:creator>mattm</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.mattmazur.com/?p=825</guid>
		<description><![CDATA[Let&#8217;s roll:]]></description>
			<content:encoded><![CDATA[<p>Let&#8217;s roll:</p>
<p><a href="http://www.mattmazur.com/wp/wp-content/uploads/2009/06/django.png"><img class="aligncenter size-full wp-image-826" title="django" src="http://www.mattmazur.com/wp/wp-content/uploads/2009/06/django.png" alt="" width="387" height="105" /></a></p>
]]></content:encoded>
			<wfw:commentRss>http://www.mattmazur.com/2009/06/django-masterpiece/feed/</wfw:commentRss>
		<slash:comments>3</slash:comments>
		</item>
		<item>
		<title>Revolution</title>
		<link>http://www.mattmazur.com/2009/05/revolution/</link>
		<comments>http://www.mattmazur.com/2009/05/revolution/#comments</comments>
		<pubDate>Thu, 14 May 2009 02:13:58 +0000</pubDate>
		<dc:creator>mattm</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.mattmazur.com/?p=704</guid>
		<description><![CDATA[(I&#8217;m going to start going over the major projects I&#8217;ve worked on over the years.) This project, dubbed Revolution, was my first major programming endeavor. I worked on it heavily in late 1998 and distinctly remember sending it to my friends in middle school and watching with pride as they used it to scroll massive [...]]]></description>
			<content:encoded><![CDATA[<div id="identi-interface" class="ui-draggable" style="position: absolute; display: none;">
<div id="identi-top-pannel"><img id="identi-logo" src="data:image/png;base64,iVBORw0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AAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAAANXMsgQAAAAV0Uk5T/////wD7tg5TAAAAQ0lEQVR42oSOSQoAIAwDJ8X/fzleWq0imENguoQoODRQR19rnmyWB4AMWPteTqx/JRZb7myRg6Ci1PJZ/us3slxpDgAJVg8jzbUuFgAAAABJRU5ErkJggg==" alt="" width="15" height="15" /></div>
<table id="identi-content-table" border="0" cellspacing="0" cellpadding="0">
<tbody>
<tr>
<td width="370" valign="top"></td>
<td width="200" valign="top"></td>
</tr>
</tbody>
</table>
</div>
<p>(I&#8217;m going to start going over the major projects I&#8217;ve worked on over the years.)</p>
<p>This project, dubbed <em>Revolution, </em>was my first major programming endeavor. I worked on it heavily in late 1998 and distinctly remember sending it to my friends in middle school and watching with pride as they used it to scroll massive amounts of text in random AOL chat rooms.</p>
<p>This was the reason I got into programming in the first place. My friend Jake sent me an AOL prog (program) and curious, I set out to learn how to build one.</p>
<p>The code is absolutely terrible and the only thing uglier is the design. It was a start.</p>
<p>Here&#8217;s some screen shots:</p>
<p><a href="http://www.mattmazur.com/wp/wp-content/uploads/2009/05/rev_main.png"><img class="aligncenter size-full wp-image-705" title="rev_main" src="http://www.mattmazur.com/wp/wp-content/uploads/2009/05/rev_main.png" alt="" width="353" height="166" /></a></p>
<p><a href="http://www.mattmazur.com/wp/wp-content/uploads/2009/05/rev_fader.png"><img class="aligncenter size-full wp-image-706" title="rev_fader" src="http://www.mattmazur.com/wp/wp-content/uploads/2009/05/rev_fader.png" alt="" width="431" height="426" /></a></p>
<p><a href="http://www.mattmazur.com/wp/wp-content/uploads/2009/05/rev_stayonline_menu.png"><img class="aligncenter size-full wp-image-707" title="rev_stayonline_menu" src="http://www.mattmazur.com/wp/wp-content/uploads/2009/05/rev_stayonline_menu.png" alt="" width="453" height="225" /></a></p>
<p><a href="http://www.mattmazur.com/wp/wp-content/uploads/2009/05/rev_stayonline.png"><img class="aligncenter size-full wp-image-708" title="rev_stayonline" src="http://www.mattmazur.com/wp/wp-content/uploads/2009/05/rev_stayonline.png" alt="" width="417" height="230" /></a></p>
<p>And here&#8217;s the menu hierarchy which shows all the exciting features:</p>
<p><a href="http://www.mattmazur.com/wp/wp-content/uploads/2009/05/rev_menus.png"><img class="aligncenter size-full wp-image-709" title="rev_menus" src="http://www.mattmazur.com/wp/wp-content/uploads/2009/05/rev_menus.png" alt="" width="270" height="868" /></a></p>
<p>I almost forgot about this program until I was going through some old 3.5&#8243; disks and came upon it. I&#8217;m glad I did&#8230; I haven&#8217;t seen the words &#8220;Lagger&#8221; or &#8220;Punter&#8221; or &#8220;Fader&#8221; in many years.</p>
<p>Gotta love it.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mattmazur.com/2009/05/revolution/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Why to Set a Time Limit on Password Reset Emails</title>
		<link>http://www.mattmazur.com/2008/12/why-to-set-a-time-limit-on-password-reset-emails/</link>
		<comments>http://www.mattmazur.com/2008/12/why-to-set-a-time-limit-on-password-reset-emails/#comments</comments>
		<pubDate>Tue, 02 Dec 2008 01:47:22 +0000</pubDate>
		<dc:creator>mattm</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.mattmazur.com/?p=250</guid>
		<description><![CDATA[You know those password reset links that are sent to you get when you forget your password? Well, some of them set a limit on how long you can use it before the link stops working. For the life of me, I couldn&#8217;t figure out why sites did this. Who cares how long it takes [...]]]></description>
			<content:encoded><![CDATA[<p>You know those password reset links that are sent to you get when you forget your password? Well, some of them set a limit on how long you can use it before the link stops working. For the life of me, I couldn&#8217;t figure out why sites did this. Who cares how long it takes me to get around to resetting my password? Why not just make the same link work every time a person wants to reset his or her password?</p>
<p>So, I coded up a registration and password reset system for Domain Pigeon without setting a time limit on reset password links.</p>
<p>Last night, somewhat randomly, it hit me why this is a bad idea. It&#8217;s so obvious now that I don&#8217;t know why I didn&#8217;t think of it sooner.</p>
<p><img class="alignnone size-medium wp-image-254" title="history" src="http://www.mattmazur.com/wp/wp-content/uploads/2008/12/history.png" alt="" /></p>
<p>If you reset your password in a public place, such as a library computer, the reset password URL will probably be stored in the browser navigation history. The next person who uses the computer might accidentally come across the &#8220;www.whatever.com/reset/&#8230;&#8221; URL and click it to see what happens. Surprise: it still works.</p>
<p>So how do you prevent this? You guessed it: a time limit.</p>
<p>Here&#8217;s how I implemented it for Domain Pigeon. When the customer requests a password reset email, store the time they requested it and then, to generate the URL, use a <a href="http://en.wikipedia.org/wiki/Sha1">hash</a> of the user&#8217;s email concatenated with the time they requested it. This&#8217;ll ensure that the URL is unique based on that specific request (aka a <a href="http://en.wikipedia.org/wiki/Salt_(cryptography)">salt</a>).</p>
<p>Then, when the customer clicks the link to reset his password, compare the current time to the time the link was sent and if it&#8217;s less than a specific amount of time, allow him to change his password. In pseudocode, this looks something like:</p>
<p><code>if hash(user.email + user.forgot_sent_at) = params[:hash] and user.forgot_sent_at + 2.hours &gt; Time.now then<br />
... yada yada yada<br />
end</code></p>
<p>[Update: Note that the has function used here is a SHA-1 hash of the input concatenated with a secret key, so that the final product here = SHA(user.email + user.forgot_sent_at + long_random_string). Thank you to Artem for pointing out it needed to be clarified]</p>
<p>Lastly, after the password is changed, reset the stored time. That will prevent someone from changing the password twice using the same reset password link.</p>
<p>The only flaw I see with this method is for the person who clicks the link to reset his password and abandons it, because that&#8217;ll allow someone else to access the page and reset his password. Fortunately, this should be rare enough that it&#8217;s not a major problem. For extra security, set the time limit to five or ten minutes. After all, how many people request a reset password link and don&#8217;t access it within the next few minutes? For the few that do, they probably won&#8217;t mind the small annoyance in return for the extra security.</p>
<p>If anyone has any thoughts on this method or password reset algorithms in particular, please let me know.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mattmazur.com/2008/12/why-to-set-a-time-limit-on-password-reset-emails/feed/</wfw:commentRss>
		<slash:comments>5</slash:comments>
		</item>
		<item>
		<title>Macs: Productivity made Easy</title>
		<link>http://www.mattmazur.com/2008/11/macs-productivity-made-easy/</link>
		<comments>http://www.mattmazur.com/2008/11/macs-productivity-made-easy/#comments</comments>
		<pubDate>Wed, 05 Nov 2008 03:33:25 +0000</pubDate>
		<dc:creator>mattm</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.mattmazur.com/?p=204</guid>
		<description><![CDATA[Day #3 of the Macbook&#8230; I began working today with the intention of integrating a test Heroku site with Paypal&#8217;s Instant Notification System. Didn&#8217;t get there quite yet, but I&#8217;m getting there. Here&#8217;s a few things I worked on this evening: Modifying the Terminal Prompt Every line had been displaying &#8220;matthew-mazurs-macbook: Matt $&#8221; or something [...]]]></description>
			<content:encoded><![CDATA[<p>Day #3 of the Macbook&#8230;</p>
<p>I began working today with the intention of integrating a test Heroku site with Paypal&#8217;s Instant Notification System. Didn&#8217;t get there quite yet, but I&#8217;m getting there. Here&#8217;s a few things I worked on this evening:</p>
<p><strong>Modifying the Terminal Prompt</strong></p>
<p>Every line had been displaying &#8220;matthew-mazurs-macbook: Matt $&#8221; or something long and annoying like that, so I looked into how to change it. Some helpful individual on #rubyonrails told me to look up PS1 and surely enough, changing it is pretty easy. <a href="http://www.cyberciti.biz/tips/howto-linux-unix-bash-shell-setup-prompt.html">This site</a> teaches you how to change it, though this method only works for the current terminal. When you reload the terminal the name reverts to its previous state. To change it permantely, you have to close down termal and edit <em>/etc/bashrc</em> in some text editor. Change the PS1 name to whatever you want and it&#8217;ll be changed permantently for future terminal windows. There&#8217;s probably an easier way to do this but hey, it worked.</p>
<p><strong>Using VI<br />
</strong></p>
<p>As nerdy readers have probably realized by now, I suck at the command prompt. I regret not taking more opportunities during my college compsci classes to gain more experience with it. Anyway, <a href="http://www.cs.colostate.edu/helpdocs/vi.html">this tutorial</a> is a pretty good introduction to what you need to know in order to navigate vi.</p>
<p><strong>Ruby Gems</strong></p>
<p>Up until this point in my app&#8217;s development I haven&#8217;t had to use any gems so I was pretty lost when I read I should install a <a href="http://dist.leetsoft.com/api/paypal/">Paypal</a> gem to interact with Paypal&#8217;s <a href="https://www.paypal.com/ipn">Instant Payment Notification</a> system. For the unenlightened, IPN is an alert that Paypal sends to your site when someone has made a purchase. You can use this notification to enable a user&#8217;s account, for example. Thankfully, <a href="http://rubygems.org/">rubygems.org</a> offers an excellent tutorial which quickly brought me up to speed. I worked my way through their progressbar example, which as stupid as it is, was a nice thing to get working.</p>
<p>Fortunately, while developing ALL IN Expert (more to come on that &#8212; I promise), I spent a lot of time learning how to do IPN with PHP. Things are slightly different now, but the prior experience is helpful.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mattmazur.com/2008/11/macs-productivity-made-easy/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Focusing on Productivity</title>
		<link>http://www.mattmazur.com/2008/11/focusing-on-productivity/</link>
		<comments>http://www.mattmazur.com/2008/11/focusing-on-productivity/#comments</comments>
		<pubDate>Mon, 03 Nov 2008 00:54:41 +0000</pubDate>
		<dc:creator>mattm</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.mattmazur.com/?p=196</guid>
		<description><![CDATA[I&#8217;ve been spending some time the last few days thinking about ways I can improve my overall productivity. In general, I&#8217;m not working at a pace that I&#8217;m satisfied with, and while part of that is due to long hours at work, a lot is also due to not fully taking advantage of the free [...]]]></description>
			<content:encoded><![CDATA[<p>I&#8217;ve been spending some time the last few days thinking about ways I can improve my overall productivity. In general, I&#8217;m not working at a pace that I&#8217;m satisfied with, and while part of that is due to long hours at work, a lot is also due to not fully taking advantage of the free time I do have.</p>
<p>Accordingly, I made two major changes today that should:</p>
<p><strong>News</strong>. A few months back, per Marc Andreessen&#8217;s advice, I subscribed to the Wall Street Journal. At first I attempted to read it on a daily basis. Now, I&#8217;m lucky if I scan it through twice a week. The problem is twofold: 1) I don&#8217;t understand a lot of it and 2) It takes time. The original purpose was to learn the important things going on in the world and in the tech industry. I think a combination of Hacker News, Inc magazine, and a few of the major blogs take care of the tech half of that goal. Usually, when my time was limited, I would just flip to the Business section and see if there were any internet related articles. For the news half, I&#8217;m going to subscribe to Time, which I think is excellent. Since they&#8217;re a weekly publication they generally avoid a lot of the irrelevent news, and they write less in one issue than the WSJ writes in a day. Starting tomorrow, I&#8217;m putting the WSJ on hold. There will hopefully come a time when I have the time and the need of reading it on a daily basis, but that time is not right now.</p>
<p><strong>Computer Usage</strong>. I&#8217;ve been using InstantRails on Windows Vista in conjunction with UltraEdit for learning and programming Rails. InstantRails, as far as I can tell, is a hack that let&#8217;s Windows developers work with Rails. It gets the job done, but it just doesn&#8217;t feel natural. And so, today, I took the plunge and bought a <a href="http://news.ycombinator.com/item?id=351027">Macbook</a>, which I&#8217;m currently writing on. It is a breadth of fresh air; I wish I had made the switch earlier. It&#8217;s taking a bit of getting used to (I didn&#8217;t know what the traffic lights at the top of the windows were), but it&#8217;s incredibly straightforward. Usability was clearly a focus for the Mac developers, which is why it&#8217;s been such an easy transition. The plan is to do all my web development on this computer from now on.</p>
<p>My goal is to launch Domain Pigeon by the end of the year.</p>
<p>I&#8217;m going to try to write more often, as I find that it helps me to write things down.</p>
<p>Thanks for reading.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mattmazur.com/2008/11/focusing-on-productivity/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Good Design is Easy, Great Design is Hard</title>
		<link>http://www.mattmazur.com/2008/10/good-design-is-easy-great-design-is-hard/</link>
		<comments>http://www.mattmazur.com/2008/10/good-design-is-easy-great-design-is-hard/#comments</comments>
		<pubDate>Tue, 14 Oct 2008 02:49:10 +0000</pubDate>
		<dc:creator>mattm</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.mattmazur.com/?p=188</guid>
		<description><![CDATA[I spent a good seven or eight hours today working on Domain Pigeon. The last week has been very busy so I haven&#8217;t been able to make much progress, but with a full day to work I got a lot done. The site now has a registration system and a semi-well done home page. One [...]]]></description>
			<content:encoded><![CDATA[<p>I spent a good seven or eight hours today working on Domain Pigeon.</p>
<p>The last week has been very busy so I haven&#8217;t been able to make much progress, but with a full day to work I got a lot done. The site now has a registration system and a semi-well done home page. One of the designs that I put together two weeks ago (that took several hours) I completely scrapped today in favor of another. I get this feel like I&#8217;ll scrape this one in time too, but, hey, the more I iterations I go over the more I learn what doesn&#8217;t work.</p>
<p>After spending a lot of time playing with different layouts and color schemes I&#8217;ve come to two conclusions: 1) It isn&#8217;t very hard to make a site that looks OK. 2) It&#8217;s a lot harder to design something that looks great. I base this on the fact that the majority of websites are designed with very little attention for usability, color schemes, overall layout, navigation. Most are, well, ugly. But every now and then you stumble upon a site that just flows. You get the feeling that if you asked the designer what the padding is between two adjacent elements, he or she will be able to tell you off the top of his head. Quality matters.</p>
<p>Esquire has an amazingly well designed magazine. Everything just seems to fit. Inc and FastCompany too. I&#8217;ve been perusing them looking for ideas and I suggest anyone who is stuck just pay the magazine section at the local book store a visit for some inspiration.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mattmazur.com/2008/10/good-design-is-easy-great-design-is-hard/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Function vs Design</title>
		<link>http://www.mattmazur.com/2008/09/function-vs-design/</link>
		<comments>http://www.mattmazur.com/2008/09/function-vs-design/#comments</comments>
		<pubDate>Wed, 01 Oct 2008 02:54:25 +0000</pubDate>
		<dc:creator>mattm</dc:creator>
				<category><![CDATA[Programming]]></category>

		<guid isPermaLink="false">http://www.mattmazur.com/?p=185</guid>
		<description><![CDATA[My latest project, dubbed Domain Pigeon, is coming along well. I work on it when I can, getting in a few hours here, a few hours there, probably not totaling more than 15 hours/week. I&#8217;m at a point with Ruby and Rails where I am knowledgeable enough to know what to look for when I [...]]]></description>
			<content:encoded><![CDATA[<p>My latest project, dubbed Domain Pigeon, is coming along well. I work on it when I can, getting in a few hours here, a few hours there, probably not totaling more than 15 hours/week. I&#8217;m at a point with Ruby and Rails where I am knowledgeable enough to know what to look for when I run into problems (which happens frequently).</p>
<p>With the limited amount of time I have to work on it, I&#8217;m trying to allocate my time better than my last project. With ALL IN Expert, I spent wayyyy too much time in the beginning worrying about the design of the website and the software. I literally spent like 10 hours one day experimenting with icons I was creating with Photoshop. This was probably a good sign that it was going to fail. I spent too much time initially deciding on nitpicky design details that really weren&#8217;t important.</p>
<p>On the other hand, there is value in spending small amounts of time working on the interface. Ideally, design should be driven by function. However, in my case I&#8217;m still working out the details on some of the functionality, so creating a basic site has helped narrow my focus in a lot of areas. Also, by designing the site as Igo, I&#8217;m starting to see what the final product is going to look like. It&#8217;s a pleasure watching beautiful things grow.</p>
<p>On an unrelated note, I&#8217;m removing the &#8220;Recommended Books&#8221; from the side bar. My original intent was just to share books that I liked, but it now strikes me as arrogant so I&#8217;m just going to nix the entire section. Also added Mark Cuban to the blogroll and removed some of the shittier ones.</p>
]]></content:encoded>
			<wfw:commentRss>http://www.mattmazur.com/2008/09/function-vs-design/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

