<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>Forem: B Jacquet</title>
    <description>The latest articles on Forem by B Jacquet (@brunjact).</description>
    <link>https://forem.com/brunjact</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F31835%2Fe5d4b254-f6f8-490c-9b60-4db5afe3ed3a.jpg</url>
      <title>Forem: B Jacquet</title>
      <link>https://forem.com/brunjact</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/brunjact"/>
    <language>en</language>
    <item>
      <title>I read 99 Bottles of OOP</title>
      <dc:creator>B Jacquet</dc:creator>
      <pubDate>Thu, 27 May 2021 11:13:41 +0000</pubDate>
      <link>https://forem.com/brunjact/i-read-99-bottles-of-oop-nce</link>
      <guid>https://forem.com/brunjact/i-read-99-bottles-of-oop-nce</guid>
      <description>&lt;p&gt;&lt;em&gt;99 Bottles of OOP, A Practical Guide to Object-Oriented Design&lt;/em&gt; is a book by Sandi Metz, Katrina Owen, and TJ Stankus. I gave a four star review on Goodreads meaning that I &lt;em&gt;really liked it&lt;/em&gt;!&lt;/p&gt;




&lt;p&gt;This is a book about Object-Oriented concepts, or should I say processes? It presents the reader a series of doctrines to follow which will improve the quality of the code.&lt;/p&gt;

&lt;p&gt;The book begins by requesting the reader to write code which prints out the lyrics to the &lt;em&gt;99 Bottles of Beer&lt;/em&gt; song. How often do we get this? It then guides the reader on evaluating its own code. The book also presents four different solutions to its own challenge and uses them, by a series of refactoring, to present the topics of the book.&lt;br&gt;
The book can be as practical as the reader wants it to be; either by passively reading the authors' approach to solve this problem, or; following along the book and apply those changes to the code directly.&lt;/p&gt;

&lt;p&gt;I think this extract from the book makes a good tl;dr summary: &lt;em&gt;"Strive for simplicity. Don't abstract too soon. Focus on smells. Concentrate on difference. Take small steps. Follow the Flocking Rules. Refactor under green. Fix the easy problems first. Work horizontally. Seek stable leading points. Be disciplined. Don't chase the shiny thing."&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;I read the Ruby version of the book and I think it's worth re-reading it in the Javascript version. Mostly because I use both languages. The concepts in this book are language agnostic and can be used on any object oriented programming language. One can take the exercise a little bit further and use it with some other OO language.&lt;/p&gt;




&lt;p&gt;99 Bottles of OOP &lt;a href="https://sandimetz.com/99bottles"&gt;website&lt;/a&gt;.&lt;br&gt;
99 Bottles of OOP on &lt;a href="https://www.goodreads.com/book/show/54500642-99-bottles-of-oop"&gt;Goodreads&lt;/a&gt;.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>any? and empty? are not antonyms</title>
      <dc:creator>B Jacquet</dc:creator>
      <pubDate>Wed, 02 Dec 2020 09:59:55 +0000</pubDate>
      <link>https://forem.com/brunjact/til-that-any-and-empty-aren-t-synonymous-7f9</link>
      <guid>https://forem.com/brunjact/til-that-any-and-empty-aren-t-synonymous-7f9</guid>
      <description>&lt;h2&gt;
  
  
  What I Learned
&lt;/h2&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="kp"&gt;nil&lt;/span&gt;&lt;span class="p"&gt;].&lt;/span&gt;&lt;span class="nf"&gt;any?&lt;/span&gt; &lt;span class="c1"&gt;# =&amp;gt; false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Because my expectation was it to be &lt;code&gt;true&lt;/code&gt;. My conception of &lt;code&gt;Enumerable#any?&lt;/code&gt; was that it &lt;em&gt;returns true if it has any record&lt;/em&gt;. Not only that, my metal shortcut it was that was an antonym to &lt;code&gt;Array#empty?&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  And why exactly is this interesting?
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Ruby has many methods which mean and do the same thing. Like &lt;code&gt;Array#size&lt;/code&gt; and &lt;code&gt;Array#length&lt;/code&gt; and, to some extent, &lt;code&gt;Enumerable#count&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt;Ruby has many methods which mean and do opposite things. Like &lt;code&gt;Enumerable#all?&lt;/code&gt; and &lt;code&gt;Enumerable#none?&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Knowing what &lt;code&gt;empty?&lt;/code&gt; does and of 1. and 2., I believed that &lt;code&gt;any?&lt;/code&gt; would do its opposite. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Enlightenment came about during code review where I was suggesting to remove the unnecessary &lt;code&gt;if&lt;/code&gt; conditional&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="n"&gt;collection&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;any?&lt;/span&gt;
  &lt;span class="n"&gt;collection&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;map&lt;/span&gt; &lt;span class="k"&gt;do&lt;/span&gt; &lt;span class="o"&gt;|&lt;/span&gt;&lt;span class="n"&gt;i&lt;/span&gt;&lt;span class="o"&gt;|&lt;/span&gt;
&lt;span class="err"&gt;…&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;After discussing the problem and poking the code we were able to remove the &lt;code&gt;if&lt;/code&gt; by preventing &lt;code&gt;nil&lt;/code&gt; from getting into &lt;code&gt;collection&lt;/code&gt;.&lt;/p&gt;

</description>
      <category>todayilearned</category>
      <category>ruby</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Change column type and convert data in Rails</title>
      <dc:creator>B Jacquet</dc:creator>
      <pubDate>Wed, 25 Nov 2020 09:42:15 +0000</pubDate>
      <link>https://forem.com/brunjact/change-column-type-and-convert-data-in-rails-fgf</link>
      <guid>https://forem.com/brunjact/change-column-type-and-convert-data-in-rails-fgf</guid>
      <description>&lt;p&gt;Wrote this post because I couldn't find an article in the World Wide Web on how to change the column type &lt;strong&gt;and&lt;/strong&gt; convert its data.✝&lt;/p&gt;

