<?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: Sara LoG</title>
    <description>The latest articles on DEV Community by Sara LoG (@saradotlog).</description>
    <link>https://dev.to/saradotlog</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%2F589173%2Fe8f9f8ef-2295-49b1-bce2-88d516a8016e.jpeg</url>
      <title>DEV Community: Sara LoG</title>
      <link>https://dev.to/saradotlog</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/saradotlog"/>
    <language>en</language>
    <item>
      <title>My first Unit Testing experience</title>
      <dc:creator>Sara LoG</dc:creator>
      <pubDate>Fri, 14 May 2021 16:24:27 +0000</pubDate>
      <link>https://dev.to/ourtimefortech/my-first-unit-testing-experience-2m4o</link>
      <guid>https://dev.to/ourtimefortech/my-first-unit-testing-experience-2m4o</guid>
      <description>&lt;p&gt;These past two weeks has been "testing weeks" at our Time for Tech codeCollab and we all have been writing test for the different parts of our Shiftwork App.&lt;/p&gt;

&lt;p&gt;Despite having worked as a developer for a few years in the past, this has been the first time I had properly written a test by myself. Back then I used to hear about their importance in meet-ups and in conferences but the reality was that we never had enough time / interest to put them in place as part of our processes.&lt;/p&gt;

&lt;p&gt;Even if they are far more common now than 4 years ago I think that is still a problem in some companies and I have both types of former colleagues and acquaintances: the ones that think that they are not so necessary and the ones who think you can't be a good dev if you cannot write tests.&lt;/p&gt;

&lt;p&gt;As I have survived all this time without them I used to consider them as a "nice to have". But this experience has given me a more deeper understanding of their importance and how they actually can make you a better dev. &lt;/p&gt;

&lt;p&gt;Not only I found flaws that might have gone unnoticed (that's what are they for, aren't they!) but they also require you to have a very good knowledge of the app, what should do and what shouldn't and above all understand that the important thing is not making the test to pass. &lt;strong&gt;The final goal is to make sure the test is actually testing what you are meant to test.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In this case we did the testing after building the app so we had to test the methods we already had in place. Although writing the test before would have been a very good experience too, I'm glad we took this direction as I have much more understanding of the app, its parts and behaviour now than when we started 10 weeks ago, and as a first testing experience for most of us a TDD approach would have been very intimidating. Now I'm ready for it tho!!!&lt;/p&gt;

&lt;p&gt;And after this, I'm currently thinking of the next challenge: presenting The Shiftwork App to the public in our demo day. So if you want to support us at our virtual event, &lt;strong&gt;&lt;a href="https://www.tickettailor.com/events/ourtimefortech/519355"&gt;please Grab a free ticket here!&lt;/a&gt;&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Hope to see you there!&lt;/p&gt;

</description>
      <category>womenintech</category>
      <category>devjournal</category>
      <category>testing</category>
    </item>
    <item>
      <title>Git and Collaboration</title>
      <dc:creator>Sara LoG</dc:creator>
      <pubDate>Wed, 31 Mar 2021 15:39:04 +0000</pubDate>
      <link>https://dev.to/ourtimefortech/git-and-collaboration-424o</link>
      <guid>https://dev.to/ourtimefortech/git-and-collaboration-424o</guid>
      <description>&lt;p&gt;I've been using Git for a few years now, but most of the time I was working alone on small projects, what meant I only had to remember some basic commands and hardly ever had conflicts (just the few times I had to work on something with any of my colleagues).&lt;/p&gt;

&lt;p&gt;Let alone PR. I had hear about them of course, specially when I started to look into resuming my career as a developer, but never had to create one before.&lt;/p&gt;

&lt;p&gt;I can say that I learnt more about git and GitHub in this couple of weeks in the codeCollab program than in my previous years as a developer. &lt;/p&gt;

&lt;p&gt;We use GitHub to create the issues that need to be working on, assigning and tagging them appropriately and to communicate between us about our problems and concerns (if any) with them.&lt;/p&gt;

