<?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: Stephen </title>
    <description>The latest articles on DEV Community by Stephen  (@solar0).</description>
    <link>https://dev.to/solar0</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%2F827293%2F810f6ccf-2be4-41ad-bb05-6e7212c2cb7b.jpeg</url>
      <title>DEV Community: Stephen </title>
      <link>https://dev.to/solar0</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/solar0"/>
    <language>en</language>
    <item>
      <title>How to Push Code to Github</title>
      <dc:creator>Stephen </dc:creator>
      <pubDate>Thu, 17 Mar 2022 20:16:35 +0000</pubDate>
      <link>https://dev.to/solar0/how-to-push-code-to-github-1ni</link>
      <guid>https://dev.to/solar0/how-to-push-code-to-github-1ni</guid>
      <description>&lt;p&gt;GitHub is a provider of internet hosting for software development and version control using Git. It is also a publishing tool and a great way to collaborate with others. Github gives us the ability to save our process and go back to earlier points as needed.&lt;/p&gt;

&lt;p&gt;We can push code to Github following these steps;&lt;br&gt;
Before we can push code to Github, Git needs to to be installed on your computer, start by heading to the Git website and downloading the latest version. Follow the steps provided on the website and install Git on your computer.&lt;/p&gt;

&lt;p&gt;After installing Git, open Github and confirm that you are signed in, click on Create new repository and then add a name and description&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--iOJ6SQ90--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s5p3d76ipsgul92kpbpz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--iOJ6SQ90--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/s5p3d76ipsgul92kpbpz.png" alt="Image description" width="616" height="395"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--P11CSsI_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pi6agwk786sbiepesv5i.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--P11CSsI_--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pi6agwk786sbiepesv5i.png" alt="Image description" width="880" height="673"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After creating a new repository, a quick setup page is loaded which has important information on how to push your code to the repository using the terminal &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--3OiL7D1A--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kk8l9fo9j9nvajdhzwa9.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--3OiL7D1A--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kk8l9fo9j9nvajdhzwa9.png" alt="Image description" width="880" height="493"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next open the terminal and set your local project as the working directory by typing &lt;code&gt;cd&lt;/code&gt; followed by the path of the folder where your project is saved on your computer and hitting return. The files in the directory can be viewed by typing &lt;code&gt;ls&lt;/code&gt; and hitting return. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--NGTQn3Np--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kv01tjnhmrkzhcikhg3n.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--NGTQn3Np--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kv01tjnhmrkzhcikhg3n.png" alt="Image description" width="880" height="270"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Intialize your local directory as a git repository by typing &lt;code&gt;git init&lt;/code&gt; and hitting return&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--inARAQJ6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0awczhe3wjgbei3y5as1.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--inARAQJ6--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/0awczhe3wjgbei3y5as1.png" alt="Image description" width="880" height="312"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Add the files in your local repository to the git repository by typing &lt;code&gt;git add .&lt;/code&gt; and hitting return.This stages the files for  commit. Typing &lt;code&gt;git status&lt;/code&gt; and hitting return shows us the files  that have been staged to commit&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--H6ztoEbi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pxx2rz4lwhat06ije39q.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--H6ztoEbi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/pxx2rz4lwhat06ije39q.png" alt="Image description" width="880" height="201"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Commit the files you have staged  by typing &lt;code&gt;git commit -m “first commit”&lt;/code&gt; and hitting enter.The -m flag specifies what commit message will be recorded in the repository. This is purely informational to users. The message might be “fixed bug,” “new level,” etc. This message helps other developers easily know what changes have been made to the code.&lt;/p&gt;

&lt;p&gt;Specifying the remote repository’s url comes next and to do this copy the url from the Github repository quick setup page then in terminal type &lt;code&gt;git remote add origin&lt;/code&gt; , paste the Git repository’s url and hit return.&lt;/p&gt;

&lt;p&gt;Finally, push the code in your local repository by typing &lt;code&gt;git push -u origin master&lt;/code&gt; and hit return. Enter your Github username and password  when requested. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--uUWA2brf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9nhy807nbird0wewq2n3.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--uUWA2brf--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/9nhy807nbird0wewq2n3.png" alt="Image description" width="880" height="74"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once all these steps are completed, the files from your local directory will be added to your repository on Github&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--7fc_H9x---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j6f2sbep1wg3rqzyjs07.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--7fc_H9x---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/j6f2sbep1wg3rqzyjs07.png" alt="Image description" width="880" height="394"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>programming</category>
      <category>beginners</category>
      <category>productivity</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>What is Github?</title>
      <dc:creator>Stephen </dc:creator>
      <pubDate>Thu, 17 Mar 2022 16:48:43 +0000</pubDate>
      <link>https://dev.to/solar0/what-is-github-k7o</link>
      <guid>https://dev.to/solar0/what-is-github-k7o</guid>
      <description>&lt;p&gt;GitHub is a cloud-based service that helps developers store and manage their code. To understand GitHub fully, you need to understand Version Control and Git&lt;/p&gt;

