Engineering Blog

Configuring Circle CI 2.0 for a Real Rails Application
Configuring Circle CI 2.0 for a Real Rails Application

To all you developers looking for a quick guide to getting a real Rails App running on Circle CI, feel free to rip and modify this as needed. For others that are looking to find out about some unusual aspects of Circle’s new 2.0 infrastructure that we’ve had to contend with, please read on after this giant code block! version: 2 jobs: build: parallelism: 8 working_directory: ~/path/to/your/app docker: - image: circleci/ruby:2.

Helping Families Find an Au Pair
Helping Families Find an Au Pair

We finally had time to solve a problem! We knew that host families wanted to know more about our available au pairs before they filled out an application. We thought, what if we improved our featured au pairs page to allow the searching and sorting that you’d want to use when finding somebody to look after your kids. [we] all wanted to see families find an amazing au pair to look after their children whilst having a fantastic cross cultural experience.

Communications at InterExchange: Content Developer’s Perspective
Communications at InterExchange: Content Developer’s Perspective

Hello! I’m Stephanie, I’m the Content Developer, I’ve been with InterExchange for over 3 years, and I’ve been in this role since this January. This position has been a really positive move for me, and I think it’s a great role for someone who wants to work on projects at a cultural exchange organization like InterExchange. I hope this helps you to learn a bit more about the position, and helps you to decide if it would be a good one for you!

Engineering at InterExchange: Lead Engineer's Perspective
Engineering at InterExchange: Lead Engineer's Perspective

Oh hai! I’ve been here almost spot on a year as I write this so I feel like I can give a good account of what it’s like to work at InterExchange. I’m currently the Lead Engineer on our team. I’d like to think my main job is leading the technical direction of our various projects whilst taking my lead on organisational direction from our CTO and COO. It’s a really small team but we manage three core projects using various technologies so an overall lead position can be important.

InterExchange Auth Service - Part One
InterExchange Auth Service - Part One

Another Microservice Post - Not Really! Microservices, they’re all the rage at the moment - as in that rage you feel is the microservices architecture you built out before you needed to. This is part one of an unknown series of posts about migrating from a few separate apps managing their own auth and user databases to one central user service. Part One deals mostly with the nitty gritty of getting the service off the ground and how we test this in an automated way.

Lets Devise a Google oAuth Login with Rails
Lets Devise a Google oAuth Login with Rails

Step by Step Google oAuth Login using Devise and Omniauth We just rolled out a feature allowing our users to login using their Google accounts, nothing revolutionary but certainly not without its pitfalls. Just to be up front we still have a small issue to fix for users that are logged into multiple Google accounts and have to choose a Google account whilst logging in, however these are the steps we took to get to a workable solution.

Quick & Dirty Auditing for Rails
Quick & Dirty Auditing for Rails

Why? Auditing is one of those things that most businesses really should have built into every one of their IT systems but it’s often seen as a nice-to-have that you will-never-have. Yet in every business I’ve worked at that has a web app you inevitably hit a problem where everyone wished there had been a trail of what had been done. As soon as you have any other person than the owner updating a record, you really should invest a little in auditing your data.

July Technology Report
July Technology Report

Photo courtesy of Unsplash. July 2015 was as busy for our marketing and engineering teams as it was for all our participants arriving for their summer programs. Only a few months ago these two teams had little to do with each other, Engineering being focussed on operational work, and Marketing on how we publish and distribute information. Now that oversight of these two teams is under the same umbrella, we’re able to leverage the power of engineering alongside marketing’s insight, to build a more engaging experience for our users.

A New Developer's Tale
A New Developer's Tale

Or how to be a good new hire and how to be good to your new hire. Hi there, I’m Aaron. I’m the new guy - or more formally the new Lead Software Engineer - at InterExchange and I’m here to say this has been about the best first month at a company I’ve ever had. Just to get the qualifications out of the way in case you think I’ve only ever had one job in my life, this is my sixth long term job and fourth software development position.

Program Landing Pages
Program Landing Pages

Last week we started directing a small set of our audience towards some of our newly created Program Landing Pages These pages are intended to give customers a more streamlined InterExchange experience, whilst serving us with valuable analytical data about how our users find the information they need. Intern USA They’re also a great chance for us to experiment working closer with Hosts online through the creation of Opprtuntity Landing Pages.

