<?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: Abderraouf GATTAL</title>
    <description>The latest articles on DEV Community by Abderraouf GATTAL (@gattalraouf).</description>
    <link>https://dev.to/gattalraouf</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%2F199789%2Ff46b106e-c700-428e-8265-67a7c3e375ba.png</url>
      <title>DEV Community: Abderraouf GATTAL</title>
      <link>https://dev.to/gattalraouf</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/gattalraouf"/>
    <language>en</language>
    <item>
      <title>12500, an Android Developer’s nightmare…</title>
      <dc:creator>Abderraouf GATTAL</dc:creator>
      <pubDate>Mon, 12 Aug 2019 17:51:27 +0000</pubDate>
      <link>https://dev.to/gattalraouf/12500-an-android-developer-s-nightmare-1i3b</link>
      <guid>https://dev.to/gattalraouf/12500-an-android-developer-s-nightmare-1i3b</guid>
      <description>&lt;p&gt;I was Developing and Android App which provides sign-in with both Facebook and Google using Firebase Authentication services, So i started coding and covered everything the documentation recommended. After finishing everything I was optimistic enough that everything will work just fine, well Facebook worked well but Google Sign-in applied the known saying :&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;It never works the first time&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;At first I thought it is just a casual error and tried to understand it, I obviously checked Stackoverflow, GitHub issues and the official documentation but it wasted hours and hours of my time with no solution, and that’s what pushed me to write an article about how to fix it…&lt;/p&gt;

&lt;h2&gt;
  
  
  Debugging the error
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Attempt 1 : Checking if I missed enabling Google Sign-in on Firebase
&lt;/h3&gt;

&lt;p&gt;Although I was 100% sure that I did enable it but I checked anyway, all I had to do is heading over to my Firebase console, choosing my App and under Authentication » Sign-in method, checked if Google Sign-in was enabled or not.&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Ftk3giz4aat6suv4sw67y.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Ftk3giz4aat6suv4sw67y.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;— Hypothesis dismissed 👎&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Attempt 2: Checking if the project support email is configured
&lt;/h3&gt;

&lt;p&gt;Well After some Googling I found out that the support email should be provided in order for the Sign-in to work, I knew I didn’t configure it so I applied the following process to add it :&lt;br&gt;
In my App in the Firebase console, and under Authentication » Sign-in method, and having enabled Google Sign-in, I selected the Google Sign-in option. And finally added the support email.&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Foteryo7lhbx8rhab2gau.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Foteryo7lhbx8rhab2gau.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After adding the support email, I was optimistic enough that I fixed the issue, I rebuilt the App and tested it again but there were the surprise 12500 shows up again…&lt;br&gt;
&lt;strong&gt;— Hypothesis dismissed 👎&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Attempt 3: Checking if the SHA-1 (certificate fingerprint) is configured correctly
&lt;/h3&gt;

&lt;p&gt;Along the Googling process for for the causes of my problem, the SHA-1 issue showed up several times but I was sure enough that it was well configured that I gave priority to other hypotheses, anyway after all the previous attempts didn’t resolve the issue (wasting hours of my time) I decided to check with the SHA-1 as a last hope…&lt;br&gt;
I was desperate enough to regenerate the SHA-1 using several methods, (you can check &lt;a href="https://medium.com/pen-bold-kiln-press/sha-1-android-studio-ec02fb893e72" rel="noopener noreferrer"&gt;this&lt;/a&gt; or the &lt;a href="https://developers.google.com/android/guides/client-auth" rel="noopener noreferrer"&gt;official documentation&lt;/a&gt;) in order to double or triple check the SHA-1. As common sense says the SHA-1 were the same in every and each attempt…&lt;/p&gt;

&lt;p&gt;To add the SHA-1 to your App you can check &lt;a href="https://stackoverflow.com/questions/39144629/how-to-add-sha-1-to-android-application/47783568" rel="noopener noreferrer"&gt;this&lt;/a&gt;.&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fy12yv14a140ozx1ht87i.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fy12yv14a140ozx1ht87i.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;PS: make sure to update the google-services.json file each time you change the SHA-1.&lt;br&gt;
Anyhow, no matter the times i changed the SHA-1 the 12500 kept showing…&lt;br&gt;
&lt;strong&gt;— Hypothesis dismissed 👎&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Attempt 4: Add an application logo to your project in the &lt;a href="https://console.developers.google.com/apis/" rel="noopener noreferrer"&gt;Google Cloud Platform&lt;/a&gt; console
&lt;/h3&gt;