&lt;p&gt;So let's say we have a &lt;strong&gt;Record&lt;/strong&gt; model with boolean column &lt;strong&gt;master&lt;/strong&gt;, where a &lt;code&gt;true&lt;/code&gt; values means that it's a &lt;em&gt;master release&lt;/em&gt; and &lt;code&gt;false&lt;/code&gt; means that it's not. Records that aren't master releases can either be &lt;em&gt;re-issues&lt;/em&gt;, &lt;em&gt;special editions&lt;/em&gt;, &lt;em&gt;remixes&lt;/em&gt;. We decided to model this info using just one column, and store it as &lt;code&gt;string&lt;/code&gt;s.&lt;/p&gt;

&lt;p&gt;Active Record's migration method &lt;code&gt;change_column&lt;/code&gt; allows us to change a column's name and type. However it doesn't provide a way to also do data conversion.☦ My suggestion to implement this has three steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Add the column — &lt;strong&gt;release_type&lt;/strong&gt; — with the new data type;&lt;/li&gt;
&lt;li&gt;Convert boolean values from &lt;strong&gt;master&lt;/strong&gt; column into respective string in &lt;strong&gt;release_type&lt;/strong&gt; column;&lt;/li&gt;
&lt;li&gt;Remove &lt;strong&gt;master&lt;/strong&gt; column.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;The migration code looks like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight ruby"&gt;&lt;code&gt;&lt;span class="k"&gt;def&lt;/span&gt; &lt;span class="nf"&gt;up&lt;/span&gt;
  &lt;span class="n"&gt;add_column&lt;/span&gt; &lt;span class="ss"&gt;:records&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:release_type&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:string&lt;/span&gt;

  &lt;span class="n"&gt;cast_values&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;-&lt;/span&gt;&lt;span class="no"&gt;SQL&lt;/span&gt;&lt;span class="sh"&gt;
    UPDATE records
    SET release_type = 'Re-Issue'
    WHERE master = FALSE;

    UPDATE records
    SET release_type = 'Master Release'
    WHERE master = TRUE;
&lt;/span&gt;&lt;span class="no"&gt;  SQL&lt;/span&gt;
  &lt;span class="no"&gt;ActiveRecord&lt;/span&gt;&lt;span class="o"&gt;::&lt;/span&gt;&lt;span class="no"&gt;Base&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;connection&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;execute&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="n"&gt;cast_values&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;

  &lt;span class="n"&gt;remove_column&lt;/span&gt; &lt;span class="ss"&gt;:records&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="ss"&gt;:master&lt;/span&gt;
&lt;span class="k"&gt;end&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The &lt;code&gt;down&lt;/code&gt; method would reverse this logic and it's left for the reader as exercise.&lt;/p&gt;




&lt;p&gt;✝ Must confess that I bumped into many articles changing &lt;code&gt;integer&lt;/code&gt; columns into &lt;code&gt;text&lt;/code&gt;, or &lt;code&gt;datetime&lt;/code&gt; into &lt;code&gt;date&lt;/code&gt;. Although data conversion is implied it is something that Rails can handle on its own.&lt;/p&gt;

&lt;p&gt;☦ &lt;a href="https://makandracards.com/makandra/18691-postgresql-vs-rails-migration-how-to-change-columns-from-string-to-integer"&gt;This article&lt;/a&gt; does suggest that one can provide a SQL statement for data conversion. However I couldn't find any official documentation to support that.&lt;/p&gt;

</description>
      <category>rails</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Closer to the one-step-deploy</title>
      <dc:creator>B Jacquet</dc:creator>
      <pubDate>Sun, 16 Aug 2020 00:23:42 +0000</pubDate>
      <link>https://forem.com/brunjact/closer-to-the-one-step-deploy-2ggg</link>
      <guid>https://forem.com/brunjact/closer-to-the-one-step-deploy-2ggg</guid>
      <description>&lt;p&gt;I've been trying out a deployment checklist which is a bit different than usual. It's a little script which &lt;del&gt;helps me&lt;/del&gt; &lt;em&gt;guides me&lt;/em&gt; through out the whole process.&lt;/p&gt;

&lt;p&gt;So, on my current project, deploying for staging environment is performed in six(ish) steps:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Inform everyone deploy is about to begin.&lt;/li&gt;
&lt;li&gt;On my local repository, switch to the &lt;code&gt;deploy&lt;/code&gt; branch.&lt;/li&gt;
&lt;li&gt;In it, execute the deploy command.&lt;/li&gt;
&lt;li&gt;Turn on the VPN.

&lt;ol&gt;
&lt;li&gt;Open the site and tryout a feature or two.&lt;/li&gt;
&lt;li&gt;Turn off the VPN.&lt;/li&gt;
&lt;/ol&gt;


&lt;/li&gt;
&lt;li&gt;Move cards forward.&lt;/li&gt;
&lt;li&gt;Inform everyone deploy has ended.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;This is too long. At most it should be steps 1 and 6, with a &lt;em&gt;Press deploy button&lt;/em&gt; in between. Depending on what "inform everyone" means—email, text, chat, yell—we can also automate that. And then we can finally make a &lt;del&gt;build&lt;/del&gt; &lt;em&gt;deploy&lt;/em&gt; in one step.&lt;/p&gt;

&lt;p&gt;My script performs steps 2, 3, 4, and 4.2 for me. 😊 But I still have to move cards about on the board, and test is the site is up and running.  😕 For now, maybe I can use a Slack command line client to inform everyone,&lt;/p&gt;

