Elizabeth Gilbert suggests that your treat your creative time/projects as if it was your secret affair. Well my “side piece” has indeedly monopolized my time.

In the past month, I’ve been actively collaborating in a side project with another developer. We have been wearing many the hats: dev, architect, PM, marketing, QA. It’s been a fantastic learning experience, and I appreciate these roles even more than before.

As full as my days have been, I want to ensure that I record some of the learnings I’ve had. Tonight, I only have the capacity to list short, sweet ones. So without further adieu, TIL:

1. The Order of the Naming of Join Table Matters

I had a users_couples table but I would get errors asking for couples_users table when I would query for something like

current_user.couples.last

The fix was to make a migration with

rename_table :old_name, :new_table

It took me a while to realize that was the fix. I just assumed I didn’t understand how to query has_and_belongs_to_many associations. Just me underestimating what I do know. =)

2. ByeBug is Like Pry But Requires Less Setup

I have not done much reading on Byebug, but since it comes with Rails, there is no manual gem installation or “require ‘pry’” additions to my desired files. Not to mention, ‘byebug’ is six letters to type, whereas ‘binding.pry’ is 11 keystrokes.

Using included gems saves me the trouble of uninstalling my “personal” gems upon the completion of my feature branch in order to keep the gemfile light and my footprinting small (as a courtesy to my teammates).

3. Bitbucket PR Comments allow for task-creation

Ok, when my CoFoundingFriend (CFF) and I get together, we have to be extra mindful of our tool-geeking out. Check this out- we are using:

 +  Pivotal Tracker
 +  Asana
 +  Draw.io
 +  Slack
 +  Bitbucket for version control
 +  Bitbucket for issues+pr workflow

Anyway, we’ve been test-driving a variety of feature combos among these tools, and the thing that most impressed me today is the fact that Bitbucket PR in-line comments allow for task creation. I can create the task that will address the concern at hand, and it is added to a list of tasks for that PR.

This was a fantastic help for me to track all the things I needed to address before I should flag my CFF down again for a second pass at the PR.

4. MailView Allows for Browser Email Preview

As a refugee from Rails 3, I assumed that I’d have to implement an external gem to allow me to preview my mailers in the browser. Well welcome to 2013, Rubynista, cus it’s included in Rails 4.1+.

In the browser:

http://localhost:3000/rails/mailers/invitation_mailer/invitation

Two of my TILs were gem-related. Open-source development holds similar spirit to the street-racing culture of modifying cars. Sure, people scoff at the overuse of aftermarket accessories and components they see on what would normally be a bare-bones car. Fast-forward several years: all of our cars make use of large media screens and special headlights. I liken this to back in 2013, when Xzibit was pimping our our Rails 3 apps with gems-galore, he was showing that with some configurating, we could have it all. Now much of that comes standard.

Bravo to the Rails community for voicing their needs, and thank you to the core team for listening to the chatter.

I will have more of these posts coming, especially as I am starting to play with Rails 5 and React Native. There- I said it out loud; now you should ask me about it the next time you see me.

A new day, a new TIL,

-t