self.extended(thoughts)

Code, Entrepreneurship, Music, Life

How to Be a One-Man Coding Army for a Startup

Last weekend I was fortunate enough to be invited to speak at Chippewa Valley Code Camp - 2012. CVCC is a free, 1-day, 4-track conference in Eau Claire, WI that attracts some of the brightest developers in Wisconsin and Minnesota.

This year there were over 120 attendees and some 20 speakers presenting on things ranging from running a massive Java web application at scale to Single Page Applications with JavaScript. I had an awesome time meeting new people and sharing a little bit about how I run the technical and development side of Bolstr. Specifically, I talked about how we collaborate on work-flows for new features through user stories with Cucumber as we build out our Ruby on Rails web application at Bolstr.com.

The slides from my talk “How to be a One-Man Coding Army for a Startup” are available online, and if you attended the session I’d sure love it if you could leave some feedback at speakerrate for me.

Also, a big shout out to Brian Hogan for encouraging me to submit a talk and even suggesting the name. Thanks Brian!

Using PhantomJS (Through Poltergeist) and Selenium in the Same Cucumber Test Suite

We use DocuSign at Bosltr to facilitate electronic signatures and testing this functionality with Cucumber has proved to be quite a pain. First of all DocuSign uses an iframe to deliver its functionality so there was that added complexity right off the bat. Secondly, because we’re doing integration testing, I wanted to actually hit the DocuSign test servers and verify that things are still working as I expect. Stubbing the requests out wouldn’t give me insight into any unexpected API changes breaking our app. Because we’re reaching out externally I had to account for the delay in receiving data from DocuSign often needing to revert to ugly things like sleep 3 in the step definitions.

The default Selenium driver through Firefox is the only solution for testing the DocuSign iframe that I could get working. However, the rest of the test suite that needs JavaScript testing has been working wonderfully on Poltergeist, an awesome headless PhantomJS driver for Capybara. Poltergeist was throwing errors about elements overlapping in the DocuSign iframe that I couldn’t solve but I didn’t want to abandon Poltergeist and revert to Selenium for ALL our JS testing, so I figured out a way to use both by tagging stories and using some Before and After hooks.

Wiring Up LittleSnapper to CloudApp

I used to love Skitch, but the recent changes have made it less awesome so I decided to seek out alternative options. I have a licensed copy of LittleSnapper from a bundle of Mac apps that I purchased a while back so I decided to give it a go.

I also use CloudApp multiple times per day (and pay for a pro subscription) so I was encouraged when I saw an article stating that RealMac (the team behind LittleSnapper) was working on integration with CloudApp, but nothing has developed on that front in over a year and I didn’t want to wait any longer so I started down the path of solving the problem myself.

Here’s how it works:

  • Configure LittleSnapper to use SFTP to “publish” locally to a folder of your choosing.
  • Create a new Automator “Folder Action” which runs an AppleScript when the contents of the folder changes.
  • Use the CloudApp API through a Ruby script (called by the aforementioned AppleScript) to publish the given file.

Breaking Out of an Iframe From a Rails Controller

For the docusign_rest gem that I recently created I needed to break out of the DocuSign iframe after a signer successfully signed the embedded PDF and redirect to a controller action showing that action’s view.

After a bit of Googling I found this code snippet:

1
2
3
4
5
6
7
<html>
  <body>
    <script type='text/javascript' charset='utf-8'>
      parent.location.href = '/myloc';
    </script>
  </body>
</html>

Which can be implemented in a Rails controller like so:

1
render text: "<html><body><script type='text/javascript' charset='utf-8'>window.parent.document.location.href = '/myloc';</script></body></html>", content_type: :html

My New Gig at Bolstr

 

It’s been nearly seven months since I joined the great team at Bolstr as Chief Technology Officer and I have to say, it’s a job that gets even better with time!

Since I started, I’ve done a bunch of things:

  • Made significant improvements to http://bolstr.com
  • Added a ton of functionality to our main application and improved test coverage / speed
  • Written a robust wrapper gem to the Docusign REST API and implemented their embedded e-signature solution into our main application
  • Switched to using Tmux and Console Vim after a brief affair with Sublime Text 2
  • Started a Ruby User Group in Green Bay, WI
  • Completed several advanced Ruby courses to hone my code slinging skills

It’s funny how time flies when you love what you do. I’m very excited about what we’re doing and we have some amazing opportunities already lined up in the months ahead.

Keep in touch if you want to see the financial and banking industries squirm when crowdfunding goes mainstream!