&lt;p&gt;So, without further ado, the script. Sensitive data was replaced with King Crimson(ish) references.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;#!/bin/bash&lt;/span&gt;
&lt;span class="nb"&gt;set&lt;/span&gt; &lt;span class="nt"&gt;-eu&lt;/span&gt;

&lt;span class="nv"&gt;VPNNAME&lt;/span&gt;&lt;span class="o"&gt;=&lt;/span&gt;&lt;span class="s2"&gt;"PROJEKT-X-VPN"&lt;/span&gt;

config_elasticbeanstalk &lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nb"&gt;mkdir&lt;/span&gt; .elasticbeanstalk
    &lt;span class="nb"&gt;cd&lt;/span&gt; .elasticbeanstalk
    &lt;span class="nb"&gt;cat&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&amp;lt;&lt;/span&gt;&lt;span class="no"&gt;EOF&lt;/span&gt;&lt;span class="sh"&gt; &amp;gt; config.yml
…yadda yadda yadda…
&lt;/span&gt;&lt;span class="no"&gt;EOF
&lt;/span&gt;    &lt;span class="nb"&gt;cd&lt;/span&gt; ..
&lt;span class="o"&gt;}&lt;/span&gt;

run_elastic_beanstalk &lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Running Elastic Beanstalk…"&lt;/span&gt;
    config_elasticbeanstalk
    eb deploy projekt-staging
&lt;span class="o"&gt;}&lt;/span&gt;

clone_repository &lt;span class="o"&gt;()&lt;/span&gt; &lt;span class="o"&gt;{&lt;/span&gt;
    &lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Cloning code repository…"&lt;/span&gt;
    &lt;span class="nb"&gt;rm&lt;/span&gt; &lt;span class="nt"&gt;-rf&lt;/span&gt; projekt-x
    git clone &lt;span class="nt"&gt;-q&lt;/span&gt; git@github.com:projekts/projekt-x.git
&lt;span class="o"&gt;}&lt;/span&gt;

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Alert in #projekt-x the deploy is about to beging:"&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"  started &lt;/span&gt;&lt;span class="se"&gt;\`&lt;/span&gt;&lt;span class="s2"&gt;projekt-staging&lt;/span&gt;&lt;span class="se"&gt;\`&lt;/span&gt;&lt;span class="s2"&gt; deploy"&lt;/span&gt;
&lt;span class="nb"&gt;read&lt;/span&gt; &lt;span class="nt"&gt;-n&lt;/span&gt; 1 &lt;span class="nt"&gt;-p&lt;/span&gt; &lt;span class="s2"&gt;"Press any key to continue: "&lt;/span&gt;

&lt;span class="nb"&gt;cd&lt;/span&gt; /tmp &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; clone_repository
&lt;span class="nb"&gt;cd &lt;/span&gt;projekt-x &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; run_elastic_beanstalk

networksetup &lt;span class="nt"&gt;-connectpppoeservice&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;VPNNAME&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;
open https://projekt-x-staging.projekts.com
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Confirm if everything is okay."&lt;/span&gt;
&lt;span class="nb"&gt;read&lt;/span&gt; &lt;span class="nt"&gt;-n&lt;/span&gt; 1 &lt;span class="nt"&gt;-p&lt;/span&gt; &lt;span class="s2"&gt;"Press any key to continue: "&lt;/span&gt;
networksetup &lt;span class="nt"&gt;-connectpppoeservice&lt;/span&gt; &lt;span class="s2"&gt;"&lt;/span&gt;&lt;span class="k"&gt;${&lt;/span&gt;&lt;span class="nv"&gt;VPNNAME&lt;/span&gt;&lt;span class="k"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;"&lt;/span&gt;

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Move cards"&lt;/span&gt;
open https://projekts.board.com/board/101421138
&lt;span class="nb"&gt;read&lt;/span&gt; &lt;span class="nt"&gt;-n&lt;/span&gt; 1 &lt;span class="nt"&gt;-p&lt;/span&gt; &lt;span class="s2"&gt;"Press any key to continue: "&lt;/span&gt;

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"Inform in #projekt-x the deploy has ended:"&lt;/span&gt;
&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"  finished &lt;/span&gt;&lt;span class="se"&gt;\`&lt;/span&gt;&lt;span class="s2"&gt;projekt-staging&lt;/span&gt;&lt;span class="se"&gt;\`&lt;/span&gt;&lt;span class="s2"&gt; deploy"&lt;/span&gt;
&lt;span class="nb"&gt;read&lt;/span&gt; &lt;span class="nt"&gt;-n&lt;/span&gt; 1 &lt;span class="nt"&gt;-p&lt;/span&gt; &lt;span class="s2"&gt;"Press any key to continue: "&lt;/span&gt;

&lt;span class="nb"&gt;echo&lt;/span&gt; &lt;span class="s2"&gt;"All done"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;p&gt;Inspiration for this script came from &lt;a href="https://blog.danslimmon.com/2019/07/15/do-nothing-scripting-the-key-to-gradual-automation/"&gt;here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;The goal of a &lt;em&gt;one build step&lt;/em&gt; was incited by &lt;a href="https://www.joelonsoftware.com/2000/08/09/the-joel-test-12-steps-to-better-code/"&gt;him&lt;/a&gt;&lt;/p&gt;