Signup and Eligibility
Signup and Eligibility

We’re starting to reinvent InterExchange so that it’s easier for people to find out what we do, and how we can help them. To get started with this we enlisted the help of Thought Merchants to simplify how we think about our offerings. With his help and the feedback of our experienced Program Directors we have started recreating our user experience from the front door, building a collection of sites we call Program Landing Pages.

Welcome Aaron Todd
Welcome Aaron Todd

This week the Engineering team welcomed Aaron Todd as our new Lead Software Engineer. Since bringing our software development internal we’ve made widescale changes to how we use software to build the organization. Aaron has a vast amount of experience working with systems in a variety of programming languages and industries. In his new position he’ll be able to use that experience to improve the training of software engineers and the overall quality of the systems we build.

OpenSSL 1.0.1m Update
OpenSSL 1.0.1m Update

For those who were following along with Open SSL #security update today 1.0.1m which was released today. There wasn’t a lot to talk about, we avoided the only high issue which could occur, event that was only a DDOS. If a client connects to an OpenSSL 1.0.2 server and renegotiates with an invalid signature algorithms extension a NULL pointer dereference will occur. This can be exploited in a DoS attack against the server.

Griddle
Griddle

Today as part of React Week, I got a chance to play around with Griddle. The day’s main project was a React app that talks to the public iTunes API to load a list of search results into a grid format — a feat that’s remarkably easy using Griddle. Warning Griddle seems to have some issues with Babel, the transpiler I’ve been using to enable ES6 in my applications. You’ll need to make sure that your Webpack config for Babel either excludes the /node_modules/ directory, or that your JSX loader is using “harmony”.

ES6 is Cool
ES6 is Cool

I’m a bit ashamed to admit that I’ve never paid much attention to the changes coming with ES6 because I generally don’t like to add extra unecessary compilation steps to my applications (ES6 isn’t widely supported yet), and yeah, it might be the future of JavaScript but that’s something I can just think about in the future, right? The examples used so far in React Week have made heavy use of ES6, and it’s really been tempting me to start giving it a look for our own technology stack.

React Week Day 1 Part 1
React Week Day 1 Part 1

Let’s start off with the most important development — The first day of React Week began with check-in and a complementary breakfast of waffles, fruit, and endless flowing coffee. After some orientation, our first speaker was Ryan Florence, one of the lead developers of React Router. Our first lesson was some introductory material on using Webpack to get our React apps up and running. This portion of the talk was mostly just an extremely gratifying affirmation of a lot of the things I learned the hard way integrating Browserify and Webpack into Styleguide, but there were also some cool tricks to learn from the masters.

Job Listings Live!
Job Listings Live!

Great work Team!

Job Listings
Job Listings

A few weeks ago I was lucky enough to be working on an open source tool that I could talk about daily. CampMinder-rb is now operating reliabily in production, with around 20 Hosts using the StaffHire feature in the past 2 weeks. What have we been up to since CampMinder? We’ve been building out Job Listings for public viewing, ready to be used by Work & Travel USA for the during the second half of the season.

CircleCI, Capybara, and XVFB
CircleCI, Capybara, and XVFB

