<?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>DEV Community: anabella</title>
    <description>The latest articles on DEV Community by anabella (@anabella).</description>
    <link>https://dev.to/anabella</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%2F70949%2Fdce8cfb2-f200-4ce3-b590-78f538796692.png</url>
      <title>DEV Community: anabella</title>
      <link>https://dev.to/anabella</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/anabella"/>
    <language>en</language>
    <item>
      <title>7 front-end interview processes I did in December 2021</title>
      <dc:creator>anabella</dc:creator>
      <pubDate>Fri, 31 Dec 2021 09:08:49 +0000</pubDate>
      <link>https://dev.to/anabella/7-front-end-interview-processes-i-did-in-december-2021-5484</link>
      <guid>https://dev.to/anabella/7-front-end-interview-processes-i-did-in-december-2021-5484</guid>
      <description>&lt;p&gt;I recently went through the task of getting myself a new job and, to do this, I took part of &lt;strong&gt;7 simultaneous interviewing processes for front-end roles&lt;/strong&gt; with React and Typescript. &lt;/p&gt;

&lt;p&gt;I learned a lot as days, weeks, and interviews went by. I learned about myself and about the way companies evaluate candidates. I think this knowledge, paired with a real view into how front-end interviewing looks like today could be really useful for other people in search of a new job and teams who are looking to hire (to get interview ideas!).&lt;/p&gt;

&lt;p&gt;In this article I'll go through each of the companies I interviewed with (without giving names, sorry papparazzi! 📸), I'll outline the process and its stages and try to give my view on the pros and cons of each approach.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;Disclaimer&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;To be completely honest, doing 5-6 interviews per week &lt;strong&gt;wasn't such a wonderful idea&lt;/strong&gt;.&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;&lt;em&gt;It was stressful, tiring and came with a constant state of context switching. Interviewing is, in a way, a performance and you have to be at the top of your game on every call, 'cause it won't matter how well it went with the other company you spoke earlier in the day.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I'd recommend job seekers to &lt;strong&gt;focus your energy in 2, max 3 processes at the same time.&lt;/strong&gt; Job hunting really is a full time job, and limiting your options will help you focus on the ones you're really interested in.&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Company 1️⃣
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Size&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;&amp;lt; 20&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Domain&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;work management tool&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Position&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;front-end developer&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Process&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;
        &lt;ul&gt;
          &lt;li&gt;
            Initial call with one of the founders &lt;em&gt;(45 min)&lt;/em&gt;
          &lt;/li&gt;
          &lt;li&gt;
            Show n' tell of a project with a FE engineer &lt;em&gt;(1 hr)&lt;/em&gt;
          &lt;/li&gt;
          &lt;li&gt;
            Call with the other founder &lt;em&gt;(45 min)&lt;/em&gt;
          &lt;/li&gt;
          &lt;li&gt;
            Demo of the product (at my request) &lt;em&gt;(30 min)&lt;/em&gt;
          &lt;/li&gt;
          &lt;li&gt;
            Call with the FE technical lead &lt;em&gt;(1 hr)&lt;/em&gt;
          &lt;/li&gt;
        &lt;/ul&gt;
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Experience&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;
        good! 👍🏼
      &lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  My take on it
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;The good 😇&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Fair and easy going process&lt;/li&gt;
&lt;li&gt;Show and tell of a project is one of the best ways to evaluate a candidate's tech skill without going through the dreaded "live coding" or the tedious "take home test"&lt;/li&gt;
&lt;li&gt;"No wrong answers" approach to tech talks&lt;/li&gt;
&lt;li&gt;Talks with C-level people (founders) were very interesting and layed back&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The bad 😈&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The talk with the front-end lead was confusing. They seemed undecisive and sloppy and not a "leader type". This had a big influence in my decision to drop out&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The ugly 👹&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;They were trying to hire remotely but hadn't figured out anything about how to do it&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;I dropped out before they made an offer (they said they were ready to do so). I realized I wanted to join a bigger engineering organization.&lt;/p&gt;




