Programming Challenge Day 3 - MailChimp

21 Sep 2016

Heads Up Before August 2018 Saber was known as "BugMuncher", so you'll see the name BugMuncher instead of Saber throughout these older posts. You can read more about the name change here - BugMuncher rebrands to Saber.

Day 3 - MailChimp

I finished yesterday’s post saying that I knew the MailChimp would take a lot of work. This prediction had nothing to do with MailChimp’s API, it was because the MailChimp integration is very different to all the rest I’ve built so far.

All other BugMuncher integrations allow the feedback sent through BugMuncher to be delivered to another service. However with MailChimp I actually built a whole new feature, that allows users to opt in to receiving more details from a website when they are submitting feedback.

10:00 am

A slightly later start today, as I had to deal with some support emails before I could get cracking. At least with MailChimp I knew they had a REST API and OAuth, but I’d still never actually used it, so my first step was reading their frankly brilliant developer documentation.

Once I’d familiarised myself with the API structure, I registered an OAuth consumer app in MailChimp, and started to think about how I was actually going to build this.

10:30 am

I’m a little ashamed to admit it, but at this point I considered giving up. I thought to myself “This is gonna take too long, I should just build a different integration today and leave MailChimp for another time.”

I very quickly derailed that train of thought, as I really don’t like to bail on a challenge, and building this whole new set of features as well as a MailChimp integration in one day was definitely going to be a challenge.

I decided to keep the BugMuncher API end of this one simple, by saving the MailChimp settings in the Website model, rather than creating a separate MailChimp model like I have for all the other integrations. This meant I was able to get the authentication, fetching of mailing lists, and adding people to a mailing lists before lunch (12:30)

1:40 pm

My belly was full and the back end was built, it was time to tackle the front end. This is where it all started to fall apart. My decision to do keep the back end super simple, instead of implementing my standard driver interface came back to bite me on the ass, as it made the front end development a hell of a lot more challenging.

2:20 pm

I had been toying with making the front end work for 40 minutes before I decided to cut my losses, and rebuild the back end to work with the standard driver structure. I figured it shouldn’t take too long, as I could keep a lot of the code and tests I’d already written. It only took me another 40 minutes to get the back end rebuilt and passing all the unit and integration tests.

3:00 pm

Back to the front end, but now I was able to work within my usual integration structure, and could built it reasonably quickly. Being that this was a whole new feature, there was a lot more work to do on the front end than the previous integrations. I also had to make some changes to the feedback interface as well.

4:50 pm

With the front end, back end, and feedback interface all updated, I deployed to the staging server and ran a full end to end test. It all worked perfectly, so it was time to write the documentation and make it live.

5:30 pm

My next job was to submit to MailChimp’s integration listing, but before I had a chance to do that, I realised that the changes I’d made in the app interface had broken the introduction tour. I spent nearly an hour fixing that, and then submitted my fancy new integration to MailChimp.

Total time taken: 8 hours

Today was tough one, but I knew it would be. More importantly I wasn’t defeated, 3 down, 2 to go. Next up is GitLab.

- Matt

Get Meaningful Feedback from your Customers and Team

Discover Trends, Improve User Experience & Identify Bugs

Start my free trial

10 day free trial, no credit card required.