&lt;p&gt;What Is Version Control?&lt;br&gt;
Version control helps developers manage and keep track of changes to a software project’s code. As a software project grows, version control becomes essential. &lt;/p&gt;

&lt;p&gt;If a developer is to work on a specific part of a software project’s codebase, it wouldn’t be safe to have them directly edit the source code.&lt;/p&gt;

&lt;p&gt;Instead, version control allows developers work safely through branching. With branching, a developer duplicates part of the source code, which is called the repository. The developer can then safely make changes to that part of the code without affecting the rest of the project.&lt;/p&gt;

&lt;p&gt;All of these changes are tracked and can be reverted if the need arises.&lt;/p&gt;

&lt;p&gt;What Is Git?&lt;br&gt;
Git is a free and open source distributed version control system, which means that the entire codebase and history is available to every developer, allowing for easy branching.&lt;/p&gt;

&lt;p&gt;GitHub is a Git repository hosting service. It offers the distributed version control and source code management(SCM) functionality of Git. While Git is a command line tool, GitHub provides a Web-based graphical interface. Github also provides access control and several collaboration features, such as a bug tracking, wikis and basic task management tools for every project.&lt;/p&gt;

&lt;p&gt;One of the most important features of GitHub is “forking” which is copying a repository from one user’s account to another. This lets you  take a project that you don’t have write access to and modify it under your own account. After making changes, you can send a notification called a “pull request” to the original owner. That user can then merge the changes found in your repository with the original repository.&lt;/p&gt;

&lt;p&gt;These three features – fork, pull request and merge – make GitHub a very powerful tool.&lt;/p&gt;

&lt;p&gt;Github  makes it a lot easier for individuals and teams to use Git for version control and collaboration.&lt;/p&gt;

&lt;p&gt;To get started with GitHub:&lt;br&gt;
•&lt;a href="https://github.com/join"&gt;Sign up&lt;/a&gt; for a free GitHub account&lt;br&gt;
•Follow the &lt;a href="https://guides.github.com/activities/hello-world/"&gt; GitHub Hello World guide&lt;/a&gt; to understand the most popular actions you can carry out.&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>programming</category>
      <category>codenewbie</category>
      <category>github</category>
    </item>
    <item>
      <title>CSS Box Model</title>
      <dc:creator>Stephen </dc:creator>
      <pubDate>Sun, 13 Mar 2022 23:54:57 +0000</pubDate>
      <link>https://dev.to/solar0/css-box-model-dhb</link>
      <guid>https://dev.to/solar0/css-box-model-dhb</guid>
      <description>&lt;p&gt;All HTML elements written in CSS have a box around them, and understanding these boxes is important in mastering how to create layouts for a webpage.&lt;br&gt;
The type of box applied to an element is defined by the &lt;code&gt;display&lt;/code&gt; property and boxes have an outer display type and an inner display type. &lt;/p&gt;

&lt;p&gt;Outer Display Type &lt;br&gt;
The outer display type determines if the box is &lt;code&gt;inline&lt;/code&gt; or &lt;code&gt;block&lt;/code&gt;. These boxes are so classed in reference to their behavior in the flow of a webpage and relation to other boxes &lt;/p&gt;

&lt;p&gt;Block Boxes &lt;br&gt;
Block boxes start on a new line and extend to fill the available inline space&lt;br&gt;
HTML elements, such as &lt;code&gt;&amp;lt;h1&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;p&amp;gt;&lt;/code&gt;, use block as their outer display type by default. &lt;/p&gt;

&lt;p&gt;Inline Boxes&lt;br&gt;
Inline boxes don’t start on a new line and are only as large as their content&lt;br&gt;&lt;br&gt;
HTML elements, such as &lt;code&gt;&amp;lt;a&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;span&amp;gt;&lt;/code&gt;, &lt;code&gt;&amp;lt;em&amp;gt;&lt;/code&gt; and &lt;code&gt;&amp;lt;strong&amp;gt;&lt;/code&gt;use inline as their outer display type by default.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6nZT6Q9f--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4lgczzq4j8j8xoe8lxzz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6nZT6Q9f--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4lgczzq4j8j8xoe8lxzz.png" alt="Image description" width="880" height="375"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
  &lt;span&gt;See the Pen &lt;a href="https://codepen.io/solar0/pen/RwxNbMX"&gt;
  Untitled&lt;/a&gt; by stephen (&lt;a href="https://codepen.io/solar0"&gt;@solar0&lt;/a&gt;)
  on &lt;a href="https://codepen.io"&gt;CodePen&lt;/a&gt;.&lt;/span&gt;
&lt;/p&gt;