&lt;h2&gt;
  
  
  Company 2️⃣
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Size&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;&amp;gt; 3000&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Domain&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;technical tools for developers&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Position&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;front-end engineer&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Process&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;
        &lt;ul&gt;
          &lt;li&gt;
            Initial call with an internal recruiter
            &lt;em&gt;(30 min)&lt;/em&gt;
          &lt;/li&gt;
          &lt;li&gt;
            Algorithms live coding (w/ study material provided by them)
            &lt;em&gt;(1 hr)&lt;/em&gt;
          &lt;/li&gt;
          &lt;li&gt;
            Take home test
            &lt;em&gt;(~a week)&lt;/em&gt;
          &lt;/li&gt;
          &lt;li&gt;
            "More complex" live coding exercise
            &lt;em&gt;(1 hr)&lt;/em&gt;
          &lt;/li&gt;
          &lt;li&gt;
            Software design (FE) with whiteboarding 
            &lt;em&gt;(1 hr)&lt;/em&gt;
          &lt;/li&gt;
          &lt;li&gt;
            Final talk with an engineering manager
            &lt;em&gt;(1 hr)&lt;/em&gt;
          &lt;/li&gt;
        &lt;/ul&gt;
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Experience&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;
        bad 😒
      &lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  My take on it:
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;The good 😇&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Clearly structured process&lt;/li&gt;
&lt;li&gt;They provided study material for the algorithms test&lt;/li&gt;
&lt;li&gt;They provided thorough feedback after dropping me&lt;/li&gt;
&lt;li&gt;They sent an anonymous Greenhouse survey about my experience&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The bad 😈&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Too many technical tests, all of them stressful&lt;/li&gt;
&lt;li&gt;Slow (~weekly) communication&lt;/li&gt;
&lt;li&gt;Unclear live coding test (they didn't say there were 2 problems so I took too much time on the first and simpler one)&lt;/li&gt;
&lt;li&gt;Untrained technical interviewers reading questions from a script&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The ugly 👹&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Dropping an experienced candidate based on their ability to solve basic algorithms while under peer and time pressure 🚩 (personally, that's not a company I want to work for)&lt;/li&gt;
&lt;li&gt;During the algorithms call they either gave me false tips (leaning me into the wrong approach) or were too ambiguous with their words (I &lt;em&gt;really really&lt;/em&gt; hope it's the latter)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
They dropped me so I might be a bit bitter about it but: cracking long-solved, highly googleable problems or implementing existing algorithms is very far from the value I can bring to a product team. If that's the first thing they care about, then that's not a company for me.&lt;/p&gt;




&lt;h2&gt;
  
  
  Company 3️⃣
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Size&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;~ 300&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Domain&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;payments&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Position&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;Senior front-end engineer&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Process&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;
        &lt;ul&gt;
          &lt;li&gt;
            Initial call with in-house recruiter
            &lt;em&gt;(30 min)&lt;/em&gt;
          &lt;/li&gt;
          &lt;li&gt;
            Technical talk with a FE developer
            &lt;em&gt;(1 hr)&lt;/em&gt;
          &lt;/li&gt;
          &lt;li&gt;
            FE system design w/ 2 devs (more in this below!)
            &lt;em&gt;(1 hr)&lt;/em&gt;
          &lt;/li&gt;
          &lt;li&gt;
            Values interview with an eng. manager and a non-technical teammate
            &lt;em&gt;(1 hr)&lt;/em&gt;
          &lt;/li&gt;
          &lt;li&gt;
            Meet the potential team (at my request)
            &lt;em&gt;(45 min)&lt;/em&gt;
          &lt;/li&gt;
        &lt;/ul&gt;
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Experience&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;
        very good! ❤️
      &lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  My take on it:
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;The good 😇&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;All kind and nice people, all around&lt;/li&gt;
&lt;li&gt;The in-house recruiter took the time to speak with me after &lt;em&gt;every&lt;/em&gt; interview, this built a friendly bond&lt;/li&gt;
&lt;li&gt;(Almost) no live coding, no whiteboarding, no take home tests&lt;/li&gt;
&lt;li&gt;Favorite interview (of them all!): &lt;strong&gt;FE system's design&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;No whiteboarding&lt;/li&gt;
&lt;li&gt;Look at app screen designs, break them down, find problems, think of implementation, evaluate options and their pros and cons. &lt;/li&gt;
&lt;li&gt;👆🏻 Literally one of the things you'll do the most while at the job (aside from writing/reviewing code).&lt;/li&gt;
&lt;li&gt;Finally, a small algorithms coding challenge (bit of a surprise :/ ) but I was already warmed up and confident and it went well :) &lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The bad 😈&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The live coding part of that interview came as a surprise, which is usually seen as a bad practice. Candidates should know about every part of the interview right when it starts. It gives them the chance to manage time and energy accordingly.&lt;/li&gt;
&lt;li&gt;I spoke to the team lead and a teammate of my potential team. They weren't ready to pitch an interesting challenge for my position, which in the end resulted in my loss of interest.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The ugly 👹&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Managers need to be trained in diversity matters&lt;/strong&gt;

&lt;ul&gt;
&lt;li&gt;When I asked the manager I spoke to about how they were giving a voice to underrepresented people in the company he said "we have an open doors policy, anyone can talk to anyone, no matter their rank"&lt;/li&gt;
&lt;li&gt;For the record, &lt;strong&gt;"open doors" is not enough for underrepresented folks&lt;/strong&gt;, as most of us won't feel entitled to speak our minds openly&lt;/li&gt;
&lt;li&gt;Humble advice: put underrepresented people in situations where they are &lt;em&gt;expected&lt;/em&gt; to speak their minds&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
They made an offer which was tough to say no to (no pun 🐴). But I felt like the work I'd be doing wasn't very clear and the team lead fell really short in pitching the project, so with a heavy heart I went a different way.&lt;/p&gt;




&lt;h2&gt;
  
  
  Company 4️⃣
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Size&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;&amp;lt; 20&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Domain&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;logistics&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Position&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;software engineer&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Process&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;
        &lt;ul&gt;
          &lt;li&gt;
            Initial call with third-party recruiter
            &lt;em&gt;(30 min)&lt;/em&gt;
          &lt;/li&gt;
          &lt;li&gt;
            Initial call with CTO
            &lt;em&gt;(45 min)&lt;/em&gt;
          &lt;/li&gt;
          &lt;li&gt;
            Take home test
            &lt;em&gt;(~a week, took me about 6 hrs)&lt;/em&gt;
          &lt;/li&gt;
          &lt;li&gt;
            Call to review take home test + add a feature
            &lt;em&gt;(1 hr)&lt;/em&gt;
          &lt;/li&gt;
          &lt;li&gt;
            Call with CEO / founder
            &lt;em&gt;(45 min)&lt;/em&gt;
          &lt;/li&gt;
          &lt;li&gt;
            Call with 2 team members (at my request)
            &lt;em&gt;(30 min each)&lt;/em&gt;
          &lt;/li&gt;
        &lt;/ul&gt;
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Experience&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;
        regular 😕
      &lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  My take on it:
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;The good 😇&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;They were very clear about their intention to make me an offer almost from the start&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The bad 😈&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The take home test was really low quality.

&lt;ul&gt;
&lt;li&gt;They gave me a boilerplate project and some designs to implement. There were no specs or acceptance criteria, icons couldn't be exported, entities were inconsistently named, and it was hard to match the data coming back from the API with the designs.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The ugly 👹&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Bad manners from a C-level interviewer 

&lt;ul&gt;
&lt;li&gt;During the review of my solution the CTO questioned the file structure of the project (wut?) and seemed to be trying to find things I "did wrong". &lt;/li&gt;
&lt;li&gt;Later on, when I was verbosely and carefuly refactoring my code to introduce a new feature he interrupted me because he didn't "understand what I was doing". &lt;/li&gt;
&lt;li&gt;After I was done with a working and clean implementation he said "there was an easier and faster way to get to the same result". &lt;/li&gt;
&lt;li&gt;All of this was inconsistent with the external recruiter's claims that they were incredibly excited for me to join.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;In a later call with the CTO he asked me to name which other companies I was interviewing with and, even though this made me really uncomfortable, I told him. I wish I had stood my ground and refused to share that info.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
They made a 3-folded offer (different distribution of salary and stock) which I declined.&lt;/p&gt;




&lt;h2&gt;
  
  
  Company 5️⃣
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Size&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;~ 150&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Domain&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;Finance&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Position&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;Senior front-end engineer&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Process&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;
        &lt;ul&gt;
          &lt;li&gt;
            Initial call with third-party recruiter
            &lt;em&gt;(30 min)&lt;/em&gt;
          &lt;/li&gt;
          &lt;li&gt;
            Technical talk with 2 front-end devs
            &lt;em&gt;(60 min)&lt;/em&gt;
          &lt;/li&gt;
          &lt;li&gt;
            Live coding with 2 devs (they shared the tasks in advance)
            &lt;em&gt;(90 min)&lt;/em&gt;
          &lt;/li&gt;
          &lt;li&gt;
            Round table w/ people from different teams/areas
            &lt;em&gt;(60 min)&lt;/em&gt;
          &lt;/li&gt;
        &lt;/ul&gt;
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Experience&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;
        great 1st impression, bad ending 💔
      &lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  My take on it:
&lt;/h3&gt;

&lt;p&gt;This was the company I was most excited about, and the one which broke my heart when they dropped me. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The good 😇&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;They have public salary bands and career paths&lt;/li&gt;
&lt;li&gt;The process was short and focused&lt;/li&gt;
&lt;li&gt;They shared a highly realistic project (with tickets) in advance, which I'd have to work on during the live coding&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The bad 😈&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We spent a lot of time during the live coding debugging accessory things which they suggested but then weren't sure how to implement.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The ugly 👹&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;2 weeks have past and they still haven't provided any feedback about what made them drop me after the live coding. I've requested it twice, no answer 🚩&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
No matter how cool a company can look, they need to walk the walk and treat their candidates with respect. I was sad they dropped me, but the fact that they've ghosted me for feedback makes me feel they weren't as cool as they presented themselves. &lt;/p&gt;




&lt;h2&gt;
  
  
  Company 6️⃣
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Size&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;~ 150&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Domain&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;Open source messaging&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Position&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;Front-end engineer&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Process&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;
        &lt;ul&gt;
          &lt;li&gt;
            Initial call with third-party recruiter
            &lt;em&gt;(30 min)&lt;/em&gt;
          &lt;/li&gt;
          &lt;li&gt;
            Initial call with in-house HR person (to whom I was meant to ask the questions)
            &lt;em&gt;(45 min)&lt;/em&gt;
          &lt;/li&gt;
          &lt;li&gt;
            "Domain-agnostic" take home test
            &lt;em&gt;(~a week, should take 3-4 hrs)&lt;/em&gt;
          &lt;/li&gt;
          &lt;li&gt;
            Pair programming on a very basic (and legacy) react app
            &lt;em&gt;(60 min)&lt;/em&gt;
          &lt;/li&gt;
          &lt;li&gt;
            Prep call with HR people for the systems design interview
            &lt;em&gt;(30 min)&lt;/em&gt;
          &lt;/li&gt;
          &lt;li&gt;
            "Deceivingly simple" systems design discussion with the VP of Engineering and a team lead
            &lt;em&gt;(60 min)&lt;/em&gt;
          &lt;/li&gt;
          &lt;li&gt;
            Talk with a member of the front-end team (at my request)
            &lt;em&gt;(30 min)&lt;/em&gt;
          &lt;/li&gt;
        &lt;/ul&gt;
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Experience&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;
        good! 👍🏼
      &lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h3&gt;
  
  
  My take on it:
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;The good 😇&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;All interesting, respectful, and kind people&lt;/li&gt;
&lt;li&gt;Fun and simple take home test, actually doable in 2-3hs (although I spent more 'cause I wanted to get it just right, that's just me)&lt;/li&gt;
&lt;li&gt;The pair progamming interview was &lt;em&gt;actually&lt;/em&gt; a pair programming exercise (not live coding in disguise).&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The bad 😈&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;A bit of a long process, too many technical tests for my taste. The one focused on React was very outdated (class components, no Typescript). It didn't reflect the actual state of the app I'd be working on.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The ugly 👹&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The person to whom I spoke when I requested a talk with a team member wasn't really prepared to pitch the project and that had the biggest impact in my decision.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
They made an offer, which I declined in favor of another one (read below!). But they said the terms of the offer would stand for about 6 months! How nice! 😍&lt;/p&gt;




&lt;h2&gt;
  
  
  Company 7️⃣
&lt;/h2&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
  &lt;tbody&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Size&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;~ 300&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Domain&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;Payments&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Position&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;Software engineer&lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Process&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;
        &lt;ul&gt;
          &lt;li&gt;
            Initial call with third-party recruiter
            &lt;em&gt;(30 min)&lt;/em&gt;
          &lt;/li&gt;
          &lt;li&gt;
            Pair programming to which I had to bring the problem to work on
            &lt;em&gt;(60 min)&lt;/em&gt;
          &lt;/li&gt;
          &lt;li&gt;
            Technical / values talk with an engineering manager
            &lt;em&gt;(90 min with a break half-way)&lt;/em&gt;
          &lt;/li&gt;
          &lt;li&gt;
            Values talk with the in-house recruiter
            &lt;em&gt;(45 min)&lt;/em&gt;
          &lt;/li&gt;
          &lt;li&gt;
            Meet the team and the team lead (at my request)
            &lt;em&gt;(30 min each)&lt;/em&gt;
          &lt;/li&gt;
        &lt;/ul&gt;
      &lt;/td&gt;
    &lt;/tr&gt;
    &lt;tr&gt;
      &lt;td&gt;&lt;strong&gt;Experience&lt;/strong&gt;&lt;/td&gt;
      &lt;td&gt;
        good! 👍🏼
      &lt;/td&gt;
    &lt;/tr&gt;
  &lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;h2&gt;
  
  
  My take on it
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;The good 😇&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Short and fast paced process&lt;/li&gt;
&lt;li&gt;Every interviewer feedback at the end of each interview (including if I passed!)&lt;/li&gt;
&lt;li&gt;Pair programming was &lt;em&gt;actually&lt;/em&gt; pair programming (not live coding in disguise)&lt;/li&gt;
&lt;li&gt;Bring-your-own coding challenge felt like I was in control of how I'd be evaluated&lt;/li&gt;
&lt;li&gt;They arranged 2 calls to meet my potential team&lt;/li&gt;
&lt;li&gt;All the talks gave me a clear sense of what it's like to work with them&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The bad 😈&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;I was a bit confused / annoyed to have to "put in work" preparing a challenge to bring before I even spoke to anyone in the company. That might have been different if I had been contacted by an in-house recruiter and learned more about them first.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;The ugly 👹&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The person doing the pair programming with me had very little knowledge about React, this was beneficial to me because I love explaining React to people, but we might have gotten more done if they had been front-end focused.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;br&gt;
They made an offer and I accepted it! 🎉 &lt;/p&gt;

&lt;p&gt;The biggest selling point for me was the ways of working (XP/Lean, pair programming by default) combined with the fact that I'd be way out of my comfort zone working a lot on backend projects and being the person-of-reference for front-end and React matters.&lt;/p&gt;




&lt;h2&gt;
  
  
  My overall learnings 🧠
&lt;/h2&gt;

&lt;h3&gt;
  
  
  For candidates 👩🏻‍💻
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Show and tell interview&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Bring something you're really excited or proud of&lt;/li&gt;
&lt;li&gt;It can be something small, you can even build it specifically for the interview (that way it'll show your most up-to-date skills!)&lt;/li&gt;
&lt;li&gt;Start with &lt;em&gt;why&lt;/em&gt; you wanted to build that&lt;/li&gt;
&lt;li&gt;Think in advance about how you're going to walk through it, the reasons for your decisions and things you'd like to add or improve on&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Live coding&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Make sure you know how many exercises you'll have to go through&lt;/li&gt;
&lt;li&gt;You can even ask how much time they think they should take. That way you can adapt your rhythm.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Helping your decision&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If you have doubts about joining a company, or if are trying to decide between competing offers, requesting a call with potential teammates can help a lot in picturing how the day-to-day work will feel like. To me that was a dealmaker because: 

&lt;ul&gt;
&lt;li&gt;I'll be working with a certain group of people&lt;/li&gt;
&lt;li&gt;In certain projects &lt;/li&gt;
&lt;li&gt;And with a certain dynamic&lt;/li&gt;
&lt;li&gt;👆🏻 that should have more weight in my decision than anything else, since it'll have the most impact on you while at the job.&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;In my experience companies and recruiters will be more than happy to arrange a call with the team for you at a final stage of the process&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Decide how much you want to share&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;You'll probably get asked about other processes you're taking part in. &lt;/li&gt;
&lt;li&gt;Companies often ask this to make sure they're not lagging behind timewise.&lt;/li&gt;
&lt;li&gt;They might ask you about "where they stand" in your preference list.&lt;/li&gt;
&lt;li&gt;They might ask you for details of other companies, size, domain. &lt;/li&gt;
&lt;li&gt;Be as honest or ellusive as you want. None of this should affect your chances of getting an offer. &lt;strong&gt;Just don't give them names&lt;/strong&gt; &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Ask questions, give feedback&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Everyone knows you're supposed to bring questions to every interview. If you didn't, now you do!&lt;/li&gt;
&lt;li&gt;Ask about things you care about, anything that'll help you picture yourself working with them or make up your mind about joining.&lt;/li&gt;
&lt;li&gt;Take the opportunity to give feedback to companies and interviewers after each call. 

&lt;ul&gt;
&lt;li&gt;Include what you liked about it and what could be improved&lt;/li&gt;
&lt;li&gt;This, if done right, could make you stand out as a candidate!&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  For hiring teams 🏢
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Show and tell interview&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;This is a great way of evaluating a candidate's experience and skill without putting them on the spot! &lt;/li&gt;
&lt;li&gt;Instead, it puts them in control of the situation and you'll get to see a lot more of how it's like to work with them on a daily basis. &lt;/li&gt;
&lt;li&gt;You won't see much of that 👆🏻 with a coding kata or an over-simplified feature development exercise.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Train people on how to interview candidates&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Especially for bigger organizations: train your interviewers in conducting conversational and technical interviews. They're the face of the company to potential employees. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Live coding interviews&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Especially for kata style ones, make sure the candidate is aware of how many problems they'll go through during the call and give them an estimate of time budget for each one. &lt;/li&gt;
&lt;li&gt;Mention if they're going overtime with one problem and give the option to move one to the next or work on solving the current one.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Pitching the project&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;When reaching the final stages of interviewing, especially if you're a small/medium company, prepare your interviewers in pitching the team and the company to candidates&lt;/li&gt;
&lt;li&gt;Those final conversations usually make or break the deal for people trying to decide between more than one offer.&lt;/li&gt;
&lt;li&gt;If you have all positive feedback across the board about a candidate, &lt;strong&gt;make sure you can give them an offer that's interesting to them&lt;/strong&gt;. 

&lt;ul&gt;
&lt;li&gt;By this &lt;strong&gt;I don't mean money&lt;/strong&gt;: most experienced candidates will get similar offers and you can probably match whatever they're getting somewhere else. &lt;/li&gt;
&lt;li&gt;Pitch them a position and a project that they'll feel excited about, and it might even be worth not going for the highest paying offer! &lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Give feedback to candidates&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;This can be before the interview ends&lt;/li&gt;
&lt;li&gt;It can be in "catch up" talks with the recruiter&lt;/li&gt;
&lt;li&gt;It can be as a warm up before making an offer&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;And it should definitely be there if the company drops a candidate&lt;/strong&gt;, especially after the candidate requests it.&lt;/li&gt;
&lt;li&gt;Idea 💡: ask candidates for feedback of each interview!&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;That's it, thanks for reading this far, please leave comments about your own experiences interviewing and being interviewed.&lt;/p&gt;

&lt;p&gt;I hope some of this is useful for you in 2022!&lt;/p&gt;

</description>
      <category>career</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>react</category>
    </item>
    <item>
      <title>Hack The Weather: our NewRelic hackathon submission</title>
      <dc:creator>anabella</dc:creator>
      <pubDate>Mon, 01 Mar 2021 07:58:44 +0000</pubDate>
      <link>https://dev.to/anabella/hack-the-weather-our-newrelic-hackathon-submission-59gk</link>
      <guid>https://dev.to/anabella/hack-the-weather-our-newrelic-hackathon-submission-59gk</guid>
      <description>&lt;p&gt;&lt;strong&gt;Hack The Weather&lt;/strong&gt; is an app that uses historical weather data to show today's average temperature in a city as well as what was the temperature on the same day 1, 2, 3, 4 and (almost) 5 decades ago (that's as far as the API's historical data goes).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6mfdTVoA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vgbp9n8eq2h352jtdeor.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6mfdTVoA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/vgbp9n8eq2h352jtdeor.png" alt="Today's weather in Barcelona, Catalunya"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To learn more about how we built it, how we integrated NewRelic into it and get a link to the live version so you can search for your city, visit &lt;a href="https://www.therelicans.com/anabellaspinelli/hack-the-weather-with-historical-weather-data-58c1"&gt;our official hackathon submission at The Relicans.&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;We built it together with my friend and colleague &lt;a href="https://dev.to/albarin"&gt;Albarin&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Leave us your comments!&lt;/p&gt;

</description>
      <category>hacktheplanet</category>
      <category>react</category>
      <category>node</category>
      <category>newrelic</category>
    </item>
    <item>
      <title>First impressions of Epic React by Kent C. Dodds</title>
      <dc:creator>anabella</dc:creator>
      <pubDate>Wed, 13 Jan 2021 19:01:12 +0000</pubDate>
      <link>https://dev.to/anabella/first-impressions-of-epic-react-by-kent-c-dodds-1oc2</link>
      <guid>https://dev.to/anabella/first-impressions-of-epic-react-by-kent-c-dodds-1oc2</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;This is my first post on a series the Epic React courses. This one is about my first impressions and opinions on the course in general (tl;dr I think it's great!), while the upcoming ones will focus on the content covered on each section. Stay tuned for more!&lt;/em&gt; &lt;/p&gt;
&lt;/blockquote&gt;




&lt;p&gt;I purchased my subscription to &lt;a href="https://epicreact.dev"&gt;Kent C. Dodds' Epic React course&lt;/a&gt; when it came out last year, but I hadn't been able to start it until yesterday. I knew from &lt;a href="https://testingjavascript.com/"&gt;other courses by him&lt;/a&gt; that it would be great, so I wanted to make sure I had time in my schedule for it before I began using it.&lt;/p&gt;

&lt;p&gt;Now that the new year is in, I decided it was about time I saw what it was all about. And so last night I watched the first chapter.&lt;/p&gt;

&lt;h1&gt;
  
  
  Welcome to Epic React 🚀
&lt;/h1&gt;

&lt;p&gt;I was instantly surprised by this initial tour of the course. As first impressions go, this looks like way beyond any other online course I've ever done. More so, it feels like the best parts of every online course I've done, optimized to work together and cater to anyone's learning habits and preferences.&lt;/p&gt;

&lt;p&gt;What do I mean?&lt;/p&gt;

&lt;h2&gt;
  
  
  E-learning, the good parts 👩🏻‍💻
&lt;/h2&gt;

&lt;p&gt;What are those awesome parts that (I think) Kent noticed and put together in just the right combination?&lt;/p&gt;

&lt;h3&gt;
  
  
  Video tutorials 🍿
&lt;/h3&gt;

&lt;p&gt;It's no secret that many people prefer watching a video course or tutorials over reading a book on a certain subject. There's so much more that you get from having someone just &lt;em&gt;tell it to you&lt;/em&gt; instead of reading it yourself. To start with, listening to a real person speaking, using their voice and emphasizing on things, not just words on a page, really makes a difference. That sort of thing is usually really hard to convey in written word, especially in the formal writing often found in books. And in the end it really makes a difference in making the learning process feel more informal and relaxed.&lt;/p&gt;

&lt;p&gt;But videos (or books) are never enough, if you can't get your hands dirty with the code. That's cool though, Epic React's got you covered:&lt;/p&gt;

&lt;h3&gt;
  
  
  Interactive tools 👾
&lt;/h3&gt;

&lt;p&gt;The first thing that surprised me about Kent's course is that it's a full product and not just a library of video tutorials. The course comes with a dedicated application you can run locally and use to&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;read about the current exercise, &lt;/li&gt;
&lt;li&gt;see the result of your code, and what the final result should look like&lt;/li&gt;
&lt;li&gt;as well as using some handy tools to control network calls.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Similar to the classic Codecademy-style apps, this is your control panel for learning.&lt;/p&gt;

&lt;p&gt;Ah, but I remember taking my first ever coding lessons in Codecademy (back in 2012 or so) and feeling like the learning was good but partial, because I had literally no idea how to create and run code that actually did something outside of the learning platform. And that's why many other types of courses give students:&lt;/p&gt;

&lt;h3&gt;
  
  
  Project Files 🗂
&lt;/h3&gt;

&lt;p&gt;I remember first learning Javascript within a learning webapp, kind of intuitively knowing that "Javascript runs in the browser" but having no idea how to actually make a browser run my code, let alone make it interact with a page.&lt;/p&gt;

&lt;p&gt;This is another ingredient in Epic React that contributes to enhancing your learning experience. You get to see your code run in a real environment, like it would if you were building an app and not just solving exercises.&lt;/p&gt;

&lt;h3&gt;
  
  
  The more the merrier 👯‍♀️
&lt;/h3&gt;

&lt;p&gt;The courses also provides a detailed explanation of each exercise (to add to Kent's videos explaining the subject), together with links and references you're encouraged to consult in order to expand your understanding.&lt;/p&gt;

&lt;p&gt;Solving the basic tasks seems to be more or less straight forward with the help of the courses cast of code comment emoji (most notably Kody the Koala 🐨) so that you don't spend much time trying to "please" the exercise checker into accepting your solution: I know I've been through that and it can be both frustrating and distracting from what you're trying to achieve.&lt;/p&gt;

&lt;p&gt;But if you're into challenges you can take on the extra credit for a less hand-holdy experience. I believe solving problems on my own is one of the best ways to solidify new knowledge.&lt;/p&gt;

&lt;h3&gt;
  
  
  The cherry on top 🍒
&lt;/h3&gt;

&lt;p&gt;To top it all Kent has created a Discord community for learners, and even a model for people to create their own learning clubs to stay motivated and learn from each other. This, I think, is the most innovative and generous thing added to this course. It really feels like it's providing every tool available for us to succeed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion 😃
&lt;/h2&gt;

&lt;p&gt;Without even starting any of the actual material I can tell that this is miles ahead of any other course out there. I can't wait to start watching the next chapter: &lt;strong&gt;React Fundamentals&lt;/strong&gt;. &lt;/p&gt;




&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Well, thank you for reading this far! These were my first impressions on Kent C. Dodds' Epic React course and what it proposes as a learning platform. I hope you enjoyed it!&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>react</category>
      <category>learning</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Emoji traffic jam generator!</title>
      <dc:creator>anabella</dc:creator>
      <pubDate>Sat, 09 Jan 2021 18:33:34 +0000</pubDate>
      <link>https://dev.to/anabella/emoji-traffic-jam-generator-b84</link>
      <guid>https://dev.to/anabella/emoji-traffic-jam-generator-b84</guid>
      <description>&lt;h2&gt;
  
  
  What I built
&lt;/h2&gt;

&lt;p&gt;I built an emoji traffic jam generator. It generates a 16x16 grid in which it draws a cross junction using ascii &lt;a href="https://en.wikipedia.org/wiki/Box-drawing_character" rel="noopener noreferrer"&gt;Box-drawing characters&lt;/a&gt; and then fills it up with (mostly) random emoji. The only fixed parts are the junction layout and the traffic lights (as they tend to not move much).&lt;/p&gt;

&lt;h3&gt;
  
  
  Category Submission:
&lt;/h3&gt;

&lt;p&gt;Random Roulette&lt;/p&gt;

&lt;h3&gt;
  
  
  App Link
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://emoji-jam-rjlxe.ondigitalocean.app/" rel="noopener noreferrer"&gt;https://emoji-jam-rjlxe.ondigitalocean.app/&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Screenshots
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fg4gut13aredizffluz1z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fg4gut13aredizffluz1z.png" alt="Emoji traffic jam generator 1"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Description
&lt;/h3&gt;

&lt;p&gt;I've been meaning to build some pattern generator using emoji for a long time. I've thought of an emoji forest, aquarium or sky (with birds, clouds, and flying things!). In the end I decided to try find beauty in something ugly: a traffic jam.&lt;/p&gt;

&lt;p&gt;The hardest part was building the logic for the grid. I've never done anything like that and it felt like I was lacking some math skills. But anyway, I solved it the easy/brute-force way. I bet there's probably smarter ways of achieving the same. Luckily I can count on React for performance optimizations.&lt;/p&gt;

&lt;h3&gt;
  
  
  Link to Source Code
&lt;/h3&gt;

&lt;p&gt;&lt;a href="https://github.com/anabellaspinelli/emoji-jam" rel="noopener noreferrer"&gt;https://github.com/anabellaspinelli/emoji-jam&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Permissive License
&lt;/h3&gt;

&lt;p&gt;The MIT license&lt;/p&gt;

&lt;h2&gt;
  
  
  Background
&lt;/h2&gt;

&lt;p&gt;I wanted to build something to generate art from random emojis for a long time. I will work on other emoji pattern generators in the future!&lt;/p&gt;

&lt;h3&gt;
  
  
  How I built it
&lt;/h3&gt;

&lt;h4&gt;
  
  
  The grid
&lt;/h4&gt;

&lt;p&gt;At first I drew the thing I wanted to build in a Sublime  Text notepad, to see how it could look and start to understand the challenges ahead:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fs0axd8marep3i6gnzrm2.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fs0axd8marep3i6gnzrm2.png" alt="Sublime Text sketch of an emoji traffic jam"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Then I "normalized" it into a grid in a GSheets document:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F9ezufy4nf1um7t6fzg49.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2F9ezufy4nf1um7t6fzg49.png" alt="Spreadsheet grid designing"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This served as a very useful reference throughout the building of the whole project.&lt;/p&gt;

&lt;h4&gt;
  
  
  Trial and error
&lt;/h4&gt;

&lt;p&gt;My first attempt was of generating "horizontal strings" that I would stack on top of each other, but I quickly found that this presented some issues in aligning the characters and that it would make it really hard to scale into something more advanced if I ever wanted to (animating it for example).&lt;/p&gt;

&lt;p&gt;I quickly went for the grid option, creating an array of "rows" and  flattening it at the time of render. Each row knows where to draw the street lines characters, and where to go fetch for some random emoji: sometimes it's sideways cars, sometimes it's frontal cars, and sometimes it's scenery (buildings, trees, pedestrians).&lt;/p&gt;

&lt;h4&gt;
  
  
  Style the tile
&lt;/h4&gt;

&lt;p&gt;The last bit was fun too: using complex CSS selectors to paint different cells light or dark gray and transform them in order to flip the emoji. Thinking back I think I might refactor it into CSS classes, being that each cell "knows" what role it plays when it's filled. But hey, it's a hackathon after all!&lt;/p&gt;

&lt;h4&gt;
  
  
  Layout
&lt;/h4&gt;

&lt;p&gt;Then came the final touches, creating a nice playful layout that would also work on mobile. Nothing too fancy. &lt;/p&gt;

&lt;h3&gt;
  
  
  Next steps
&lt;/h3&gt;

&lt;p&gt;The next steps would be improving the hacky hackathony code into something more scalable, exporting as an image, and playing with adding some controls to the generator:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Sidewalks option (with pedestrians!)&lt;/li&gt;
&lt;li&gt;Middle lane with plants option&lt;/li&gt;
&lt;li&gt;Cars/trucks ratio&lt;/li&gt;
&lt;li&gt;Some hidden easter eggs!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I hope you like it, let me know what you think in the comments! :D &lt;/p&gt;

</description>
      <category>dohackathon</category>
      <category>emoji</category>
      <category>art</category>
      <category>generativeart</category>
    </item>
    <item>
      <title>The self-confidence toolbox for job interviews</title>
      <dc:creator>anabella</dc:creator>
      <pubDate>Tue, 02 Jul 2019 13:09:56 +0000</pubDate>
      <link>https://dev.to/typeform/the-self-confidence-toolbox-for-job-interviews-4k3j</link>
      <guid>https://dev.to/typeform/the-self-confidence-toolbox-for-job-interviews-4k3j</guid>
      <description>&lt;p&gt;One of the biggest challenges I faced when starting my career in software engineering was &lt;strong&gt;applying and interviewing for jobs&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;I went through &lt;em&gt;a ton&lt;/em&gt; of interviewing processes, and for most of them, I was unprepared and under-qualified. In spite of this, I realised that every not-so-good interview helped me improve my "technique" and become more confident.&lt;/p&gt;

&lt;p&gt;Then, about a year ago, I started participating in the other side of interviews, that much more comfortable side of the conversation: interviewing candidates instead of being a candidate myself. This change in perspective allowed me to observe interviewing in more detail (and with less stress) and reflect on all the things that I've learned about it.&lt;/p&gt;

&lt;p&gt;This post describes tactics that helped me reduce stress during those conversations, as well as some mental tools I used to frame the interviewing process and ultimately be more confident about my performance, whatever the outcome.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Getting an interview means you’re already 50% in&lt;/strong&gt; 🌓
&lt;/h4&gt;

&lt;p&gt;I know it doesn't feel like it, but it is often true. A friend of mine used to say this, and I didn't believe him. Years later, I realised that companies only spend time talking to candidates who they already suspect might be a good fit. If they asked you in for an interview, they want to learn more.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;You're also interviewing them&lt;/strong&gt; 👀
&lt;/h4&gt;

&lt;p&gt;Yes, you're being evaluated during an interview. But it’s a two-way street: the interview is also your chance to evaluate the company as a potential employer and learn whether the company and team are a good fit for you. It's important (and empowering) to keep this in mind during the interview–you’re also trying to find out if &lt;strong&gt;you&lt;/strong&gt; want to work there.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Tell your story&lt;/strong&gt; 📜
&lt;/h4&gt;

&lt;p&gt;This is an elevator pitch about yourself, and pitches need a good story. So, how can you describe your experience and objectives in a way that captivates others? Find that story you want to tell, and once you have it, keep working on that narrative to make it engaging. &lt;/p&gt;

&lt;p&gt;You don’t have to recite your resumé by heart. Instead, fill in the gaps between every milestone, from your own human perspective. Think about the most relevant point in time to start from, then pick and choose the events you tell so that they follow a logical, purposeful path. You're not trying to prove anything–instead, focus on making them remember you.&lt;/p&gt;

&lt;p&gt;In my case, my "story" changed every time I was looking for a new job: I would usually explain how each of my previous jobs contributed to my professional growth and what I was looking for next. I found that it would take me a couple of tries before I had my story clear enough in my mind to be able to transmit it to others.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Please don't lie!&lt;/strong&gt; 🤥
&lt;/h4&gt;

&lt;p&gt;Lying will just make you more nervous. I've done it, and it backfired. I still remember that interview as the worst in my life.&lt;/p&gt;

&lt;p&gt;You can, however, frame the truth without lying. For example, instead of saying, &lt;em&gt;"I don't know anything about React..."&lt;/em&gt; you could say, &lt;em&gt;"I've heard about React and its popularity…although I haven't used it yet, I'm curious and would like to give it a try."&lt;/em&gt;&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Ask questions&lt;/strong&gt; 🗣
&lt;/h4&gt;

&lt;p&gt;I used to get very nervous when interviewers asked me if I had any questions for them until I understood that I needed to think of some questions in advance and adapt those to the specific context of each conversation.&lt;/p&gt;

&lt;p&gt;So, prepare some questions beforehand. Do a little research about the company and think about what you're looking for in a new job and what you care about (remember, you're also interviewing &lt;em&gt;them&lt;/em&gt;).&lt;/p&gt;

&lt;p&gt;Think about what you'd like to ask and what you want to communicate with your questions. The interviewer’s answers will give you a deeper understanding of the job and your questions will show them the things you care most about.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;Trust them, they know&lt;/strong&gt; 👥
&lt;/h4&gt;

&lt;p&gt;This is one of my favourite tools in the self-confidence toolbox. There may be times when you feel you're not good enough for the job. &lt;em&gt;Ye olde imposter syndrome, right?&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Well my best tool against this is simply putting my trust in the people doing the interviews: telling myself, &lt;em&gt;"They know."&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Why? Because they have a lot more context about the company, the team, and the position, and they're more likely to assess the situation correctly. So if I'm feeling like I might not be up to challenge, I just tell myself: &lt;em&gt;"You don't know that. They do."&lt;/em&gt; Remember my first point: companies spend time with candidates they already think might be a good fit.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;There's no such thing as being too interested&lt;/strong&gt; 🙇🏽‍♀️
&lt;/h4&gt;

&lt;p&gt;It's &lt;strong&gt;totally OK&lt;/strong&gt; to express your interest up front and ask for feedback or updates throughout the process. It's also a great strategy to go the extra mile to demonstrate it. If you really want to land a particular job, ask yourself, &lt;em&gt;"What can I do to stand out from every other candidate?"&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;When I was interviewing for my current job, I decided I would go an extra 2 or 3 miles because I wanted the job &lt;em&gt;so badly.&lt;/em&gt; Before my coding interview I researched the company's APIs and created a suite of acceptance tests for them. I wrote an email to HR, asking if they would be interested in reviewing the project during the upcoming interview. Even if my small project wasn't anything special, they were impressed with my commitment, and I think that played a great part in the outcome.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;It's not you, it's them&lt;/strong&gt; 💔
&lt;/h4&gt;

&lt;p&gt;Rejection is gonna happen…and it's probably not about you. Many factors come into play during a hiring process, and the ones that are not related to you greatly outnumber the ones that are about you specifically. The best you can do is ask for feedback, reflect on what you've learned, and use it to feel more confident in your performance next time.&lt;/p&gt;




&lt;h3&gt;
  
  
  In the end, they want this as much as you do 👯‍♀️
&lt;/h3&gt;

&lt;p&gt;The people interviewing you are spending time getting to know you because they think you might be a great fit. They're not looking to rule you out, but quite the opposite: &lt;em&gt;they want you to succeed&lt;/em&gt;.&lt;/p&gt;

&lt;p&gt;The hiring process can feel like a series of challenges to overcome to get a prize–challenges that the interviewers want most candidates to fail. This is not the case: they &lt;em&gt;should&lt;/em&gt; want you to succeed and they &lt;em&gt;should&lt;/em&gt; help you get there. But if it feels like the interviewers pressure you and want to see you at your limit, maybe it’s not the best place for you after all.&lt;/p&gt;

&lt;p&gt;Also, if you’re working with a recruiter, remember that it's their job to get a hire. Don't forget to use this to your advantage, let them help you: listen to what they say, as they have a lot of useful insights that can help you perform better.&lt;/p&gt;

&lt;p&gt;I once asked for 2 weeks of preparation for a coding interview, saying that I was a bit rusty with the subject we'd be covering in the test. Truth is I wasn't rusty, I had no experience with the subject at all. During the interview I asked to look at my own study files to recall something and it was &lt;em&gt;fine&lt;/em&gt;. In the end it all went well and I passed the interview.&lt;/p&gt;




&lt;h2&gt;
  
  
  A final note about coding interviews 🖥
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimages.unsplash.com%2Fphoto-1506452819137-0422416856b8%3Fixlib%3Drb-1.2.1%26ixid%3DeyJhcHBfaWQiOjEyMDd9%26auto%3Dformat%26fit%3Dcrop%26w%3D1266%26q%3D80" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fimages.unsplash.com%2Fphoto-1506452819137-0422416856b8%3Fixlib%3Drb-1.2.1%26ixid%3DeyJhcHBfaWQiOjEyMDd9%26auto%3Dformat%26fit%3Dcrop%26w%3D1266%26q%3D80" alt="Photo by Kevin Ku on Unsplash"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This article focuses mostly on the "talking" part of interviews, but I feel there are a couple things left to be said about live coding interviews.&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;It’s OK to say "I don't know"&lt;/strong&gt; 🤷‍♀️
&lt;/h4&gt;

&lt;p&gt;There's no shame in saying &lt;em&gt;"I don't know that."&lt;/em&gt; Take it as another opportunity to evaluate them as an employer. They should be able to explain a task or concept to you and give you the opportunity to show how easily you can pick up something new and apply it right away.&lt;/p&gt;

&lt;p&gt;This has happened to me twice, and it turned out to be a great learning experience. On one occasion, I got the chance to ask questions and demonstrate my learning process, and on the other I showed my Googling skills. In the end, I got both jobs!&lt;/p&gt;

&lt;h4&gt;
  
  
  &lt;strong&gt;It's not about the code&lt;/strong&gt; 💫
&lt;/h4&gt;

&lt;p&gt;While you're coding or white-boarding, think out loud as much as you can. Coding interviews aren't supposed to be about producing perfect code on the first try. They're about your thought process and your ability to think of solutions, debug problems, and communicate your ideas. Turn it into a conversation.&lt;/p&gt;




&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Easier said than done, right? I agree, but these strategies do make interviewing less stressful. They allow you to step back and approach interviewing not as a stress-filled contest to win a job but as a process that helps both sides evaluate whether the fit is right. Plus, the more you practice, the easier it gets.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Have you used anything similar to these tools before? Do you have others? Drop them in the comments!&lt;/em&gt; 😉 &lt;em&gt;I'd love to read them!&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>beginners</category>
      <category>career</category>
      <category>interview</category>
    </item>
    <item>
      <title>I built a site for Pride month!</title>
      <dc:creator>anabella</dc:creator>
      <pubDate>Thu, 27 Jun 2019 15:59:59 +0000</pubDate>
      <link>https://dev.to/anabella/i-built-a-site-for-pride-month-5gmg</link>
      <guid>https://dev.to/anabella/i-built-a-site-for-pride-month-5gmg</guid>
      <description>&lt;p&gt;&lt;em&gt;Cover Photo by &lt;a href="https://unsplash.com/@stavrialena?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;Stavrialena Gontzou&lt;/a&gt; on Unsplash&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Hey lovely &lt;strong&gt;DEV&lt;/strong&gt; community!&lt;/p&gt;

&lt;p&gt;I'm writing this short post to show you a small website that I built using just HTML and CSS 😁 &lt;em&gt;Yay! Old times!&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;I always wanted to work on a project for Pride month but I could never think of something in time. Until this month I started seeing a lot of pride-themed brands using "the wrong colors" &lt;em&gt;*gasp*&lt;/em&gt; 😱&lt;/p&gt;

&lt;p&gt;So I did some research on the subject. And by "research" I mean that I read the Wikipedia article on &lt;a href="https://en.wikipedia.org/wiki/Rainbow_flag"&gt;Rainbow Flags&lt;/a&gt; and realised it's not really that easy.&lt;/p&gt;

&lt;p&gt;Usually people think the LGBTQ+ Pride flag needs to have 7 colors: "the colors of the rainbow", but that's not really the case. When this happens they end up using the &lt;a href="https://en.wikipedia.org/wiki/Cooperative"&gt;Cooperativism Movement&lt;/a&gt; flag, instead of the widely accepted (but not exclusively recognised) Pride flag.&lt;/p&gt;

&lt;p&gt;What I found is that there's no final truth about what's the correct one, but after struggling a lot with myself thinking if it made sense to make this website or not I finally decided that it's just for fun and set out for it. And, a couple of days later, it's ready.&lt;/p&gt;

&lt;p&gt;🥁 &lt;em&gt;drumroll&lt;/em&gt; 🥁&lt;/p&gt;

&lt;p&gt;Here it is: &lt;a href="https://pride-or-coop.fyi"&gt;Pride or Coop?&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;I hope you like it and can use it as a reference when in doubt!&lt;/em&gt;&lt;/p&gt;

</description>
      <category>pride</category>
      <category>webdev</category>
      <category>showdev</category>
    </item>
    <item>
      <title>A junior, a mid and a senior dev walk into a bar</title>
      <dc:creator>anabella</dc:creator>
      <pubDate>Sat, 29 Dec 2018 16:12:43 +0000</pubDate>
      <link>https://dev.to/anabella/a-junior-a-mid-and-a-senior-dev-walk-into-a-bar-414f</link>
      <guid>https://dev.to/anabella/a-junior-a-mid-and-a-senior-dev-walk-into-a-bar-414f</guid>
      <description>&lt;p&gt;&lt;em&gt;Gather 'round and let me tell you about that time my teammates and I took down one of the platform's most critical services.&lt;/em&gt; &lt;/p&gt;

&lt;p&gt;&lt;em&gt;For the sake of narrative, I’ll name my coworkers S (senior) and M (middle), although I changed the dates and some of the technical details in an effort to keep things as anonymous as possible.&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;T’was a lovely Thursday afternoon at the end of July. Weather was milder than the days before and my teammates and I had just moved into a new space in the office. &lt;/p&gt;

&lt;p&gt;Life was mostly good. &lt;/p&gt;

&lt;p&gt;The week before had passed without the presence of our most senior dev, &lt;code&gt;S&lt;/code&gt;, but &lt;code&gt;M&lt;/code&gt; and I had managed to complete some tasks on our own.&lt;/p&gt;

&lt;p&gt;The changes we introduced had some pretty heavy stuff (new database fields, new endpoints) so we decided to wait for S's review before we merged them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Database changes and migrations 📚
&lt;/h2&gt;

&lt;p&gt;In the meantime another dev reviewed our changes and mentioned that the operations in our migration scripts could be a lot of work for the database server and could keep it locked for a while. So he suggested some alternatives.&lt;/p&gt;

&lt;p&gt;If you don’t know what a &lt;strong&gt;database migration&lt;/strong&gt; is, it’s a series of SQL scripts that — when executed sequentially — create the whole database schema from scratch (tables, columns, default values, constraints, etc.). Usually they run on every deployment, but only if there’s something new to apply––that is, a new migration script that has never been run.&lt;/p&gt;

&lt;p&gt;We didn’t want to run our change as a migration because then it would be executed by our continuous integration system which would be completely out of our control if something went wrong. &lt;/p&gt;

&lt;p&gt;We had to run it manually. &lt;/p&gt;

&lt;p&gt;So, we sat down with a replica of the production database and started playing around with queries trying to find the most efficient alternative.&lt;/p&gt;

&lt;p&gt;This was a fun while, the 3 of us trying to guess what would happen when we ran each script line separately. Would it take long? Or run instantly? And why? Where should we set the default value to prevent new entries from breaking it?&lt;/p&gt;

&lt;h2&gt;
  
  
  Showtime! 👯‍♀️
&lt;/h2&gt;

&lt;p&gt;Now it was 5 PM and we were finally happy with our query. It did everything in the right order and didn’t really lock down for very long. We sent a ticket to the infrastructure team to run it directly on our servers, since obviously we didn't have credentials for that. &lt;em&gt;You’ll see exactly why in just a moment.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Infra was &lt;em&gt;really&lt;/em&gt; diligent about this. We know they’re a busy bunch, and it’s okay if they take a while to do stuff. But not this time, oh no, this time the ticket was closed before I could blink twice.&lt;/p&gt;

&lt;p&gt;Everything seemed ok. It was almost the end of the day so we split into our own desks and finished some tasks.&lt;/p&gt;

&lt;p&gt;Some minutes later, a member of another team came by and asked me if we were changing stuff on that feature because it was throwing some errors. This hit me like an ice-bucket-challenge:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Oh no, I mean, yes… we f***ed it up.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;em&gt;Can you guess what happened? I know it’s harder to find omissions than to find mistakes, but I think you could be able to know what we needed to do (and didn’t) without knowing the service, the feature, or the queries.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;If you do, scroll to the bottom and comment it, I’ll trust you’re not peeping below this photo 👇&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkxziblwh046mm0s6kkni.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/cdn-cgi/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fkxziblwh046mm0s6kkni.jpeg" alt="_Photo by 胡 卓亨 on Unsplash_" width="800" height="533"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Alright, if you have no idea what could have happened, that’s OK too. I feel I should have known, because this happened locally during development like a million times. And I had been starting a very similar feature on my own that day and dealing with the same error.&lt;/p&gt;

&lt;p&gt;Ready for it?&lt;/p&gt;

&lt;h2&gt;
  
  
  Reality hits hard 👊
&lt;/h2&gt;

&lt;p&gt;We added the column in the database, &lt;em&gt;but we never merged the code that handled this new data&lt;/em&gt;. This resulted in the application not knowing WTF to do with those fields, and throwing errors &lt;strong&gt;on all GET requests&lt;/strong&gt; 😱&lt;/p&gt;

&lt;p&gt;Now, this might not have happened in some languages, which probably would have discarded the extra, unparsed data and moved on. I shouldn't disclose any more information about this, but I’ll say that we were using a technology that’s not as chill about rogue database columns, it demands that you tell it how to handle everything it receives.&lt;/p&gt;

&lt;p&gt;Not merging the code for the new fields wasn’t the problem though. Here’s where our little evil villain comes in: meet &lt;code&gt;*&lt;/code&gt; 😈 &lt;em&gt;malefic, echoing laughter&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;See, all of our retrieval queries were using the &lt;code&gt;*&lt;/code&gt; (known as an asterisk or star), which means results will include every field on the table. This was the day I learned this is a &lt;em&gt;very very very bad idea.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;If we had had a list of the fields to retrieve instead of &lt;code&gt;*&lt;/code&gt; nothing bad would have happened. But we didn't. And all 3 of us knew it. It just slipped our minds 😰&lt;/p&gt;

&lt;h2&gt;
  
  
  The real, real problem 🤦🏻‍♀️
&lt;/h2&gt;

&lt;p&gt;OK but, we’re humans, right? We make mistakes. No-one can keep all of the codebases in a company in their working memory. This is why we have tests. Not because our code is fragile and error prone, but because our minds are. And it’s our minds that create the code.&lt;/p&gt;

&lt;p&gt;So the problem wasn’t really that we broke it. The problem was that &lt;em&gt;no alarms went off.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;We had production tests, but they weren’t notifying anyone. We had error alarms in the logs, but they weren’t monitoring the thing that caused the most errors. We had end-to-end tests, but they were disabled and marked as “broken”. This is what was truly unacceptable 🍋&lt;/p&gt;

&lt;h2&gt;
  
  
  Epilogue 📜
&lt;/h2&gt;

&lt;p&gt;Ultimately, though, it was a big opportunity for learning: you never learn as hard as when you f*** up. That’s a lesson that never leaves you.&lt;/p&gt;

&lt;p&gt;So, for you children out there, here’s my list of learnings from that day:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;NEVER, I MEAN NEVER&lt;/strong&gt; use * in a query in your code. Even if you have to write one hundred column names, it's better like that.&lt;/li&gt;
&lt;li&gt;Be scared of database changes, may fear guide you into caution.&lt;/li&gt;
&lt;li&gt;Migrations should be decoupled from deploys, in order to provide better control over them.&lt;/li&gt;
&lt;li&gt;When you introduce a database change, make sure all the code is already in place and that it can handle the previous db state, and the one after the change.&lt;/li&gt;
&lt;li&gt;Have happy-path tests in place running on production for your critical features, working and notifying the right people.&lt;/li&gt;
&lt;li&gt;Test database changes as soon as they are impacted and monitor the logs for a couple of minutes later (depending on the amount of traffic that you get).&lt;/li&gt;
&lt;li&gt;Aaand brush your teeth before you go to sleep 😬&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Disclaimer ⚠️
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;This is a story told by the less experienced and knowledgeable of its characters. If you have any input about it, to add to or correct what I say I would really enjoy reading it, but please be nice about it.&lt;/em&gt; 🙂&lt;/p&gt;




&lt;h4&gt;
  
  
  Credits
&lt;/h4&gt;

&lt;p&gt;&lt;em&gt;Cover Photo by &lt;a href="https://unsplash.com/photos/8gLBzBob4U8?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;Sebastian Fröhlich&lt;/a&gt; on &lt;a href="https://unsplash.com/" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;&lt;/em&gt;&lt;br&gt;
&lt;em&gt;Photo by &lt;a href="https://unsplash.com/photos/8mZdmmAUCHw?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText" rel="noopener noreferrer"&gt;胡 卓亨&lt;/a&gt; on &lt;a href="https://unsplash.com/" rel="noopener noreferrer"&gt;Unsplash&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Thanks to &lt;a href="https://dev.to/picsoung"&gt;Nicolas Grenié a.k.a. @picsoung&lt;/a&gt; and &lt;a href="https://medium.com/@1KHats" rel="noopener noreferrer"&gt;Eva Casado de Amezua&lt;/a&gt; for their reviews and input.&lt;/em&gt;&lt;br&gt;
&lt;em&gt;This story was originally published in &lt;a href="https://hackernoon.com/a-junior-a-middle-and-a-senior-dev-walk-into-a-bar-and-they-order-an-alter-table-36d7bf650d33" rel="noopener noreferrer"&gt;HackerNoon.&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>career</category>
      <category>beginners</category>
    </item>
    <item>
      <title>A peep beneath the hood of PassportJS' OAuth flow</title>
      <dc:creator>anabella</dc:creator>
      <pubDate>Mon, 03 Dec 2018 21:50:36 +0000</pubDate>
      <link>https://dev.to/anabella/a-peep-beneath-the-hood-of-passportjs-oauth-flow-eb5</link>
      <guid>https://dev.to/anabella/a-peep-beneath-the-hood-of-passportjs-oauth-flow-eb5</guid>
      <description>&lt;p&gt;Libraries are great. They provide standardized, widely compatible and clean way of doing common tasks, abstracting away the details we usually don't care about. They help us not to worry about the specifics of authentication, database handling or form validation and just write the code for that thing we have in mind.&lt;/p&gt;

&lt;p&gt;But then, what happens when something doesn't work as expected? How do you know what went wrong if you're just pushing buttons on a black box?&lt;/p&gt;

&lt;p&gt;Sooner or later it's necessary to understand how our borrowed libraries do that &lt;em&gt;little thing they do&lt;/em&gt; 🎶 to figure out where we (or them) took a wrong turn and be able to correct it.&lt;/p&gt;

&lt;p&gt;This was the case for me when I decided to learn about &lt;a href="http://www.passportjs.org" rel="noopener noreferrer"&gt;PassportJS&lt;/a&gt; for a personal project. And in this article I intend to dig into what I found most elusive about handling an OAuth flow with PassportJS.&lt;/p&gt;

&lt;p&gt;If you need a full tutorial on how to implement PassportJS for OAuth, as always, I recommend &lt;a href="https://www.youtube.com/watch?v=sakQbeRjgwg&amp;amp;list=PL4cUxeGkcC9jdm7QX143aMLAqyM-jTZ2x" rel="noopener noreferrer"&gt;the one by the wonderful Net Ninja on YouTube&lt;/a&gt;. Or if you just want a refresher about how to dance the OAuth, you can visit &lt;a href="https://dev.to/anabella/dancing-with-oauth-emp"&gt;my previous article&lt;/a&gt; on the subject.&lt;/p&gt;

&lt;h1&gt;
  
  
  Index
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;Basic PassportJS setup&lt;/li&gt;
&lt;li&gt;Calling authenticate&lt;/li&gt;
&lt;li&gt;Road to the &lt;code&gt;verify&lt;/code&gt; callback&lt;/li&gt;
&lt;li&gt;WTF is serialize and deserialize&lt;/li&gt;
&lt;li&gt;The complete login flow&lt;/li&gt;
&lt;li&gt;The authenticated request flow&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Basic PassportJS setup
&lt;/h3&gt;

&lt;p&gt;These are the only things we need to get started: &lt;strong&gt;a passport strategy&lt;/strong&gt; that's properly configured and &lt;strong&gt;2 endpoints&lt;/strong&gt; (one for authorizing, the other for redirecting) .&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h3&gt;
  
  
  Calling authenticate
&lt;/h3&gt;

&lt;p&gt;The great thing about Passport is that you can register any number of strategies with it and then tell it which one to use according to the route that's being called, using the authenticate method, like so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;passport&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;authenticate&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;github&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When you configure one of the strategies you'll have to define some parameters and also a &lt;strong&gt;verify callback function&lt;/strong&gt; that will handle the user data it gets back from the provider.&lt;/p&gt;

&lt;p&gt;The weird thing, at least for me, was the reason behind having to call &lt;code&gt;passport.authenticate()&lt;/code&gt; in two different routes.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;But here's the trick:&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;The &lt;strong&gt;first&lt;/strong&gt; time &lt;code&gt;authenticate()&lt;/code&gt; is called passport will try to find if it has a strategy by the name of the string you pass to the function previously registered. If it does, it'll start the OAuth dance by hitting the provider's authorize endpoint. If it doesn't find it, it'll just throw an error saying that strategy is unknown.&lt;/p&gt;

&lt;p&gt;Now, the &lt;strong&gt;second&lt;/strong&gt; time it's called is within a callback from the provider's OAuth server, in the &lt;strong&gt;redirect&lt;/strong&gt; route. This time, though it looks exactly the same, Passport will detect that it's on the second stage of the OAuth flow and tell the strategy to use the temporary code it just got to ask for an OAuth token. The strategy knows exactly how and where to ask for that. &lt;/p&gt;

&lt;p&gt;What happens after this?&lt;/p&gt;

&lt;h3&gt;
  
  
  Road to the verify callback
&lt;/h3&gt;

&lt;p&gt;Have a look at my latest hand drawn creation, a diagram about the OAuth flow in PassportJS. At this point we're reaching that red bubble that says &lt;code&gt;getProfile()&lt;/code&gt;:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F598afllul09ygd1z7q51.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F598afllul09ygd1z7q51.png" alt="Hand drawn diagram" width="800" height="1117"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;If this makes you more confused than before, read on; I promise it gets better!&lt;/p&gt;

&lt;p&gt;The first thing that happens after we get the OAuth token is that the strategy fetches that user's profile. This is an internal mechanism of the strategy that knows &lt;strong&gt;where&lt;/strong&gt; to ask for it on that specific provider.&lt;br&gt;
 &lt;br&gt;
Right after that, the strategy will try to parse the profile into a model it has defined internally for that provider, and then pass it with all the other data it has (accessToken, refreshToken and profile) to our &lt;strong&gt;verify callback&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Remember we defined the verify callback when we configured the strategy? Now is the first time our custom code in there gets executed by the strategy. In this instance we could check the database for that user, create a record for it if necessary and verify anything else that's needed.&lt;/p&gt;

&lt;p&gt;Once we've checked all that we needed, we'll call done (or &lt;em&gt;the callback of the verify callback&lt;/em&gt;) which is its fourth and last function argument. We'll pass it &lt;code&gt;null&lt;/code&gt; (for no errors) and the user with all the information we find relevant.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;accessToken&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;refreshToken&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;profile&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;done&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// verify things here and then...&lt;/span&gt;
  &lt;span class="nf"&gt;done&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;&lt;span class="nx"&gt;accessToken&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;profile&lt;/span&gt;&lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And finally, Passport will execute its very own &lt;code&gt;req.login()&lt;/code&gt; which will save that user into &lt;code&gt;req.user&lt;/code&gt; for further use.&lt;br&gt;
 &lt;br&gt;
&lt;em&gt;Check that diagram up there again, you should understand it much better now.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Up next comes &lt;code&gt;serializeUser&lt;/code&gt; 👇&lt;/p&gt;
&lt;h3&gt;
  
  
  WTF is serialize and deserialize
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Serialization is the process of translating data structures or object state into a format that can be stored or transmitted and reconstructed later.&lt;br&gt;
––Wikipedia's &lt;strong&gt;Serialization&lt;/strong&gt; Article&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In our case, "the data" is that user we've been tossing around. Our own custom code in Passport's &lt;code&gt;serializeUser&lt;/code&gt; method should define what pieces of information we need to persist into the session in order to be able to retrieve the full user later by passing it to serializeUser's &lt;code&gt;done&lt;/code&gt; callback. &lt;/p&gt;

&lt;p&gt;This is Passport's serialize user method in a very simple form:&lt;br&gt;
&lt;br&gt;
 &lt;/p&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;passport&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;serializeUser&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;done&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;done&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kc"&gt;null&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="na"&gt;id&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;profile&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt;
  &lt;span class="na"&gt;accessToken&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;access_token&lt;/span&gt;
&lt;span class="p"&gt;}))&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;☝️this object will end up in &lt;code&gt;req.user&lt;/code&gt; and &lt;code&gt;req.session.passport.user&lt;/code&gt; for subsequent requests to use.&lt;/p&gt;

