<?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: Clarance Liberi 💯</title>
    <description>The latest articles on DEV Community by Clarance Liberi 💯 (@claranceliberi).</description>
    <link>https://dev.to/claranceliberi</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%2F427600%2F7879d1a9-9fb5-41c9-8e96-d8411725f864.jpg</url>
      <title>DEV Community: Clarance Liberi 💯</title>
      <link>https://dev.to/claranceliberi</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/claranceliberi"/>
    <language>en</language>
    <item>
      <title>Quick review on git commands</title>
      <dc:creator>Clarance Liberi 💯</dc:creator>
      <pubDate>Fri, 19 Mar 2021 13:13:29 +0000</pubDate>
      <link>https://dev.to/claranceliberi/quick-review-on-git-commands-1eg6</link>
      <guid>https://dev.to/claranceliberi/quick-review-on-git-commands-1eg6</guid>
      <description>&lt;p&gt;In this blog, we are going to review some basic git commands. We are going to work through all essential git commands that you need to start working with git efficiently and productively.&lt;/p&gt;

&lt;h3&gt;
  
  
  Setting up git
&lt;/h3&gt;

&lt;p&gt;After downloading and installing  &lt;code&gt;git bash&lt;/code&gt; you will need to set up this information so that git can start working properly but this will only be set once unless you re-install new git.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# - check git version&lt;/span&gt;
git &lt;span class="nt"&gt;--version&lt;/span&gt;

&lt;span class="c"&gt;# - configure you Name and your email to identify yourself with Git&lt;/span&gt;
git config &lt;span class="nt"&gt;--global&lt;/span&gt; user.name &lt;span class="s2"&gt;"Your Name"&lt;/span&gt;
git config &lt;span class="nt"&gt;--global&lt;/span&gt; user.email &lt;span class="s2"&gt;"your@email.com"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Initializing/creating repository
&lt;/h3&gt;

&lt;p&gt;in case you are creating new repository to track your file changes&lt;br&gt;
you will need to use this command&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# - initializing git repository&lt;/span&gt;
git init
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Status [ of the repository]
&lt;/h3&gt;

&lt;p&gt;when you want to see the status of the files in the repository, again in the current branch you will use this command which will show untracked files, etc.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# - show status of the repository&lt;/span&gt;
&lt;span class="c"&gt;# - shows files which have been changed,&lt;/span&gt;
&lt;span class="c"&gt;#   tracked, staged etc&lt;/span&gt;
git status
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Stagging files
&lt;/h3&gt;

&lt;p&gt;all about adding files to git repository, notice that you can use &lt;code&gt;remove&lt;/code&gt; instead of &lt;code&gt;add&lt;/code&gt; if you want to unstage files or remove files&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# - staging :   adding files to stage area&lt;/span&gt;
&lt;span class="c"&gt;# - staging area :  files that are going to be included &lt;/span&gt;
&lt;span class="c"&gt;#               in next commit&lt;/span&gt;


&lt;span class="c"&gt;# - staging one file&lt;/span&gt;
git add file.js

&lt;span class="c"&gt;# - staging multiple files&lt;/span&gt;
git add file.js file2.js file3.js

&lt;span class="c"&gt;# - staging all files&lt;/span&gt;
git add &lt;span class="nb"&gt;.&lt;/span&gt;

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Committing file [or stagging files]
&lt;/h3&gt;

&lt;p&gt;saving changes you made in the repository.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# - commit : a term used for saving changes&lt;/span&gt;
&lt;span class="c"&gt;#           to a repository&lt;/span&gt;

&lt;span class="c"&gt;# - committing changes made from stagged files&lt;/span&gt;
&lt;span class="c"&gt;# - '-m' means message , a message should be descriptive&lt;/span&gt;
&lt;span class="c"&gt;# - showing what changes really made in the repository&lt;/span&gt;
git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Commit message"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  History [of the repository]
&lt;/h3&gt;

&lt;p&gt;list of necessary commands that you need to work through your git repository history.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# - view your commit history&lt;/span&gt;
git log

