<?xml version="1.0" encoding="utf-8"?>
<feed xmlns="http://www.w3.org/2005/Atom">

  <title><![CDATA[Matt Robinson]]></title>
  <link href="http://www.mattrobinson.net/atom.xml" rel="self"/>
  <link href="http://www.mattrobinson.net/"/>
  <updated>2012-04-27T14:22:58-07:00</updated>
  <id>http://www.mattrobinson.net/</id>
  <author>
    <name><![CDATA[Matt Robinson]]></name>
    
  </author>
  <generator uri="http://octopress.org/">Octopress</generator>

  
  <entry>
    <title type="html"><![CDATA[Starting at LivingSocial]]></title>
    <link href="http://www.mattrobinson.net/2012/04/09/starting-at-livingsocial/"/>
    <updated>2012-04-09T20:44:02-07:00</updated>
    <id>http://www.mattrobinson.net/2012/04/09/starting-at-livingsocial</id>
    <content type="html"><![CDATA[<p>I&#8217;m a little late to write this post since I&#8217;m already starting my second week, but I&#8217;ve got a new job with <a href="http://www.livingsocial.com/">LivingSocial</a>.  I&#8217;m excited about the projects that I&#8217;ll have the opportunity to work on and they&#8217;ve been hiring a lot of really awesome Ruby developers, so I hope to learn a lot from my new coworkers.  I&#8217;m in Washington DC right now for my week of orientation since that&#8217;s where the company is based, but I&#8217;ll be working full time in Portland still, in fact just 5 blocks from my old office.</p>

<p>Leaving <a href="http://puppetlabs.com/">Puppet Labs</a> was a difficult decision since they&#8217;re a great company that&#8217;s also got a lot of great stuff coming down the pipeline.  They&#8217;re improving, growing and innovating, and I wish them the best to continue to do so.  They&#8217;ve got a lot of great people with more starting all the time - the company is many, many times the size it was when I started at around 10 employees.  I&#8217;ll really miss being paid to work on open source software and doing so much work on non-web applications.  I like web apps, but it&#8217;s certainly nice to do something else from time to time.</p>

<p>I&#8217;ll still be looking for ways to contribute to Puppet as I can, now as a community member - maybe I&#8217;ll finally finish that patch to have <a href="https://github.com/mmrobins/puppet/tree/ticket/2.7.x/bash_completion">command line completion for Puppet</a> - but first I&#8217;ve got a lot of new code to get familiar with.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Rank Your Git Contributors Lines of Code (then be careful what you do with the data)]]></title>
    <link href="http://www.mattrobinson.net/2012/01/17/rank-your-git-contributors-lines-of-code-then-be-careful-what-you-do-with-the-data/"/>
    <updated>2012-01-17T22:41:18-08:00</updated>
    <id>http://www.mattrobinson.net/2012/01/17/rank-your-git-contributors-lines-of-code-then-be-careful-what-you-do-with-the-data</id>
    <content type="html"><![CDATA[<p>Lately at work there&#8217;s been a bit of an obsession with metrics - I&#8217;m not sure it&#8217;s healthy.  Code metrics can be interesting, but in the wrong hands or used the wrong way, they are misleading and harmful.  It&#8217;s still to be seen what the outcome will be in this case.  I&#8217;m more than little worried.</p>

<p>That said, even I like to get some numbers on code, especially unfamiliar code, to help me figure out a few things.   For example, I&#8217;ve been using <a href="http://cloc.sourceforge.net/">CLOC (Count Lines of Code)</a> for years to find out quickly how big a project is and what languages are used in what proportion.</p>

<p>The first metric that&#8217;s started to be tracked at work is lines of code added and deleted per release, per author.  I&#8217;ve occasionally glanced at these kinds of numbers in the past too, and even wrote a little script (<a href="https://github.com/mmrobins/git-rank">git-rank</a>) to get the same kind of info when I was on a code deletion spree.  I&#8217;ve found these numbers to be useful for getting a general idea of who is most knowledgeable about a project or some files within the project.</p>

<p>However, the numbers can easily be misleading.  For example, if someone is committing a lot of style reformats, vendoring code from other projects, or autogenerating documentation, their numbers will be very high but they may know very little about the codebase.  For example, for a release to a Rails project I&#8217;ve worked on the metrics gathered showed that I had added 248,475 lines and deleted 458,020 lines. That&#8217;s obviously suspicious, although it does make me look very active.  These are the kinds of numbers that you should dig a little to figure out what&#8217;s happening, which is why I wrote my little git-rank script makes it easy to break those line totals down by file, and then exclude files for the next count.</p>

<pre><code>$ git rank v1.1.1..v1.1.9 --all-authors-breakdown --author "Matt Robinson"
Matt Robinson         603061
                      1 vendor/gems/json_pure-1.5.1/tests/fixtures/fail14.json
                      1 vendor/gems/json_pure-1.5.1/tests/fixtures/fail12.json
                      1 vendor/rails/railties/test/vendor/gems/dummy-gem-a-0.4.0/lib/dummy-gem-a.rb
                      ........
                      21418 vendor/gems/haml-3.0.13/lib/haml/precompiler.rbc
                      24953 vendor/gems/haml-3.0.13/test/sass/engine_test.rbc
                      30038 vendor/gems/haml-3.0.13/test/haml/engine_test.rbc
Matt Robinson         603061`
</code></pre>

<p>It&#8217;s pretty obvious that most of what I did was update vendored gems.  If you&#8217;re trying to figure out who did the most work between the releases I specified, you probably want to ignore the vendor directory when count lines of code.</p>

<pre><code>$ git rank v1.1.1..v1.1.9 --exclude-file vendor
Josh Cooper           4
Nigel Kersten         8
Andreas Zuber         11
Michael Stahnke       11
Jacob Helwig          15
nfagerlund            37
Daniel Pittman        283
Max Martin            418
Nick Lewis            543
Randall Hansen        901
Pieter van de Bruggen 1018
Matt Robinson         1661
</code></pre>

<p>Now we&#8217;re starting to get a more realistic picture.  From here we could dig deeper by listing all the files again for all the authors, and then maybe start excluding lines based on a regex if there were automated changes, and then maybe look at additions vs deletions in the count (I&#8217;m summing them together for these numbers).</p>

<p>However, I hope people <em>never</em> think they can get the whole picture, or even most of the picture, of a code base and who is contributing the most from something as arbitrary as lines of code counts.  I feel like that&#8217;s almost too obvious to say, but I&#8217;ve heard horror stories of managers who tie reviews to metrics like this.  I hope I never personally experience such a thing.</p>

<p>P.S. If anyone tries using the &#8216;git-rank&#8217; project I mentioned above, please keep in mind it&#8217;s a hacky little sick project that is probably got some bugs and you should take the numbers is spits out with a grain of salt.  <a href="http://en.wikipedia.org/wiki/Grain_of_salt">What a weird phrase that is</a>.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Testing AntiPatterns - Open Source Bridge 2011]]></title>
    <link href="http://www.mattrobinson.net/2012/01/17/testing-antipatterns-open-source-bridge-2011/"/>
    <updated>2012-01-17T22:12:26-08:00</updated>
    <id>http://www.mattrobinson.net/2012/01/17/testing-antipatterns-open-source-bridge-2011</id>
    <content type="html"><![CDATA[<p>I&#8217;m finally getting around to posting my slides from the presentation I did at <a href="http://opensourcebridge.org/sessions/690">Open Source Bridge</a> in June last year.  It was fun to present and attend the conference, although next time I hope do to a talk about something more fun.  Testing is an important and useful topic, but not nearly as entertaining as <a href="http://opensourcebridge.org/sessions/581">a totally RESTful language</a>.</p>

<p><strong><a href="http://www.slideshare.net/mmrobins/open-source-bridge-testing-antipatterns-presentation-11097677">Open source bridge testing antipatterns presentation</a></strong></p>

<p>View more <a href="http://www.slideshare.net/">presentations</a> from <a href="http://www.slideshare.net/mmrobins">mmrobins</a></p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Open Source Platform Benefits from Closed Source Features]]></title>
    <link href="http://www.mattrobinson.net/2011/12/29/open-source-platform-benefits-from-closed-source-features/"/>
    <updated>2011-12-29T21:35:52-08:00</updated>
    <id>http://www.mattrobinson.net/2011/12/29/open-source-platform-benefits-from-closed-source-features</id>
    <content type="html"><![CDATA[<p>When I first started working for <a href="http://puppetlabs.com/">Puppet Labs</a>, one of the main reasons was that I would get to contribute to open source software as a full time job.  However, for much of the summer and fall I was leading a team to create a closed source feature built on top of the open source projects in the Puppet ecosystem, and it turned out pretty well if I do say myself - <a href="http://puppetlabs.com/blog/live-management-part-2-controlling-puppet-and-invoking-agents/">Live Management</a>.  It&#8217;s a web app addon to <a href="http://puppetlabs.com/puppet/related-projects/dashboard/">Puppet Dashboard</a> that exposes the command line interface of the cool server orchestration framework <a href="http://puppetlabs.com/mcollective/introduction/">MCollective</a>.  MCollective lets you execute commands on large numbers of systems in parallel, including doing things like triggering Puppet runs, starting and stopping services, or gathering lots of realtime information about your infrastructure from <a href="http://puppetlabs.com/puppet/related-projects/facter/">Facter</a>.  It&#8217;s like the big red button for your entire infrastructure: so easy to use even your manager can now blow up your infrastructure with a few clicks.</p>

<p>Besides building on the open source Puppet projects of Puppet, MCollective, Puppet Dashboard and Facter, we also used a ton of other open source software directly: <a href="http://rubyonrails.org/">Rails</a>, <a href="http://sinatrarb.com">Sinatra</a>, <a href="http://batmanjs.org/">BatmanJS</a>, <a href="http://jquery.com/">JQuery</a> and many more indirectly.  One of our team members <a href="https://github.com/pvande">pvande</a> was able to contribute a lot of code and help back to the BatmanJS project - we had to since it&#8217;s alpha software and we were using it in a commercial application.</p>

<p>As I worked on the project, I sometimes felt sad that it wasn&#8217;t being open sourced.  I knew the rationalization that at some point the company has to make a product that people will pay us money for, but that wasn&#8217;t the rationalization that helped me accept it most at the end.  What helped was knowing that by building on top of other open source projects, we ended up contributing a lot back to them.  Puppet got bug fixes and small new features to help us manage resources, MCollective got plugin improvements and feedback on how it can better support web app use cases and scale testing, Puppet Dashboard got some CSS cleanup and UI improvements, and BatmanJS got lots of real world use, feedback and code.</p>

<p>Besides, it&#8217;s <a href="http://puppetlabs.com/puppet/puppet-enterprise/">free to try out</a> for fewer than 10 nodes, and since it&#8217;s written in interpreted languages, people can view the source code if they really want to.  There&#8217;s nothing stopping someone from writing a similar thing open sourced, and now we&#8217;ve done some of the hard work of improving the platform they would also build on.  This does mean that we&#8217;ll have to continue to innovate and improve on our closed source features that sell product, but also on our open source platform that enables anyone to build their own features make their life managing systems easier.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Tmux Is Awesome - Even Better Than Screen]]></title>
    <link href="http://www.mattrobinson.net/2011/04/10/tmux-is-awesome-even-better-than-screen/"/>
    <updated>2011-04-10T20:56:01-07:00</updated>
    <id>http://www.mattrobinson.net/2011/04/10/tmux-is-awesome-even-better-than-screen</id>
    <content type="html"><![CDATA[<p>I&#8217;ve been using <a href="http://www.gnu.org/software/screen/">GNU screen</a> for years now as a way to deal with all the terminals I need to use at once (terminal multiplexing is what I talk to my wife about when I know she doesn&#8217;t want to hear about work).  I started out using it, as many do, because I needed to do some work over ssh on a remote terminal, and losing that connection was painful without using screen.  After getting used to it, I found I liked using it even when I wasn&#8217;t working over ssh because it gave me a way to easily manage a bunch of terminal sessions.</p>

<p>Then one day I wanted to do <a href="http://tooky.github.com/2010/01/08/remote-pairing-with-gnu-screen-and-vim.html">remote pairing</a> and had heard of people doing this in screen.  It&#8217;s a bit of a pain to setup with screen (shared login or chmod to set uid bit), but then I discovered <a href="http://tmux.sourceforge.net/">tmux</a> - and realized how many things screen didn&#8217;t have that I now don&#8217;t want to live without.  The main thing being vertical splits.  I used to think vertical splits were just for vim sessions, but I was wrong.  The <a href="http://tmux.cvs.sourceforge.net/viewvc/tmux/tmux/FAQ">tmux faq</a> has a much fuller list of differences from screen that are nice (auto naming windows, more intuitive help, easier multiuser, multiple sessions).  In tmux vs screen tmux wins hands down.  The only things I&#8217;ve found I miss about screen is that my vim sessions were part of the scrollback buffer, but in tmux they disappear from tmux&#8217;s scrollback when you exit vim.</p>

<p><a href="https://picasaweb.google.com/lh/photo/VnR0PAqbR09N063c7SMkwg?feat=embedwebsite"><img src="https://lh5.googleusercontent.com/_Wo_DhMcZuSo/TaJ6XF12bsI/AAAAAAAEQ88/QyF0CDettlQ/s800/Screen%20shot%202011-03-31%20at%2011.44.30%20PM.png" alt="" /></a></p>

<p>Why not iTerm2, Terminator for Gnone, other OS specific terminal app here?  Did I mention they&#8217;re OS specific?  I want a terminal solution that works on any terminal the same way, and over ssh connections.  Oh, and open source and BSD licensed is nice too even if I never look at the source code.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Version Control Your Configuration / Dot Files]]></title>
    <link href="http://www.mattrobinson.net/2011/04/06/version-control-your-configuration-dot-files/"/>
    <updated>2011-04-06T22:19:56-07:00</updated>
    <id>http://www.mattrobinson.net/2011/04/06/version-control-your-configuration-dot-files</id>
    <content type="html"><![CDATA[<p>I&#8217;ve been meaning to write this post forever, but once I started doing what I suggest here it seemed so obvious that I have trouble remembering what life was like before I did it.  Once you&#8217;ve been working in a terminal for long enough, you realize how much more productive you can be with your aliases, scripts, prompts, plugins and other configurations setup the way you like.  This becomes especially apparent when you either work on someone else&#8217;s machine, or something happens and you have to rebuild yours and you realize just how slow you are in comparison.</p>

<p>How do you avoid this slowdown and prevent loss of all those great hacks and configurations you&#8217;ve built up?  Version control all the files that enable your productive environment.  Here&#8217;s my repo for all those files.</p>

<p><a href="https://github.com/mmrobins/config-files">https://github.com/mmrobins/config-files</a></p>

<p>I&#8217;ve got bash, zsh, vim, screen, tmux, irb, tmux, irssi, ruby scripts, puppet scripts and more in this git repository.  I spend a lot time working remotely via ssh or on virtual machines on my development box, so it&#8217;s important not only that I have these files available, but I also have a fast way to get all these files in place quickly.  I also want changes that I make to these files to be easy to commit back to my repository.  To accomplish this, I make all these files symlinks to the files in my repository so that if I edit ~/.bashrc with my great new alias that saves all sorts of typing, it&#8217;s actually editing the .bashrc in my git respository.  Then I have a little perl script that when run puts all these symlinks in place for my automatically and backup up any files I&#8217;m moving out of the way to create the links, just in case.</p>

<p><a href="https://github.com/mmrobins/config-files/blob/master/create_symlinks">https://github.com/mmrobins/config-files/blob/master/create_symlinks</a></p>

<p>Now whenever I end up in a new environment on the terminal, I can get all my productivity in place with a few simple commands from the home directory.</p>

<pre><code>git clone git://github.com/mmrobins/config-files.git
./config-files/create_symlinks
source .bashrc
</code></pre>

<p>Now vim has my plugins and configuration, bash has my prompt, if GNU Screen or tmux are available they&#8217;re how I like them, my aliases work, etc.  There&#8217;s always going to be tweaks necessary for this to work cross platform and on different machines with different privileges, but since committing those changes back to the git repo is so easy, it become a natural part of my workflow to have these incremental improvements to my work environment available everywhere I work.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Working at Puppet Labs]]></title>
    <link href="http://www.mattrobinson.net/2010/05/29/working-at-puppet-labs/"/>
    <updated>2010-05-29T11:48:15-07:00</updated>
    <id>http://www.mattrobinson.net/2010/05/29/working-at-puppet-labs</id>
    <content type="html"><![CDATA[<p>I&#8217;m excited to say that I started a new job last week at <a href="http://www.puppetlabs.com">Puppet Labs</a>.  This means I&#8217;m back to working with Ruby code (I don&#8217;t think I&#8217;ll miss Perl much), not going to be doing much web development and pumped to be working on an open source project.  The development team is small and really smart, and it&#8217;s fascinating to see how things operate in a startup company that&#8217;s based on a widely used, mature code base with a lot of community involvement.</p>

<p>There&#8217;s a lot of new things to learn, and finally working on a Mac and retraining my fingers on where the control key is may be one of the hardest.  Just kidding, although that has been more of my brain power this last week than I&#8217;d like.  Some of the cool new areas I&#8217;m looking forward to exploring in Puppet include parsers (Puppet has it&#8217;s own language), client server models other than with a web browser and working with directed graphs (finally going to get a chance to use all that graph math from college).</p>

<p>I&#8217;ll miss my coworkers at Rentrak and wish them luck with their code.  I&#8217;ll be going to <a href="http://opensourcebridge.org/">Open Source Bridge</a> next week, so I&#8217;ll see some of them there I assume.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Reputation Addiction on Stackoverflow]]></title>
    <link href="http://www.mattrobinson.net/2009/12/08/reputation-addiction-on-stackoverflow/"/>
    <updated>2009-12-08T19:14:37-08:00</updated>
    <id>http://www.mattrobinson.net/2009/12/08/reputation-addiction-on-stackoverflow</id>
    <content type="html"><![CDATA[<p>I&#8217;ve run across <a href="http://www.stackoverflow.com">Stack Overflow</a> plenty of times in the last year or so while looking for answers, but until now I hadn&#8217;t been motivated to sign up and post questions and answers.  I finally decided it might be a good thing to try out when I saw they had a jobs section, because presumably the company you&#8217;re applying to might be impressed with your participation on the website.  So I signed up thinking I&#8217;d give it a try and quickly lose interest as I always have participating in message boards or IRC since I always found the signal to noise ratio to be very low.</p>

<p>However, the simple little reputation system they&#8217;ve implemented on Stack Overflow has kept me interested for a least a couple weeks - probably will for longer.  The reputation points makes me feel like it&#8217;s a something of a game where I&#8217;m trying to improve my score.  I&#8217;m just over 400 reputation, and have started to look around to see what silly little badges I might be able to easily earn.  I&#8217;ve even put up one of their silly flair badges on this site for now.  We&#8217;ll see how long that stays up.</p>

<p>In fact, I think the minor addition of these badges helps make the whole reputation system more fun than a lot of other web sites that do &#8216;points&#8217; or &#8216;karma&#8217; or something else to measure your participation.  I&#8217;m specifically thinking of the <a href="http://news.ycombinator.com">Y Combinator Hacker News Site</a> that has these points.  I tried to get some for a while, but I feel like there&#8217;s too many people who just sit around posting links and spouting out useless comments all day to compete for mind share.  Even stack overflow suffers from this a little bit, where often the first person to answer gets a ton of points even if a better answer comes along later.  Overall though, the community feel is still really good and there&#8217;s a nice balance of users who have enough earned power to do things to organize the site, and users who just need an occasional question answered.  I&#8217;ll have to remember this as resource when I get stuck on things.</p>

<p>Update - Jan 3 2010 - The initial fun has worn off some, partly because you have to be almost the first person to respond to questions to stand a chance of getting your answer accepted.  I just don&#8217;t have the time to watch for new questions that frequently.  What I will say is that there&#8217;s a treasure trove of great answers that I&#8217;ve been using as a resource more and more often.  It&#8217;s hard to even come up with original questions to ask for points.  Guess I need to start working on harder problems - or at least more obscure ones :-)</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Flickr Finally Has Competition - Cheaper Storage on Google Web Albums]]></title>
    <link href="http://www.mattrobinson.net/2009/11/24/flickr-finally-has-competition-cheaper-storage-on-google-web-albums/"/>
    <updated>2009-11-24T23:03:22-08:00</updated>
    <id>http://www.mattrobinson.net/2009/11/24/flickr-finally-has-competition-cheaper-storage-on-google-web-albums</id>
    <content type="html"><![CDATA[<p>I&#8217;ve been using <a href="http://www.flickr.com">Flickr</a> for quite a few years now because it&#8217;s a great website for photo sharing.  Perhaps most importantly to me, it&#8217;s offered super cheap online storage - less than $25 for unlimited storage.  However, offline I&#8217;ve been using <a href="http://picasas.google.com">Google&#8217;s Picasa</a> software to do all my photo organization - tagging, captioning, touch ups, sorting into albums, and recently geotagging and face recognition.  The one thing that I&#8217;ve really wanted was a great way to sync between Picasa and somewhere online - but for cheap.  Google was charging $75 for 40GB, which is about how much photo data I have that I&#8217;d like to backup - way too much.  Now it&#8217;s $20 for 80GB.  Sweet.  I&#8217;m in the process of uploading everything now.</p>

<p>Not only does Google&#8217;s Picasa Web Albums sync data between online and desktop, it syncs tags and captions.  Now I can upload my photos and tag them from anywhere with an internet connection if I get the urge to organize.  Then I can sync those changes back down.</p>

<p>So far the main thing I&#8217;m missing from Flickr is the post to blog feature.  I&#8217;m finding a ton of plugins for Wordpress that supposedly help with this, but I just want one good one.  I tried one already called Goldengate that used up all my PHP memory.  No thanks.  I tried another I don&#8217;t even remember already that was just terrible.  I&#8217;m sure a good one is out there, and once I find it, I think I&#8217;ll be ready to switch over from Flickr completely.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Master of Software Engineering from PSU]]></title>
    <link href="http://www.mattrobinson.net/2009/11/03/master-of-software-engineering-from-psu/"/>
    <updated>2009-11-03T19:33:06-08:00</updated>
    <id>http://www.mattrobinson.net/2009/11/03/master-of-software-engineering-from-psu</id>
    <content type="html"><![CDATA[<p>I&#8217;d been wanting to take some computer science courses for a while now because after being out of school for five years, I miss it.  Besides, my employer pays for a bit of the education costs.  But it&#8217;s hard to find graduate level courses that are convenient times and locations.  I stumbled across the <a href="http://www.pdx.edu/omse/node/23">OMSE program</a> (Oregon Master of Software Engineering) from someone&#8217;s blog post that was linked to from an Ignite Portland web page, and saw that they offer online class for most of the courses, and convenient evening times for the face to face classes.  Bingo.</p>

<p>I&#8217;m taking the first course, OMSE 500, Principles of Software Engineering, right now.  The course is an overview of the rest of the program, and it&#8217;s helping me realize that software engineering is quite a different topic from computer science.  The course is all discussion based about topics such as project management, system architecture, development methodologies and other high view topics, but we never actually look at code.  I&#8217;m not sure if I like that or not yet.  I wonder sometimes if I would get burned out on code if I worked a normal week coding, and then had classes where all I did was code on top of that.  On the other hand I feel like the OMSE courses will prepare me more to be a project manager than a better programmer.</p>

<p>What I like best about the course so far is getting a lot of perspective and stories from the fellow students.  A prerequisite for taking the classes is that you&#8217;ve been working in software development for a few years, so it&#8217;s interesting to hear about the real world problems that people face as opposed to the type of fellow students I had when I was finishing my undergrad where almost nobody had any real experience outside of homework assignments.  It really drives home the point that with software being as ubiquitous as it is now, some of the biggest challenges in developing it are managing how programmers work with each other since there&#8217;s not much that is done by a single person anymore.</p>

<p>I plan to at least get the certificate, which is 5 courses and should take me a little over a year.  The full masters program is 13 or so courses, but I&#8217;m not sure yet that I wouldn&#8217;t rather focus on more computer science courses.  The biggest downside to the program is that it&#8217;s expensive - over $1500 for 3 credits.  I can&#8217;t imagine paying that if work didn&#8217;t chip in for most of it.  I suppose they charge a little extra since most people enrolled have their employers paying for it.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Passpack - Password Management Made Awesome]]></title>
    <link href="http://www.mattrobinson.net/2009/10/22/passpack/"/>
    <updated>2009-10-22T08:10:08-07:00</updated>
    <id>http://www.mattrobinson.net/2009/10/22/passpack</id>
    <content type="html"><![CDATA[<p>Keeping track of passwords has been a pain - until I found <a href="http://www.passpack.com/">Passpack</a>.  Passpack is a free, online password manager that I&#8217;ve been using for over a year now to keep track of most of my passwords.</p>

<h3>Security</h3>

<p>Storing passwords online might set of some security warning bells in your head since you&#8217;ll have all your passwords in one place, somewhere any could try to get to, but I&#8217;ve <a href="[http://www.passpack.com/en/security/](http://www.passpack.com/en/security/)">convinced myself</a> that using Passpack is safe and that they take security very seriously.  Your password data is never sent anywhere unencrypted, meaning not even Passpack programmers could access your data.  This means you have a login that does get sent to Passpack to access your account, but to &#8216;unpack&#8217; your data you have to type in another password they call your Packing Key.</p>

<p>Another security benefit is that now I don&#8217;t reuse passwords like I used to.  Trying to remember all the logins and passwords for all the websites I go to used to be such a hassle that I just used the same 2 or 3 passwords for everything.  Passpack even has a nifty password generator that I used to create stronger passwords.</p>

<h3>Access</h3>

<p>I was a bit worried initially about what might happen if Passpack was down (I&#8217;ve never seen it happen) or if I lost my internet connection, but they have all sorts of offline options including a simple export (which you&#8217;ll want to encrypt if you&#8217;re storing it locally) and Google Gears.  I haven&#8217;t had a problem with getting Passpack from anywhere yet, but it&#8217;s nice to know that if I did I would have backup.</p>

<h3>Ease of Use</h3>

<p>Besides storing your passwords online, they make it ridiculously easy to login places.  They have a button that you can add to your browser toolbar that automatically logs you into websites that Passpack knows your password for.  It saves you from having to copy and paste stuff all over the place, although they make that easier too with one click copy to the clipboard without ever showing your username or password on the screen so you don&#8217;t have to worry about anyone shoulder surfing your info.</p>

<p>Besides all this, there&#8217;s some new features they offer that I don&#8217;t even take advantage of like secure message sending, and the ability to share passwords between accounts.</p>

<p>Passpack is now one of the first sites that I open when I start a browsing session.  Perhaps one day <a href="http://www.openid.net">OpenID</a> or something like it will be ubiquitous and I won&#8217;t need so many passwords, but until then some sort of tool like this to help is essential.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Put Your rc, Config Files and More Under Source Control]]></title>
    <link href="http://www.mattrobinson.net/2009/06/21/put-your-rc-config-files-and-more-under-source-control/"/>
    <updated>2009-06-21T18:08:07-07:00</updated>
    <id>http://www.mattrobinson.net/2009/06/21/put-your-rc-config-files-and-more-under-source-control</id>
    <content type="html"><![CDATA[<p>I&#8217;ve been working on more and more computers lately, and I was getting tired of my favorite bash and editor shortcuts not being available between the different machines.  I finally took some good advice I heard a while back and put my config files under source control, and it&#8217;s been one of the best tips I&#8217;ve followed in some time.</p>

<p>The way I&#8217;ve done it is to use <a href="http://www.github.com/mmrobins">GitHub</a> to store my config files, so anyone else is free to take a look if they want to see how I&#8217;ve got vim, bash, screen, readline, ruby&#8217;s irb or other things configured.  However, the biggest benefit is that I can quickly get a new machine customized with all my favorite settings just by doing a checkout (clone in git) into my home directory on the new machine.  From there I&#8217;ve got a little script I run called &#8216;create_symlinks&#8217; that backs up the old config files before overwriting them with symlinks that point to the files in my checkout.  That way, whenever I update my repository, the files are automatically current.</p>

<p>This has been immensely helpful in taking the tricks I learn at work and easily incorporating them at home or on any remote server I have to do work.  If I add something new and cool to my vimrc at work, I just have to remember to commit it and push the changes to GitHub before I head home, and then I can continue working from home without having to remember whatever command I just automated.</p>

<p>I&#8217;ve even heard of people who go so far as to put their whole home directories under version control as a way of not only moving files around, but as a way of doing backups.  That seems overkill to me, but it&#8217;s worth thinking about what sorts of files we move around a lot might be easily moved and backed up using a source control system like git or SVN.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Mephisto no more]]></title>
    <link href="http://www.mattrobinson.net/2009/05/25/mephisto-no-more/"/>
    <updated>2009-05-25T08:37:41-07:00</updated>
    <id>http://www.mattrobinson.net/2009/05/25/mephisto-no-more</id>
    <content type="html"><![CDATA[<p>If you&#8217;re wondering what happened to this site, I decided that I was sick of trying to use Mephisto for blogging software.  I love Rails development, but Mephisto was a pain in the ass and a major memory hog compared to a much more stable Wordpress.  It was taking down my slice pretty regularly and discouraging me from posting because it was a pain to use comparatively.  I haven&#8217;t moved the old posts over yet, but they will be coming in the next few weeks.  I&#8217;d move them sooner, but they&#8217;re mostly about stuff that is long since out of date.  I&#8217;d say I hope to post more frequently, but I&#8217;m not entirely sure that&#8217;s true.  We&#8217;ll see if having an easier to use blogging system installed precipitates more frequent posting.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Programming Perl Instead of Ruby]]></title>
    <link href="http://www.mattrobinson.net/2008/07/13/programming-perl-instead-of-ruby/"/>
    <updated>2008-07-13T16:25:49-07:00</updated>
    <id>http://www.mattrobinson.net/2008/07/13/programming-perl-instead-of-ruby</id>
    <content type="html"><![CDATA[<p>I&#8217;ve got a new job and it&#8217;s working almost completely in Perl. Who&#8217;d have thought? Fortunately, it really is true that if you know one programming language fairly well, you&#8217;ll understand others fairly easily. Modifying code in Perl is easy as long as I have other code to refer to, and I often forget it&#8217;s a new language. Learning all the names, faces and practices in my new job is much harder than learning a bit of new syntax. However, if I had to sit down and write something in Perl from scratch it would not go well.</p>

<p>There&#8217;s definitely a few things I&#8217;ve noticed about Perl that I don&#8217;t like compared to Ruby:</p>

<ul>
<li>Sigils. I keep forgetting to prepend my variables with those $@% sigils. That&#8217;s not me cursing there, those are the sigils for scalars, arrays and hashes. The worst is when you&#8217;re references the whole array (@foo) you use a different sigil than when you&#8217;re referencing a scalar element in the array ($foo[0]).</li>
<li>Objects feel like a hacked up addon to the language. You have to &#8220;bless&#8221; things to make them objects and you&#8217;re always passing around references to $self to object methods. You can&#8217;t make methods private. Weird stuff.</li>
<li>No interactive shell built in. I loved having irb to try things out when I was learning Ruby - heck, I still do. Fortunately, after a bit of searching and bad advice on just using the Perl debugger I found Perl Console.</li>
<li>Always needing to say &#8220;my variablename&#8221; instead of just &#8220;variablename&#8221; if I want local variables. It seems like variables should be local by default and you say something if you want to make them local.</li>
</ul>


<p>There&#8217;s some things about Perl I&#8217;m not sure if I like or dislike yet:</p>

<ul>
<li>Default variables. Strangely named variables like $<em> and @</em> pop up everywhere. The idea is if you don&#8217;t want to come up with a name for variables while you&#8217;re iterating or passing parameters, you don&#8217;t have to thus saving all that typing and thinking. However it certainly makes the code harder to read for those who don&#8217;t know Perl and I suspect it might make things always harder to read even once I get used to it.</li>
<li>Regular expressions everywhere. This will be good for me to get better with this powerful feature, but damned if regular expressions aren&#8217;t ugly.</li>
<li>There&#8217;s always more than one way to do something. This is true in most every language, but Perl seems to take a lot of pride in it, and often the idiomatic Perl way of doing something is quite a bit harder to read than the non idiomatic way.</li>
</ul>


<p>The main thing I like about Perl so far is that the Perl community seems to have a sense of humor. Perl books are always making jokes and variables in Perl code are given entertaining names.</p>

<p>Aside from the new language difference, the new job is great for me to get used to coding in a large codebase and with teams. We use quite a few Extreme Programming practices like test driven development, and even more impressive, pair coding. These practices more than make up for anything I don&#8217;t like about Perl.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[ruby-debug 0.10.1 Broken On Windows]]></title>
    <link href="http://www.mattrobinson.net/2008/05/24/ruby-debug-0101-broken-on-windows/"/>
    <updated>2008-05-24T16:25:19-07:00</updated>
    <id>http://www.mattrobinson.net/2008/05/24/ruby-debug-0101-broken-on-windows</id>
    <content type="html"><![CDATA[<p>Since the old rails breakpointer quit working in versions of Ruby after 1.8.4, the preferred method for debugging rails has been to use ruby-debug. This is a separate gem, so to install you just do</p>

<pre><code>gem install ruby-debug
</code></pre>

<p>However, the current version of ruby-debug (0.10.1) runs into problems on Windows, namely it doesn&#8217;t work and spews out an error message when you try to run it directly:</p>

<pre><code>c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require': no such file to load -- c:/ruby/
lib/ruby/gems/1.8/gems/linecache-0.42-x86-mswin32/lib/../ext/trace_nums (LoadError)
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from c:/ruby/lib/ruby/gems/1.8/gems/linecache-0.42-x86-mswin32/lib/tracelines.rb:8
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from c:/ruby/lib/ruby/gems/1.8/gems/linecache-0.42-x86-mswin32/lib/linecache.rb:63
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from c:/ruby/lib/ruby/gems/1.8/gems/ruby-debug-base-0.10.1-mswin32/lib/ruby-debug-base.rb:3
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from c:/ruby/lib/ruby/gems/1.8/gems/ruby-debug-0.10.1/cli/ruby-debug.rb:5
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `gem_original_require'
from c:/ruby/lib/ruby/site_ruby/1.8/rubygems/custom_require.rb:27:in `require'
from c:/ruby/lib/ruby/gems/1.8/gems/ruby-debug-0.10.1/bin/rdebug:7
from c:/ruby/bin/rdebug:19:in `load'
from c:/ruby/bin/rdebug:19
</code></pre>

<p>I&#8217;ve found two possible ways to fix this. The first is simply to revert back to ruby-debug version 0.10.0</p>

<pre><code>gem uninstall ruby-debug
gem install ruby-debug --version "=0.10.0"
</code></pre>

<p>The other way to fix the problem I found on a ticket in Rails Trac</p>

<p>In the file ruby\lib\ruby\gems\1.8\gems\linecache-0.42-x86-mswin32\lib\tracelines.rb I changed the line from</p>

<pre><code>require File.join(@@SRCDIR, '..', 'ext', 'tracenums')
</code></pre>

<p>to</p>

<pre><code>require File.join(@@SRC_DIR, '..', 'ext', 'extconf.rb')
</code></pre>

<p>I suppose the advantage to this method is that you have the newer version of ruby-debug with all it&#8217;s fixes, although I don&#8217;t really know what those are.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Finally Back Online]]></title>
    <link href="http://www.mattrobinson.net/2008/05/06/finally-back-online/"/>
    <updated>2008-05-06T16:24:32-07:00</updated>
    <id>http://www.mattrobinson.net/2008/05/06/finally-back-online</id>
    <content type="html"><![CDATA[<p>Now that I&#8217;m finally back in the USA it&#8217;s time to start blogging about technical things again. I doubt anyone really noticed, but this site was down for the last few months as my free Rails hosting expired back in February and I didn&#8217;t bother to renew it. I was also too busy to resetup Mephisto on my other server, especially since I haven&#8217;t found that I&#8217;ve liked Mephisto very much. I decided I&#8217;d continue with it and try to change the things I didn&#8217;t like, if for no other reason than it&#8217;s good practice deploying Rails apps. I&#8217;ll have the old articles back up in the near future.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Rails Plugins: scope_out and will_paginate]]></title>
    <link href="http://www.mattrobinson.net/2007/06/26/rails-plugins-scope_out-and-will_paginate/"/>
    <updated>2007-06-26T16:23:48-07:00</updated>
    <id>http://www.mattrobinson.net/2007/06/26/rails-plugins-scope_out-and-will_paginate</id>
    <content type="html"><![CDATA[<p><em>update: I finally noticed that some people still visit this post.  scope_out was great, but it&#8217;s been integrated into Rails now.  It&#8217;s called <a href="http://railscasts.com/episodes/108-named-scope">name_scope</a> and it works right out of the box with will_paginate.</em></p>

<h1>Round 1: scope_out</h1>

<p>A plugin I have found immensely useful is the scope_out plugin by John Andrews. The rationale for using the plugin is very nicely summed up by Dan Manges:</p>

<ul>
<li>Your conditions are defined in ONE place.</li>
<li>You can extend associations if you want caching.</li>
<li>The &#8216;raw&#8217; with_scope is available, making applying multiple conditions easy.</li>
<li>The find and calculate methods are both available.</li>
</ul>


<p>Use it like so:</p>

<pre><code>class Project &lt; ActiveRecord::Base hasmany :tasks, :dependent =&gt; :deleteall end

class Tasks &lt; ActiveRecord::Base belongs_to :project scope_out :active, :conditions =&gt; "status = 'active'" end
</code></pre>

<p>Now you can do the following:</p>

<pre><code># All active tasks
@tasks = Task.find_active(:all, :order =&gt; 'due_on')

# The active tasks for the project with memoization preserved
@tasks = @project.tasks.active
</code></pre>

<p>If you don&#8217;t see why that&#8217;s useful or understand what the means, read the whole blog post and contrast it with Jamis Buck&#8217;s take on associations, which is what originally led me to scopeout. I don&#8217;t like Jamis&#8217; idea of defining methods on the associations because there&#8217;s some methods I need to use as part of the association OR as just a method on the original class. Also, what if a user also hasmany tasks? You have to redefine what &#8216;active&#8217; is for that association too.</p>

<p>To install it appears you have to go to the svn repository since it&#8217;s not found in the default rails plugin repositories</p>

<pre><code>ruby script/plugin install http://scope-out-rails.googlecode.com/svn/trunk/
</code></pre>

<p>and then rename /vendor/plugins/trunk to /vendor/plugins/scope_out.</p>

<h1>Round 2: will_paginate</h1>

<p>Using scoped out I&#8217;d been paginating my conditions with Rails classic pagination</p>

<pre><code>def index
  @task_pages = Paginator.new self, Task.find_active(:all).count, 10, params[:page]
  @tasks = Task.find_active(:all, :order =&gt; 'due_on',
  :limit  =&gt;  @person_pages.items_per_page,
  :offset =&gt;  @person_pages.current.offset)
end
</code></pre>

<p>But now that pagination isn&#8217;t going to be part of the rails core I went looking for what people were going to do and found Err&#8217;s will_paginate plugin, which is slicker than what I&#8217;ve been doing anyway.</p>

<pre><code>@tasks = Task.paginate :page =&gt; params[:page]
</code></pre>

<p>But can I still use my scope_out definitions?</p>

<pre><code>@tasks = Task.paginate_active :page =&gt; params[:page]
NoMethodError: undefined method `find_all_active' for Task:Class
</code></pre>

<p>Not yet. willpaginate implements a method missing bit o&#8217; code so you can do findby&#8217;s with an implicit all:</p>

<pre><code># These are equivalent
@tasks = Task.paginate_by_priority "high", :page =&gt; params[:page]
@tasks = Task.paginate_all_by_priority "high", :page =&gt; params[:page]
</code></pre>

<p>However, the way the regular expression is written messes up scopeout. This is easily fixed by replacing one line of code in vendor/plugins/willpaginate/lib/will_paginate/finder.rb. Replace</p>

<pre><code>finder.sub! /^find/, 'find_all'
</code></pre>

<p>on line 91 with</p>

<pre><code>finder.sub! /^find_by/, 'find_all_by'
</code></pre>

<p>Now paginateby will still have an implicit all and scopeout definitions will work with the pagination. I&#8217;m pretty sure this change doesn&#8217;t break anything with the will_paginate plugin, but if anyone finds problems with this let me know.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Peepcode: Building a Full Rails Stack on Ubuntu 6.06]]></title>
    <link href="http://www.mattrobinson.net/2007/05/07/peepcode-building-a-full-rails-stack-on-ubuntu-606/"/>
    <updated>2007-05-07T16:23:14-07:00</updated>
    <id>http://www.mattrobinson.net/2007/05/07/peepcode-building-a-full-rails-stack-on-ubuntu-606</id>
    <content type="html"><![CDATA[<p>I just signed up for a slicehost account today and am trying to setup my new server according with the deprec capistrano recipes according to the free bonus peepcode video: Building a Full Rails Stack on Ubuntu 6.06.</p>

<p>The first capistrano task you have to run is really hard to read since the free video download is pretty poor quality, so you can&#8217;t read the underscores very well at all.</p>

<pre><code>cap setup ssh keys
</code></pre>

<p>should be</p>

<pre><code>cap setup_ssh_keys
</code></pre>

<p>running it the wrong way got me the error</p>

<pre><code>command "sudo  chgrp -R deploy /var/www/apps/rails_app" failed on www.servername.com
</code></pre>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[RCov - Code Coverage in Rails]]></title>
    <link href="http://www.mattrobinson.net/2007/04/17/rcov-code-coverage-in-rails/"/>
    <updated>2007-04-17T16:22:19-07:00</updated>
    <id>http://www.mattrobinson.net/2007/04/17/rcov-code-coverage-in-rails</id>
    <content type="html"><![CDATA[<p>If you haven&#8217;t been doing test driven development, and you should be, you may not be sure how well tested your rails application is. You can use rake stats to get your code to test ratio, but that only gives you a general sense of how you&#8217;re doing, but just knowing that your ratio is 1.0 to .7 doesn&#8217;t really ensure anything. You can write some tests in one line that test dozens of lines of code fairly well.</p>

<p>This is where using rcov comes in to save the day. Thankfully Coda Hale has written a rails plugin to make running rcov on your projects super easy. The instructions on his page tell you to install rcov by downloading it, but there&#8217;s a prepackaged gem that makes installation even easier. Let&#8217;s install it:</p>

<pre><code>gem install rcov
</code></pre>

<p>Now Coda Hale recommends installing the plugin using -x to add and svn:externals entry, but I can&#8217;t stand having svn:externals since every time I want to update or commit I become dependent on someone else&#8217;s svn repository. You&#8217;re better off using piston if you need to keep your plugins up to date. So go ahead and run:</p>

<pre><code>ruby script/plugin install http://svn.codahale.com/rails_rcov
</code></pre>

<p>Now you&#8217;re pretty much done for installing. Just run rake with a little change</p>

<pre><code>rake test:units:rcov
</code></pre>

<p>You&#8217;ll now find a folder in your rails project called coverage. Look in there and find the index file and open it up. You now can see how well covered all your models are. If you open the individual model coverage file you can see exactly which lines aren&#8217;t covered and begin writing tests for them. There&#8217;s other options you can pass to rcov too, so take a look at the documentation if you want to get fancy. The only other command I run is</p>

<pre><code>rake test:functionals:rcov RCOV_PARAMS="--sort=coverage"
</code></pre>

<p>So the difference there is I&#8217;m testing the controllers with functionals instead of the models with units and sorting the output by code coverage. This way I can easily see the models and controllers I need to do the most work on.</p>
]]></content>
  </entry>
  
  <entry>
    <title type="html"><![CDATA[Moving the Documents and Settings Folder to a Different Drive]]></title>
    <link href="http://www.mattrobinson.net/2007/03/23/moving-the-documents-and-settings-folder-to-a-different-drive/"/>
    <updated>2007-03-23T16:21:33-07:00</updated>
    <id>http://www.mattrobinson.net/2007/03/23/moving-the-documents-and-settings-folder-to-a-different-drive</id>
    <content type="html"><![CDATA[<p>I thought this would be easy, and it was - once I figured out one little thing. You&#8217;ll probably come across Microsoft&#8217;s KB Article 236621 which got me most of the way there. The second method listed says to search the registry and replace all instances of &#8220;Documents and Settings&#8221;. This works fine if you&#8217;re just moving the folder to somewhere else on the same drive with a different name. However I wanted to move all the user profiles from the C drive to the same folder name on the D drive on a terminal server.</p>

<p>First of all, trying to do this with the regular old regedit program is awful since it doesn&#8217;t do search and replace. I found a free program called Blade&#8217;s Registry Replacer that worked great for doing search and replace on the registry and generating an undo file.</p>

<p>Now that you&#8217;ve got that you&#8217;ll want to replace all instances of &#8220;C:\Documents and Settings&#8221; AND all instances of &#8220;%SystemDrive%\Documents and Settings&#8221; (this is the part I was missing earlier) with &#8220;D:\Documents and Settings&#8221; or whatever you want to call the folder on the D drive.</p>
]]></content>
  </entry>
  
</feed>