&lt;p&gt;Now for &lt;code&gt;deserializeUser&lt;/code&gt;, this function will  receive the user data present in the session and use it to get all of the user's data from our DB. For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;passport&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;deserialize&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;done&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;dbHelper&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;getUser&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;user&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;id&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;profile&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nf"&gt;done&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;profile&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt;
&lt;span class="p"&gt;})&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Whatever gets passed to &lt;code&gt;done&lt;/code&gt; here will be available in &lt;code&gt;req.user&lt;/code&gt;.&lt;br&gt;
 &lt;/p&gt;
&lt;h3&gt;
  
  
  The complete login flow
&lt;/h3&gt;

&lt;p&gt;Let's  do a zoom-in of the previous diagram, specifically after the OAuth dance is over. I wanted to dig deeper into that because I remember it being particularly mysterious when I was starting to use PassportJS for OAuth.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8fwnoinsp99apczorano.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8fwnoinsp99apczorano.png" alt="Close up of previous drawn diagram" width="800" height="850"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So this is what happens after the user says "yes, allow" and our app gets their access token:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Passport receives an OAuth token from the provider&lt;/li&gt;
&lt;li&gt;It uses it to fetch the user's profile information&lt;/li&gt;
&lt;li&gt;The &lt;code&gt;verifyCallback&lt;/code&gt; runs, and when it's done it passes the user object to its own &lt;code&gt;done&lt;/code&gt;  callback&lt;/li&gt;
&lt;li&gt;Passport calls its own method &lt;code&gt;req.login()&lt;/code&gt; which then calls &lt;code&gt;serializeUser()&lt;/code&gt;.
serializeUser extracts some user info to save in the session and then continues with the following handlers of the redirect route.&lt;/li&gt;
&lt;/ul&gt;
&lt;h3&gt;
  
  
  The authenticated request flow