</description>
      <category>showdev</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Remotees At Work</title>
      <dc:creator>B Jacquet</dc:creator>
      <pubDate>Tue, 14 Apr 2020 07:31:00 +0000</pubDate>
      <link>https://forem.com/runtime-revolution/remotees-at-work-2mdb</link>
      <guid>https://forem.com/runtime-revolution/remotees-at-work-2mdb</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;Re·mo·tees&lt;/strong&gt; (rĭ-mōt-ēs): A person hired to work for another from outside the office, usually from home.❊&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;For the past month &lt;a href="https://www.runtime-revolution.com/"&gt;Runtime Revolution&lt;/a&gt; has been working full remote, for reasons the whole world is aware of. Going remote is such a game changer at Runtime, and to me personally, that I immediately wanted to blog about it. This time ‘round I twisted things a bit and asked some of our readers (fellow co-workers) to share their experiences on (forced) remote work.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--QIZP35Rk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2AP0_WdasLJ7BthRuCJPB8hA.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--QIZP35Rk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2AP0_WdasLJ7BthRuCJPB8hA.jpeg" alt=""&gt;&lt;/a&gt;All you need for remote work. Photo by &lt;a href="https://medium.com/u/256a7e3ac5bc"&gt;Ana Gonçalves&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In this post I’m joined by &lt;a href="https://dev.to@sbg_ana"&gt;Ana Gonçalves&lt;/a&gt;, &lt;a href="https://medium.com/u/7c54fb105c1e"&gt;João Ribeiro&lt;/a&gt;, and &lt;a href="https://medium.com/u/499c0dd781c5"&gt;Maria Luís Duro&lt;/a&gt;. &lt;strong&gt;Ana&lt;/strong&gt; is a Team Leader and has been with Runtime Revolution for four years. During that time she has contributed to ten different projects! &lt;strong&gt;João&lt;/strong&gt; is another Team Leader and he has been with Runtime for two years. &lt;strong&gt;Maria&lt;/strong&gt; is our IT Recruiter. She’s hiring! 😉&lt;/p&gt;

&lt;h4&gt;
  
  
  Are you working alone at home? Are you enjoying it?
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Ana:&lt;/strong&gt; &lt;em&gt;“Me and my partner are both working from home right now, we work in separate rooms because we have meetings quite often. We need separate spaces so we don’t speak over each other. Sometimes we notify each other if there’s going to be a meeting so that the other doesn’t make too much noise. Other than that we basically work as if we were alone and try not to interact much during the day, apart from lunch and snack times. It can be nice to work without the usual hustle of the office and with my cat’s occasional company, but human interaction is also missed. Overall, working from home has its pros and cons. For now I’m enjoying it but I’m afraid I might get over it soon.”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;João:&lt;/strong&gt; “&lt;em&gt;I’m not alone, since my girlfriend is also remote during this time.&lt;br&gt;&lt;br&gt;
We made some ground rules before starting this period and one of them is to work in separate rooms in the house, since we have this possibility.&lt;br&gt;&lt;br&gt;
These two “offices” were also set up in rooms that we don’t use for our off-work time, which means we can disconnect and still be in the living-room / kitchen / bedroom without the work office feeling. I can say that this new experience is definitely different from the normal routine, it’s better in some aspects but at the same time, worse in others. I think I’ve been able to focus more easily than in a busy day at the office, since I don’t get interrupted as often.”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Maria:&lt;/strong&gt; &lt;em&gt;“I’m currently “in quarantine” alongside my parents. The three of us are working but in separate spaces since we all have jobs that require calls or video chats. For now it’s all going well and we try to respect each other’s schedules. We eat lunch together to maintain interaction, have coffee breaks, and try to keep a fairly normal life. Since this is a particular situation in which we all need to stay at home I don’t feel my personal life is any more involved in my day-to-day than it was before. Because we’re not used to spending all hours of the day with each other sometimes we get a bit annoyed but it’s a feeling that goes away fairly quickly.”&lt;/em&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  Now that you don’t commute, what do you use that time for?
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cn6_FTeK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2ALWOU_B7O42LYbTUxhS7HzA.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cn6_FTeK--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2ALWOU_B7O42LYbTUxhS7HzA.jpeg" alt=""&gt;&lt;/a&gt;João’s less is more setup.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Ana:&lt;/strong&gt; &lt;em&gt;“I usually spend about 2 hours a day to commute and I actually used to read during that time but now I don’t read as much. Now I try to be mindful with my time so I don’t fall into the trap of working more than usual. I use the extra time to bake (I like making my own sourdough bread and the extra time is very much appreciated), tidying up, or use the extra hour in the evening to do some yoga.”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;João:&lt;/strong&gt; &lt;em&gt;“In the morning I get up at the same time as I did before, I just get ready a lot more slowly and the rush part of my day is not here anymore. I use that time to catch up on the news (“real” television news), calmly eat my breakfast, and sometimes still read a bit as I used to do on the train.”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Maria:&lt;/strong&gt; &lt;em&gt;“Usually in the morning I go for a run outside and come home to continue some workout exercises I would otherwise do at the gym. I save the end of my day to play video games (I am revisiting some oldies like Pokemon and Kirby!)”&lt;/em&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  How did you, and your team, adapt to the long distance?
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Ana:&lt;/strong&gt; &lt;em&gt;“We as a team work from an office but we work remotely with the product team. We have standups twice a week with them, so that interaction hasn’t really changed that much. We added a daily standup internally so we see and talk to each other regularly and PRs [Pull Requests — Ed.] are usually published in a Slack channel, as we did before. We also created a Zoom link that we called “Virtual Kitchen” so anyone from the team can join after lunch and during breaks to talk to each other about whatever they want, as we would do if we were in the office.”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;João:&lt;/strong&gt; “&lt;em&gt;In my project we’re divided into different teams, inside the project, so in my team we started doing two daily check-ins, one in the morning and one near the end of the day. I feel this keeps the team connected even though there might not be that many updates in each one, but we get to see each other and also talk a little bit. Apart from that nothing much changed, if you need help with something you talk to who you think might help you and schedule a call, or simply write a message in your channel and get some responses to it. For all the people in the project we also started doing some “Watercooler Calls”, twice a day you can get together with others and just talk about “nothing”, which is great to keep the mental sanity!”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Maria:&lt;/strong&gt; &lt;em&gt;“We adapted pretty well. We talk everyday and maintain our weekly meetings. Personally I feel the response time isn’t so immediate but at the same time it doesn’t have a particularly adverse effect in our work. I believe that now more so than before, all my questions are answered. Because of this change, working from home has made us more aware that we need to maintain all channels of communication open and do business as usual.”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--rIWEf7A4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2Aw8opCUlojnbPdMzV3bgS8g.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rIWEf7A4--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2Aw8opCUlojnbPdMzV3bgS8g.jpeg" alt=""&gt;&lt;/a&gt;Maria’s minimalist office, in the dinning room.&lt;/p&gt;