&lt;span class="c"&gt;# - revert / go back to certain commit&lt;/span&gt;
&lt;span class="c"&gt;# - '07e239f2f' is a sample commit id that we are&lt;/span&gt;
&lt;span class="c"&gt;#   trying to go back on &lt;/span&gt;
git checkout 07e239f2f

&lt;span class="c"&gt;# - going back to the latest commit on &lt;/span&gt;
&lt;span class="c"&gt;#   the 'master' branch&lt;/span&gt;
git checkout master
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Branches
&lt;/h3&gt;

&lt;p&gt;list of commands that you will work with to interact with branches  in the repository&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="c"&gt;# - Creating new branch&lt;/span&gt;
&lt;span class="c"&gt;# - 'new-branch-name' is the name of the new branch&lt;/span&gt;
git branch new-branch-name

&lt;span class="c"&gt;# - switching to branch in the repository&lt;/span&gt;
&lt;span class="c"&gt;# - if branch 'branch-name' does not exists &lt;/span&gt;
&lt;span class="c"&gt;#   on the repository git will create it&lt;/span&gt;
git switch  branch-name

&lt;span class="c"&gt;# - switch to any branch in the repository&lt;/span&gt;
&lt;span class="c"&gt;# - 'master' is the branch we want to switch on&lt;/span&gt;
git checkout master


&lt;span class="c"&gt;# - list all branch in the repository&lt;/span&gt;
git branch

&lt;span class="c"&gt;#merge 'branch-name' to active branch   &lt;/span&gt;
git merge branch-name

&lt;span class="c"&gt;# - delete branch&lt;/span&gt;
&lt;span class="c"&gt;# - 'branch-name' is the branch we are deleting&lt;/span&gt;
git branch &lt;span class="nt"&gt;-d&lt;/span&gt; branch-name

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Conclusion &lt;br&gt;
All of these commands are super easy to work with as they are easily explained, with them you can start using &lt;code&gt;GitHub&lt;/code&gt; or any other tool so that you can now control versions of your system, and I am pretty sure that it is a good note for those who already know &lt;code&gt;git&lt;/code&gt;, Thank you &lt;/p&gt;

</description>
      <category>github</category>
      <category>webdev</category>
      <category>productivity</category>
      <category>programming</category>
    </item>
    <item>
      <title>Tips to reproduce/fix bugs form software developers</title>
      <dc:creator>Clarance Liberi 💯</dc:creator>
      <pubDate>Sun, 06 Dec 2020 15:11:19 +0000</pubDate>
      <link>https://dev.to/claranceliberi/tips-to-reproduce-fix-bugs-form-software-developers-c71</link>
      <guid>https://dev.to/claranceliberi/tips-to-reproduce-fix-bugs-form-software-developers-c71</guid>
      <description>&lt;p&gt;Tips to reproduce/fix bugs form software developers&lt;br&gt;
We all know how hard it may be to google an error, some error tend to last too long due to not knowing how to search or find solutions for the error&lt;br&gt;
here are a few tips&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Use the meaningful text from the error
&lt;/h2&gt;

&lt;p&gt;When you are going to search for an error on google try to pick only meaningful text from the error, and avoid timestamps, line numbers, name of files, or other stuff which maybe not that useful to the browser&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Include names of the technology
&lt;/h2&gt;

&lt;p&gt;While googling try to include names of the technologies like if you are using javascript, try to tag it in a search query, or if you are using a framework tag it&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Small search query 
&lt;/h2&gt;

&lt;p&gt;Also, remember to minimize the search query as small text as possible but remember to keep it meaning full, keep in mind that the small text or phrase you write the more result you get on google so this can boost your search to more resources&lt;/p&gt;

&lt;h2&gt;
  
  
  4. First look at GitHub issues / StackOverflow posts
&lt;/h2&gt;

&lt;p&gt;The reason why you need to first look at this platforms are, GitHub mostly have the solution of errors as they might have been reported early on the project so here you get a taste of solutions or alternative from the owners of the project, while StackOverflow is the world of words programmers problems&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Be patient
&lt;/h2&gt;

&lt;p&gt;googling errors does not mean that you have to always find a solution as you get your first search, No, sometimes you don't find a solution at the beginning and what you have to do is keep searching on other platforms not mandatory only Github or StackOverflow, give a try other platform and you may find it&lt;/p&gt;