&lt;/h3&gt;

&lt;p&gt;Now, this is all very nice, but how does our app know that the user is still authenticated on further requests and that it can provide private information safely? &lt;/p&gt;

&lt;p&gt;This is not a full tutorial, but if you've been following one, you probably have something like this in your server code:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;server&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;use&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;passport&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;initialize&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;span class="nx"&gt;server&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;use&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;passport&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;session&lt;/span&gt;&lt;span class="p"&gt;())&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These lines configure two &lt;em&gt;middlewares&lt;/em&gt; that will run on every request that our server gets.&lt;/p&gt;

&lt;p&gt;When an authenticated request is made, Express will load the session into the req, making our serialized user data available at &lt;code&gt;req.session.passport.user&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Then, the first middleware, &lt;code&gt;initialize()&lt;/code&gt;, will try to find that user in the request, or create it as an empty object if it doesn't exist (which would mean the user is not authenticated). &lt;/p&gt;

&lt;p&gt;And then, &lt;code&gt;session()&lt;/code&gt; will kick in which to determine if the request is authenticated by trying to find a serialized object in it.&lt;br&gt;
 &lt;br&gt;
When it finds it, it'll pass it to &lt;code&gt;deserializeUser&lt;/code&gt; which will use it to get the whole user data (maybe from the DB) and add it to &lt;code&gt;req.user&lt;/code&gt; where we can use it to create other requests.&lt;/p&gt;

