<?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>a day in the pit</title>
	<atom:link href="http://adayinthepit.com/feed/" rel="self" type="application/rss+xml" />
	<link>http://adayinthepit.com</link>
	<description>my view from inside</description>
	<lastBuildDate>Mon, 30 Jan 2012 19:16:10 +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>HelloBirthday Grows Up, Goes Private</title>
		<link>http://adayinthepit.com/2012/01/26/hellobirthday-goes-private/</link>
		<comments>http://adayinthepit.com/2012/01/26/hellobirthday-goes-private/#comments</comments>
		<pubDate>Thu, 26 Jan 2012 19:10:27 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Information]]></category>
		<category><![CDATA[Software]]></category>

		<guid isPermaLink="false">http://adayinthepit.com/?p=390</guid>
		<description><![CDATA[HelloBirthday goes private...]]></description>
			<content:encoded><![CDATA[<p>It must have been two years ago that I missed my friends birthday and she was super upset with me. Naturally, I devoted 48 hours to building an app that would never let me forget a birthday. (I think this may have pissed her off even more...)</p>
<p>Fast forward... I've decided to change HelloBirthday so that as of January 25th, 2012 new users will only see a forecast of birthdays and wishing will not occur. <strong>This only affects new users; current users you're OK.</strong></p>
<p>HelloBirthday still has the capabilities to automate wishing and I'm letting friends, family, and people who know me to continue to use it. If you want to use HelloBirthday please <a title="HelloBirthday" href="http://thebirthdayapp.com" target="_blank">add it</a> and then e-mail me (mike@thinkeffect.com).</p>
]]></content:encoded>
			<wfw:commentRss>http://adayinthepit.com/2012/01/26/hellobirthday-goes-private/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>I hope you&#8217;re surfing</title>
		<link>http://adayinthepit.com/2012/01/20/i-hope-youre-surfing/</link>
		<comments>http://adayinthepit.com/2012/01/20/i-hope-youre-surfing/#comments</comments>
		<pubDate>Fri, 20 Jan 2012 18:00:58 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Entrepreneurship]]></category>
		<category><![CDATA[Information]]></category>
		<category><![CDATA[Jokes and Stuff]]></category>

		<guid isPermaLink="false">http://adayinthepit.com/?p=373</guid>
		<description><![CDATA[Entrepreneurship]]></description>
			<content:encoded><![CDATA[<h2>The Rush</h2>
<p>I've been thinking about how thrilling life can be. One minute you're in a comfort zone without realizing it and then in a flash you're paddling your heart out head-on for a large body of water that's trying to crash down on you. And as you paddle into this wall of a wave your instinctual response, to the sheer amount of fear amongst other things, is to paddle, kick, and dive into the belly of the beast. Just barely scraping past the wave you and your board flop down onto the hard surface water only to keep paddling because you know there is another wave coming; the set had just begun.</p>
<p>A freezing chill runs down your spine but you realize it's just some of the water from that last wipe out. <em>Fuck, it's freezing cold</em>.</p>
<p>But you continue because the feeling of this challenge has never felt better. It's why you put yourself in situations you're never comfortable in, and why you know the devil in comfort intimately. These waves don't care about anything except providing you challenge after challenge with no end in site.</p>
<h2>Ride a Wave</h2>
<p>Surfing is a lot like entrepreneurship. It's fueled primarily by you and your own will, and encouraged by that group of people in the water with you. It's still somewhat of a dog-eat-dog world but that bond between soloists is stronger than one might think. It's incredibly rewarding. It takes an immense amount of time to do it well but you can start and feel empowered immediately.</p>
<p>Good luck. Have fun. And remember, the company you work for does not define you.</p>
]]></content:encoded>
			<wfw:commentRss>http://adayinthepit.com/2012/01/20/i-hope-youre-surfing/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>What&#8217;s New in Rails 3 &amp; What I&#8217;m Excited About</title>
		<link>http://adayinthepit.com/2011/11/02/whats-new-in-rails-3-what-im-excited-about/</link>
		<comments>http://adayinthepit.com/2011/11/02/whats-new-in-rails-3-what-im-excited-about/#comments</comments>
		<pubDate>Wed, 02 Nov 2011 17:23:03 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Information]]></category>
		<category><![CDATA[Ruby on Rails]]></category>
		<category><![CDATA[rails 3]]></category>

		<guid isPermaLink="false">http://adayinthepit.com/?p=382</guid>
		<description><![CDATA[Ruby on Rails 3.1 is out and we've got some changes to talk about]]></description>
			<content:encoded><![CDATA[<p>Rails 3.1.0 was released on 8/31/2011, and as such marks a great day for the Rails community. For a while Rails felt stagnant (think 2.3.11 to 3.0.1RC) and so this is something I've been looking forward to. As I've been using Rails 3 for over a year now, and I've been following along in the change sets, I wanted to point out some of the features I think are really going to be game changers.</p>
<h3>Sprockets, and the Asset Pipeline</h3>
<p>Previously done through third party libraries, the Asset Pipeline is a built-in framework for managing your assets and writing these assets in other, some say more friendly languages, like CoffeeScript for JavaScript and Sass for CSS  style sheets. It's a very large change to Rails because it introduces a new mix of options for how you can write your JS/CSS and it moves the serving of these components to the Rack middle-ware. Your asset resources now can be pre-processed, minified, and compressed in one swoop. This process is done by <a href="https://github.com/sstephenson/sprockets" target="_blank">Sprockets</a>. I won't go into any further detail but you should know this is worth reading up on, so go check out the <a href="http://edgeguides.rubyonrails.org/asset_pipeline.html" target="_blank">Asset Pipeline</a> introduction by the RoR team. (You can disable this feature if you don't want to use it. So don't freak out!)</p>
<h3>Streaming</h3>
<p>Although it requires Ruby 1.9x to run, HTTP streaming has finally been added. Part of the confusion I often hear about Rails is why this feature was not there from day one. To be honest, I'm not sure but my hunch is that it didn't make sense in a prototyping stage to have to stream content. Further, it's very very error prone compared to building your response and then shipping it over (i.e. if computational errors occur mid stream you're dead in the water and the page will never finish loading). Further, Ajax helped mitigate this need by loading a light HTML shell and then using asynchronous calls to fetch your users' data. At any rate, I'm very excited for this feature because the last two years of PHP coding has had me used to buffering output and I really do see the value in being able to use streaming to show progress without making lots of asynchronous calls.</p>
<h3>JSON</h3>
<p>ActiveResource now defaults responses to JSON, as opposed to XML.</p>
<h3>jQuery</h3>
<p>Is now the default JavaScript library bundled with Rails 3. Further, RJS has been factored out as a gem.</p>
<h3>Basic Authentication</h3>
<p>Rails 3 comes with a quick and easy way of doing Basic Authentication (Username/Password) in your Controllers. Read up on Base.http_basic_authenticate_with - <a title="Basic Auth Example" href="http://guides.rubyonrails.org/3_1_release_notes.html#action-controller" target="_blank">Check out the example here</a></p>
<h3>Pluralize Names for Models</h3>
<p>Yup! You can now set, on specific models, whether you want them pluralized or not. From within your controller class you'd set: <code>self.pluralize_table_names = false</code></p>
<h3>BCrypt Passwords</h3>
<p>You now have a model attribute <code>has_secure_password</code> that will take care of password hashing/encryption.</p>
<p><span id="more-382"></span></p>
<p>As a concluding note on this short article please take some time to look over their very readable and friendly documentation on changes: <a href="http://guides.rubyonrails.org/3_1_release_notes.html#active-record" target="_blank">Rails 3 ActiveModel Changes</a></p>
<p>Sources:</p>
<p><a href="http://weblog.rubyonrails.org/2011/8/31/rails-3-1-0-has-been-released" target="_blank">RubyonRails.org Release Article</a></p>
<p><a title="Rails 3.1 Release Notes" href="http://guides.rubyonrails.org/3_1_release_notes.html#action-controller" target="_blank">Rails 3.1 Release Notes</a></p>
<p><a href="http://edgeguides.rubyonrails.org/asset_pipeline.html" target="_blank">Ruby on Rails Asset Pipeline Detailed Description</a></p>
]]></content:encoded>
			<wfw:commentRss>http://adayinthepit.com/2011/11/02/whats-new-in-rails-3-what-im-excited-about/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>State of the Union</title>
		<link>http://adayinthepit.com/2011/10/03/state-of-the-union/</link>
		<comments>http://adayinthepit.com/2011/10/03/state-of-the-union/#comments</comments>
		<pubDate>Mon, 03 Oct 2011 21:41:03 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Information]]></category>

		<guid isPermaLink="false">http://adayinthepit.com/?p=379</guid>
		<description><![CDATA[It's been some time since my last post. Yeah, I know, that may be a good thing for some of you and bad for others! Either way, I'm back in school temporarily to finish up my last class to get my undergraduate degree. What this really means is that I'm now throwing a new ball [...]]]></description>
			<content:encoded><![CDATA[<p>It's been some time since my last post. Yeah, I know, that may be a good thing for some of you and bad for others! Either way, I'm back in school temporarily to finish up my last class to get my undergraduate degree. What this really means is that I'm now throwing a new ball into my juggling routine. Will I survive? Eh, most likely. But for those who have been bitten by curiosity here is what I'm up to now-a-days:</p>
<p>I'm still working full-time for Yahoo! as a software developer/advertising analyst. I'll continue my night-time hacks; but these will slow down. I'm completely immersed in my computational models &amp; theory course at UC Santa Cruz. I recently picked up an Ipad2 to begin developing on the mobile platform and have begun working on a game. And last but not least I continue to eat, sleep, and surf.</p>
<p>So there you have it. A breakdown of all that is important to me right now and why this blog may just experience a pause for silence. Who knows, I just might have some interesting things to say when I resurface in a few weeks. Surely, you can expect some exciting news towards December <img src='http://adayinthepit.com/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' />  You should follow my twitter account @<a title="Smasher5" href="http://twitter.com/#!/smasher5">smasher5</a> for snippets of interesting (and uninteresting) things.</p>
<p>Katt Williams said life is too fucking short. Yeah Mr. Williams I agree with you. Therefor I say to all of you reading this post, "go outside." (And make your paper booboo)</p>
]]></content:encoded>
			<wfw:commentRss>http://adayinthepit.com/2011/10/03/state-of-the-union/feed/</wfw:commentRss>
		<slash:comments>2</slash:comments>
		</item>
		<item>
		<title>Resque me with a custom Redis host</title>
		<link>http://adayinthepit.com/2011/08/30/resque-me-with-a-custom-redis-host-please/</link>
		<comments>http://adayinthepit.com/2011/08/30/resque-me-with-a-custom-redis-host-please/#comments</comments>
		<pubDate>Tue, 30 Aug 2011 18:02:22 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Redis]]></category>
		<category><![CDATA[Resque]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://adayinthepit.com/?p=360</guid>
		<description><![CDATA[Resque &#038; Redis, remotely hosted, and getting the right server addresses in place.]]></description>
			<content:encoded><![CDATA[<p>If you're working outside of Ruby on Rails and want to have Redis hosted non-locally than this is the command you're looking for:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">Resque.<span style="color:#9900CC;">redis</span> = <span style="color:#996600;">'&lt;non_localhost_address&gt;:&lt;port&gt;'</span></pre></div></div>

<p>To paint the full picture: You've got Redis running on <em>Machine1.Hostname</em> and your Resque workers on <em>Machine2.Hostname</em> and you need those two wired up. In your Rake file for Resque workers you should add the line of code from above.</p>
<p>One little caveat, if you're told Resque is an uninitialized constant than you just simply need to get Resque into your environment. Here's an example IRB session where I'm using Bundler/Gemfile:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">ree<span style="color:#006600; font-weight:bold;">-</span>1.8.7<span style="color:#006600; font-weight:bold;">-</span><span style="color:#006666;">2011.03</span> :001 <span style="color:#006600; font-weight:bold;">&gt;</span> <span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'rubygems'</span>
 <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#0000FF; font-weight:bold;">false</span> 
ree<span style="color:#006600; font-weight:bold;">-</span>1.8.7<span style="color:#006600; font-weight:bold;">-</span><span style="color:#006666;">2011.03</span> :002 <span style="color:#006600; font-weight:bold;">&gt;</span> <span style="color:#CC0066; font-weight:bold;">require</span> <span style="color:#996600;">'bundler/setup'</span>
 <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#0000FF; font-weight:bold;">true</span> 
ree<span style="color:#006600; font-weight:bold;">-</span>1.8.7<span style="color:#006600; font-weight:bold;">-</span><span style="color:#006666;">2011.03</span> :003 <span style="color:#006600; font-weight:bold;">&gt;</span> Bundler.<span style="color:#CC0066; font-weight:bold;">require</span>
<span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006600; font-weight:bold;">&lt;</span><span style="color:#6666ff; font-weight:bold;">Bundler::Dependency</span> type=:runtime name=<span style="color:#996600;">&quot;SystemTimer&quot;</span> requirements=<span style="color:#996600;">&quot;&gt;= 0&quot;</span><span style="color:#006600; font-weight:bold;">&gt;</span>, <span style="color:#006600; font-weight:bold;">&lt;</span><span style="color:#6666ff; font-weight:bold;">Bundler::Dependency</span> type=:runtime name=<span style="color:#996600;">&quot;rake&quot;</span> requirements=<span style="color:#996600;">&quot;&gt;= 0&quot;</span><span style="color:#006600; font-weight:bold;">&gt;</span>, <span style="color:#006600; font-weight:bold;">&lt;</span><span style="color:#6666ff; font-weight:bold;">Bundler::Dependency</span> type=:runtime name=<span style="color:#996600;">&quot;redis&quot;</span> requirements=<span style="color:#996600;">&quot;&gt;= 0&quot;</span><span style="color:#006600; font-weight:bold;">&gt;</span>, <span style="color:#006600; font-weight:bold;">&lt;</span><span style="color:#6666ff; font-weight:bold;">Bundler::Dependency</span> type=:runtime name=<span style="color:#996600;">&quot;redis-namespace&quot;</span> requirements=<span style="color:#996600;">&quot;&gt;= 0&quot;</span><span style="color:#006600; font-weight:bold;">&gt;</span>, <span style="color:#006600; font-weight:bold;">&lt;</span><span style="color:#6666ff; font-weight:bold;">Bundler::Dependency</span> type=:runtime name=<span style="color:#996600;">&quot;yajl-ruby&quot;</span> requirements=<span style="color:#996600;">&quot;&gt;= 0&quot;</span><span style="color:#006600; font-weight:bold;">&gt;</span>, <span style="color:#006600; font-weight:bold;">&lt;</span><span style="color:#6666ff; font-weight:bold;">Bundler::Dependency</span> type=:runtime name=<span style="color:#996600;">&quot;resque&quot;</span> requirements=<span style="color:#996600;">&quot;&gt;= 0&quot;</span><span style="color:#006600; font-weight:bold;">&gt;</span>, <span style="color:#006600; font-weight:bold;">&lt;</span><span style="color:#6666ff; font-weight:bold;">Bundler::Dependency</span> type=:runtime name=<span style="color:#996600;">&quot;ruby-prof&quot;</span> requirements=<span style="color:#996600;">&quot;&gt;= 0&quot;</span><span style="color:#006600; font-weight:bold;">&gt;</span>, <span style="color:#006600; font-weight:bold;">&lt;</span><span style="color:#6666ff; font-weight:bold;">Bundler::Dependency</span> type=:runtime name=<span style="color:#996600;">&quot;json&quot;</span> requirements=<span style="color:#996600;">&quot;&gt;= 0&quot;</span><span style="color:#006600; font-weight:bold;">&gt;</span>, <span style="color:#006600; font-weight:bold;">&lt;</span><span style="color:#6666ff; font-weight:bold;">Bundler::Dependency</span> type=:runtime name=<span style="color:#996600;">&quot;nokogiri&quot;</span> requirements=<span style="color:#996600;">&quot;&gt;= 0&quot;</span><span style="color:#006600; font-weight:bold;">&gt;</span>, <span style="color:#006600; font-weight:bold;">&lt;</span><span style="color:#6666ff; font-weight:bold;">Bundler::Dependency</span> type=:runtime name=<span style="color:#996600;">&quot;fastercsv&quot;</span> requirements=<span style="color:#996600;">&quot;&gt;= 0&quot;</span><span style="color:#006600; font-weight:bold;">&gt;</span>, <span style="color:#006600; font-weight:bold;">&lt;</span><span style="color:#6666ff; font-weight:bold;">Bundler::Dependency</span> type=:runtime name=<span style="color:#996600;">&quot;yieldmanager&quot;</span> requirements=<span style="color:#996600;">&quot;&gt;= 0&quot;</span><span style="color:#006600; font-weight:bold;">&gt;</span><span style="color:#006600; font-weight:bold;">&#93;</span></pre></div></div>

<p>Cool, now we've got our environment and can do what we want. It's not necessary to use a Gemfile, you can manually install your gems and then <code>require</code> them in your Ruby file. But since I have multiple files doing many different things it makes sense to have one common section for inclusion of my packages. I also encourage creating a ruby include file with your Redis setups; this will prevent you from having that <code>Resque.redis</code> scattered in all of your files that access Redis.</p>
<p>Hope this saves someone a minute. More information is in <a href="https://github.com/defunkt/resque">Defunkt's Resque package on Github</a>.</p>
]]></content:encoded>
			<wfw:commentRss>http://adayinthepit.com/2011/08/30/resque-me-with-a-custom-redis-host-please/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Visualizing Subversion&#8217;s Commit History</title>
		<link>http://adayinthepit.com/2011/08/20/data-visualization-is-so-fetch-err-i-mean-cool/</link>
		<comments>http://adayinthepit.com/2011/08/20/data-visualization-is-so-fetch-err-i-mean-cool/#comments</comments>
		<pubDate>Sat, 20 Aug 2011 02:52:35 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Information]]></category>
		<category><![CDATA[Software]]></category>
		<category><![CDATA[data visualization]]></category>
		<category><![CDATA[gource]]></category>
		<category><![CDATA[subversion history]]></category>

		<guid isPermaLink="false">http://adayinthepit.com/?p=343</guid>
		<description><![CDATA[Yeah, it's Friday! Woohoo. Yup, that's right people, it's time to kick off your shoes and code... I have not posted in like two weeks. Lemme tell ya, One of those weeks I spent in Vegas on a much needed vacation without a laptop. It was pretty spectacular. This week has just flown by. But [...]]]></description>
			<content:encoded><![CDATA[<p>Yeah, it's Friday! Woohoo. Yup, that's right people, it's time to kick off your shoes and code...</p>
<p>I have not posted in like two weeks. Lemme tell ya, One of those weeks I spent in Vegas on a much needed vacation without a laptop. It was pretty spectacular. This week has just flown by. But today I felt like doing something fun; I felt like being a movie producer, director, composer, etc. However, I don't really like to get off the couch just to film a movie when I have a at least 25 storylines wandering around my computer.</p>
<p>Without further pause here is my story of the main Subversion repository I contribute to at work:<br />
[ By the way, dots (or nodes) are directories or files. As the two people-icons run around the screen they are making subversion commits. Explosions typically occur when a big check-in happens. ]</p>
<p><iframe width="560" height="345" src="http://www.youtube.com/embed/vHiBgrZpfj8" frameborder="0" allowfullscreen></iframe></p>
<p>Enjoy? Let's make you a video. Visualizing Subversion commit activity is crazy simple. Dayum! I'm running Mac OS X 10.6.8 so all of following was done on that environment.</p>
<p>You'll want to get ffmpeg and some codecs. I use Darwin Ports to manage packages like these so if you're like me here's the quick fix</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">sudo port install ffmpeg +gpl +lame +x264 +xvid</pre></div></div>

<p>Next, we're going to need <a href="http://code.google.com/p/gource/downloads/detail?name=gource-0.35.tar.gz&#038;can=2&#038;q=">Gource</a>, and ffmpeg. </p>
<p>Download gource. unzip it and head into the directory. once in the gource directory go ahead and</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">sudo ./configure
sudo make; sudo make install
gource --help</pre></div></div>

<p>Alright we're pretty much ready to go. Head over to one of your subversion root directories. Add this file to your directory: summerfun.conf<br />
and in it put</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">[gource]
bloom-intensity=0.25
colour-images=true
hide=filenames,dirnames
path=my-project-log.xml
seconds-per-day=0.1</pre></div></div>

<p>You'll see the my-project-log.xml is nowhere to be found. Let's create it:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">svn log -r 1:HEAD --xml --verbose --quiet &gt; my-project-log.xml</pre></div></div>

<p>That will make the video play a little faster. You can remove or muck with all of the settings; just read the README for available options. Now here is the command I executed:</p>

<div class="wp_syntax"><div class="code"><pre class="shell" style="font-family:monospace;">gource --load-config summerfun.conf -1280x720 -o - | ffmpeg -y -b 10000K -r 60 -f image2pipe -vcodec ppm -i - -vcodec libx264 -vpre default -threads 0 -bf 0 gource.x264.mp4</pre></div></div>

<p>This command launches a video; watch it &#038; interact with it. Give it a try. All interactions get recorded in the video output. So zoom as you wish, to entertain your watchers. Let me know how it goes and post your videos.</p>
<p>Reference:</p>
<ul>
<li><a href="http://code.google.com/p/gource/wiki/Videos">Making Videos with Gource &#038; FFmpeg</a></li>
<li><a href="http://code.google.com/p/gource/wiki/SVN">Making Videos in Gource with SVN</a></li>
<li><a href="http://www.legendiary.at/2011/01/20/visualize-icinga-git-with-gource/">This guy talks about how to get your Git logs and make videos</a></li>
</ul>
]]></content:encoded>
			<wfw:commentRss>http://adayinthepit.com/2011/08/20/data-visualization-is-so-fetch-err-i-mean-cool/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>You can play music on a locked Mac OS X</title>
		<link>http://adayinthepit.com/2011/08/03/you-can-play-music-on-a-locked-mac-os-x/</link>
		<comments>http://adayinthepit.com/2011/08/03/you-can-play-music-on-a-locked-mac-os-x/#comments</comments>
		<pubDate>Wed, 03 Aug 2011 17:41:18 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Designs]]></category>
		<category><![CDATA[Hardware]]></category>
		<category><![CDATA[Information]]></category>
		<category><![CDATA[Mac OSX]]></category>

		<guid isPermaLink="false">http://adayinthepit.com/?p=332</guid>
		<description><![CDATA[Seriously, stop designing the big feature and make sure the application lets me log in! Design, and then engineer, quality products.]]></description>
			<content:encoded><![CDATA[<p>At some point today my Macbook Pro, running Mac OS X 10.6.8, locked my screen due to inactivity yet I was still able to control the audio via helper keys on the top row of the keyboard. That's pretty cool. It made me think of my Android phone, and how that too offers audio controls when locked. It made me think of how designing a product requires attention to the most subtle of details.</p>
<p>When beginning a new project, I often start off in total ignorance at the amount of work that will ensue. I think to myself, "sashimi slices, it'll all work out" and then I plug away at writing some code, designing some views, and seeing it all come together. At some point I find myself customizing the little pieces of the Application: the footer. Woah, seriously the footer is valuable real estate but I rarely look at it that way. Yet, in it's tiny form it can hold some of the most important links and people naturally go there. We actually expect a footer on the pages we frequent; we expect it has worthwhile resources that we may need. And what goes into this footer is exactly what I'm talking about: subtle features.</p>
<p>I've tried to come up with a name for these features and I think I'll stick to unoriginality and call them Core Application Functionality - CAFs.</p>
<p>Apple loves their CAFs and it shows. My Macbook Pro understands me. It knows that just because I'm not logged into my computer I still may need to adjust the volume. It knows that physical components of my machine, like sound, need physical controls. </p>
<p>Mac OS X reminds me of how CAFs can make or break an (web) application. For example, looking at user authentication we have a baseline rubric for what we need to use a service. We expect a web application to let us register, login, and logout. That's the basics. Of course we are missing one very important feature: password reset. Unfortunately, not all web apps are created equally and some fail to provide a password reset mechanism. A missing CAF like this highlights the little attention to detail in core functionality of the Application. That's pretty bad and what's worse is how the user is left feeling helpless. A negative experience such as this will have the Application failing -- <i>what a silly way to break the bank!</i></p>
<p>CAF gaps happens. Trust me. As an avid user of new web applications I find myself stuck more often than I'd like. These gaps creep up on start-ups as well as medium-to-large sized companies. They just happen. And they suck. So my advice is to take a moment and ask yourself this, "does my application get me?"</p>
]]></content:encoded>
			<wfw:commentRss>http://adayinthepit.com/2011/08/03/you-can-play-music-on-a-locked-mac-os-x/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Wrapping text in a jQuery jqGrid cell</title>
		<link>http://adayinthepit.com/2011/08/02/wrapping-text-in-a-jquery-jqgrid-cell/</link>
		<comments>http://adayinthepit.com/2011/08/02/wrapping-text-in-a-jquery-jqgrid-cell/#comments</comments>
		<pubDate>Tue, 02 Aug 2011 17:43:11 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[CSS]]></category>
		<category><![CDATA[JavaScript]]></category>

		<guid isPermaLink="false">http://adayinthepit.com/?p=335</guid>
		<description><![CDATA[jqGrid wrapping text using CSS]]></description>
			<content:encoded><![CDATA[<p>I've been using jqGrid now for about a year and I'm relatively satisfied. I use jqGrid to prettify, ajaxify, and make more functional pre-generated reports for our customers. The first thing you might notice about the grid is that it uses Alt text to display full cell content. This is nice, for sure, but it cuts off a lot of content depending on the amount. At times I'd like to be able to display the full amount of data in a row and not have to make the width of a column overly wide! So I'm employing CSS to do the trick.</p>
<p>To wrap a cell's text (non header) include this CSS after all of the jquery &amp; jqgrid css has loaded:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.ui-jqgrid</span> tr<span style="color: #6666ff;">.jqgrow</span> td <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">white-space</span><span style="color: #00AA00;">:</span> <span style="color: #993333;">normal</span> !important<span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">vertical-align</span><span style="color: #00AA00;">:</span>text-<span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>And to wrap a column cell's text:</p>

<div class="wp_syntax"><div class="code"><pre class="css" style="font-family:monospace;"><span style="color: #6666ff;">.ui-jqgrid</span> <span style="color: #6666ff;">.ui-jqgrid-htable</span> th div <span style="color: #00AA00;">&#123;</span>
    <span style="color: #000000; font-weight: bold;">white-space</span><span style="color: #00AA00;">:</span><span style="color: #993333;">normal</span> !important<span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">height</span><span style="color: #00AA00;">:</span><span style="color: #993333;">auto</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">vertical-align</span><span style="color: #00AA00;">:</span>text-<span style="color: #000000; font-weight: bold;">top</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">position</span><span style="color: #00AA00;">:</span><span style="color: #993333;">relative</span><span style="color: #00AA00;">;</span>
    <span style="color: #000000; font-weight: bold;">overflow</span><span style="color: #00AA00;">:</span><span style="color: #993333;">hidden</span><span style="color: #00AA00;">;</span>
<span style="color: #00AA00;">&#125;</span></pre></div></div>

<p>jqGrid can be customized to add classes onto elements but not the parent of elements in the table thus we're unable to set the parent td or div element to have the correct white-space CSS property. That's why we have to add our own CSS in, after the fact, to get the effect we want.</p>
]]></content:encoded>
			<wfw:commentRss>http://adayinthepit.com/2011/08/02/wrapping-text-in-a-jquery-jqgrid-cell/feed/</wfw:commentRss>
		<slash:comments>1</slash:comments>
		</item>
		<item>
		<title>Under the hood &#8211; Ruby methods Array#map, Array#inject</title>
		<link>http://adayinthepit.com/2011/08/01/under-the-hood-ruby-methods-arraymap-arrayinject/</link>
		<comments>http://adayinthepit.com/2011/08/01/under-the-hood-ruby-methods-arraymap-arrayinject/#comments</comments>
		<pubDate>Mon, 01 Aug 2011 01:40:38 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Learning]]></category>
		<category><![CDATA[Ruby]]></category>

		<guid isPermaLink="false">http://adayinthepit.com/?p=320</guid>
		<description><![CDATA[In the spirit or writing some Ruby methods I'm going to add three in this post. We'll begin with mapping elements of an Array. class Array def rb_map n_array = &#91;&#93; self.each &#123; &#124;elm&#124; n_array &#60;&#60; yield&#40;elm&#41; &#125; n_array end end Then we do Inject, class Array def rb_inject initial = nil value = initial [...]]]></description>
			<content:encoded><![CDATA[<p>In the spirit or writing some Ruby methods I'm going to add three in this post. We'll begin with mapping elements of an Array.</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">class</span> <span style="color:#CC0066; font-weight:bold;">Array</span>
    <span style="color:#9966CC; font-weight:bold;">def</span> rb_map
        n_array = <span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006600; font-weight:bold;">&#93;</span>
        <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9900CC;">each</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#006600; font-weight:bold;">|</span>elm<span style="color:#006600; font-weight:bold;">|</span> n_array <span style="color:#006600; font-weight:bold;">&lt;&lt;</span> <span style="color:#9966CC; font-weight:bold;">yield</span><span style="color:#006600; font-weight:bold;">&#40;</span>elm<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#125;</span>
        n_array
    <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>Then we do Inject,</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">class</span> <span style="color:#CC0066; font-weight:bold;">Array</span>
    <span style="color:#9966CC; font-weight:bold;">def</span> rb_inject initial = <span style="color:#0000FF; font-weight:bold;">nil</span>
        value = initial
        <span style="color:#0000FF; font-weight:bold;">self</span>.<span style="color:#9900CC;">each</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#006600; font-weight:bold;">|</span>elm<span style="color:#006600; font-weight:bold;">|</span> value = <span style="color:#9966CC; font-weight:bold;">yield</span><span style="color:#006600; font-weight:bold;">&#40;</span>value,elm<span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#125;</span>
        value
    <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>And finally, let's revisit map using our inject:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#9966CC; font-weight:bold;">class</span> <span style="color:#CC0066; font-weight:bold;">Array</span>
    <span style="color:#9966CC; font-weight:bold;">def</span> new_map_using_inject
        rb_inject<span style="color:#006600; font-weight:bold;">&#40;</span><span style="color:#006600; font-weight:bold;">&#91;</span><span style="color:#006600; font-weight:bold;">&#93;</span><span style="color:#006600; font-weight:bold;">&#41;</span> <span style="color:#006600; font-weight:bold;">&#123;</span> <span style="color:#006600; font-weight:bold;">|</span>set, elm<span style="color:#006600; font-weight:bold;">|</span> set <span style="color:#006600; font-weight:bold;">&lt;&lt;</span> elm <span style="color:#006600; font-weight:bold;">&#125;</span>
    <span style="color:#9966CC; font-weight:bold;">end</span>
<span style="color:#9966CC; font-weight:bold;">end</span></pre></div></div>

<p>You'll notice I did not do any error handling. That's not the point of the exercise; we want to know what the methods we call daily do behind the scenes.</p>
]]></content:encoded>
			<wfw:commentRss>http://adayinthepit.com/2011/08/01/under-the-hood-ruby-methods-arraymap-arrayinject/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
		<item>
		<title>Rails 3, Webrick, Mac OS X, Error: missing :action (ArgumentError)</title>
		<link>http://adayinthepit.com/2011/07/28/rails-3-webrick-mac-os-x-error-missing-action-argumenterror/</link>
		<comments>http://adayinthepit.com/2011/07/28/rails-3-webrick-mac-os-x-error-missing-action-argumenterror/#comments</comments>
		<pubDate>Thu, 28 Jul 2011 18:07:32 +0000</pubDate>
		<dc:creator>Mike</dc:creator>
				<category><![CDATA[Code]]></category>
		<category><![CDATA[Information]]></category>
		<category><![CDATA[Ruby]]></category>
		<category><![CDATA[Ruby on Rails]]></category>

		<guid isPermaLink="false">http://adayinthepit.com/?p=322</guid>
		<description><![CDATA[I was making some changes in a routes.rb file and fat fingered the wrong line: match '/public_html', &#34;domains#public_html&#34;, :as =&#62; 'public' Ran rails server, hit localhost:3000 and quickly saw a huge stack trace with this little gem of an error at the top: /Users/miker/projects/projects/logthingy/vendor/bundle/ruby/1.8/gems/actionpack-3.0.7/lib/action_dispatch/routing/mapper.rb:171:in `default_controller_and_action': missing :action (ArgumentError) To me, that error message is not [...]]]></description>
			<content:encoded><![CDATA[<p>I was making some changes in a routes.rb file and fat fingered the wrong line:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">match <span style="color:#996600;">'/public_html'</span>, <span style="color:#996600;">&quot;domains#public_html&quot;</span>, <span style="color:#ff3333; font-weight:bold;">:as</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'public'</span></pre></div></div>

<p>Ran <code>rails server</code>, hit localhost:3000 and quickly saw a huge stack trace with this little gem of an error at the top:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;"><span style="color:#006600; font-weight:bold;">/</span>Users<span style="color:#006600; font-weight:bold;">/</span>miker<span style="color:#006600; font-weight:bold;">/</span>projects<span style="color:#006600; font-weight:bold;">/</span>projects<span style="color:#006600; font-weight:bold;">/</span>logthingy<span style="color:#006600; font-weight:bold;">/</span>vendor<span style="color:#006600; font-weight:bold;">/</span>bundle<span style="color:#006600; font-weight:bold;">/</span>ruby<span style="color:#006600; font-weight:bold;">/</span><span style="color:#006666;">1.8</span><span style="color:#006600; font-weight:bold;">/</span>gems<span style="color:#006600; font-weight:bold;">/</span>actionpack<span style="color:#006600; font-weight:bold;">-</span>3.0.7<span style="color:#006600; font-weight:bold;">/</span>lib<span style="color:#006600; font-weight:bold;">/</span>action_dispatch<span style="color:#006600; font-weight:bold;">/</span>routing<span style="color:#006600; font-weight:bold;">/</span>mapper.<span style="color:#9900CC;">rb</span>:<span style="color:#006666;">171</span>:<span style="color:#9966CC; font-weight:bold;">in</span> <span style="color:#996600;">`default_controller_and_action': missing :action (ArgumentError)</span></pre></div></div>

<p>To me, that error message is not the most helpful. Because the only change I had made was in routes.rb I knew the issue was there. By the way, this is where I feel a little bit sorry for newcomers to Ruby and Rails... The error messages are not always entirely clear. For those of us who have been in Ruby long enough to know the "breadcrumb logic" we can get by, but for those who don't it can be a nightmare.</p>
<p>The fix was simple and subtle... was missing some punctuation:</p>

<div class="wp_syntax"><div class="code"><pre class="ruby" style="font-family:monospace;">match <span style="color:#996600;">'/public_html'</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">&quot;domains#public_html&quot;</span>, <span style="color:#ff3333; font-weight:bold;">:as</span> <span style="color:#006600; font-weight:bold;">=&gt;</span> <span style="color:#996600;">'public'</span></pre></div></div>

]]></content:encoded>
			<wfw:commentRss>http://adayinthepit.com/2011/07/28/rails-3-webrick-mac-os-x-error-missing-action-argumenterror/feed/</wfw:commentRss>
		<slash:comments>0</slash:comments>
		</item>
	</channel>
</rss>