When your Continuous Integration server starts breaking sporadiablly you basically have to drop everything you’re doing and figure out why. Until the time that it’s fixed you’ll not be able to trust whether your code base is running as expected. The Failure On Friday our CircleCI builds started failing with. An error occurred in an after hook Errno::EPIPE: Broken pipe occurred at /home/ubuntu/app/vendor/bundle/ruby/2.2.0/gems/capybara-webkit-1.3.1/lib/capybara/webkit/connection.rb:30:in `write' F Now usually when we get a failure it’s because we’ve changed some code and inadvertently broken another part of the code.

Webpack
Webpack

In my last post, I outlined our move to Browserify, and how it was a huge win for us. Surely, with such obvious benefits and no apparent downsides, Browserify was here to stay. But every once in a while, a new technology comes along — a technology so futuristic, so amazing, so utterly essential, that you know you need to have it. Now. That technology? React Hot Loader. There was just one problem.

When Github Deletes
When Github Deletes

So what were we hitting up Github Pages for anyway? @alexcohen has made even more improvments to our howto documentation, including support for using Google Hangouts for chat.

Browserify
Browserify

When I joined InterExchange back in October, App was on the brink of a radical change — dirkkelly had recently set up the separate Styleguide project to manage our assets, leveraging the Facebook’s React framework to power our new placement system. The placement system, was a huge success, but when the dust settled, it was clear we had a serious mess on our hands. Simple bugs that would have been quickly caught and squashed in our Ruby codebase were taking inordinately long amounts of time to track down in our JavaScript, or even finding their way into production.

Braintree Webhooks SNI
Braintree Webhooks SNI

Yesterday we completed a PHP update to the Passport project. We’d done so a few weeks earlier in the staging environment and received few reports of errors, unfortunately our automated testing for this project is minimal, so we lacked any real confidence it had worked. We’re using Amazon AWS at the moment, our goal was to jump from 5.3.28 to the more recent 5.5.20. We can’t use standard packages with the AMI operating system, so we recorded our steps for removing the old libraries and upgrading.

App v1.10.0
App v1.10.0

It was a few weeks ago that I announced we’d Made a Gem to help us build an interface into CampMinder, a partner that could help InterExchange clients manage their participants after a successful match. Today we released Application Version v1.10.0 and in turn let the CampMinder functionality into the wild. It was fantastic being able to complete such a viable tool to our colleagues and their clients. This feature has been wanted for a long time now.

What Do We Do?
What Do We Do?

Today I spent a lot of time working on the business domain of the organization, a project I’ve undertaken that will help us better define how we do things at InterExchange, in turn helping our Participants and Hosts understand the regulations surrounding the Programs we offer. In this post I’m going to spend some time defining what I think we do at InterExchange, a sort of brain dump from the thought sessions I had today.

CampMinder StaffHire, So Obvi
CampMinder StaffHire, So Obvi

Well this morning was a huge success, I had a 5 minute chat with Kevin from CampMinder about the CampMinder StaffHire, So Close issues we were experiencing. It turns out that we format our salary information in a way which is incompatible with their server, adding a , was resulting in the inconsistent POST errors we were seeing yesterday. We updated the codebase, and have since updated the library specs to reflect this requirement and are now consistently recieving success messages for our POST.

CampMinder StaffHire, So Close
CampMinder StaffHire, So Close

Good News Everyone The good news of the day is that our work on The Rails Asset Pipeline and Gulp Manifests has been merged into our develop branch. All future work for Nathan and I will be able to leverage this, already the results have been stellar, with the one annoyance being the timestamps within the manifest.yml creating false positives of a changed file. [7 days]: {{ site.baseurl }}blog/2015/01/29/field-notes.html

The Rails Asset Pipeline and Gulp Manifests
The Rails Asset Pipeline and Gulp Manifests

How we made the Rails Asset Pipeline use a Gulp generated Assets and Manifest throughout development, test and production. Problem Users are visiting our new dynamic tools for matching with participants, for the most part they’re loving it, for the sad few though they’re unable to see any results without hard refreshing. This issued arose from leaving the native Rails 4.2.0, a move which has resulted in much faster development, at the cost of the producton reliability.

First Post
First Post

Okay this doesn’t happen very often in this job, we wrote the spec for StaffHire, plugged in our authorization details, started a vcr cassette, and ran bundle exec rspec spec/dummy/spec/staff_hire_spec.rb All of a sudden we had a response, a 200 OK response. Could it be? We did it on the first go? We logged into CampMinder and there it was, a little notification item and our latest Staff hire.

NathanHarper is Headed to React Week
NathanHarper is Headed to React Week

There’s still so much we can do to improve the speed, usabilty and durability of our systems. Learning how we can better utilize the ReactJS toolset will open up further opportunities for us to improve our user interfaces, across the board. We’re always looking for new team members looking to change the way software gets built in the Exchange community. If you have a passion for culture, community and software, check out our Software Engineer job posting.

CampMinder Connected
CampMinder Connected

Often it can be really helpful to go home and use the travel and alone time to think on the problems of the day. Harpelly had finished the day not sure how to deal with the encoding/decoding of CampMinder’s payloads. That evening Nathan Harper was able to break down the source of confusion into a simple to reason class CampMinder::Base64. With simple equally simple to understand specs. We could now reliably communicate with CampMinder, however we were still stuck receiving this random .

Holiday Party
Holiday Party

Today day ended with InterExchange’s Annual Holiday Party. It was a great night held over at Pampano, a location we all agreed would do every time, fantastic drinks and delicious food. Good times, for a great team. And finally a profile picture for Harpelly!

urlsafe_decode64
urlsafe_decode64

Back onto CampMinder today, we’re at the point where we know Proximo won’t work with our Ruby HTTP libraries and doesn’t support HTTPS connections anyway. We decided it would be just as easy to set up our own Squid proxy, so with that we set up an instance on Digital Ocean and went googling for some tutorials on creating a proxy. sudo apt-get update sudo apt-get install squid sudo cp /etc/squid3/squid.

4 Ways it was Wednesday
4 Ways it was Wednesday

Wednesday for us means variety and today we had a ton, I thought it would be fun to do a listicle, so here it is. 1. What Backups? Oh good, those ones. I got an email telling me every day that backups were successful, sounded good to me. So yesterday when I needed a physical backup, I went to retrieve one. Yeah, backups are never right. It doesn’t matter what you think is happening, it isn’t, or maybe never was.

Juno
Juno

Today it was #juno’s turn to devastate the North East of America. Whilst luckily there was no devastation in NYC, the decision was made that the office would be closed until the trains returned to service. This didn’t mean much to the Engineering team, we’d all decided yesterday that regardless of the weather we’d just work remotely. While the blizzard raged, we coded up a storm. We’re now at a point where we can start testing the integration of our interexchange/campminder-rb gem with our Application.

Base63?
Base63?

Today we had a great chat with Kevin from CampMinder and we were given access to their staging environment. This was a great opportunity to check whether interexchange/campminder-rb was able to verify and decode the data being sent by the server. Many high fives were had when the get_payload method was able to decode the timestamp sent by CampMinder, however there was still work to be done with is_valid_request?. The issue was related to how we were decoding the Base64 string, we hadn’t implemented the methods that modified the Base64 during encoding and decoding.

Made a Gem
Made a Gem

Today @nathanharper and I paired on the development of the interexchange/campminder-rb gem. Our primary goal was to understand how the authentication and encryption sections of their API operates. We’re still waiting on access to a staging environment, but in the mean time we’d been blessed with a C Sharp implementation of the same system we needed to build. Having neither of us worked in C Sharp before… The morning started with analysis of the current codebase, for about 3 minutes we attempted to get the project working on my laptop.

CampMinder v0.0.1
CampMinder v0.0.1

Being a Wednesday today’s primary focus was Passport, the online tool which handles the entire Au Pair department’s workflow. Before anything though we wanted to deploy Application v1.9.12 which fixed some issues introduced in yesterday’s deploy. That went smoothly, so we went on to deploy Passport v1.0.7 which also fixed some issues introduced with the new year. Following that it was mostly a day of chore and bug fixes on Passport, we investigated a major source of pain for our repeat users, but we’re still working on a solution to that.

Disqus Comments
Disqus Comments

I’ve just installed Disqus comments on our engineering blog, it’s an incredibly easy tool to install and provides a solid platform for managing discussions on your website. I wanted to highlight just how easy it is to install, namely within the platform we use to power our blog Jekyll. Signup Just do it, create an account Create a Site Copy the Universal HTML Install Code Install Because Jekyll is just a directory of the files that power your website it’s easy enough to add it to the overall layout of your blog.

Field Notes
Field Notes

Half way through the first month of 2015, recently returned from a snowboarding vacation in CO. Things ran very smoothly during my absence, Nathan has been working on improving our new ReactJS based Online Placement system. We’re definitely hitting the limits of the system, and in need to implement a pagination and server side search system. This coming week we’re working to integrate with CampMinder, at the moment we’re aligining our security policies between our two systems, we’ll have some idea (by this I mean screenshots) of how it will work in the coming days.

Placement
Placement

Today we released our latest tool for 2015 Summer Work Travel Employers.

Technology Report
Intercom Map
Intercom Map

We published a map! And we started our Twitter. We are InterExchange. We have users in 2,430 cities (including Perth!) https://t.co/IFEls3EBEJ cc/@dirkabroad via/@intercom — InterExchange Eng (@interexchangeio) November 13, 2014

New Search, Such Intrigue
New Search, Such Intrigue

All user data is obfuscated using the Faker gem.