&lt;p&gt;So, even though &lt;code&gt;serializeUser&lt;/code&gt; &lt;strong&gt;is only called on log in&lt;/strong&gt;, &lt;code&gt;deserializeUser&lt;/code&gt; is a global middleware that'll get executed on every single request to make the full user object available for authenticated requests.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;This concludes my deep dive into the OAuth flow which I hope has helped you to understand what is going on behind the scenes of PassportJS at least a bit better. It surely helped me clear some doubts to write it. Thanks for reading!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;While I was researching for this article I came across this wonderful &lt;a href="https://medium.com/r/?url=https%3A%2F%2Fgithub.com%2Fjwalton%2Fpassport-api-docs" rel="noopener noreferrer"&gt;unofficial documentation for PassportJS&lt;/a&gt; by J. Walton's which will surely help you in any other doubts you might have.&lt;/em&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>passportjs</category>
      <category>oauth</category>
      <category>node</category>
    </item>
    <item>
      <title>Figuring out CSS floats with two sushi recipes</title>
      <dc:creator>anabella</dc:creator>
      <pubDate>Thu, 11 Oct 2018 16:37:33 +0000</pubDate>
      <link>https://dev.to/anabella/figuring-out-css-floats-with-sushi-recipes-2c5o</link>
      <guid>https://dev.to/anabella/figuring-out-css-floats-with-sushi-recipes-2c5o</guid>
      <description>&lt;p&gt;&lt;em&gt;This article was &lt;a href="https://medium.freecodecamp.org/how-to-understand-css-floats-with-two-simple-sushi-layout-recipes-dded925706b9" rel="noopener noreferrer"&gt;originally published&lt;/a&gt; in freeCodeCamp.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;A few weeks ago I decided I should admit to all the things I’ve never understood about basic CSS. I would try to do a deep and conscious dive into them and finally &lt;em&gt;get&lt;/em&gt; them. It seemed that now, more than a couple years after learning about CSS for the first time, I could use all the experience I’ve gathered to my advantage. This time it should be easier and clearer.&lt;/p&gt;

