The oddest thing tripped me up on the very first GAME 2 card today. In ruby, the call method is the same as using .(), but the community style guide prefers using the call method and that's what I have adopted. So when the card was asking me to "call" a function that I had just created I kept typing furiously into the iex REPL and getting pummelled with errors! Giving up on that card I flipped it over and I had to laugh out loud. f2.() was the answer. Dang, I was still in ruby mode. I had spent 6 hours that morning writing ruby.

So how does one transition efficiently into Elixir mode? Maybe it just comes with regular practice, and I haven't practiced in the last couple of days, which might prove the point. I should have remembered the golden rule:

Never miss more than 2 consecutive days

This is about habit forming, because my days are not flexible with when I get 30 - 60 minutes to sit down and do some elixir. I'm focussing more on building a habit than using spaced repetition timeframes. Statistically speaking, if you miss a single day then your chance of adopting a habit drops by 5%, missing 2 consecutive days brings that down to 20%, and missing more than 2 days in a row takes the chances of adopting the habit down 90%.

Luckily, I'm back on track and keen to keep a streak going after reviewing some succinct advice from Brandon at OnePercentBetter: 10 Essential Keys To Make Habits Stick.

Day 5 only dives into a single function, but the deceptively simple tuple_size held a few surprises for me.

< Previous