&lt;p&gt;After doing all the above, I lost hope of resolving the issue and even started thinking of starting a new project hoping to not face the issue again, but I decided to use the power of communities and ask for help, I posted about the issue in several slack workspaces and work on other things while waiting till someone replied suggesting to add a logo in my Firebase app’s configuration, Something I never thought would cause such an error, but I tried it anyway since I had no other choice, by doing the following :&lt;/p&gt;

&lt;p&gt;In my Google Cloud Platform, and after selecting my project, on the left navigation bar, under Credentials » OAuth consent screen, I scrolled down to the application logo section, and added a random picture to just test it then clicked save, tried the App debugging version that existed in my phone already and it really worked.&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F43tgakdde5bk9hakwzql.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F43tgakdde5bk9hakwzql.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I still don’t know why, but the Firebase application’s logo seems to be a necessary thing for Google Sign-in…&lt;br&gt;
&lt;strong&gt;— Hypothesis is the Eurêka !!! 👍&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Final thoughts
&lt;/h2&gt;

&lt;p&gt;As you can see, it was not easy at all to find the cause of the bug. This is one of the moments that pushes you to think out of the box and surely convince you how helpful the community can be.&lt;/p&gt;

&lt;p&gt;These are some of the lessons I learned because of this experience :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Error messages are neither 100% correct nor clear. (Showing a 12500 error with no details is not helpful at all).&lt;/li&gt;
&lt;li&gt;Reading carefully the Android documentation is not easy but it’s very important so you can understand how it works but sometimes they can be not helpful at all.&lt;/li&gt;
&lt;li&gt;As a Developer, being an expert Googler is something crucial…
Developers Communities are great thanks to all the people sharing their experiences and trying to help whoever in need.&lt;/li&gt;
&lt;li&gt;It is not always something logical that causes the error, think out of the box and expect everything.&lt;/li&gt;
&lt;li&gt;Errors do waste time but they give you lessons and experiences that you can’t deny their importance.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;That’s it, I hope you like it and find it useful at some point. I would really appreciate your feedback and if you needed any help just give me a DM.&lt;/p&gt;

</description>
      <category>android</category>
      <category>debugging</category>
      <category>firebase</category>
      <category>googlesignin</category>
    </item>
    <item>
      <title>Git, an entire universe to explore</title>
      <dc:creator>Abderraouf GATTAL</dc:creator>
      <pubDate>Mon, 22 Jul 2019 17:11:49 +0000</pubDate>
      <link>https://dev.to/gattalraouf/git-an-entire-universe-to-explore-5cfh</link>
      <guid>https://dev.to/gattalraouf/git-an-entire-universe-to-explore-5cfh</guid>
      <description>&lt;blockquote&gt;
&lt;p&gt;The &lt;strong&gt;universe&lt;/strong&gt; is full of magical things patiently waiting for our wits to grow sharper.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In this article we will explore the Git universe, go through some of it’s magical things &amp;amp; understand it’s language.&lt;/p&gt;

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

&lt;blockquote&gt;
&lt;p&gt;The Universe is all of space and time and their contents.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Talking about Git, we can define it by just saying: “It is a version control system” which is too technical, in other words we can say it is all of versions, time and their contents.&lt;br&gt;
Well a version control system (aka: VCS) is a kind of a “database”. It lets you save a version (a snapshot of your complete project) at any time you want. When you later take a look at an older version, your VCS shows you exactly how it differed from the previous one. It is independent of the kind of project / technology / framework you’re working with:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It works just as well for an HTML website as it does for a design project or an iPhone app&lt;/li&gt;
&lt;li&gt;It lets you work with any tool you like; it doesn’t care what kind of text editor, graphics program, file manager or other tool you use&lt;/li&gt;
&lt;li&gt;It records the changes you make to your project’s files (the contents). This is what version control is about.&lt;/li&gt;
&lt;/ul&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Ferynecwxpkg96phcwg0p.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Ferynecwxpkg96phcwg0p.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Git’s purpose?
&lt;/h2&gt;

