Bad Dinosaur!

You Should Check This Out

CollegeJobConnect | Better Undergraduate Recruiting

Wednesday, August 24, 2011

Do you test?

Note: this was in response to a question asked on the Dallas.rb group regarding if, how, and why you write tests (or specs, or whatever you want to call them).

Definitely test. It will feel weird / slow at first, but it helps you write much cleaner, more modular code. I initially hated it when I was forcing myself to adopt it, now I feel naked without it. For me, I find testing important for a few reasons:
  • It helps me think through what I want the app to do should do from a stakeholders standpoint.

  • It helps me and anyone else working on my app from a dev standpoint know how my app and its components should behave - specifications should do just that: specify what certain things should do! I try to always ask myself "What should you do, Mr. [Object]" and then write a spec around that.

    For example, take a look at this:
    You can see what I'd expect if you were to write User#full_name. It says: "Show me the full name when available, or its parts, or default to the email address, which is ensured to be present, if all else fails." Perhaps we drew up this specification when determining how we should handle displaying a "Hi, #{current_user.full_name}" in our UI for the different cases our app might encounter. Or perhaps #full_name was the failing part of our acceptance test when we were writing the code that we wish he had (see The RSpec Book for this reference and a very informative read).

  • It's an insurance policy and time saver. Anytime you change your app you can be confident that other areas still behave as expected. My workflow before TDD / BDD was:
    1. implement some new feature
    2. think through all other parts that could be effected
    3. pop open my dev env and manually test each to make sure things were working.
    This was a waste of time and exposed me to my own human error: perhaps I forgot to do a certain thing or whatever. The computer is your friend (and worker), make it do the checking for you. My workflow is now:
    1. implement some new feature
    2. initiate tests
    3. go make a sandwich, return and see what passed what needs fixing.

  • I found writing expressive and clean unit tests much easier than acceptance tests. If you are using Cucumber, check this out: Imperative vs Declarative scenarios in user stories and try to avoid using the pre-packaged web-steps when possible.

Friday, August 12, 2011

Love, S and P

Tuesday, August 9, 2011

DRYing up those controller specs

I recently had a bunch of duplicate code in my controller specs and wanted to share a solution I arrived at that DRYed things up significantly. Feel free to use it and abuse it and if you have recommendations on how to improve it, let me know.

First, the quick requirements and background: all controller methods must explicitly demonstrate that guests do not have access to certain resources and are told, upon any attempt to access them, that they must login in order gain access.

The first pass was to write the tests, get all to pass, then look to consolidate and improve the suites. Here's the first pass:

These specs duplicate an awfully large amount of code. This is an issue because more LoC translate into more maintenance, more potential areas to make mistakes, and more places that need to be updated when things change. (For example, what if we want to flash an alert of "OH NOZ, SIGN IN FIRST PLZ"? I could find and replace, but that should be handled in one place.)

In order to remedy these issues, I added a controller macro that includes #it_should_block_access_to(action, options = {}), which is passed an action (:index, :create, :update), maps each to a default method (:get, :post, :put) if none is specified, and generates the appropriate routing (member vs collections). It also handles format specification, such as :json, or setting any other arbitrary params via the options hash.

Here's the refactored code:

The controller specs are cleaner, a big chunk of code duplication has been removed, and there is a main handler for these tests that does not (in my opinion) add too much complexity into the testing suite.

Wednesday, September 22, 2010

Enhance Your Brand: Create a Custom Facebook Page

Edit: I got published ... in Bulgaria! - Kak Da Napravim Fenstranica Vuv Facebook

