Week 8 — Day 2: Deconstructing the magic behind Rails

Antonio Ciniglio
acebook-byte4
Published in
3 min readApr 10, 2018

The mission of Byte4 is to provide users with experiences that transcend the current, boring, scenario of social media.

In order to make this happen, we decided to spend another day delving into the exciting meanders of Rails.

We kicked off the morning with our usual standup, and a workshop on routes. Goal for the day? Write a little app in Rails, and be able to make sense out of what happens behind the scenes.

With our energy levels higher than Kate and Pete in their heyday, we got back to our battle stations and carried on with our research and experiments. We discovered several useful tricks, including a way to initialise a Rails app with PostgreSQL as default database.

Kate and Pete

We thought we had reached the ultimate level of software development arousal, when suddenly, Ammar the Visionary was blessed with a divine intervention from the Coding Gods.

He received the word scaffold.

Now, every common mortal would think of scaffold as the following:

However, the Visionary knew better. He explained us that scaffold was actually an entire set of models (and respective database migrations), views, controllers, and even a test suite!

The command between sacred and profane

As if that wasn’t enough, the Gods of Coding struck on Byte 4 again, and whispered to us all “..gem install devise..”

We tried it and our minds were blown by the power of this great gem. Basically, Devise soothes (almost) all the pains caused by authentication.

The Visionary possessed by the Gods of Coding

After all this mystical excitement, gravity called us back to planet Earth: time for a retro!

Beautifully moderated by Agnes, we were able to express our thoughts, discoveries and inspirations, completely filling the whiteboard.

The positive points of our retro were:

  • General excitement surrounding ease of use of Rails
  • Error messages can lead you to solutions
  • Self-paced time to learn
  • High fives
  • Chocolate
  • Spirit of group

The meh point was:

  • A need to do a bit more research before jumping straight into coding

The negative points were:

  • Beating ourselves up constantly
  • Being too stubborn

After only two days, we have a much better understanding of the backbone of a Rails app, the common operations required to manipulate data (CRUD) and the REST practice. We are excited and can’t wait to apply the magic we have learnt today to our Acebook app.

So, tomorrow we will be focusing on:

  • Discuss XP values
  • Research and experiment on layouts and RSpec in Rails
  • Come up with an MVP

And to guide us through positive thinking, our mantras will be:

  • Don’t be neutral or negative, BE POSITIVE!
  • If you are being too stubborn, and feel like you are hindering progress and learning, stop and think “Is what I’m doing good for me and the group?”

Before wrapping up, a special mention must go to Irfan, man of one thousand and one resources, who found a brilliant set of videos that rescued us from the routes’ devilish hands.

Stay tuned for the next mystical coding experience.

Screenshot of a view of a tiny little Rails app that allows you to CRUD the coolest records

--

--