&lt;p&gt;I’d say universes were made to be discovered yet that wouldn’t be appropriate here, so i prefer to resume the many benefits of using Git for your projects in the following :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Ensuring a great collaboration between the team members, giving them freedom to change what they need to when they need to in the project without conflicts.&lt;/li&gt;
&lt;li&gt;Allowing to Save a version of the project after making changes simply and properly.&lt;/li&gt;
&lt;li&gt;Ensuring the ability to restore older versions of a file (or even the whole project) effectively.&lt;/li&gt;
&lt;li&gt;Helps you understand how your project evolved between versions.
A side-effect of using a distributed VCS like Git is that it can act as a backup.&lt;/li&gt;
&lt;/ul&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F0x8sqwwsmwbwxmz9zu6a.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F0x8sqwwsmwbwxmz9zu6a.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  The rules of Git’s Universe!!
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;The only way to master git is by understanding how it really works, commands are written everywhere !!&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;It is a fact that understanding the language a universe speaks is the only way to understand it’s rules and find out it’s secrets. The same goes for git, as it goes for everything else and to understand git’s language we should understand some concepts by answering the following questions :&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F7k82ohii0qeudsvet5j4.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2F7k82ohii0qeudsvet5j4.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  What’s a working directory ?
&lt;/h3&gt;

&lt;p&gt;It is simply the directory where you plan to work on your project.&lt;/p&gt;

&lt;h3&gt;
  
  
  What’s a commit ?
&lt;/h3&gt;

&lt;p&gt;A Commit is a snapshot of the project’s currently &lt;strong&gt;staged&lt;/strong&gt; (added to the staging area) changes. You can say it is a safe version of the project.&lt;/p&gt;

&lt;h3&gt;
  
  
  What’s a staging area?
&lt;/h3&gt;

&lt;p&gt;It is &lt;strong&gt;Where commits are prepared&lt;/strong&gt;, you can say it’s the scene where we gather the project changes to be snapshotted.&lt;/p&gt;

&lt;h3&gt;
  
  
  What’s a repository ?
&lt;/h3&gt;

&lt;p&gt;The answer would be, the data structure where git stores the changes to your project files, but that would be too technical and too formal, to simplify we’ll say it is: &lt;strong&gt;The “container” that stores the snapshots of your project files&lt;/strong&gt;.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It stores other things more than just the commits, like the configuration file and a set of references to commits, called &lt;strong&gt;heads&lt;/strong&gt; (we are going to talk about those in another article).&lt;/li&gt;
&lt;li&gt;It is stored in the same directory (working directory) as the project itself, as a hidden sub-directory called “.git”.&lt;/li&gt;
&lt;li&gt;There are 2 types of repositories the local which is the copy saved in your computer and the remote which is saved in a central server or any code hosting services like GitHub.&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What do we mean by Hash in git ?
&lt;/h3&gt;

&lt;p&gt;A hash in git is a short digest constructed by an cryptographic algorithm (SHA-1) from a sequence of bytes of any length. In English, it is a mostly unique short code that identify a whole file.&lt;/p&gt;

&lt;h2&gt;
  
  
  The story of Git’s Universe ?
&lt;/h2&gt;

&lt;p&gt;Understanding the secrets of Git’s Universe would be pretty easy by putting the concepts we just understood together in the following workflow:&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fhuxn761odzxda90ilosa.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fhuxn761odzxda90ilosa.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  A. Initializing your project
&lt;/h3&gt;

&lt;p&gt;To initialize a project you have two possible scenarios which would be :&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Starting a brand new project using the &lt;strong&gt;git init&lt;/strong&gt; command.&lt;/li&gt;
&lt;li&gt;Cloning a project from a remote repository using the &lt;strong&gt;git clone&lt;/strong&gt; command.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In both scenarios your Working directory will contain a hidden sub folder named &lt;strong&gt;.git&lt;/strong&gt; which contains all the information needed for git to work.&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Ficclb3w0wcsne41ap58i.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Ficclb3w0wcsne41ap58i.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  B. Building a complete feature
&lt;/h3&gt;