&lt;p&gt;Then, after working on the feature on a separate branch, we create a PR that has to be reviewed and approved at least by 3 people of the team (we are 4 plus the senior engineers, which means we all get to review someone else's work). Once it is approved it gets merged, and if there is any conflict we solve it. &lt;/p&gt;

&lt;p&gt;To review an open PR, we pull the code to our local, ran it and test everything is working properly, flag any error or problems that arise and if none, approve it (and of course congratulate the person who did the job, it costs nothing to be nice and acknowledge the effort 😉)&lt;/p&gt;

&lt;p&gt;It can all seem pretty simple, even for me as I'm writing this now after two weeks doing it, but the first time you face it it can be daunting! I also downloaded a Git GUI, but I prefer to don't use it much and type the commands on the CLI to learn it better and get more confident with it now that I can.&lt;/p&gt;

&lt;p&gt;And on top of the tools, I think this second and third week at codeCollab has been very good on communication. We still need to keep improving, but I think the initial shyness is slowly vanishing and we are speaking more among us, doing more meetings, overcoming blockers together and moving forward quicklier as a team. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Collaboration, communication and team working skills&lt;/strong&gt; are something that also need to be learnt and practised, besides coding, specially when working with remote teams in different timezones, something that looks like is in increasing demand nowadays. And I have the chance to learn, practise and improve them everyday. Thanks again Arit and Our Time for Tech for giving me the opportunity 🙏!&lt;/p&gt;

&lt;p&gt;Photo by &lt;a href="https://unsplash.com/@cwmonty?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;Chris Montgomery&lt;/a&gt; on &lt;a href="https://unsplash.com/s/photos/video-call?utm_source=unsplash&amp;amp;utm_medium=referral&amp;amp;utm_content=creditCopyText"&gt;Unsplash&lt;/a&gt;&lt;/p&gt;

</description>
      <category>devjournal</category>
      <category>github</category>
      <category>collaboration</category>
      <category>womenintech</category>
    </item>
    <item>
      <title>Adding Authentication to a Rails Web App. The Devise Gem.</title>
      <dc:creator>Sara LoG</dc:creator>
      <pubDate>Tue, 16 Mar 2021 17:30:55 +0000</pubDate>
      <link>https://dev.to/ourtimefortech/adding-authentication-to-a-rails-web-app-the-devise-gem-946</link>
      <guid>https://dev.to/ourtimefortech/adding-authentication-to-a-rails-web-app-the-devise-gem-946</guid>
      <description>&lt;p&gt;Another week in Our Time for Tech has gone by.&lt;/p&gt;

&lt;p&gt;I was assigned the app authentication, and in order to do that I had to investigate and install the Ruby Gem called Devise.&lt;/p&gt;

&lt;p&gt;One thing I learnt in my previous developer experience was to don't reinvent the wheel. When working with a framework and as a newbie I always tried to do things by myself. (Even the authentication process).&lt;/p&gt;

&lt;p&gt;But usually frameworks have that part covered with tools that have already been tested by a lot of developers and are secure and stable, saving you from hours and hours of work.&lt;/p&gt;

&lt;h2&gt;
  
  
  So, What is devise and what it is for?
&lt;/h2&gt;

&lt;p&gt;Devise is an authentication solution for Rails based on Warden. It handles authentication with bcrypt, eliminating the need to hash and salt passwords manually.&lt;/p&gt;

&lt;p&gt;It allows your user to be able to do basic things like sign up, log in and log out and it is composed of 10 modules, of which you can choose to use only the ones you need. These modules are: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Database Authenticable&lt;/strong&gt; — Hashes and stores the password in database. Authentication is done by a POST request. Necessary to save user/hashed password in the DB.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Omniauthable&lt;/strong&gt; — Adds support for Omniauth provider, allowing log in through third-party providers like Facebook, Twitter, etc&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Confirmable&lt;/strong&gt; — Disables access to the user account unless a user has confirmed their account through email.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Recoverable&lt;/strong&gt; — Adds a ‘Forgot my Password’ link that allows the user to reset their password using email.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Registerable&lt;/strong&gt; — Creates a registration process, users can now edit and delete their account.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Rememberable&lt;/strong&gt; — Creates a token and stores a user session with a saved cookie (adds REMEMBER ME checkbox)&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Trackable&lt;/strong&gt; — Tracks user IP addresses, sign in count, last sign in, and timestamps&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Timeoutable&lt;/strong&gt; — Logs a user out after a certain amount of time.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Validatable&lt;/strong&gt; — Uses built-in Devise validations for email address and password (length, characters, etc).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Lockable&lt;/strong&gt; — Locks an account after a specific amount of time or specific amount of log in attempts.&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Setting up devise in your Web App
&lt;/h2&gt;

&lt;p&gt;These are the steps I followed (there are plenty or tutorials around)&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Open up your Gemfile and add this line &lt;code&gt;gem 'devise'&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;bundle install&lt;/code&gt; to install the gem&lt;/li&gt;
&lt;li&gt;Restart your rails server&lt;/li&gt;
&lt;li&gt;Run &lt;code&gt;rails g devise:install&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Open up &lt;code&gt;config/environments/development.rb&lt;/code&gt; and add:
&lt;code&gt;config.action_mailer.default_url_options = { host: 'localhost', port: 3000 }&lt;/code&gt;
before the &lt;code&gt;end&lt;/code&gt; keyword.&lt;/li&gt;
&lt;li&gt;Open up &lt;code&gt;app/views/layouts/application.html.erb&lt;/code&gt; and add:
&lt;code&gt;&amp;lt;% if notice %&amp;gt; &amp;lt;p class="alert alert-success"&amp;gt;&amp;lt;%= notice %&amp;gt;&amp;lt;/p&amp;gt; &amp;lt;% end %&amp;gt;&lt;/code&gt;
&lt;code&gt;&amp;lt;% if alert %&amp;gt; &amp;lt;p class="alert alert-danger"&amp;gt;&amp;lt;%= alert %&amp;gt;&amp;lt;/p&amp;gt; &amp;lt;% end %&amp;gt;&lt;/code&gt;
right above &lt;code&gt;&amp;lt;%= yield %&amp;gt;&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;Setup the User model:
&lt;code&gt;rails g devise User&lt;/code&gt; (or the name you want to give, Admin...)
&lt;code&gt;rails db:migrate&lt;/code&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Once that is done you can go and create your first user &lt;a href="http://localhost:3000/users/sign_up"&gt;http://localhost:3000/users/sign_up&lt;/a&gt; and log in &lt;a href="http://localhost:3000/users/sign_in"&gt;http://localhost:3000/users/sign_in&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Image by &lt;a href="https://pixabay.com/users/geralt-9301/?utm_source=link-attribution&amp;amp;utm_medium=referral&amp;amp;utm_campaign=image&amp;amp;utm_content=3960205"&gt;Gerd Altmann&lt;/a&gt; from &lt;a href="https://pixabay.com/?utm_source=link-attribution&amp;amp;utm_medium=referral&amp;amp;utm_campaign=image&amp;amp;utm_content=3960205"&gt;Pixabay&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ruby</category>
      <category>webdev</category>
      <category>beginners</category>
      <category>devjournal</category>
    </item>
    <item>
      <title>Back to coding with Our Time For Tech</title>
      <dc:creator>Sara LoG</dc:creator>
      <pubDate>Thu, 11 Mar 2021 16:04:52 +0000</pubDate>
      <link>https://dev.to/ourtimefortech/back-to-coding-with-our-time-for-tech-9lf</link>
      <guid>https://dev.to/ourtimefortech/back-to-coding-with-our-time-for-tech-9lf</guid>
      <description>&lt;p&gt;My journey in Tech started almost 10 years ago when I got my first web developer position at a digital agency. After a few years working I decided to take a small break, and that small break turned into almost 4 years as a stay-at-home mom.&lt;/p&gt;

&lt;p&gt;I always knew sooner or later I would come back so, when I felt it was the right moment to start job-hunting, for a couple of months I used every free minute I had to go over as many freeCodeCamp courses I could and to read as many articles I found and was when I realised I remembered more than I thought.&lt;/p&gt;

&lt;p&gt;But I think knowing how to code is not enough anymore. Nowadays it is much more difficult to find a dev position than it was 10 years ago, when it could be done by knowing some HTML, CSS, Javascript or a CMS like WordPress. Also now I'm looking for a more specific role, it needs to be remote, preferably within a team... That's why when I discovered &lt;a href="https://ourtimefortech.org/"&gt;Our Time For Tech&lt;/a&gt; (A nonprofit online program that empowers early-career &amp;amp; career-changing Women in Tech) and its codeCollab program I knew it was the final push I needed.&lt;/p&gt;

&lt;p&gt;I've been lucky enough to be part of it and I would like to share my journey with you. Over the next 12 weeks we (a group of 5 female coders) with the help of two experienced developers will be building a web app where we not only will develop further our coding skills, but also will learn and develop important ones, like team collaboration and communication, among others.&lt;/p&gt;

&lt;h2&gt;
  
  
  So, what have I done so far?
&lt;/h2&gt;

&lt;p&gt;As a brief recap, things I (we) have been working on over the last two weeks:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Setting up the environment. Installing Rails 6, Node, Yarn and Postgresql. Dealing with errors during the installation, like the need of a different Ruby version.&lt;/li&gt;
&lt;li&gt;Learning how to make a pull request. During my previous experience as a developer I never had to used them, and even if I had a good knowledge of git I had forgotten most of it. Also I think back at that time pull requests weren't so widely spread in work environments as they are now, but I can be mistaken on this affirmation.&lt;/li&gt;
&lt;li&gt;Reading a lot about Ruby on Rails as I have never used it before, migrations, SQL commands, CLI commands... Searching and going through technical documentation when I get stuck.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;And last, but not least:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Thinking big: we are not only supposed to implement the tasks we are told, we are in charge of deciding (or trying at least) the best way of doing things, what can and cannot to deliver (find the MVP), collaborating and thinking as a group. (With the proper guidance of course). &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;This last point was probably the one I was more worried about at the beginning, but now is probably the one that motivates me more. Looking forward to another week of challenges!&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>womenintech</category>
      <category>firstpost</category>
      <category>devjournal</category>
    </item>
  </channel>
</rss>