&lt;p&gt;In August, I kicked it off with &lt;a href="https://dev.to/anabella/understanding-the-different-pairings-of-css-position-flavours-5855"&gt;an intro&lt;/a&gt; to the mysterious pairings of the &lt;code&gt;position&lt;/code&gt; property. Here’s my second stop in the journey:&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;float&lt;/code&gt; property, in the form of cooking recipes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Recipes Index
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Sushi rows — make elements cover a full row in an even manner&lt;/li&gt;
&lt;li&gt;Clearing broth — make content found below the floats act normally&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  Sushi rows 🥢
&lt;/h3&gt;

&lt;p&gt;We'll use floats and percentage values to distribute elements evenly in the full (container) width. Just like sushi rows in a plate.&lt;/p&gt;

&lt;h4&gt;
  
  
  Ingredients:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;1 container or board&lt;/li&gt;
&lt;li&gt;Some sushi pieces you need to distribute side-by-side.&lt;/li&gt;
&lt;li&gt;The % sign&lt;/li&gt;
&lt;li&gt;1 float: left;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Instructions:
&lt;/h4&gt;

&lt;p&gt;Prepare your sushi pieces, that is, the elements you want to be displayed in a row. They could be makis, item cards, nigiris, icons, whatever suits your taste.&lt;/p&gt;

&lt;p&gt;You can also add any non-positioning styling to them: colors, text-alignment, fonts or soy sauce.&lt;/p&gt;

&lt;p&gt;Put them inside a block container, like a board. In its most basic form, this should be a &lt;code&gt;div&lt;/code&gt; (but you can use any other HTML5 semantic elements such as &lt;code&gt;header&lt;/code&gt;, &lt;code&gt;footer&lt;/code&gt;, &lt;code&gt;section&lt;/code&gt;, &lt;code&gt;article&lt;/code&gt;, &lt;code&gt;main&lt;/code&gt;). Add a descriptive class for them. I’ll be using &lt;code&gt;nigiri&lt;/code&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight html"&gt;&lt;code&gt;&lt;span class="nt"&gt;&amp;lt;html&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;body&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"board"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"nigiri"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;/ / / / /&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"nigiri"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;/ / / / /&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;div&lt;/span&gt; &lt;span class="na"&gt;class=&lt;/span&gt;&lt;span class="s"&gt;"nigiri"&lt;/span&gt;&lt;span class="nt"&gt;&amp;gt;&lt;/span&gt;
          &lt;span class="nt"&gt;&amp;lt;h1&amp;gt;&lt;/span&gt;/ / / / /&lt;span class="nt"&gt;&amp;lt;/h1&amp;gt;&lt;/span&gt;
        &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
    &lt;span class="nt"&gt;&amp;lt;/div&amp;gt;&lt;/span&gt;
  &lt;span class="nt"&gt;&amp;lt;/body&amp;gt;&lt;/span&gt;
&lt;span class="nt"&gt;&amp;lt;/html&amp;gt;&lt;/span&gt;

&lt;span class="c"&gt;&amp;lt;!-- Don't mind the `/`s, they're for the salmon's stripy effect. --&amp;gt;&lt;/span&gt; 
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now, on class nigiri we'll apply some styles, including our float: left;. Take a moment and read through them:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="nc"&gt;.nigiri&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;10px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;  &lt;span class="c"&gt;/* fixed 10px margin and padding... for now! */&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;10px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;float&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;left&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c"&gt;/*  Extra things to makit look nice  */&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#fff&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;box-shadow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;inset&lt;/span&gt; &lt;span class="m"&gt;-3px&lt;/span&gt; &lt;span class="m"&gt;-6px&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;#ece0cd&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.nigiri&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nt"&gt;h1&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#fca35d&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#fce2da&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;font-weight&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;100&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.board&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;500px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;200px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c"&gt;/* we need this because floated elements don't occupy real Document Flow space, try removing it! */&lt;/span&gt;
  &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt; &lt;span class="nb"&gt;auto&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;10px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;background&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#CBAD8C&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;8px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;box-shadow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;12px&lt;/span&gt; &lt;span class="m"&gt;8px&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="n"&gt;rgba&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="m"&gt;#000&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="m"&gt;0.1&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;What &lt;code&gt;float: left;&lt;/code&gt; does is tell every element to stick to one side — in this case, left — and stand next to each other in a left-to-right row.&lt;/p&gt;

&lt;p&gt;Note that we're adding height to the board. Normally we wouldn’t need this: the board would expand to fit whatever is in it. But floating elements, like our nigiris, are different: they don’t occupy real Document space and don’t affect other, non-floating elements. That’s why we’re using a fixed, pixel-sized height for the board.&lt;/p&gt;

&lt;p&gt;Now, you should see all your elements on a single row. But something’s not quite right. They’re all piling up on the left and you probably have a lot of empty space on the right side of your board.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F40qr3ozf9eiyevrmny79.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F40qr3ozf9eiyevrmny79.jpeg" alt="Unevenly spaced sushis" width="800" height="268"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We need to space them evenly.&lt;/p&gt;

&lt;p&gt;We can do that by setting the nigiri's width to be relative to their container (the board in this case) using a percentage value. But, for 3 elements, is it just 33.33%? Well, it's not that simple...&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Now this is the tricky part&lt;/em&gt;: the % you need to set will depend on 3 things&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;how many items you have&lt;/li&gt;
&lt;li&gt;how they’re structured inwardly (padding)&lt;/li&gt;
&lt;li&gt;and how much space you want between them.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Do you want them to stick to each other side by side or do they need some margin in between them? If the sushi pieces have &lt;em&gt;rice &lt;em&gt;padding&lt;/em&gt;&lt;/em&gt;, that will cause them to be bigger than their content. You’ll have to compensate that by decreasing their width. For this reason, it’s also advisable to use % in the padding values.&lt;/p&gt;

&lt;p&gt;I know al this can be confusing. Here’s a handmade single-press illustration that I hope can... well, illustrate it clearly.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4eaa3nn45f65qnmz713x.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F4eaa3nn45f65qnmz713x.jpeg" alt="Detailed view of all that's going on with these % signs" width="800" height="356"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Each nigiri is 33.33% of the board’s full width: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;2% for margin on each side,&lt;/li&gt;
&lt;li&gt;2% for padding on each side &lt;/li&gt;
&lt;li&gt;and then 29.33% of their actual width.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;But this is a recipe, not a math lesson. To make it easier for you, dear readers, here are some common combinations for shoulder-to-shoulder and margin-spaced elements, all with 1% rice padding:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;&lt;span class="c"&gt;/* Two elements in the row */&lt;/span&gt;

&lt;span class="nc"&gt;.two.shoulder&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;48%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.two.spaced&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;46%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;


&lt;span class="c"&gt;/* Three elements in the row */&lt;/span&gt;

&lt;span class="nc"&gt;.three.shoulder&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;31.33%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.three.spaced&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;29.33%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;


&lt;span class="c"&gt;/* Four elements in the row */&lt;/span&gt;

&lt;span class="nc"&gt;.four.shoulder&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;23%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.four.spaced&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;21%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;


&lt;span class="c"&gt;/* Five elements in the row */&lt;/span&gt;

&lt;span class="nc"&gt;.five.shoulder&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;18%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.five.spaced&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;width&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;16%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;padding&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;margin&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;1%&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Feel free to take as many as you want.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;You may have noticed the pattern here: we’re assuming elements come with 1% of padding. They need to compensate that by subtracting 2% (1% for each side) from the element’s percentage width. Same goes for our 1% margin breather. Now it makes more sense to not use 33.33% width for 3 elements in a row. Instead set it to 29.33% after leaving 2% the padding and 2% for the margin on each.&lt;/p&gt;

&lt;p&gt;Sigh… that was a lot of math. Ok so now, no matter how many pieces your sushi roll gets chopped in, you know how to present them nicely in a board.&lt;/p&gt;

&lt;p&gt;If you want to play around with this setup, here's a &lt;a href="https://codepen.io/anabellaspinelli/pen/OwRVMK" rel="noopener noreferrer"&gt;CodePen&lt;/a&gt; specially made for that.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;And if you like CSS sushi, don't miss Sasha Tran's very inspiring &lt;a href="https://codepen.io/sashatran/pen/bgZVdm" rel="noopener noreferrer"&gt;CSS Sushi Board&lt;/a&gt;.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Clearing broth 🍲
&lt;/h3&gt;

&lt;p&gt;The perfect soup to have with some floating sushi, while making sure your portions don’t end up swimming in it.&lt;/p&gt;

&lt;h4&gt;
  
  
  Ingredients:
&lt;/h4&gt;

&lt;ul&gt;
&lt;li&gt;One container or board with floating sushi&lt;/li&gt;
&lt;li&gt;A soup or broth to follow after it.&lt;/li&gt;
&lt;li&gt;One clear: broth;&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Instructions:
&lt;/h4&gt;

&lt;p&gt;Once you have your row of floating sushi pieces ready, place your soup container below them in the html.&lt;/p&gt;

&lt;p&gt;Our sushi is meant to gracefully float "above" the Document flow and not affect other elements. If we’re not careful they might just end up floating in soup and sushi-ramen is not something the world is ready for.&lt;/p&gt;

&lt;p&gt;Remember that floating elements don’t have real Document height. This also means that they don’t “push” the soup down. Now look at this horrific mess:&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/anabellaspinelli/embed/wxzrgv?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;br&gt;
To prevent this atrocity, we need to add our clear: broth;… I mean both;!&lt;/p&gt;

&lt;p&gt;We have two options here:&lt;/p&gt;

&lt;p&gt;We can simply put the soup in a bowl or container and give the bowl a style of &lt;code&gt;clear: both;&lt;/code&gt;. This will &lt;em&gt;sort of&lt;/em&gt; get the job done, but it will result in things like &lt;code&gt;margin-top&lt;/code&gt; not working at all on the bowl.&lt;/p&gt;