&lt;h4&gt;
  
  
  Name one thing that is absolutely indispensable to have at your desk for remote work
&lt;/h4&gt;

&lt;p&gt;&lt;strong&gt;Ana:&lt;/strong&gt; &lt;em&gt;“Tea and headphones are very much indispensable to me, having wireless headphones is even cooler because I can walk around the house and still hear whatever is being said in the “Virtual Kitchen”.”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;João:&lt;/strong&gt; “&lt;em&gt;Water, ANC Headphones and hand cream to keep my hands from drying!”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Maria: “&lt;/strong&gt; &lt;em&gt;My desk is pretty basic, since I’m working in the living room (where we eat haha). I only have a notebook, a pen, and a bottle of water to keep me hydrated :)”&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---rCrpq8L--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2A80VPYZ9abBRsdhTbuHX14g.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---rCrpq8L--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2A80VPYZ9abBRsdhTbuHX14g.jpeg" alt=""&gt;&lt;/a&gt;Ana’s Virtual Kitchen.&lt;/p&gt;

&lt;p&gt;I echo the sentiments expressed above by my co-workers. I’m also at home with someone who’s doing remote work and we also work in separate rooms. I wonder why do we seek a quiet place to work, when at the office we would be working in an open space with multiple distractions? Why do we seek the shift from busy open space to quiet alone room?&lt;br&gt;&lt;br&gt;
As for the added “bonus” time, I use it differently. Oddly enough I find my concentration levels varying throughout the day and I tend to compensate by spending my commute time on working hours. But that is not the norm and so far I was able to catch up seasons one and two of Westworld’s TV Series.&lt;br&gt;&lt;br&gt;
Runtime Revolution’s culture and values are spread throughout its teams and their projects. But that doesn’t restrict them in adopting different routines for remote work. During this time I’ve worked with teams relying mostly on group text messaging and occasional voice calls (through Slack), and other teams opting for an always on group voice call with occasional text (through Discord). Though apparently similar solutions, I find voice to be less disruptive than text. As soon as I know the discussion doesn’t concern me, I find it easier to ignore human voice. That doesn’t happen with notification beeps and flashing icons luring me to text waiting to be read.&lt;/p&gt;

&lt;p&gt;I want to thank &lt;a href="https://dev.to@sbg_ana"&gt;Ana Gonçalves&lt;/a&gt;, &lt;a href="https://medium.com/u/7c54fb105c1e"&gt;João Ribeiro&lt;/a&gt;, and &lt;a href="https://medium.com/u/499c0dd781c5"&gt;Maria Luís Duro&lt;/a&gt; for taking part on this post and sharing their insights. The Q&amp;amp;A interviews were conducted safely on Slack and no COVID-19 virus was spread through them.&lt;/p&gt;




&lt;blockquote&gt;
&lt;p&gt;&lt;strong&gt;&lt;em&gt;❊&lt;/em&gt;&lt;/strong&gt; Remotees &lt;em&gt;is word I made up. The title is a pun on Peter Seibel’s wonderful book&lt;/em&gt; &lt;a href="http://www.codersatwork.com/"&gt;Coders At Work&lt;/a&gt;&lt;em&gt;. Read it!&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;em&gt;I work at&lt;/em&gt; &lt;a href="http://www.runtime-revolution.com/"&gt;&lt;em&gt;Runtime Revolution&lt;/em&gt;&lt;/a&gt; &lt;em&gt;as Full Stack Rails developer. We help startups kickoff their business and reach the next level.&lt;/em&gt;&lt;/p&gt;




</description>
      <category>remote</category>
      <category>productivity</category>
      <category>interview</category>
      <category>tips</category>
    </item>
    <item>
      <title>🎬🎛️🤘</title>
      <dc:creator>B Jacquet</dc:creator>
      <pubDate>Thu, 03 Oct 2019 14:22:58 +0000</pubDate>
      <link>https://forem.com/brunjact/-4dm2</link>
      <guid>https://forem.com/brunjact/-4dm2</guid>
      <description>&lt;p&gt;&lt;a href="https://api.rubyonrails.org/classes/ActionController/Metal.html"&gt;https://api.rubyonrails.org/classes/ActionController/Metal.html&lt;/a&gt;&lt;/p&gt;

</description>
      <category>todayilearned</category>
      <category>ruby</category>
      <category>rails</category>
    </item>
    <item>
      <title>A Lightning Talk about Pry and a Blogpost about Lisp</title>
      <dc:creator>B Jacquet</dc:creator>
      <pubDate>Sun, 28 Oct 2018 15:36:59 +0000</pubDate>
      <link>https://forem.com/brunjact/a-lightning-talk-about-pry-and-a-blogpost-about-lisp-2mlh</link>
      <guid>https://forem.com/brunjact/a-lightning-talk-about-pry-and-a-blogpost-about-lisp-2mlh</guid>
      <description>&lt;p&gt;This week was quite busy (for things other than work). My co-workers at &lt;a href="https://www.runtime-revolution.com/"&gt;Runtime Revolution&lt;/a&gt; had just enough of me. On Tuesday my post &lt;a href="https://revs.runtime-revolution.com/four-things-about-pry-a0ebb10c6c2e"&gt;&lt;em&gt;Four things about Pry&lt;/em&gt;&lt;/a&gt; was published on our &lt;a href="https://revs.runtime-revolution.com/"&gt;blog&lt;/a&gt;. It is about a handful of features which I useful for debugging Ruby code.&lt;/p&gt;