My startup wanted to add a custom Facebook landing page. Having visitors click through and seeing the standard "Wall" is apparently lame (that is what our undergraduate member tell us). Here is how we implemented a custom Facebook landing page to give a more personalized greeting and to show our company's character (spoiler: we are nerds):
  1. Create a public Facebook page
    (login to Facebook > Ads and Pages > Create Page)

  2. As mentioned, make sure your page is set to "public"
    You want anyone to be able to view your page, regardless if they are logged in to Facebook or not. (Edit Page > Settings)

  3. Add the FBML application so you can create your custom tab
    Via FBML: Add advanced functionality to your Page using the Facebook Static FBML application. This application will add a box to your Page in which you can render HTML or FBML (Facebook Markup Language) for enhanced Page customization.

  4. Create your landing page image.
    Here is what we did: First, we made sure we created a new Adobe Photoshop document that was roughly 520px wide (this is approximately the width you get for your Facebook pages).

    We want fans to get behind what we are doing so we highlighted our request for visitors to "Like" our page (#1). We also wanted to quickly explain what we do (#2). Next was to show our logo (#3). Finally, have a little fun, make it memorable, add a part that can be updated periodically with new content (#4).

    For #1: I took a screenshot of the Facebook Like button (Shift+Cmd+4) and placed the image on a new layer. Then I added a drop shadow. Next, on a new layer, I added text with a Dakota font, linked these two layers, and then using free transform, I rotated both layers.

    For #2: I mostly just followed this tutorial to create the Post-It note, and this tutorial to create the Scotch tape (why a sticky note needs to be held up by tape, you got me).

    For #3: It's our logo, just plug-n-play.

    For #4: I love legos, and wanted something that was funny, but hit on our vision: i.e. help undergrads connect with companies and find jobs. I found a lot of content on Flickr through a Creative Commons search and then just added some text. To get the fade effect, check out this tutorial. We plan to update this with a series of postings, you know, to keep it fresh. If you'd like to contribute, please send submissions to

  5. Upload your image to an image hosting service (Picasa, Flickr, etc.).
    I uploaded our completed image to Picasa and then clicked through to get its URL. I copied that URL, which is about to come into play.

  6. Add the image to your FBML custom tab.

    Click "edit" on your FBML application, and add a "Box Title" (title of your page's tab) and add an image tag with the source set to the hosted URL from above. Ex. our title was "Welcome" and our FBML was:

    <img src="" alt="CollegeJobConnect" />

  7. Finally, make this custom page the default landing page.
    Click to edit your page, then click to edit your Wall settings. For the "Default Landing Tab for Everyone Else" setting, select your newly added FBML tab (it will be the title you just entered)

That is basically it. We've seen a greater "Like" rate from our page's visitors after we added the landing page. You can see our final image here and our Facebook page here (don't forget to "Like" us!). Hope it helps, please email me with any questions, thanks.

Wednesday, September 8, 2010

Inebriation (like Inception ... but with drinking)

Shot where I live ... bravo

Tuesday, May 25, 2010

Minimal Viable Product

Aside from the usage of expletives, there are several other similarities in Jonathan Wegener's Minimal Viable Product (MVP) article to my "Kevin Costner is Full of Sh*t" posting (more on the title below).

A little background: an Minimal Viable Product is the 1.0 version of your software, service, product, whatever, that you can go to market with. It is called minimally viable because it is just that: it is the quickest thing you can whip up that demonstrates your core thesis or offering, with little room for much else. Reid Hoffman, founder of LinkedIn, famously said: “If you’re not embarrassed by the first version of your product, you’ve launched too late.”

This principle can be difficult to follow. Jonathan Wegener, author of Back of the Envelope, points out:
"Manhattan is full of gorgeous skyscrapers. No self-respecting person walks around thinking to themselves “Gosh, if I were going to build a skyscraper, I’d want mine to look like sh*t.” That just doesn’t happen! Instead, we have a natural tendency to want to ‘one up’ the status quo: “I’m going to build a skyscraper out of gold!”"
I was guilty of giving into this line of thinking when I was building myBusinessTies in 2005 (a Facebook for Wall Street back when Facebook was just for college kids). I was following the Kevin Costner "build it and they will come" mantra. I developed a fully featured and stylistically beautiful networking platform, but had no customers and no idea how to acquire them, or even if they wanted what I was peddling. My result: long development time and significant effort invested, full product, but no idea if anyone wanted to use it, and no user marketing strategies.

If following the MVP strategy is the way to go, you might wonder why you don't see more of them out there. The answer that Jonathan offers up is:
"the heart of the issue is that very few of these minimal viable products exist in the real world. Why? They rarely stick around! Customer feedback quickly drives additional improvements and features. Soon, memories of the mediocre original product completely fade away!"
Bingo. MVP either guides your product forward quickly or advises you to cut your losses, avoiding over investment into a less-than-promising venture. What I should have done with myBusinessTies was spend less time developing and more time reaching out to my potential customer-base, demonstrating the core offering of the platform, gathering feedback, and then iterating my product appropriately (or realizing that Wall Street didn't want an exclusive web-based network). Either way, better than marching blindly forward.

If it helps, realize your product only has to be an MVP for a short time. After you gather feedback and have a better idea where to push your product next, you'll step out of that category towards a Viable Product that is polished and professional.

The key is this: don't blindly over develop and over invest, but rather practice customer discovery and development and don't hesitate to get out in front of potential customers and clients as early as possible. It will make you a happier entrepreneur.

Monday, May 17, 2010

Solving the "Marketplace" Business Model

I came across an interesting article today about how to solve the "marketplace" business model issue. The article was posted on A Smart Bear and you can read the full text here. I wanted to share it with the Good Dinosaur collective, perhaps a rousing entrepreneurial discussion will ensue.

There are several inherent difficulties in establishing a market place:

  • You have a double-sided market that you must capture. This is also known as the chicken and egg problem.

  • Your venture itself must be two companies in one, appealing to both sides independently to win adoption.

  • Size can matter. You often can't bootstrap your way to success when it comes to market place establishment. It can be a go big (and spend big!), or go home situation.

The article discusses several viable ways to persever over these challenges, such as attempting to build up the supply side of your market first by offering incentives or targeting a specific niche so you can carve out a space for yourself.

At CollegeJobConnect, we've experienced the challenges in establishing a market place, so this article rings especially true. We are currently pursuing several campaigns to build our roster of companies that want to leverage us for undergraduate recruitment come the fall (attack the supply side). We are also setting up several student affiliate programs at our target schools to increase undergraduate adoption (win both sides in parallel, carve out our niche, scale up quickly).

I'd be more than happy to discuss at length with anyone that is interested. And if you know enterprising undergraduates that are interested in working with our startup, please let me know. Exciting stuff!