&lt;p&gt;So if we want the sushi pieces to be completely protected from soup flooding — and not lose any features in the way — we need them to be contained in a plate with a high edge. To achieve that we’ll add an &lt;code&gt;:after&lt;/code&gt; pseudo-element to the sushi plate (that is, the container of our little nigiri floaters):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight css"&gt;&lt;code&gt;
&lt;span class="nc"&gt;.nigiri-plate&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;background-color&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;#223&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;box-shadow&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;inset&lt;/span&gt; &lt;span class="m"&gt;-8px&lt;/span&gt; &lt;span class="m"&gt;-8px&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;0&lt;/span&gt; &lt;span class="m"&gt;#558&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;border-radius&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;20px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;height&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="m"&gt;105px&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="nc"&gt;.nigiri-plate&lt;/span&gt;&lt;span class="nd"&gt;:after&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nl"&gt;content&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="s1"&gt;""&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;clear&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;both&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="nl"&gt;display&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="nb"&gt;block&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The pseudo-element needs an empty &lt;code&gt;content&lt;/code&gt; to even exist. Then "clear:both" and "display:block" are there for the purposes of this technique.&lt;/p&gt;

&lt;p&gt;Below there's another example for you play around with. I’ve made the plate visible using height and background color. Even though that’s not necessary for the soup to be well placed, it just makes it look fancier 🎩&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/anabellaspinelli/embed/LBWrMz?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;I've also front-and-centered the soup bowl with the classic &lt;code&gt;margin: anything, auto;&lt;/code&gt; technique.&lt;/p&gt;

&lt;p&gt;Think of this strategy as making the sushi dish have a very high southern wall in order to prevent any soup from flooding in. But… like… a nice wall.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;All right, I’m super glad that you made it this far and I hope this tiny recipe book helped you get a better idea on how floats work… and how we can work with floats. Stay tuned for more deep-dive-into-basic-but-elusive-things like this 😉&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>css</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Understanding the different pairings of CSS Position flavours</title>
      <dc:creator>anabella</dc:creator>
      <pubDate>Mon, 27 Aug 2018 07:57:37 +0000</pubDate>
      <link>https://dev.to/anabella/understanding-the-different-pairings-of-css-position-flavours-5855</link>
      <guid>https://dev.to/anabella/understanding-the-different-pairings-of-css-position-flavours-5855</guid>
      <description>&lt;p&gt;&lt;em&gt;This story was &lt;a href="https://medium.freecodecamp.org/an-intro-to-the-mysterious-pairings-of-css-position-flavors-92b3625176ea"&gt;originally published&lt;/a&gt; on freeCodeCamp.&lt;br&gt;
Cover photo by &lt;a href="https://unsplash.com/photos/O6nOEZcLCWQ?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;Tom Hermans&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;/em&gt;&lt;/p&gt;

&lt;p&gt;The position property can be a mysterious thing to run into when you’re starting to learn about CSS. It’s like being given a set of unknown spices that look similar, but have very different flavours and the combinations between them don't always work like expected.&lt;/p&gt;

&lt;p&gt;This article is an attempt to describe the best and most common pairings between them so that you can easily apply them in your first web cooking steps. Just like we learn in the kitchen — parsley goes well with garlic, but not that much with cinnamon.&lt;/p&gt;
&lt;h3&gt;
  
  
  Getting to know the properties
&lt;/h3&gt;

&lt;p&gt;First of all, let’s define what each of the position variants tastes like:&lt;/p&gt;
&lt;h4&gt;
  
  
  Static
&lt;/h4&gt;

&lt;p&gt;This is what every HTML element has by default. It means the element will be positioned according to the normal document flow. Block elements with full width, inline elements lining up. It’s basically the salt of them all.&lt;/p&gt;
&lt;h4&gt;
  
  
  Relative
&lt;/h4&gt;

&lt;p&gt;Elements with relative position can be placed relatively to the space they would occupy in the normal document flow. They still occupy that space &lt;strong&gt;only&lt;/strong&gt;, but support &lt;code&gt;top&lt;/code&gt;, &lt;code&gt;right&lt;/code&gt;, &lt;code&gt;bottom&lt;/code&gt; and &lt;code&gt;left&lt;/code&gt; properties. &lt;br&gt;
Whatever values you assign to those properties will be used to calculate its displayed position using its real position boundaries. Like adding some pepper, it usually doesn’t do much harm.&lt;/p&gt;
&lt;h4&gt;
  
  
  Absolute
&lt;/h4&gt;

&lt;p&gt;This one’s tricky — it’s sort of like cumin, it can be a very good addition, but you have to use it carefully. Absolute elements are removed from the normal document flow. This means they don’t affect and aren’t affected by other elements in the page. However, they will be placed &lt;strong&gt;relatively&lt;/strong&gt; (yes, I know, bear with me) to their nearest positioned ancestor. This means whichever parent element that has its position &lt;strong&gt;explicitly set&lt;/strong&gt;. It can be fine tuned using &lt;code&gt;top&lt;/code&gt;, &lt;code&gt;right&lt;/code&gt;, &lt;code&gt;bottom&lt;/code&gt; and &lt;code&gt;left&lt;/code&gt; too. So it’s similar to relative positioning, but, since it’s no longer part of the document flow, it uses a parent as the reference.&lt;/p&gt;
&lt;h4&gt;
  
  
  Fixed
&lt;/h4&gt;

&lt;p&gt;Ah, this one’s easy. Fixed elements are not part of the document flow at all and their position is based on the whole window, sometimes referred to as viewport. Also, they’re not affected by scrolling.&lt;/p&gt;


&lt;h4&gt;
  
  
  Quick tip before we start cookin'
&lt;/h4&gt;

&lt;p&gt;It's not advisable to use &lt;code&gt;margin&lt;/code&gt; and/or &lt;code&gt;padding&lt;/code&gt; when you're using &lt;code&gt;top&lt;/code&gt;, &lt;code&gt;right&lt;/code&gt;, &lt;code&gt;bottom&lt;/code&gt; and &lt;code&gt;left&lt;/code&gt;. While the latter will &lt;em&gt;offset&lt;/em&gt; the element's visible position the first will offset its &lt;strong&gt;real and document-affecting&lt;/strong&gt; position. &lt;/p&gt;

&lt;p&gt;Things can get confusing if you're using both on the same element so best keep 'em separated.&lt;/p&gt;


&lt;h3&gt;
  
  
  So, how can we mix them?
&lt;/h3&gt;

&lt;p&gt;Use &lt;code&gt;position: relative;&lt;/code&gt; whenever you want to offset an element &lt;em&gt;a little bit&lt;/em&gt; from where it would normally be, but you don't want everything else to move with it. Remember that all other elements will behave as if it hasn’t moved. Use &lt;code&gt;top&lt;/code&gt;, &lt;code&gt;right&lt;/code&gt;, &lt;code&gt;bottom&lt;/code&gt; and &lt;code&gt;left&lt;/code&gt; to adjust it &lt;em&gt;relatively&lt;/em&gt; to what would have been its natural position.&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/anabellaspinelli/embed/djeqZP?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Use &lt;code&gt;position: absolute;&lt;/code&gt; when you care about where the element is in relation to its first parent or wrapper with an explicit (usually relative) position. Note for this that the position property &lt;strong&gt;does not cascade&lt;/strong&gt;, so that's why this will use the nearest parent with an explicit position declaration, if there's none, then it will be the &lt;code&gt;&amp;lt;body&amp;gt;&lt;/code&gt;. If you want to force cascading of the position property, you can declare it as &lt;code&gt;position: inherit;&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Keep in mind that this element’s position is defined by the size and shape of its closest positioned parent, so if you change that, this element might be affected too.&lt;/p&gt;

&lt;p&gt;&lt;iframe height="600" src="https://codepen.io/anabellaspinelli/embed/ajGaPo?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Finally, &lt;code&gt;position: fixed;&lt;/code&gt; is a funny thing to play around with. Normal usages include sticky navbars, footers, or side menus. Remember it’s out of the normal document flow, so this means:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;you can place it wherever you want and nothing else will break&lt;/li&gt;
&lt;li&gt;it also means that it won’t do anything else you don’t explicitly tell it to do, so you need to set its 2 coordinates for it to show up at all. &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;These 2 coordinates (namely, top or bottom, plus left or right) will be measured from the edge of the window.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;(tip: scroll this up and down 👇)&lt;/em&gt;&lt;br&gt;
&lt;iframe height="600" src="https://codepen.io/anabellaspinelli/embed/PBeyoO?height=600&amp;amp;default-tab=result&amp;amp;embed-version=2"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

&lt;h4&gt;
  
  
  Sticky Disclaimer
&lt;/h4&gt;

&lt;p&gt;There is another option I didn’t cover and that is &lt;code&gt;position: sticky;&lt;/code&gt;. It makes elements behave and scroll normally but then stick to a certain position while the rest of the content keeps on scrolling. I decided to leave it out, because it’s still experimental and exceeds the understand-the-basics scope of this article. But, if you’re curious, &lt;a href="https://alligator.io/css/position-sticky/"&gt;here’s an article&lt;/a&gt; showing what it’s all about.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;I plan to address many of these basic things that I never fully understood about web development by researching them and then putting my new knowledge to the test by writing articles about it. So expect more in depth takes on basic stuff from me in the future!&lt;/em&gt;&lt;/p&gt;

</description>
      <category>css</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Why do great developers love writing tests?</title>
      <dc:creator>anabella</dc:creator>
      <pubDate>Mon, 06 Aug 2018 14:06:38 +0000</pubDate>
      <link>https://dev.to/anabella/why-do-great-developers-love-writing-tests-1o6j</link>
      <guid>https://dev.to/anabella/why-do-great-developers-love-writing-tests-1o6j</guid>
      <description>&lt;p&gt;&lt;em&gt;This article was originally published in &lt;a href="https://medium.com/typeforms-engineering-blog/why-do-great-developers-love-writing-tests-2c0ff5cb7ef2" rel="noopener noreferrer"&gt;Typeform's Engineering Blog&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Part one:&lt;/strong&gt; &lt;em&gt;OMG I'm totally buggin!&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;I’ve been hearing about the importance of writing tests for years. No wonder, since during all that time I was working as a QA Engineer within a team of developers. I’ve heard about how important unit and integration testing is, the wonders of TDD, code coverage, you name it.&lt;/p&gt;

&lt;p&gt;Agile teams and organisations kept talking about it, and for a long time I assumed it wasn’t related to my job. Even though it had the word “test” in it, it wasn’t the kind of testing I was involved with. So I just wrote it down in my mental &lt;strong&gt;“Book of Things That Are Good Things”&lt;/strong&gt; and hoped that one day I’d grasp the reasons why it belonged there. I was clueless.&lt;/p&gt;

&lt;p&gt;In the meantime, all those years ago, I was learning to code. I wanted to switch my career to development, or at least test automation. Sites like Codecademy were just getting started back then and I was going crazy with their free courses. Somehow it never caught my attention how the exercises knew when my code was incorrect, how come they usually had a pretty good idea of what part of it was off target.&lt;/p&gt;

&lt;p&gt;After that, I did some more intense “classroom coding-courses”. There, I learned a little bit about the purpose of unit tests. They test every functional cell (or unit) of the code to make sure it does all that it is suppose to. Now, after letting this new definition sit in my head for years without giving it a second thought, I realised something new:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Unit tests don’t test outward facing features –like a login form or an endpoint– they test the inward facing functionality, making sure a piece of code can be properly used by other pieces of code.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Since I was learning some new tricks I was also starting to create small pet projects, either to apply what I learned or to challenge it by building something fun that I came up with. There were a lot of tedious sides to this: obsessively googling for solutions, not using git, figuring out what CORS is… you know how it is. But one of the worst things about my process (or lack thereof) was having to test every single use and edge case on every single change that I made.&lt;/p&gt;

&lt;p&gt;If you’ve read this far, you probably know what I’m talking about. Either you’re experiencing it right now, or you remember it from when you were starting to develop real, working things. There’s no way of forgetting that tedious feeling of having to manually test every single flow variant each time you introduced a change in the logic. Or, worse, discovering a broken flow after a 3-hour-long refactor and not having a clue of when it had stopped working.&lt;/p&gt;

&lt;p&gt;Now imagine a situation where all of that is covered by just running a command on the terminal, and watching a sea of green (and occasionally red) text unfold. Wouldn’t that be lovely? It definitely would, but somehow it still escaped my understanding. My projects are not “real applications”, I thought, they don’t need tests.&lt;/p&gt;




&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1600%2F0%2AM9kUUVov8gltivB5" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1600%2F0%2AM9kUUVov8gltivB5" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Part two:&lt;/strong&gt; &lt;em&gt;The end of my bone-as-a-weapon days&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;I’ve been working at Typeform for a about 6 months now. I’m part of a team that is very self-sufficient testing-wise and they don’t really need me to keep the QA hat on at all times. We do a lot of mob and pair programming and I get to take part in the development of features, changes, and fixes. I’m learning a lot with this experiences, but there’s one thing that always surprises me: when we finish a task, my teammates immediately want to write tests for it. It feels almost as if it were an impulse or an unconscious reflex, not something they remember they have to do. And somehow they always catch me off guard.&lt;/p&gt;