&lt;p&gt;Code, code and more code…&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fr18y85bl9m38rgoj0yyt.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fr18y85bl9m38rgoj0yyt.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  C. Staging Your work
&lt;/h3&gt;

&lt;p&gt;To stage your changes is to make them traceable in git, using the &lt;strong&gt;git add&lt;/strong&gt; command. Staging your work is the preparing steps to the feature you are building to be committed.&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fj9aaru63j8yjhmytt3ox.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fj9aaru63j8yjhmytt3ox.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  D. Commit the changes
&lt;/h3&gt;

&lt;p&gt;After staging all the changes, all what left is using the &lt;strong&gt;git commit&lt;/strong&gt; command in order to compresses it and stores it into its own data structure. The compressed object will have a unique name, a hash, and will be stored under the &lt;strong&gt;object directory&lt;/strong&gt; in the &lt;strong&gt;.git folder&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;In fact when you commit git does only two things in order to create the snapshot of your working directory:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;If the file didn’t change, git just adds the name of the compressed file (the hash) into the snapshot.&lt;/li&gt;
&lt;li&gt;If the file has changed, git compresses it, stores the compressed file in the object folder. Finally it adds the name (the hash) of this compressed file into the snapshot.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;In short we should understand that a commit is made of 4 things :&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The name (a hash) of the working directory’s snapshot&lt;/li&gt;
&lt;li&gt;A comment&lt;/li&gt;
&lt;li&gt;Commiter information&lt;/li&gt;
&lt;li&gt;Hash of the parent commit&lt;/li&gt;
&lt;/ol&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fow1r6hgo2dp83z8x6vb9.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fow1r6hgo2dp83z8x6vb9.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  E. Building another feature and redo the previous…
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;The data saved with each commit is the way git tracks every file’s status, knows the differences between commits and saves the changes, more precisely git uses the Hash of the commit and it’s parent to do that.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h2&gt;
  
  
  To be continue…
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;The secrets of a &lt;strong&gt;Universe&lt;/strong&gt; never end…&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;We just covered the basic workflow that you should understand in order to work with git easily. Yet you should know the proper commands to do so which you can find with details (Mainly in the cheat sheets) in addition to some valuable resources in &lt;a href="https://github.com/Gattalraouf/Git-GitHub-Valuable-Resources" rel="noopener noreferrer"&gt;here&lt;/a&gt;.&lt;br&gt;
Other aspects like branching would be detailed in other articles.&lt;/p&gt;

</description>
      <category>git</category>
      <category>versioncontrol</category>
      <category>devops</category>
      <category>contributions</category>
    </item>
    <item>
      <title>6 reasons why I fell in love with Constraint layout!!</title>
      <dc:creator>Abderraouf GATTAL</dc:creator>
      <pubDate>Mon, 22 Jul 2019 16:46:16 +0000</pubDate>
      <link>https://dev.to/gattalraouf/6-reasons-why-i-fell-in-love-with-constraint-layout-3j1l</link>
      <guid>https://dev.to/gattalraouf/6-reasons-why-i-fell-in-love-with-constraint-layout-3j1l</guid>
      <description>&lt;p&gt;This is an article I’ve decided to work on after witnessing the power of Constraint layout my self, seeing how flexible it is, and interacting with the great options it offers. I just fell in love. Not only because Constraint Layout allows you to create optimized large and complex layouts with a flat view hierarchy (no nested view groups), nor that it is — similarly to Relative Layout (Which is the layout I used to prefer before using Constraint layout) deal with all views according to relationships between sibling views and the parent layout with more flexibility and simplicity, But also because of 6 options that made it as it is which are :&lt;/p&gt;

