Makers Academy: Penultimate Week

This week is the first of two on our final project. After a somewhat drawn out process at the end of last week we had come together to form four project groups. I was in the largest and the six of us were going to build a platform to show off ourself as Makers Academy Graduates.


On Monday we started by initialising a rails project adding devise and then struggling to sort out omniauth. Omniauth is using another sites authentication for our own. In our case from github. This was surprisingly difficult and took us all of Monday to get nowhere. Come Tuesday two of us had worked it out, eventually. I had found this link which was useful at explaining what should be done but still is not perfect. 

As it turned out omniauth is possible without devise so Tuesday we restarted from a blank canvas. Two hours in and we had done more than all of the previous day. 

A group of six was the largest I had worked in so far. One difficulty was dividing up work at the start, because when setting up the foundations your can find yourself working on something that touches everything. This means that three pairs working simultaneously is not possible. By midweek we were able to start working as three pairs and then code generation was surprisingly rapid, I was often checking our repo’s network graph to see what was happening.

With a bit more freedom it was easy for us to volunteer only to work on the bits of the project we were most interested in. It was quickly apparent that as a group we were more keen on developing the back end over dealing with styling issues. It also turned out that not everyone was convinced by the value of refactoring tests. I am and therefore when working alone it turned out that this was were I spent my time. After one early morning start, the test suit was completely over hauled by the time 9 am rolled around. This refactoring showed its worth when it next came to adding a field to our user model. With only one line of code we had all the tests to allow a user to save a linked in address. 

This week I discovered Webmock, a test mocking framework. With it all requests to the outside world can be blocked. This ensures that you don’t over use calls to an API. Combined with some custom rake tasks to generate JSON data this turned out to be very powerful. I will have to write a post on this and maybe even a Gem.

One very positive thing in our group was the desire for proper testing and git practices. The pressure to move forward was notably higher but all of us were making best attempts towards best practices. Mihai in particular forced me to up my game on how I merged in commits and pushed. 

As always seams to happen when focusing on one thing another can be neglected. This week that thing was running the tests. We had written good tests. When merging I would make sure all my merges where on feature branches and not the master. However as we concentrated on the correct merge order actually running the tests passed slipped my mind. A few hours later over half the tests were failing because no one had rerun them as they merged. We quickly addressed that but the procedure for merging in feature branches was now getting extensive. The work flow was as follows.

  1. commit last change on feature branch
  2. run tests
  3. switch to master
  4. pull from origin (github)
  5. switch to feature branch
  6. merge from master branch
  7. run tests
  8. switch to master
  9. merge from feature branch
  10. run tests
  11. push to origin (github)
  12. push to Heroku

I’m not sure how many times I managed all 12 steps in the correct order this week. Hopefully it will be more often next week. I can see why people incorporate tools such as git flow but for the moment I want to work on getting the practise.

Two interesting links to share from this week. First Mashape a showcase and market place for 100’s of API’s. Second a showcase of some of the most interesting projects on github.