Day 47 (September 6, 2018)

September 7, 2018 02:51 UTC Team Barcelona Duo (Exercism) [2018]Subscribe to this teams's activities

Hindsight is 20/20

Today I wrote a few lines of code and altered the way we post items on our board.

After our morning daily, I worked with Maikha and Emily on defining the epic and the stories and spikes that comprise it. The idea being that each step taken towards completing a particular goal should be broken down into smaller steps and recorded on our board so that at any point every team member and stakeholder can in a glance understand what we have done, what we are doing and what we have left to do.

In our case, our epic was issue#3881. The stories were the parts of the code that needed to be modified in order to complete the epic. The spikes are the things we needed to learn in order to write the code to complete each story. Today's goal was to write a test for an area of the code that had not been tested, the link in an email to the mentors.

What I coded today:

  • Added a failing test of the link in the mailer notifications.
  • Changed the code to get it to pass.

Sounds so simple, doesn't it? To get to this point, there were so many things we had to understand. Once you become an expert, it is so easy to forget all the bits of accumulated knowledge that turns the complex into something simple and obvious.

A short list of what we needed to understand to complete this task:

  • A bit about how mailers work
  • How to generate mock data to trigger the mailer
  • Mailer previews
  • How to recognize a Rails link
  • How to decipher said link
  • How links are generated
  • What a route is and how they are generated
  • How to find routes (bin/rails routes)
  • How to test routes
  • Where to add the tests in the codebase
  • How to change the link.
  • Rails helper functions
  • Know the difference between assert_body_includes and assert_text_includes

Along the way we also learned how to better distinguish between what information we need to understand to complete the task and what need to put aside to learn about later.

It has been a long journey through mailers, controllers and routes, to understand a single line of code #{link_to "view it here", [:mentor, @solution]} so we could fix it. Behind this simple PR is hours of tutorials, coaching sessions, and practice exercises, consistent with the RGSoC objective: "learn, learn, learn".


You must be logged in to add a comment.