&lt;p&gt;And then on Thursday I made a lightning talk about Lisp. In it I attempt to give some insight some of Lisp's often joked and praised about features:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Parenthesis&lt;/li&gt;
&lt;li&gt;Prefix notation&lt;/li&gt;
&lt;li&gt;Recursion&lt;/li&gt;
&lt;li&gt;Functional programming&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Had to remove &lt;strong&gt;Macros&lt;/strong&gt; due to time restrictions.&lt;/p&gt;

&lt;p&gt;Slides were made on &lt;a href="https://remarkjs.com/"&gt;Remark&lt;/a&gt; and you find them &lt;a href="https://bjacquet.github.io/extras/lisp-speech-therapy/presentation.html"&gt;here&lt;/a&gt;. Remark is great for quick and simple slides but had a really hard time making a PDF out of it.&lt;/p&gt;

</description>
      <category>lisprubytips</category>
    </item>
    <item>
      <title>Four things about Pry</title>
      <dc:creator>B Jacquet</dc:creator>
      <pubDate>Tue, 23 Oct 2018 08:44:08 +0000</pubDate>
      <link>https://forem.com/runtime-revolution/four-things-about-pry-2pe5</link>
      <guid>https://forem.com/runtime-revolution/four-things-about-pry-2pe5</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jKa6ttg1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/819/1%2AQTCgxaIflO13BjErDm69nw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jKa6ttg1--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/819/1%2AQTCgxaIflO13BjErDm69nw.png" alt=""&gt;&lt;/a&gt;Pry is ready for action.&lt;/p&gt;

&lt;p&gt;I love &lt;strong&gt;REPL&lt;/strong&gt; s. It’s a great development tool. Any decent language has a REPL. &lt;strong&gt;Lisp&lt;/strong&gt; has it. &lt;strong&gt;Python&lt;/strong&gt; has it. So does &lt;strong&gt;Haskell&lt;/strong&gt;. And &lt;strong&gt;Ruby&lt;/strong&gt; , obviously, has it!&lt;/p&gt;

&lt;p&gt;REPL stands for &lt;strong&gt;R&lt;/strong&gt; ead &lt;strong&gt;E&lt;/strong&gt; val &lt;strong&gt;P&lt;/strong&gt; rint &lt;strong&gt;L&lt;/strong&gt; oop. It’s a command line interface to interact with a programming language. Most interactive programming languages have a REPL. (I didn’t check.) This nomenclature derives from Lisp’s implementation which, in its most basic form, can be a one-liner:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(loop (print (eval (read))))
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Lisp REPLs are very powerful. We can inspect the stack tree, (re-)execute a frame (usually a function call), change frame arguments and re-execute it, change a function definition and re-execute the frame calling it.&lt;/p&gt;

&lt;p&gt;With such high expectations, it’s no wonder that &lt;a href="https://ruby-doc.org/stdlib/libdoc/irb/rdoc/IRB.html"&gt;&lt;strong&gt;IRB&lt;/strong&gt;&lt;/a&gt; (Ruby’s default REPL) doesn’t look that powerful. (I think you’ll agree with me on this.) &lt;a href="http://pryrepl.org/"&gt;&lt;strong&gt;Pry&lt;/strong&gt;&lt;/a&gt; is a pretty powerful alternative to IRB and packs a lot of new functionality. But still… it can’t be compared with Lisp’s. Nevertheless, there are a few features which (I think) will appeal to newcomers. I intend to go over them in this post.&lt;/p&gt;

&lt;h3&gt;
  
  
  Previous evaluation value
&lt;/h3&gt;

&lt;p&gt;When learning Ruby, one of the things I was constantly needing to do was using the value of the previous evaluation. Let’s say I had calculated the tax value of a product and now wanted to get the final price:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pry(main)\&amp;gt; price, tax\_rate = 34, 0.08
=\&amp;gt; [34, 0.08]
pry(main)\&amp;gt; price \* tax\_rate
=\&amp;gt; 2.72
pry(main)\&amp;gt; final\_price = price + # damn! -\_-
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;It took me ages to find out we can access the previous value with &lt;strong&gt;_&lt;/strong&gt; (underscore). With two underscores &lt;strong&gt;__&lt;/strong&gt; we access the second from last value.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pry(main)\&amp;gt; price, tax\_rate = 34, 0.08
=\&amp;gt; [34, 0.08]
pry(main)\&amp;gt; price \* tax\_rate
=\&amp;gt; 2.72
pry(main)\&amp;gt; final\_price = price + \_
=\&amp;gt; 36.72
pry(main)\&amp;gt; \_\_
=\&amp;gt; 2.72
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  Where am I?
&lt;/h3&gt;

&lt;p&gt;One debug methodology is to put breakpoints in our code. With Pry we do that with the &lt;strong&gt;binding.pry&lt;/strong&gt; expression. This causes the execution to stop on that line. When that happens ruby’s console will show something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pry(main)\&amp;gt; Grid.generate(6, 6)

From: /Users/bjacquet/Projects/gol/gol.rb @ line 27 Grid.generate:

25: def self.generate(width, height)
 26: self.new(Array.new(height).collect do
 =\&amp;gt; 27: binding.pry
 28: Array.new(width).collect { rand(2) }
 29: end
[1] pry(Grid)\&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;It shows the line of code where the execution stopped, indicated with =&amp;gt;. (Being the 27th line.) Also some code context with surrounding lines. We can also infer that it stopped inside the method Grid.generate and it’s defined in file  &lt;strong&gt;gol.rb&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;This information is also available at any time by typing in the &lt;strong&gt;whereami&lt;/strong&gt;  command.&lt;/p&gt;

&lt;p&gt;Were this method twice its size, we could still see its full content by using the &lt;strong&gt;show-source&lt;/strong&gt; command as such:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pry(main)\&amp;gt; show-source Grid.generate

From: gol.rb @ line 25:
Owner: #\&amp;lt;Class:Grid\&amp;gt;
Visibility: public
Number of lines: 7

def self.generate(width, height)
 self.new(Array.new(height).collect do
 binding.pry
 Array.new(width).collect { rand(2) }
 end
 )
end
pry(Grid)\&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  Replaying history
&lt;/h3&gt;

&lt;p&gt;Pry’s &lt;strong&gt;hist&lt;/strong&gt; command is really something. It enables you to view, search, and replay history, among other things. When invoked with no options it displays all of Pry’s history, that is, all the inputs we’ve given it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pry(main)\&amp;gt; hist
1: price, tax\_rate = 34, 0.08
2: price \* tax\_rate
3: price, tax\_rate = 34, 0.08
4: price \* tax\_rate
5: final\_price = price + \_
6: \_\_
7: Grid.generate(6, 6)
8: show-command Grid.generate
pry(main)\&amp;gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;With the &lt;strong&gt;--replay&lt;/strong&gt; option we can re-evaluate expression(s):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pry(main)\&amp;gt; hist --replay 3..4
=\&amp;gt; [34, 0.08]
=\&amp;gt; 2.72
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;I find it faster to use this command than revolving previous inputs with the up arrow.&lt;/p&gt;

&lt;h3&gt;
  
  
  Let me fix that right now
&lt;/h3&gt;

&lt;p&gt;Quite often we are typing in multiple-line expressions into Pry. More often than we would like we type in a line with an error. To fix it we use the &lt;strong&gt;amend-line&lt;/strong&gt; command. It takes a line number and the replacement code as arguments.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pry(main)\&amp;gt; def hello
pry(main)\* puts “hello #{name}”
pry(main)\* amend-line 1 def hello(name)
1: def hello(name)
2: puts “hello #{name}”
pry(main)\* end
=\&amp;gt; :hello
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;In this example I realised that I forgot to specify name as a method argument. Thus I correct that by calling the amend-line command on line &lt;strong&gt;1&lt;/strong&gt; with the new code. Pry then shows all input lines provided so far and waits for more. I type in end and the method is defined.&lt;/p&gt;

&lt;h3&gt;
  
  
  Going further
&lt;/h3&gt;

&lt;p&gt;Off by one error, sorry about that! It’s worth it.&lt;/p&gt;

&lt;p&gt;Pry also gives us the possibility of changing methods on the fly. To do so we need to use two commands. First we change the method using the &lt;strong&gt;edit&lt;/strong&gt;  command.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pry(main)\&amp;gt; edit Grid.generate
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;This will open an editor with the cursor on the first line of the method definition. When we’re done, we save the changes and exit the editor.&lt;/p&gt;

&lt;p&gt;Next we need to evaluate the new definition. Command &lt;strong&gt;reload-method&lt;/strong&gt; does just that.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;pry(main)\&amp;gt; reload-method Grid.generate
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;From now on it will use the new version of Grid.generate.&lt;/p&gt;

&lt;h3&gt;
  
  
  Further reading
&lt;/h3&gt;

&lt;p&gt;Pry has a lot more features to discover. Whilst preparing this post I discovered the amend-line command. It is so useful that I had to include it. Other commands you should know about include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;show-model&lt;/strong&gt; , lists the model attributes and class associations.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;show-stack&lt;/strong&gt; , shows the frames call stack. (More often than not, this takes a lot of time to display anything.)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://github.com/pry/pry/wiki"&gt;Pry's wiki&lt;/a&gt; is well documented and also has links to other resources.&lt;/p&gt;

&lt;p&gt;Pry’s help command is also very useful. I learned most of these features through there. (RTFM syndrome)&lt;/p&gt;

&lt;p&gt;That’s all for now. Have fun and be nice! :-)&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I work at&lt;/em&gt; &lt;a href="http://www.runtime-revolution.com/"&gt;&lt;em&gt;Runtime Revolution&lt;/em&gt;&lt;/a&gt; &lt;em&gt;as a Rails developer. We also work with Python, JavaScript… both of which have REPL! We also help startups reach the next level.&lt;/em&gt;&lt;/p&gt;




</description>
      <category>commandline</category>
      <category>programming</category>
      <category>ruby</category>
      <category>debugging</category>
    </item>
    <item>
      <title>Explain Gopher</title>
      <dc:creator>B Jacquet</dc:creator>
      <pubDate>Fri, 27 Jul 2018 10:56:43 +0000</pubDate>
      <link>https://forem.com/brunjact/explain-gopher-2d36</link>
      <guid>https://forem.com/brunjact/explain-gopher-2d36</guid>
      <description>&lt;p&gt;&lt;a href="https://lobste.rs/s/szbati/lobste_rs_mirror_on_gopher"&gt;This article&lt;/a&gt; popup on Lobste.rs and there was a small buzz about it and I couldn't understand why. Mostly because I never heard about Gopher.&lt;/p&gt;

&lt;p&gt;Except for &lt;em&gt;this&lt;/em&gt; gopher! ;-) &lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--yYaVIYfx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://m5.paperblog.com/i/12/126238/featured-animal-gopher-L-lk9X3I.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--yYaVIYfx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://m5.paperblog.com/i/12/126238/featured-animal-gopher-L-lk9X3I.jpeg" alt="Pocket Gopher"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thank you.&lt;/p&gt;