&lt;h2&gt;
  
  
  Match Constraints (the power of 0 dp):
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;When a dimension is set to “Match_Constraint” or “0 dp”, the default behavior is to make the view expands as much as possible to meet the constraints on each side (after accounting for the view’s margins).&lt;/p&gt;
&lt;/blockquote&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fstoz2dtlsez1ee805pt9.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fstoz2dtlsez1ee805pt9.png" alt="Match_Constraint"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This simply my favorite feature, It allows you to control the dimensions of the views responsively according to the screen sizes in different devices. It just took the dimensions handling in Android Development to a next level.&lt;/p&gt;

&lt;h2&gt;
  
  
  Baseline alignment
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Align the text baseline of a view to the text baseline of another view.&lt;/p&gt;
&lt;/blockquote&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fz5h34y7grxkhp7286v7d.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fz5h34y7grxkhp7286v7d.png"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I won’t talk much about this one because it’s definition says it all, It allows you to align views according to the text it self, and that’s just awesome!!!&lt;/p&gt;

&lt;h2&gt;
  
  
  Constrain to a guideline
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;There is 2 types of guidelines, vertical and horizontal guidelines to which you can constrain views, and the guideline will be invisible to app users. You can position the guideline within the layout based on either dp units or percent, relative to the layout’s edge.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;The guidelines feature simplifies making everything responsive in your layout, since it offers you the possibility to position different views using percentages relatively to the layout’s edge, and this is a wonderful option to be honest.&lt;/p&gt;

&lt;h2&gt;
  
  
  Constrain to a barrier
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Similar to a guideline, a barrier is an invisible line that you can constrain views to. Except a barrier does not define its own position; instead, the barrier position moves based on the position of views contained within it.&lt;/p&gt;
&lt;/blockquote&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fmty1nwozwqlvqpngzzks.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fmty1nwozwqlvqpngzzks.png" alt="Constrain to a barrier"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This one is just amazing, using it you can handle the unpredictable behavior of dynamically filled views, let’s say you have a text view, just set and put it inside the barrier then position the other views relatively to the barrier and everything will be handled automatically. That’s it, no more complicated links to think about. It’s true power appears when used with multiple views.&lt;/p&gt;

&lt;h2&gt;
  
  
  Control linear groups with a chain
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;A chain is a group of views that are linked to each other with bi-directional position constraints. The views within a chain can be distributed either vertically or horizontally.&lt;/p&gt;
&lt;/blockquote&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fznq4r1fq95mrq5a8nzbf.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fznq4r1fq95mrq5a8nzbf.png" alt="Different Chain Styles"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Chains provide group-like behavior in a single axis (horizontally or vertically). The other axis can be constrained independently. It offers a fast easy way to dynamically link views without thinking static, it comes in both directions horizontal and vertical. It has several types shown in the figure up there.&lt;/p&gt;

&lt;h2&gt;
  
  
  Circular positioning
&lt;/h2&gt;

&lt;blockquote&gt;
&lt;p&gt;Circular positioning is to constrain a widget center relatively to another widget center, at an angle and a distance. This allows you to position a widget on a circle.&lt;/p&gt;
&lt;/blockquote&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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fuvvi2mmmfdc8wu0mj5g8.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%2Fthepracticaldev.s3.amazonaws.com%2Fi%2Fuvvi2mmmfdc8wu0mj5g8.png" alt="Circular positioning"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Circular position is a whole new level of positioning in android, it links the center of a view to the center of another view according to a specific angle which allows you not only to position complicated views easily but also animate them changing just the angle.&lt;/p&gt;

&lt;p&gt;Those 6 features are not all what constraint layout offers, nor the usages are limited to what I mentioned. Using constraint layout creatively can create pretty cool layouts, all you have to do is unleashing your imagination and some coding…&lt;/p&gt;

&lt;h2&gt;
  
  
  Useful links:
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://developer.android.com/training/constraint-layout" rel="noopener noreferrer"&gt;https://developer.android.com/training/constraint-layout&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://developer.android.com/reference/android/support/constraint/ConstraintLayout" rel="noopener noreferrer"&gt;https://developer.android.com/reference/android/support/constraint/ConstraintLayout&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>android</category>
      <category>constraintlayout</category>
      <category>xml</category>
      <category>userinterface</category>
    </item>
  </channel>
</rss>