&lt;p&gt;Inner Display Type&lt;br&gt;
The inner display type determines how elements inside a particular box are laid out. By default, the elements inside a box are laid out in normal flow, just like any other block and inline elements (as explained above).&lt;/p&gt;

&lt;p&gt;We can, however, change the inner display type by using display values like &lt;code&gt;flex&lt;/code&gt; and then style the boxes according to flex rules.&lt;/p&gt;

&lt;p&gt;The CSS box model defines how the different parts of a box — margin, border, padding, and content — work together to create the layout of a page.&lt;br&gt;
The image below illustrates the box model:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--iAVLVDan--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/heoz3utjrcr66o3hsdds.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--iAVLVDan--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/heoz3utjrcr66o3hsdds.png" alt="Image description" width="880" height="488"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Content box: The area where your content is displayed, which can be sized using properties like &lt;code&gt;width&lt;/code&gt; and &lt;code&gt;height&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Padding: The padding sits around the content as white space; its size can be controlled using the &lt;code&gt;padding&lt;/code&gt; property&lt;/p&gt;

&lt;p&gt;Border: The border wraps the content and any padding. Its size and style can be controlled using the &lt;code&gt;border&lt;/code&gt; property&lt;/p&gt;

&lt;p&gt;Margin: The margin is the outermost layer, wrapping the content, padding, and border as whitespace between the box and other elements. Its size can be controlled using the &lt;code&gt;margin&lt;/code&gt; property&lt;/p&gt;

&lt;p&gt;Examples&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wlfIq1rn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lqlh9stdn2ae3qofjl9z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wlfIq1rn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lqlh9stdn2ae3qofjl9z.png" alt="Image description" width="880" height="569"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--H72EsxXe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/844hb4j84u0nl7offyrn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--H72EsxXe--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/844hb4j84u0nl7offyrn.png" alt="Image description" width="880" height="569"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;
  &lt;span&gt;See the Pen &lt;a href="https://codepen.io/solar0/pen/ZEvEdzR"&gt;
  Untitled&lt;/a&gt; by stephen (&lt;a href="https://codepen.io/solar0"&gt;@solar0&lt;/a&gt;)
  on &lt;a href="https://codepen.io"&gt;CodePen&lt;/a&gt;.&lt;/span&gt;
&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>programming</category>
      <category>css</category>
    </item>
    <item>
      <title>ABSOLUTE AND RELATIVE LENGTH UNITS</title>
      <dc:creator>Stephen </dc:creator>
      <pubDate>Fri, 11 Mar 2022 19:27:04 +0000</pubDate>
      <link>https://dev.to/solar0/absolute-and-relative-length-units-4oeb</link>
      <guid>https://dev.to/solar0/absolute-and-relative-length-units-4oeb</guid>
      <description>&lt;p&gt;Several CSS properties take “Length” values, such as width, padding, font size, margin, etc. The Length values are used to set the size of an element or space an element in a web page. &lt;br&gt;
The two main types of length units used in CSS are absolute and relative. Understanding how these two units work is important for styling web pages using CSS.&lt;/p&gt;

&lt;p&gt;Absolute Length Units&lt;br&gt;
Absolute Length units describe physical units of length. They approximate the actual size of an element on the screen and are not relative to any other element or measurement. Absolute Length Units include centimeters(cm), millimeters(mm),  inches(in),  pixels(px), points(pt) and picas(px). &lt;/p&gt;

&lt;p&gt;The absolute length units are fixed and a length expressed in any of these will appear as exactly that size when displayed. The only value that you will commonly come across is px (pixels). The others are more useful for print.&lt;/p&gt;

&lt;p&gt;Absolute Units are not recommended for use on screens because they will look the same whether on desktop, tablet, or mobile, and will not change along with the viewport’s dimensions, making it impossible to build responsive web pages.&lt;/p&gt;

&lt;p&gt;Relative Length Units &lt;br&gt;
Relative length units specify a length relative to another length property which for example could be the size of the viewport or the size of the parent element’s font. Relative length units are useful for making responsive websites. &lt;/p&gt;

&lt;p&gt;They scale relative to a parent or the viewport and allow for websites to adapt style sheets from one environment to another, such as from mobile to desktop.&lt;br&gt;
Some of the most useful relative units for web development are listed in the table below&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fifQ09ue--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qe1cyu3je7cnxvxi8pwz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fifQ09ue--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qe1cyu3je7cnxvxi8pwz.png" alt="relative length units" width="636" height="440"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;em and rem are the two relative lengths you are likely to encounter most frequently when sizing elements.&lt;br&gt;
It is good practice for web developers to set length values using relative length units rather than absolute units. This makes it easier to manipulate the size of elements, easily halving or doubling the size instead of setting explicit values.&lt;/p&gt;

&lt;p&gt;Thanks for reading!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>programming</category>
      <category>css</category>
    </item>
  </channel>
</rss>