&lt;h2&gt;
  
  
  6. Look around the community
&lt;/h2&gt;

&lt;p&gt;at this step now look around your friends or elders who you may trust that they know something about the technology you are using,&lt;br&gt;
they help you in one way or other so that your problem may be fixed&lt;/p&gt;

&lt;h2&gt;
  
  
  7. Refresh your mind and take a rest
&lt;/h2&gt;

&lt;p&gt;programmers use their brain and butt than other things so they might be the time you are tired or anything else, first do something to refresh your mind or sleep like 1 hour then you will come back with good thinking than before&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Trace where the function was called from, in javascript</title>
      <dc:creator>Clarance Liberi 💯</dc:creator>
      <pubDate>Thu, 01 Oct 2020 11:08:30 +0000</pubDate>
      <link>https://dev.to/claranceliberi/trace-where-the-function-was-called-from-in-javascript-22hf</link>
      <guid>https://dev.to/claranceliberi/trace-where-the-function-was-called-from-in-javascript-22hf</guid>
      <description>&lt;p&gt;Hello, Today we are going to remind ourselves how we can trace a function so that we can know where it was called from. If you have not ever messed up while trying to find where a function was called from you can't understand how important this post is, but if you have messed up and struggled to know and find where exactly the function is called from and then here is the solution&lt;/p&gt;

&lt;p&gt;so we already know some debugging functions in javascript like &lt;code&gt;console.log()&lt;/code&gt;&lt;br&gt;
but there is time they never help to such situation, that's when you find that the real  thing to use is&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;

console.trace()


&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;so here is the step by step of doing the things&lt;/p&gt;

&lt;p&gt;I am using CodePen for writing these simple codes&lt;/p&gt;

&lt;p&gt;let us suppose we have two functions &lt;code&gt;add&lt;/code&gt; and &lt;code&gt;consoleAdd&lt;/code&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%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fwvl9xpa32be19fnbl48e.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%2Fwvl9xpa32be19fnbl48e.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;and I think you have noticed that in &lt;code&gt;add()&lt;/code&gt; function we have something called &lt;code&gt;console.trace()&lt;/code&gt; so at this time we want to ensure and know where exactly &lt;code&gt;add()&lt;/code&gt; function was called from.&lt;/p&gt;

&lt;p&gt;so to know this we will go in &lt;code&gt;console&lt;/code&gt; in browser dev tools, as where every console functions are found, so what you will see is the list of where the function is going called and there parents function&lt;br&gt;
but the exact function will be the first one as you see right here&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%2Fls1z1xd8yxhhsouaa0z2.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%2Fls1z1xd8yxhhsouaa0z2.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;it thinks you already see that we have &lt;code&gt;add&lt;/code&gt; in the first place so that's where our &lt;code&gt;console.trace()&lt;/code&gt; was called from , but remember our aim is not knowing where &lt;code&gt;console.trace()&lt;/code&gt; was called from but where &lt;code&gt;add()&lt;/code&gt; was called from &lt;/p&gt;

&lt;p&gt;simple console.trace() shows every function call from where &lt;code&gt;console.trace()&lt;/code&gt; is called to the last one&lt;br&gt;
I think you can see it clear in the above image that &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;
&lt;code&gt;console.trace()&lt;/code&gt; was called in &lt;code&gt;add()&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;
&lt;code&gt;add()&lt;/code&gt; was called from &lt;code&gt;consoleAdd()&lt;/code&gt;
&lt;/li&gt;
&lt;li&gt;and finally &lt;code&gt;consoleAdd()&lt;/code&gt; was called by &lt;code&gt;anonymous&lt;/code&gt; as it was called by browser while running the code&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;simple those number on the end of the name of a function are the number of the line where the function is returned or if the function did not return anything they take the next line to the last function curry brace &lt;code&gt;}&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;and that &lt;strong&gt;5&lt;/strong&gt; you saw, is the output of &lt;code&gt;add(2,3)&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;I hope this post help, Thank you dev community&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>vscode</category>
      <category>productivity</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