</description>
      <category>explainlikeimfive</category>
    </item>
    <item>
      <title>Hmmm… food…</title>
      <dc:creator>B Jacquet</dc:creator>
      <pubDate>Tue, 24 Jul 2018 21:16:53 +0000</pubDate>
      <link>https://forem.com/brunjact/hmmm-food-1mi0</link>
      <guid>https://forem.com/brunjact/hmmm-food-1mi0</guid>
      <description>&lt;p&gt;The best Pull Request ever has to be about food!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/stympy/faker/pull/1316"&gt;https://github.com/stympy/faker/pull/1316&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;😋🍲&lt;/p&gt;

</description>
      <category>ruby</category>
      <category>inspiration</category>
      <category>fun</category>
    </item>
    <item>
      <title>Calculating Route…</title>
      <dc:creator>B Jacquet</dc:creator>
      <pubDate>Thu, 14 Jun 2018 16:03:19 +0000</pubDate>
      <link>https://forem.com/runtime-revolution/calculating-route-f07</link>
      <guid>https://forem.com/runtime-revolution/calculating-route-f07</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--jY0NeDru--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2AHP_UqWnjhETCy1jijaoE4A.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--jY0NeDru--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn-images-1.medium.com/max/1024/1%2AHP_UqWnjhETCy1jijaoE4A.jpeg" alt=""&gt;&lt;/a&gt;Photo by &lt;a href="https://unsplash.com/photos/L7CwfCSmpfM?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;Nikita Kachanovsky&lt;/a&gt; on &lt;a href="https://unsplash.com/?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Ruby on Rails’ routing mechanism was the topic which took me the longest to grasp. Being the gateway between the application and the world, understanding its functionalities, possibilities, and restrictions is crucial to look ahead on how the User Experience can, will, may, or may not be.&lt;/p&gt;

&lt;p&gt;Any RoR tutorial will tell you how simple it is to setup. “&lt;em&gt;Just type in”&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;resources :product
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;&lt;em&gt;“and you’ll have all of these routes automatically:”&lt;/em&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Verb URI Pattern Controller#Action
GET /products products#index
GET /products/:id products#show
GET /products/new products#new
POST /products products#create
GET /products/:id/edit products#edit
PUT /products/:id products#update
PATCH /products/:id products#update
DELETE /products/:id products#destroy
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;Not having previous experience with RESTful APIs, I was a bit sceptical on how just five methods (GET, POST, PUT, PATCH, DELETE) are enough to provide all functionalities required for my application (or &lt;em&gt;any&lt;/em&gt; application for that matter). What if I needed three different ways to update product? What if I needed routing for something which doesn’t have a model?&lt;/p&gt;

&lt;p&gt;Turns out that mastering the routes.rb file is not that easy. ActionController::RoutingError was ranked the most common error amongst more than 1000 RoR projects, by &lt;a href="https://rollbar.com/blog/top-10-ruby-on-rails-errors/"&gt;Rollbar&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;Ruby on Rails Guides’ page on &lt;a href="http://guides.rubyonrails.org/routing.html"&gt;Routing&lt;/a&gt;, although short on words, but with plenty of examples, is still quite a long page. Yet I suspect there’s more to say about it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://medium.com/@vaidehijoshi"&gt;Vaidehi Joshi&lt;/a&gt; has a &lt;a href="https://youtu.be/lEC-QoZeBkM"&gt;presentation&lt;/a&gt; on this subject with 123 slides! Spoiler alert: the talk is more about on how the routing mechanism is made.&lt;/p&gt;

&lt;p&gt;Developing an MVP is fast and hard work. You follow your guts and act on a need to know basis — reflection comes after. Now, I have some time to look back at the routes.rb file. How little I knew at the time and what little more I know now. It’s obvious to me now that I can create a route for “not-modeled-something”. It’s also obvious that one can get away without a controller as well! Try it yourself:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Rails.application.routes.draw do
 get 'not-modeled-something', to: proc { [200, {}, [“Hello, controllerless!”]] }
end
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;For further reading, I’ve recently discovered &lt;a href="https://richonrails.com/articles/understanding-rails-routing"&gt;this&lt;/a&gt; tutorial by RichOnRails.com which I believe to very complete. Happy reading and &lt;em&gt;bon voyage&lt;/em&gt;!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Nowadays I work at&lt;/em&gt; &lt;a href="http://www.runtime-revolution.com/"&gt;&lt;em&gt;Runtime Revolution&lt;/em&gt;&lt;/a&gt;&lt;em&gt;. Working here has been a great learning experience, and I’m beginning to know a thing or two about Rails.&lt;/em&gt;&lt;/p&gt;




</description>
      <category>rails</category>
      <category>routing</category>
      <category>softwaredevelopment</category>
    </item>
    <item>
      <title>Atom and Visual Studio Code</title>
      <dc:creator>B Jacquet</dc:creator>
      <pubDate>Thu, 07 Jun 2018 10:11:54 +0000</pubDate>
      <link>https://forem.com/brunjact/atom-and-visual-studio-code-566d</link>
      <guid>https://forem.com/brunjact/atom-and-visual-studio-code-566d</guid>
      <description>&lt;p&gt;Some years ago Oracle took over two big open source projects, MySQL and Open Office. Whilst MySQL remained open and community driven Open Office did not and was later discontinued. (It eventually got forked and became Libre Office.)&lt;/p&gt;

&lt;p&gt;Given the recent acquisition by Microsoft, will any of these editors prevail?&lt;br&gt;
Or is there a large enough ecosystem for they to co-exist?&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>editors</category>
      <category>atom</category>
      <category>vscode</category>
    </item>
  </channel>
</rss>