&lt;p&gt;At those moments, I’m inclined to feel happy and relaxed. The fact is we’re done understanding the problem, discussing approaches and sorting obstacles, and finally got the thing working. I just wanna take a quick coffee break, but all they want to do is make sure everything is covered with tests.&lt;/p&gt;

&lt;p&gt;And it’s only today, after almost 9 years working in the software industry, that I understood why:&lt;/p&gt;

&lt;p&gt;These people care about code, and not only the code they write themselves. They care that it’s readable and maintainable, that it follows good standards, that it’s efficient and that it does everything it’s supposed to do, both inwards and outwards.&lt;/p&gt;

&lt;p&gt;But, they work on real-world codebases, which tend to have a lot of code, in a lot of files, for a lot of features. And there’s only 24 hours in a day. They need a reliable and fast way to ensure that their change works and — most importantly — that everything else still works too.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Great developers love writing tests because they care about the code, and they know that (well-written) tests are the only reliable way they can feel more confident that it works.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;They also know that if it doesn’t get tested when it’s fresh out of the dev oven, it probably never will. This is also why things like &lt;strong&gt;Test Driven Development&lt;/strong&gt; (TDD) exist.&lt;/p&gt;

&lt;p&gt;When you use a TDD approach, you start by writing tests for everything that you need to add or change. Yes, I’m serious. Write the test before you write the actual code. All the new tests will fail, of course, but then you write your code so that they all pass. You start by having coverage, then build the thing that you need to cover.&lt;/p&gt;

&lt;p&gt;TDD has an additional value: &lt;strong&gt;focus&lt;/strong&gt;. Only code that makes the tests go green should get written.&lt;/p&gt;




&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1600%2F0%2AxSnp8hYWmiSc4ocW" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fcdn-images-1.medium.com%2Fmax%2F1600%2F0%2AxSnp8hYWmiSc4ocW" title="I hope the tests are as green as they have been in my dreams" alt=""&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Epilogue:&lt;/strong&gt; &lt;em&gt;I hope the tests are as green as they have been in my dreams&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;My final point here is not to brag about getting to work side-by-side with great devs, but rather encouraging you to get acquainted with testing your own code sooner rather than later. Make it a necessary thing in your process. Not because it’s an industry standard, a good practice, or because somebody said you had to. Simply because it will no doubt make your life as a developer easier and happier.&lt;/p&gt;

&lt;p&gt;An please don’t be like me, some things are &lt;em&gt;too obvious&lt;/em&gt; to take years to put together 😉&lt;/p&gt;

</description>
      <category>testing</category>
      <category>codequality</category>
      <category>programming</category>
      <category>culture</category>
    </item>
    <item>
      <title>Dancing with OAuth: a step by step guide</title>
      <dc:creator>anabella</dc:creator>
      <pubDate>Wed, 04 Jul 2018 17:14:12 +0000</pubDate>
      <link>https://dev.to/anabella/dancing-with-oauth-emp</link>
      <guid>https://dev.to/anabella/dancing-with-oauth-emp</guid>
      <description>&lt;h1&gt;
  
  
  Dancing with OAuth: a step by step lesson
&lt;/h1&gt;

&lt;p&gt;Most of the times I try to learn something new and put it into practice, I quickly start to feel like I’m lost in a myriad of dance moves. I’m desperately trying to find the right way to do things, while not really understanding what’s going on or how I ended up on the wrong side of the room…&lt;/p&gt;

&lt;p&gt;Just trying things out until something works.&lt;/p&gt;

&lt;p&gt;Maybe it’s because of the way my learning process works, or maybe guides and tutorials are targeted at more experienced or technical people. But, after I’m done wrapping my head around the subject, I always feel like there should be an easy guide for understanding the key concepts and making it easier to apply them in a project.&lt;/p&gt;

&lt;p&gt;So this time, I’ve decided to stop wishing for it and make it myself, using the last thing that I learned.&lt;/p&gt;

&lt;p&gt;And that thing was OAuth 2.0.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is OAuth?
&lt;/h2&gt;

&lt;p&gt;Let’s start with the basics: OAuth stands for &lt;strong&gt;Open Authorization&lt;/strong&gt;. It’s a process through which an application or website can access private user data from another website.&lt;/p&gt;

&lt;p&gt;This other website usually works only as a trusted identity provider. It gives the requesting app some basic information about you so that the app can create a profile. This way, you don’t have to fill in a boring sign-up form and deal with yet another password 📋&lt;/p&gt;

&lt;p&gt;You’ve already used this at least a gazillion times, in fact you used it every time you clicked on “Log in with Facebook / Google / GitHub / …”. Next, you were shown a consent screen that displayed which information from your (let’s say) Facebook profile you’re allowing &lt;em&gt;that-hot-new-app.com&lt;/em&gt; to read (and sometimes, write). After that, since &lt;em&gt;that-hot-new-app.com&lt;/em&gt; trusts the identity provided by Facebook, they can create a profile for you on their database using the data that they received.&lt;/p&gt;

&lt;p&gt;The communication between &lt;em&gt;that-hot-new-app.com&lt;/em&gt; and Facebook usually ends here. This is why your profile picture won’t change all across the Internet if you change it on Facebook. They just never go back to Facebook and ask for updated data.&lt;/p&gt;

&lt;h3&gt;
  
  
  When marimba rhythms start to play…
&lt;/h3&gt;

&lt;p&gt;There’s another purpose for building this kind of mechanism, one with way more potential: using the identity provider as a service provider (in an ongoing manner). This means communicating with it regularly to supply enhanced features for your users.&lt;/p&gt;

&lt;p&gt;A nice example of this is &lt;a href="https://www.relive.cc/" rel="noopener noreferrer"&gt;Relive&lt;/a&gt;, a service that connects with different sports tracking apps to create Earth view videos of your run or ride. Every time you finish an activity, Relive prompts you offering to create a video from it. If you say yes, they’ll process it, and notify you when it’s ready for social media bragging… I mean sharing 🏅&lt;/p&gt;

&lt;p&gt;There’s really no technical difference between these two usages. That’s why you should be cautious about where you log in with your social media or Google/Gmail account.&lt;/p&gt;

&lt;p&gt;It might sound scary, but there's really nothing to fear. Just bear in mind that you’re authorizing &lt;em&gt;that-hot-new-app.com&lt;/em&gt; to access that information about you that’s detailed in the consent screen, potentially on a recurrent basis. Be aware of the permissions you grant, and make sure you know how to disable them whenever you don’t feel trusting anymore.&lt;/p&gt;

&lt;p&gt;For instance, if you are using your Google account for accessing that-hot-new-app.com but don’t want to allow that anymore, just go to your &lt;a href="https://myaccount.google.com/security#connectedapps" rel="noopener noreferrer"&gt;Google account settings&lt;/a&gt; and disable their access.&lt;/p&gt;

&lt;p&gt;All the main identity providers offer control over this.&lt;/p&gt;

&lt;h2&gt;
  
  
  Grooming it up before you hit the streets
&lt;/h2&gt;

&lt;p&gt;Before you land on &lt;em&gt;that-hot-new-app.com&lt;/em&gt; and even click on “Log in with YourFavoriteIdentityProvider”, someone — probably a developer — has to create an application on the provider’s site.&lt;/p&gt;

&lt;p&gt;This is a way of registering &lt;em&gt;that-hot-new-app.com&lt;/em&gt; so that, later, the provider knows who’s asking for private data.&lt;/p&gt;

&lt;p&gt;In this step, the developer will set up some information about the application, like the app's name or website and — most importantly — a redirect URI. The provider (like Google or Facebook) will use this to contact the requesting app and tell them that the user said yes 💍&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frsck7sjlzab7gpze6pq2.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Frsck7sjlzab7gpze6pq2.jpg" alt="I promise you won't have to write it by hand, we pride ourselves on our paperlessness." width="800" height="366"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once the app is registered, the provider will give &lt;em&gt;that-hot-new-app.com&lt;/em&gt; a &lt;code&gt;clientId&lt;/code&gt; and a &lt;code&gt;clientSecret&lt;/code&gt; which will be used in the communications between them. They work sort of like a username and password for the registered application.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftpb2aa6e5dp8c5vbs2qi.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftpb2aa6e5dp8c5vbs2qi.jpg" alt="You'll get the clientID and clientSecret right after you click on Save application" width="800" height="569"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;It's very important that you keep your application information (redirect URIS, clientId, an especially clientSecret) in a secure location and don't share it with strangers. If someone gets access to them, they could request private user data from the provider on your behalf, and then use it for evil!&lt;/p&gt;

&lt;p&gt;We don't want that.&lt;/p&gt;

&lt;h3&gt;
  
  
  Hands on waists or shoulders
&lt;/h3&gt;

&lt;p&gt;Apart from setting up all those things, our developer has to find out what kind of data the provider gives access to, and how it’s segmented.&lt;/p&gt;

&lt;p&gt;These “segments” are known as &lt;em&gt;scopes&lt;/em&gt; and they define access rights, usually separated in read/write categories. &lt;/p&gt;

&lt;p&gt;So, for example, that-hot-new-app.com can request for &lt;code&gt;profile:read&lt;/code&gt; and &lt;code&gt;contacts:read&lt;/code&gt; scopes. This means they can read whatever information the provider assigns to the “profile” and “contacts” segments, but they cannot change it. Other things won’t be accessible, for example your posts or what content you like.&lt;/p&gt;

&lt;p&gt;Well, just to make things simple for now on, let’s say that &lt;em&gt;that-hot-new-app.com&lt;/em&gt; is a website that integrates with &lt;a href="http://typeform.com/" rel="noopener noreferrer"&gt;Typeform&lt;/a&gt;, a service for creating beautiful and smart forms and also the company I work for 🤷. You definitely want in on the hottest thing right now, and quick, so on their website you click on “Log in with Typeform” to get right into the action. What’s next?&lt;/p&gt;

&lt;p&gt;Here’s a home-made, organic, and cholesterol-free diagram to use as a map for the whole thing. It may look a bit complicated but don’t worry, we’ll examine each step up next.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7rzhbh6y8naghpzk5z1l.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F7rzhbh6y8naghpzk5z1l.png" alt="Colorful notes bring joy to my heart" width="800" height="1194"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Authorize: the first step in the OAuth dance
&lt;/h2&gt;

&lt;p&gt;So, you take the initiative and click on “Connect with Typeform”. Here, &lt;em&gt;that-hot-new-app.com&lt;/em&gt; (THNA from now on, ’cause I’m getting tired of writing dash-separated words) will send you to Typeform’s authorize endpoint (/oauth/authorize) and provide:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;their clientId (remember, that’s THNA’s username)&lt;/li&gt;
&lt;li&gt;their desired scopes (or access rights)&lt;/li&gt;
&lt;li&gt;and their redirect URI again (Typeform already knows it from when we set up the whole thing, but we send it again as an extra layer of security)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That URL will look something like this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://api.typeform.com/oauth/authorize?client_id=yourClientId&amp;amp;scope=accounts:read+forms:read+results:read
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Typeform will use this information to generate a consent screen where you can review what sort of things you’re authorizing THNA to see and do.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa4lhgpst5t1e9oyk5w21.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fa4lhgpst5t1e9oyk5w21.jpeg" alt="Consent screen generation flow" width="800" height="251"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you have &lt;strong&gt;thoroughly read what you’re consenting to&lt;/strong&gt; and happily click on “Allow”, Typeform will send you to the redirect URI with a temporary, like so:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;https://that-hot-new-app.com/auth/redirect?code=xxxXXXxxxXXXxxx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Token: it takes 2 to tangOAuth 💃
&lt;/h2&gt;

&lt;p&gt;All this back and forth feels like someone’s taking you for a tango spin, right?&lt;/p&gt;

&lt;p&gt;The second step of the OAuth dance is when THNA receives that code, and exchanges it for an OAuth Token.&lt;/p&gt;

&lt;p&gt;So at this stage THNA has a temporary code that represents everything they're asking for, think of it as an encrypted way of saying:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Hey, remember me? I'm THNA, This user said I can look at their forms and themes. When you're ready, please send me a token for that to this redirect URI."&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;As reward for knowing all the steps and not stepping on anyone's toes, THNA will get a shiny OAuth Token ✨ which it can use to interact with Typeform on behalf of the user (that's you!) and ask for the authorized data whenever they need it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Stay with me, sway with me
&lt;/h2&gt;

&lt;p&gt;From now on, in every request THNA makes to Typeform on your behalf, they’ll have to include an Authorization header with that access token. With it, Typeform (or any other provider) can identify:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;who’s asking for the data (in this case, THNA)&lt;/li&gt;
&lt;li&gt;who’s the data about (you!)&lt;/li&gt;
&lt;li&gt;and also make sure they have the correct authorization to access that data (only what you consented to).&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Ready for the dance floor 👯
&lt;/h2&gt;

&lt;p&gt;So now that you know all the steps and spins of the OAuth dancing technique you should be ready to create your own choreographies, I mean, integrations, and make the Internet an even greater place.&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Drawings by yours truly&lt;/em&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;If you're looking for a deeper, more hands on experience with OAuth 2.0 I strongly recommend The Net Ninja's PassportJS tutorial. It covers all the basics you need to know to set this up (in a NodeJS app), in a very well balanced theory/practice proportion. It was the turning point for my process in understanding all of this.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;iframe width="710" height="399" src="https://www.youtube.com/embed/sakQbeRjgwg"&gt;
&lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>oauth</category>
      <category>authentication</category>
      <category>explainlikeimfive</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
