Matt Hodan

Tech news, code samples, product reviews, etc.

  • @matthodan · Follow me on Twitter!
  • 23 Dec 2011 Bookmarklet Loader in CoffeeScript

    Bookmarklet Loader is a template bookmarklet that injects your app’s .js and .css into the current page when clicked. You can grab the code on GitHub: Bookmarklet Loader Bookmarklet Loader is written in CoffeeScript, however bookmarklets must be JavaScript and URL encoded. CoffeeMarklet does a great job of converting CoffeeScript to bookmarklet-friendly JavaScript. I recommend you use it to...

    Read the rest of this post »

  • 10 Oct 2011 How to test [something] with Rspec

    I’ve slowly been learning how to test my Rails projects with Rspec and I thought it would be helpful to document this experience. I’m sure there are better, faster, smarter ways to test these concepts, so please do tell me in a comment so I (and others) can learn! To get started, make sure you have Rspec installed properly. Ryan Bates created a great Railscast that walks through setting up...

    Read the rest of this post »

  • 28 Aug 2011 Endless Scroll (a.k.a. Endless Page) with jQuery

    I decided to write a super lightweight endless scroll (a.k.a. endless page, pageless, without pagination, etc.) plugin for jQuery. It will let me trigger some code whenever the user scrolls within a certain number of pixels from the bottom of the page. I’ll get right to the juicy details. Here is the plugin code, and yes, it’s written in CoffeeScript. If you need javascript, feel free to copy...

    Read the rest of this post »

  • 30 Jul 2011 Using Masked Identifiers to Reference ActiveRecord Models

    Just about every time I start a new Rails project, I find myself building out a way to reference records based on a masked identifier. It just feels wrong to me to display the count of the number of records in the database, which is the Rails default. UPDATE: I created a Rails plugin that makes it easy to add a non-incrementing masked identifier to any ActiveRecord object. Check out the Github...

    Read the rest of this post »

  • 1 May 2011 Dual displays with your MacBook Pro (or any other laptop)

    Note: I was not paid by Plugable to write this post-- I genuinely love their product. Have you ever wanted to run dual-displays with your MacBook Pro?  With the Plugable USB 2.0 UGA Multi-Display Adapter, it's easy and affordable ($64.50 on Amazon at the time of this writing).  But before we get into details, here is the finished product Yes, I know-- I have three displays hooked up.  Why...

    Read the rest of this post »

  • 30 Nov 2010 Non-Field-Specific Custom Validations and Error Messages in Rails

    If you've created a moderately complex form in Rails, you've probably asked yourself the question: How do I display a validation error message that doesn't relate to a specific field on my form? The first solution you should consider is the "error_messages_for" helper.  You can use "error_messages_for" in your view to display a quick and dirty summary of all validation errors.  For example, the...

    Read the rest of this post »

  • 20 Aug 2010 Exclude Static Assets From Heroku Slug Without Removing From Repository Using .slugignore

    Want to reduce the size of your Heroku slug? Easy-- move your static assets to S3.  Great, problem solved, but wait... What do you do with the static assets left in your repository?  I found myself asking this question today... My first though was to use .gitignore, which would exclude the static assets from my git repository and in turn my Heroku slug.  However, this approach would leave me without...

    Read the rest of this post »

  • 8 Aug 2010 Ruby Private Methods vs. Protected Methods

    Let's talk Ruby access control basics... What is the difference between 'private' and 'protected' methods in Ruby?  In Ruby, the primary difference between a 'private' and 'protected' method is that a private method cannot be called with an explicit receiver, while a protected method can.   What is an 'explicit receiver', you ask?  An explicit receiver is the object that is receiving a message...

    Read the rest of this post »

  • 2 Aug 2010 Recurring Payments w/ ActiveMerchant & PayPal Web Payments Pro (US)

    Many web services charge recurring subscriptions.  Unfortunately, ActiveMerchant does not support recurring payments with PayPal Website Payments Pro (US) out of the box.   In this tutorial, we will add support for recurring payments to ActiveMerchant.  Before we begin, let’s list what we’re using here:  ActiveMerchant v1.7.0 PayPal Website Payments Pro (w/ Recurring Payments Enabled) Rails...

    Read the rest of this post »

  • 23 Jul 2010 Ruby Arrays Containing Country, State, and Province Codes Used by PayPal's API

    While working on an address form for a rails project, I came across this nasty little task of building an array of country, state, and province codes.  I ended up downloading PayPal's official list of country, state, and province codes from their API documentation and making the following: Country codes: U.S. state codes: Canadian province codes: Other state/province codes: Hopefully this saves...

    Read the rest of this post »

  • 4 Jun 2010 How to setup Heroku Hostname SSL with GoDaddy SSL Certificate and Zerigo DNS

    Heroku recently added an exciting new 'Hostname SSL' option.  This option offers the broad compatibility of IP-based SSL, but at 1/5 the price ($20 / month at the time of this writing).     The following tutorial explains how to use Heroku's new 'Hostname SSL' option on your Heroku project.  Before we begin, let's list what we're using here: Heroku Hostname SSL GoDaddy Standard SSL Certificate...

    Read the rest of this post »

About Me

Matt Hodan is a entrepreneur, investor, and technologist.

Matt began his career in finance, working for two years as an Analyst at J.P. Morgan. While at J.P. Morgan, Matt provided strategic M&A advisory services to leading companies.

After J.P. Morgan, Matt worked for two years as an Associate at Genstar Capital, a middle-market private equity investment firm. While at Genstar Capital, Matt identified investment opportunities, executed new acquisitions, and monitored portfolio investments.

After Genstar Capital, Matt joined Y-Combinator and started two companies: Data Marketplace and Smart Shortcuts. Data Marketplace is an online marketplace for tabular data. Smart Shortcuts is an Excel productivity add-in for financial analysts.

Matt has been programming since childhood, and has developed applications in C, C++, C#, VB.NET, VBA, Perl, Java, PHP, and Ruby. Today, Matt spends most of his time creating new Ruby on Rails web applications.

Matt received a B.S. in Finance from Indiana University in 2005. When he's not working, Matt loves to play tennis, snow ski, sail, play piano, invest, and talk about new business ideas.