<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Charles Oriih on Medium]]></title>
        <description><![CDATA[Stories by Charles Oriih on Medium]]></description>
        <link>https://medium.com/@charlesorih?source=rss-2246a68f6b65------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*YpaLwKKem5TDqn8ixJ7tYQ.jpeg</url>
            <title>Stories by Charles Oriih on Medium</title>
            <link>https://medium.com/@charlesorih?source=rss-2246a68f6b65------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 20 Nov 2026 05:42:26 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@charlesorih/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Introduction to ReactJs]]></title>
            <link>https://medium.com/@charlesorih/introduction-to-reactjs-e0d8a6b38dae?source=rss-2246a68f6b65------2</link>
            <guid isPermaLink="false">https://medium.com/p/e0d8a6b38dae</guid>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[react]]></category>
            <dc:creator><![CDATA[Charles Oriih]]></dc:creator>
            <pubDate>Sun, 12 Feb 2023 21:17:51 GMT</pubDate>
            <atom:updated>2023-02-12T22:56:09.989Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="react image" src="https://cdn-images-1.medium.com/max/1024/1*y6C4nSvy2Woe0m7bWEn4BA.png" /></figure><p>ReactJs is an open-source frontend JavaScript library for building interactive and optimized user interfaces based on reusable components. Due to the built-in ability to create reusable UI (User Interface) components, ReactJs stands out as one the most used frontend library. The ability to create components that present data that can be changed over time has proven to be highly useful to developers.</p><p>React was originally created by Jordan Walke in 2012 as a prototype, in an attempt to manage the problems of Facebook Ads.</p><p><strong>Importance of React</strong></p><p>The importance of ReactJs cannot be overemphasized. The following are some of the importance of the most used JavaScript library:</p><ul><li>React uses virtual DOM (Document Object Model), a JavaScript object. It has the ability to improve app performance since the virtual DOM only updates only the part of the DOM where there are changes, this brings about improved speed.</li><li>React components and workflow patterns improve the code base’s readability, which helps maintain larger apps.</li><li>It can also be used on the client and server side as well as with other frameworks like Laravel, etc.</li><li>React and its frameworks like Next.js and Gatsby can be used to create static websites which are efficient in SEO (Search engine optimization).</li></ul><p><strong>Setting Up ReactJs</strong></p><p>ReactJs can be set up for use in a few ways which include:</p><ul><li>Adding to a website using CDN (Content delivery networks).</li><li>Using CRA (create react app)</li><li>Using Vite.</li></ul><p><strong>Adding ReactJs to a website: </strong>this can be achieved by providing some meta tags in the details in the title of your HTML document, as can be seen in this <a href="https://reactjs.org/docs/add-react-to-a-website.html">link</a>. Though this method has many shortcomings, some abilities of ReactJs can not be completely captured.</p><p><strong>Using CRA (create react app): </strong>This is the modern way to create a react application. After the installation of <a href="https://nodejs.org/en/download/">nodejs</a> in your device, open up a terminal either in your text editor, gitBash or your command prompt, and run</p><pre>npx create-react-app my-app</pre><p>after successfully running this function, it downloads the necessary installing this packages to run a react app on your device. run cd my-app to change the working directory to your newly created react app (in this case, “my-app”). After this, run npm start to start up the react app in a live server at port: localhost:3000 on your default browser. For more on this, visit this <a href="https://reactjs.org/docs/create-a-new-react-app.html">link</a>.</p><p><strong>using Vite: </strong>vite is a rapidly growing front-end development tool that focuses on speed and performance it is gradually gaining recognition for its optimized speed, to create a react app using Vite, follow this <a href="https://www.digitalocean.com/community/tutorials/how-to-set-up-a-react-project-with-vite">link</a>.</p><p><strong>Conditional rendering</strong></p><p>conditional rendering refers to the process of delivering elements and components based on certain conditions.</p><p><strong>React Hooks</strong></p><p>React Hooks are JavaScript functions that can be used to isolate reusable parts from a functional component. The introduction of react hooks has made state management and the management of side-effects of specific functions easy. React provides a bunch of standard in-built hooks such as useState, useEffects, useMemo, useRef to mention a few. <strong>useState </strong>is used to manage the state of your components.</p><pre>import { useState } from &quot;react&quot;;<br>import ReactDOM from &quot;react-dom/client&quot;;<br><br>function FavoriteColor() {<br>  const [color, setColor] = useState(&quot;green&quot;);<br>  return (<br>  &lt;&gt;<br>      &lt;h1&gt;My favorite color is {color}!&lt;/h1&gt;<br>      &lt;button<br>        type=&quot;button&quot;<br>        onClick={() =&gt; setColor(&quot;pink&quot;)}<br>      &gt;Pink&lt;/button&gt;<br>      &lt;button<br>        type=&quot;button&quot;<br>        onClick={() =&gt; setColor(&quot;yellow&quot;)}<br>      &gt;Yellow&lt;/button&gt;<br>    &lt;/&gt;<br>)<br>}<br><br>const root = ReactDOM.createRoot(document.getElementById(&#39;root&#39;));<br>root.render(&lt;FavoriteColor /&gt;);</pre><p>in the above function, each time the button is clicked, the state changes to the colour specified by the button. the onClick event triggers the change on the color state using the setColor state.</p><p><strong>Creating a to-do list app using react.</strong></p><p>The to-do list app is <strong>CRUD</strong> enabled to allow the user to create tasks, read tasks, update or edit tasks and delete to-do tasks. The following steps was used to achieve this:</p><ul><li>create react app,</li><li>managed the state of the functional components using useState,</li><li>states like, task list, editing, task name and alert was created and managed</li><li>a list component that renders all the task lists was created to properly style the each task in the to-do list.</li><li>an alert component was also created to manage specific alerts on some events on the to-do list.</li><li>the index.css file houses all styling of the app.</li><li>react icons were used to import icons to the page.</li><li>these react icons were made nested inside buttons to call onclick events which would in turn trigger functions which the icons represent eg. removeItem and editItem.</li><li>the list items are stored in the local storage so that even on page refresh, the data would be unchanged.</li><li>useEffect was used to control how long the alert components display before it disappears.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e0d8a6b38dae" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[HTML SEMANTICS]]></title>
            <link>https://medium.com/@charlesorih/html-semantics-178c206d8408?source=rss-2246a68f6b65------2</link>
            <guid isPermaLink="false">https://medium.com/p/178c206d8408</guid>
            <category><![CDATA[semanticweb]]></category>
            <category><![CDATA[semantics]]></category>
            <category><![CDATA[html5]]></category>
            <category><![CDATA[seo]]></category>
            <dc:creator><![CDATA[Charles Oriih]]></dc:creator>
            <pubDate>Sun, 18 Dec 2022 21:23:15 GMT</pubDate>
            <atom:updated>2022-12-19T22:49:03.320Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="HTML Semantics" src="https://cdn-images-1.medium.com/max/640/1*a6-c-uwQIc5eG3dDSlHicQ.png" /></figure><p>HTML is the standard markup language for developing web pages. HTML stands for Hyper Text Markup Language. It consists of a series of elements that directs the browser on how to structure and display the contents of a web page.</p><p>Semantics is a branch of linguistics and logic concerned with meaning. Semantics in Hyper Text Markup Language uses Markup in HTML to elucidate the meaning of contents in a webpage rather than merely improving the web page’s appearance. To achieve great semantics in HTML, <em>HTML</em> <em>syntax</em> or <em>HTML elements</em> are used. This better defines the web page into various sections and makes its contents more comprehensible.</p><p><strong>HTML Elements</strong></p><p>An Html element is a component of an HTML document that informs a web browser how to structure and interpret a certain part of the document. It is mostly identified with an opening and a closing tag but in a few cases, it is contained in a single tag. The following example further explains an HTML element;</p><p>Example 1</p><pre>&lt;p&gt; This is a paragraph &lt;/p&gt;</pre><p>The &lt;p&gt; tag is called the opening tag, the &lt;/p&gt; tag is called the closing tag while the text within the opening and the closing tags “This is a paragraph” represents the text which should be displayed on the webpage. The contents of the &lt;p&gt; &lt;/p&gt;tag are interpreted as a paragraph by the web browser.</p><p>Example 2</p><pre>&lt;h2&gt; Hello! &lt;br&gt; Welcome to my Zenith Furniture &lt;/h2&gt;</pre><p>The &lt;h2&gt; element is used to define headings on a web page. In the example above, &lt;h2&gt; is the opening tag while &lt;/h2&gt; is the closing tag, but there is a &lt;br&gt; tag which is a single tag element, which represents a line break. In the web page, the output of this example would be structured into lines, the first line would contain the contents of the &lt;h2&gt; heading before the line break (&lt;br&gt;) tag and the second would contain the content of the &lt;h2&gt; heading tag after the line break tag.</p><p>HTML possesses over a hundred elements that aid the structuring and definition of a webpage.</p><p><strong>The Importance of Semantics HTML</strong></p><p>The importance of semantics cannot be overemphasized because the essence of web or application development is to communicate and poor semantics disrupts good communication. Poor semantics deprives the user of the precise meaning of the content of the webpage or application. The importance of a semantics HTML would be discussed under the following subtitles;</p><ul><li>Accessibility</li><li>Search Engine Optimization</li><li>Maintenance</li></ul><p><strong>Accessibility</strong></p><p>The quality of being easily understood and useful is an important feature of web development. Semantics HTML is regarded as a key first step towards good accessibility practices. When a web page is scanned by screen readers, it extracts information from the DOM (Document Object Model) which translates the page to the reader in various ways. These screen readers can interpret HTML elements with emphasis on their meaning (semantics). It is pertinent to state that screen readers do not read CSS and JavaScript, so no matter how beautiful, functional, or well-styled a website or application may appear to be, it could still be poorly accessible.</p><p><a href="https://www.ncbi.nlm.nih.gov/pmc/articles/PMC5820628/#:~:text=The%20prevalence%20of%20people%20that,estimated%20to%20have%20functional%20presbyopia.">Statistics</a> have it that about 3.44% of the world’s population is visually impaired. The goal of an inclusive developer is to create designs that certain users won’t feel excluded. other accessibility practices include the use of <em>alt</em> text on images, adding a caption to tables, adding a label to inputs etc. For example, if the developer decides to write a title or page heading in a &lt;div&gt;Title goes here&lt;/div&gt; instead of any of the heading tags like &lt;h1&gt;Title goes here&lt;/h1&gt;, the screen reader cannot identify and interpret the content of the &lt;div&gt; as the page title instead, it would interpret it as an ordinary text and that meaning that a title should have given the page becomes absent. Also, the use of &lt;div&gt;paragraph goes here&lt;/div&gt;instead of the use of &lt;p&gt;paragraph goes here&lt;/p&gt;. This would bring about the misinterpretation of the meaning of a paragraph in that context.</p><p><strong>Search Engine Optimization (SEO)</strong></p><p>Semantically correct HTML makes it easier for machines, screen readers, and other assisting devices to understand the contents of a webpage. Search engines accord importance hierarchically from the top of a page to the bottom, meaning; more recognition is given to the content at the top of your page.</p><p>A semantically correct HTML positions the title of the page at the top of the page within the heading tag &lt;h1&gt; &lt;/h1&gt;. This is because search engines are programmed to recognize heading tags at the top of a webpage as the title of that web page and that the context of the heading should define the web page’s content. If other HTML elements like &lt;p&gt; &lt;/p&gt; elements are positioned at the top of a page, search engines will not recognize the content of this &lt;p&gt; tag as the title of that page. If such a website is deployed without correction, it would lack search engine optimization.</p><p><strong>Maintenance</strong></p><p>A semantically correct HTML affords developers ease of maintenance. This is so because it brings a touch of the standard to the HTML file knowing that, some tags are present in the file because of the meaning it gives to the webpage rather than the appearance. This allows the developers to change styles rather than HTML elements, which would further make the file easy to maintain and read.</p><p><strong>Some HTML Semantics Best Practices</strong></p><p><strong>1. Document Structure</strong>: the release of HTML5 availed the developers of some new tags to improve semantics in a web page. This has rapidly improved the proper structuring of web pages. Below, the use of some of these HTML5 tags is stated:</p><ul><li>&lt;header&gt;&lt;/header&gt;<strong>:</strong> This element functions as a container that houses the header of the web page. It contains the logo, navigation, and heading of the website.</li><li>&lt;main&gt; &lt;/main&gt;: This is an HTML element that contains all the content of the web page except for the &lt;header&gt; and the &lt;footer&gt;.</li><li>&lt;footer&gt; &lt;/footer&gt;:<strong> </strong>this is an element that is featured at the bottom of the web page. It contains site information like contact info, copyright, authorship, and navigation links.</li><li>&lt;nav&gt; &lt;/nav&gt;: This is an HTML element that contains the navigation links of the page. It is positioned within the &lt;header&gt; and sometimes the &lt;footer&gt;. In situations where the site has &lt;aside&gt; section, it can also be present in the aside section to enable easy navigation around the site.</li><li>&lt;aside&gt; &lt;aside&gt;: it is used to house contents related to the main content of the page but is not part of the primary flow of the document.</li><li>&lt;section&gt; &lt;/section&gt;: This is an element used to define a distinct part within a larger body of a web document. To achieve this, it can contain other HTML elements that can add meaning to the content.</li></ul><p><strong>2. Page Title and Headings &lt;h1&gt; to &lt;h6&gt;</strong>: headings tags in HTML are one of the most important search engine optimization tools, they include &lt;h1&gt;, &lt;h2&gt;, &lt;h3&gt;, &lt;h4&gt;, &lt;h5&gt; and &lt;h6&gt;. It is said to vary in hierarchical importance starting from &lt;h1&gt; down to &lt;h6&gt; and vary in size except if styled otherwise.</p><ul><li>On a website, it is advisable to use a lower heading below a higher heading to ensure correct semantics. The &lt;h3&gt; should be under a &lt;h2&gt;, and a &lt;h2&gt; should be under a &lt;h1&gt; to properly communicate meaning in the hierarchy.</li><li>It is advisable to use only one &lt;h1&gt; heading tag on a page for better search engine optimization.</li></ul><p><strong>3. Textual Semantics</strong></p><p>It is pertinent to note the use of &lt;b&gt;&lt;/b&gt;and &lt;i&gt;&lt;/i&gt; tags which stand for bold and italics respectively is strictly for appearance. Meaning, it stands for nothing semantically. To solve this problem, HTML4 introduced &lt;strong&gt;and&lt;em&gt;.</p><ul><li>&lt;em&gt;&lt;/em&gt;: this is an element used to accord emphasis on a text within a web document and also styles the text as italics. This is a better substitution for the&lt;i&gt;since it embodies both a semantic and visual meaning.</li><li>&lt;strong&gt;&lt;/strong&gt;: this is an element used to accord emphasis on a text within a web document and also styles the text as a bold text. This is a better substitution for the&lt;b&gt;since it embodies both a semantic and a visual meaning.</li><li>&lt;mark&gt;&lt;/mark&gt;: this is an element used to emphasize a specific text within a web document by highlighting such text.</li><li>&lt;button&gt; &lt;/button&gt;: the button element is used to define a clickable button on a web page. A typical example of a reoccurring mistake in semantics is the use of &lt;div&gt; Submit &lt;/div&gt; which cannot be read as a button by screen readers instead of &lt;button&gt; Submit &lt;/button&gt;.</li><li>&lt;cite&gt;&lt;/cite&gt;: this is an element used to identify the origin of a specific text.</li><li>&lt;blockquote&gt;&lt;/blockquote&gt;and&lt;q&gt;&lt;/q&gt;: these are elements used to identify specific text which is a direct quotation from another source.</li><li>&lt;time&gt;&lt;/time&gt;: this is an element used to inform browsers and screen readers what time and date format a specific content should be interpreted with.</li><li>&lt;p&gt;&lt;/p&gt;: this is an element used to identify a specific text as a paragraph.</li><li>&lt;a href=&quot;https://www.google.com&quot;&gt;&lt;/a&gt;: this is an element used to identify a specific text as a link. It is called an <em>anchor tag</em> and any content within this tag if clicked, directs the user to the link within the href attribute.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=178c206d8408" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unified Modeling Language (UML): Versions and Modeling Tools]]></title>
            <link>https://medium.com/@charlesorih/unified-modeling-language-uml-versions-and-modeling-tools-2836e8ce143c?source=rss-2246a68f6b65------2</link>
            <guid isPermaLink="false">https://medium.com/p/2836e8ce143c</guid>
            <category><![CDATA[uml-tool]]></category>
            <category><![CDATA[uml-diagrams]]></category>
            <category><![CDATA[uml]]></category>
            <dc:creator><![CDATA[Charles Oriih]]></dc:creator>
            <pubDate>Sun, 11 Dec 2022 09:16:51 GMT</pubDate>
            <atom:updated>2022-12-11T09:16:51.340Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="Unified Modeling Language (UML) — title image" src="https://cdn-images-1.medium.com/max/640/1*-CWOOmPl7SHpd22G9SPFaQ.png" /></figure><p><strong>What is Unified Modeling Language?</strong></p><p><strong>UML (Unified Modeling Language)</strong> is a multipurpose modeling language used to simplify complex procedures and plan of action of a software developer or a professional, to enable a client or even the team involved in development, visualize the way the system would be or has been designed using objects and relationships. This would enable a client who does not understand the professional jargon or the programming languages visualize and understand the procedures involved in building a system. It avails the developer or other professionals a means to transfer complicated and technical professional information to investors or clients to enable them visualize the design and working of a system. It provides a means for creating models and designs for sophisticated systems, which can be understood without much difficulty. UML is rather a visual language and not a programming language. It is used to create a similar mental picture as blueprints in the fields of engineering or floor plans by architects.</p><p>The application of a Unified Modeling Language is expected to bring forth a <strong><em>UML Diagram</em></strong>. A UML Diagram is a pictorial representation of classes, objects and the relationship between them. This is a model which describes parts of a system, functionality and relationships. There are three main categories of ULM Diagrams which include; Structural diagram, Behavioral diagram and Interaction diagram. The Object Management Group (OMG) adopted Unified Modeling Language as a standard in 1997. It has been managed by Object Management Group till date. Since 1997, various versions of ULM have been revised over the years and are reviewed periodically to enhance proper communication and representation. This article will focus on the 2005 version 2.0 until version 2.5 revised in June 2015.</p><p><strong>UML Versions (From version 2.0–2.5)</strong></p><p>After the International Organization for Standardization (ISO) published UML as an approved standard in January 2005 with the UML version 1.4.2, another version (version 2.0) was release. The version 2.0 was a game changer as numerous top companies and associations contributed to its development. The likes of Microsoft, Oracle, Hewlett Packard (HP), Object Management Group, Computer Associates International, IBM, Ptech, Rational Software, Reich Technologies, Softeam, Taskon, Unisys, Intellicorp and Electronic Data System took part in the development of the UML version 2.0. The UML version 2.0 came with new diagrams such as object, timing, packaging and interaction. This version update also added activity and sequence diagrams, renamed collaboration diagram to communication diagram and some more features were added. New diagrams such as object, package, timing, interaction were added to version 2.0. New features were added to the activity and sequence diagrams. <em>Collaboration diagram</em> was renamed as <em>communication diagram</em>. Multiple changes were introduced in the existing diagrams.</p><p>The <strong>UML Version 2.1</strong> adopted in April 2006 was a minor revision on version 2.0 which focused on correction and bug fixes to UML version 2.0. Mistakes likes; wrong association name, <em>object edges</em> replaced by <em>object flows,</em> missing parenthesis in <em>OCL</em>, missing semantics, inconsistency between <em>section Associations</em> and <em>Figure</em>, invalid stereotype in <em>StandardProfile</em> and a whole lot more were fixed in version 2.1.</p><p>The<strong> UML Version 2.1.1</strong> was released in February 2007. It went further fix issues from UML version 2.0 and the version 2.1. The UML Version 2.1.1 added the presentation option for transitions which was identified in version 2.0. It also corrected a problem of <em>ObjectNode</em> which has a wrong default multiplicity, a <em>notation</em> issue and <em>output token</em> issue in the previous version.</p><p>The <strong>UML Version 2.1.2</strong> was released in November 2007. It had a lot fixes for the UML version 2.0, few fixes for UML versions 2.1 and 2.1.1. Issues ranging from <em>Common behavior</em>, <em>actions</em> to <em>Classes </em>were problems identified in version 2.0 and solve in version 2.1.2. Also, version 2.1.2 fixed some problems identified in version 2.1 like; <em>Setting structural</em> features of a <em>data type</em>, issue regarding <em>required </em>and <em>provided interfaces</em>, <em>Parameter </em>(from Kernel, <em>AssociationClasses</em>) and few others. It also fixed some issues from UML version 2.1.1 like; <em>ReadLinkAction</em>, <em>constraining classifiers</em>, <em>Change multiplicity</em> of <em>ClassifierTemplateParameter</em> role and some more.</p><p>The <strong>UML Version 2.2</strong> was released in February 2009. The update had a lot of fixes from issues identified in versions 2.0, 2.1, 2.1.1 and 2.1.2. It fixed the issue of <em>Enumeration Literal</em> which should constrain <em>Instance Specification, action inputs/output </em>associated with the version 2.0 release. It also solved the issue of <em>information flow source </em>and <em>target</em> identified in version 2.1.</p><p>The <strong>UML Version 2.3</strong> was a minor update to version 2.2. Itwas released in May 2010. The update had fixes from issues identified from versions 2.0, 2.2, 2.1.1, 2.1.2, and 2.1.3 like <em>component diagrams</em>, <em>composite structures</em>, <em>actions</em>, <em>association</em> and <em>association classes</em>, it also added <em>final classifier</em>.</p><p>The <strong>UML Version 2.4.1</strong> was a minor update which was released in August 2011. It removed <em>creation event</em>, <em>send</em> and <em>receive</em> <em>operation</em> <em>events</em>, renamed <em>destruction event</em> to <em>destruction occurrence specification. </em>It also fixed <em>classes</em>, <em>packages</em>, added <em>URI package attribute and </em>a few others fixes<em>.</em></p><p>The <strong>UML Version 2.5</strong> is also a minor revision to the UML version 2.4.1. It was released in June 2015. The specification of UML was rewritten and <em>superstructure</em> and <em>infrastructure</em> which was previously in different documents was made a single document for simplicity. The four UML compliance levels (L0, L1, L2 and L3) were eliminated. This revision also added <em>clarifications </em>and <em>explanations, </em>new notation<em> </em>for<em> inherited members </em>with caret “ ̂ ”, clarified <em>feature redefinition </em>and <em>overloading</em>, definition of qualifiers was corrected. The default for <em>generalization set</em> was revised from {<em>incomplete, disjoint</em>} to {<em>incomplete, overlapping</em>} and few more fixes was made by this revision which is still the latest revision when this article was published.</p><p><strong>Unified Modeling Tools/Software</strong></p><p>There are many software or drawing tools available in the market to generate UML diagrams. Some have to be installed in your computer before use while some can be used on the internet through browsers. Good examples of ULM modeling tools include: StarUML, Microsoft Visio Pro, Umbrello, EdrawMax, Moqups, Gleek.io, Lucidchart, Diagrams.net (formerly draw.io), Cacoo, Gliffy, Adobe Express, etc. For the purpose of this article, five ULM modeling tools would be reviewed.</p><p><a href="https://www.adobe.com/express/"><strong><em>Adobe Express</em></strong></a>: is a UML software that helps a user design customized and streamlined models. The user can also save and share models with others; it is supported by Android, IOS, Windows, Mac and Linux.</p><p><a href="https://www.lucidchart.com/"><strong><em>Lucidchart</em></strong></a>: This is a UML modeling tool that provides developers or individuals a platform to create UML diagrams. Because of the drag-and-drop input type which makes Lucidchart easy to use, less-technical teams use this tool for development. Lucidchart can be used to create class diagrams, sequence diagrams and activity diagrams. Lucidchart works in real time across many platforms thanks to its code being HTML 5-based. The ability of Lucidchart to integrate with Google Drive, Slack, Confluence, Microsoft Teams and G Suite has made it destination for so many software developers.</p><p><a href="https://www.diagrams.net/"><strong><em>Diagrams.net</em></strong></a>: Diagrams.net (formerly draw.io) is a ULM tool that can be used to create UML models or diagrams. <em>Diagrams.net</em> has the drag-and-drop input type and can be accessed using a web browser. It has built in templates that ease the creation series of diagram types such as class diagrams, sequence diagrams, flow chart, relationship diagrams, organization chart and the likes.</p><p><a href="https://staruml.io/"><strong><em>StarUML</em></strong></a>: This is a sophisticated UML Diagram modeling software which provides templates for up to eleven diagram types. <em>StarUML</em> has the drag-and-drop input feature enabled, but cannot be accessed using a web browser. For it to work, it has to be installed in the computer, and is supported by multiple platforms (operating systems). <em>StarUML</em> is an open source modeling tool and it allows the installation and use of extensions to enhance the creation process.</p><p><a href="https://www.microsoft.com/en-gb/microsoft-365/visio/flowchart-software"><strong><em>Visi</em>o</strong></a><strong>: </strong>This is a unified modeling language software owned Microsoft that provides Microsoft Office user access to create UML diagrams. It is also known as Microsoft Visio Pro. It is very useful to organizations or companies who use Microsoft Office as it enables them create their UML diagrams within the Microsoft Office ecosystem. It uses the drag-and-drop input type and built in template for state diagrams, use case diagrams and activity diagrams.</p><p>As a developer, my preferred UML tool/software is <em>Lucidchart</em>. This is because of its simplified interface, possibilities, cost of use and most importantly its ability to integrate with some software development tools.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2836e8ce143c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Difference Between Let, Const and Var in JavaScript]]></title>
            <link>https://medium.com/@charlesorih/the-difference-between-let-const-and-var-in-javascript-c506b05f382b?source=rss-2246a68f6b65------2</link>
            <guid isPermaLink="false">https://medium.com/p/c506b05f382b</guid>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Charles Oriih]]></dc:creator>
            <pubDate>Sun, 04 Dec 2022 22:24:52 GMT</pubDate>
            <atom:updated>2022-12-05T08:13:36.683Z</atom:updated>
            <content:encoded><![CDATA[<p>A JavaScript <strong><em>variable</em></strong> is simply a name of storage location. There are two types of variables in JavaScript: local variable and global variable. A local variable in JavaScript is a variable declared inside a block or a function. These variables can only be accessed within the function or block only. local variables are bound to their value within the local scope . Variables regarded to have global scope are those declared outside any function. Global variables can be accessed from anywhere in a JavaScript program. JavaScript variables can be declared with var, let, or const. This article will shed light on the differences between these 3 JavaScript variable declaration types and when best to use them.</p><p><strong>Var</strong></p><p>Before the ECMA Script 6 release in 2015, var was the only declaration type in JavaScript. This also means that all JavaScript variables from 1995 to 2015 was declared using var and if you want your code to run in older browsers, it advisable to use var. Var declarations are function scoped or globally scoped. It is function scoped when declared within a function or a block of code. Here, it can only be accessed within that function.</p><pre>var clap = &quot;clap clap clap&quot;;<br>    <br>    function music() {<br>        var sing = &quot;do re mi&quot;;<br>        console.log(sing);  // returns &quot;do re mi&quot;<br>        console.log(clap);  // returns &quot;clap clap clap&quot;<br>    }<br>console.log(sing);  // returns error: sing is not defined <br>console.log(clap);  // returns &quot;clap clap clap&quot;</pre><p>in the example above, clap is a global variable , while sing is a functionally scoped variable. This means that var can only be accessed within the music() function while var clap can be accessed both within and outside the music() function.</p><p><strong><em>Var Hoisting</em></strong></p><p>var declaration are processed before any code execution, declaring a variable anywhere in the code is the same as declaring it at the top. It is pertinent to note that only a variable’s declaration is hoisted and not its initialization. The example below would further explain.</p><pre>function myFunction() {<br>  console.log(gender); // returns &quot;Error: gender is undefined&quot;<br>  var gender = &quot;Male&quot;;<br>  console.log(gender); // returns &quot;Male&quot;<br>}</pre><pre>function myFunction2() {<br>  var gender;<br>  console.log(gender); // returns &quot;Error: gender is undefined&quot;<br>  gender = &quot;Male&quot;;<br>  console.log(gender); // returns &quot;Male&quot;<br>}</pre><p><strong>Let</strong></p><p>it was introduced in ES6 (2015) to solve the problems of var and is currently preferred for variable declaration. Variables declared with let have Block Scope. A block scope is a scope confined in a curly braces {}. Variables declared with let must be declared before use and cannot be re-declared. So, if a variable is declared with let in a block, it is only available for use within that block. In the example below, the possibilities of let can be seen in the output. We see that using welcome outside its block would returns an error. This is because let variables are block scoped.</p><pre>let gender= &quot;Male&quot;;<br>   let age = 19;<br><br>if(age &gt;  18) {<br>  let welcome = &quot;Hey! Adult, welcome&quot;;<br>  console.log(welcome); // returns &quot;Hey! Adult, welcome&quot;<br>}<br>console.log(welcome) // Error: welcome is not defined<br> </pre><p>Variables declared with let cannot be re-declared within the same block. Though, the stored value can be updated but re-declaring within the same block would cause an error. This is can be seen from the example below, where updating stored data would work perfectly,</p><pre>let age = 19;<br><br>if(age &gt;  18) {<br>  let gender = &quot;Male&quot; <br>  gender = &quot;Female&quot; <br>  console.log(gender); // returns &quot;Female&quot;<br>}</pre><p>re-declaring a value within the same block would cause an error,</p><pre>let age = 19;<br><br>if(age &gt;  18) {<br>  let gender = &quot;Male&quot; <br>  let gender = &quot;Female&quot; <br>  console.log(gender); <br>// returns Error: Identifier &#39;gender&#39; has already been declared<br>}</pre><p>If the same variable is declared with letin different scopes, it would not cause an error.</p><pre>let age = 19;<br><br>if(age &gt; 18) {<br>  let name = &quot;Charles&quot; <br>  console.log(name); // returns &quot;Charles&quot;<br>}else if(age &lt; 20) {<br>  let name = &quot;David&quot; <br>  console.log(name); // returns &quot;David&quot;<br>}else if(age == 19) {<br>  let name = &quot;Daniel&quot; <br>  console.log(name); // returns &quot;Daniel&quot;<br>}</pre><p><strong><em>let Hoisting</em></strong></p><p>let declaration are hoisted to the top Just like var. But if a let keyword is not initialized and you attempt to use a let variable before declaration, you’ll get a Reference Error which is unlike var that is initialized as undefined.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c506b05f382b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[JavaScript and its Core Attributes]]></title>
            <link>https://medium.com/@charlesorih/javascript-and-its-core-attributes-1328838478e7?source=rss-2246a68f6b65------2</link>
            <guid isPermaLink="false">https://medium.com/p/1328838478e7</guid>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Charles Oriih]]></dc:creator>
            <pubDate>Sun, 04 Dec 2022 22:01:04 GMT</pubDate>
            <atom:updated>2022-12-05T04:18:09.974Z</atom:updated>
            <content:encoded><![CDATA[<p>JavaScript is a high-level interpreted language originally designed to add interactivity to web pages and create web applications. JavaScript is regarded as the flagship programming language of web development because it can be used to add life into websites and make them more interactive and user-friendly. JavaScript is regarded as client-side programming language because it runs inside a client browser and processes commands on a client’s computer rather than a server. On the other hand, with the introduction of a platform like Node.js, JavaScript can also be regarded as a server-side programming language as it allows a developer store information in the database and dynamically construct and return other files. The client-side and server-side possibilities made JavaScript a full-stack programming language.</p><p>JavaScript is arguably one of the most important programming language today because of the possibilities availed to developers by variety of libraries, frameworks and platforms such as ReactJs AngularJS, jQuery, VueJs, React Native, Next.js, Node.js, Express.js among others, making the use of JavaScript for development even more efficient. JavaScript frameworks like ImpactJs, MelonJS, Babilon.js, and PixiJS among others can be used in game development, while React Native is widely used for mobile application development. The versatility of JavaScript cannot be overemphasized.</p><p><strong>A Brief Origin of JavaScript</strong></p><p>While in active duty at Netscape, it took <strong><em>Brendan Eich</em></strong> 10 days to create JavaScript in 1995. An idea which was birthed in an attempt to make Java available for professional component writers where the American developed an easy to use programming language called Mocha which would be used for small scripting tasks. A Mocha prototype was later integrated into the Netscape Communicator after which was later renamed to Light Script, and subsequently JavaScript. The name JavaScript was completely a marketing strategy to gain wider recognition and acceptance not because of any connection or similarity with Java Programming Language.</p><p>JavaScript was taken the organization which develops standards for information technology and consumer electronics ECMA (European Computer Manufacturers Association Standard) Group in 1996 to create an official standard for the language that everyone could follow, in 1997, it became an ECMA standard and the official name changed to ECMA Script. This is where a version name “ECMA Script 1”(ES1) came about, followed by ECMA Script 2(ES2) in 1998, ECMA Script 3(ES3) in 1999. The ECMA Group withheld approval for ECMA Script 4(ES4) in 2008, so there was no ES4. ES5 was approved in 2009 while ES6 was later released in 2015 and by then, JavaScript had gained immense popularity and was one of the most in-demand programming languages. This is because; these version upgrades came with lots of new possibilities, additions, improvements and community growth.</p><p>Today, the application of JavaScript transcends web development and client side programming. It can be seen in game development, mobile application, robotics engineering and server side programming with the addition of Node.Js among others. Popular JavaScript library like ReactJs and frameworks like VueJs and AngularJs has gained recognition in the past few years because of the possibilities it brings to the table. Companies like Facebook, Google, Netflix and Paypal among others and use JavaScript libraries and frameworks in their products. JavaScript has come a long way since its origin and would continue to evolve in years to come.</p><p><strong>Core Features of JavaScript</strong></p><p>Some core attributes makes JavaScript Stand out amongst other programming languages. This following are core attributes of JavaScript;</p><ul><li>Event Handling</li><li>Conditional Statements</li><li>Interpreted Language</li><li>Input Validation</li><li>Object-Oriented Programming</li><li>Ability to perform In Built Function</li></ul><p><strong><em>Event Handling: </em></strong>Event handling refers to the control of response to activities on a website or app. JavaScript can listen to events on the website and respond a certain way. To perform this function, event listeners like onclick(), onmouseover(), onchange(), onload(), onmouseout(), are added into the HTML element and a function is written within this event listener, when this event occurs, the function is called. onclick() event is triggered when the user click the HTML element, onmouseover() occurs when the user moves the mouse over an HTML element, onmouseout() occurs when the user moves the mouse away from an HTML element, onload() is triggered when the browser has finished loading the page. For example; the following operation would alert “thanks for Clicking Me” when the button is clicked on.</p><pre>&lt;button onclick=&quot;alert(&#39;Thanks for Clicking me&#39;)&quot;&gt;Please Click me&lt;/button&gt; </pre><p><strong>Conditional Statements:</strong> conditional statements control the behavior of functions. It determines the parameters that must be met for a code to run. There are different types of conditionals. If statements, else statements and else if statements.</p><p><em>“If” statements:</em><strong> </strong>This executes a block of code if a specific condition is true. Example include:</p><pre>let x = 6<br>if (x &gt; 9) {<br>    console.log(&quot;x is greater than 9&quot;);<br>} else {<br>    console.log(&quot;x is less than 9&quot;);<br>}</pre><p><em>“Else” statements:</em> This executes a block of code where the condition of the <em>if statement</em> is false. In the example below, since the x is not less than 4, the else statement would execute meaning the “x is less than 5”</p><pre>let x = 4<br>if (x &gt; 5) {<br>    console.log(&quot;x is greater than 5&quot;);<br>} else {<br>    console.log(&quot;x is less than 5 &quot;);<br>}</pre><p><em>“Else if” statements:</em> This executes a block of code where the condition of the <em>if statement</em> is false and the condition its own condition is true. It specifies a new test if the first condition is false, and the new condition is true. The example below execute that “x is equal to 6” because this is the condition that best suites the value of x.</p><pre>let x = 6<br>if (x &gt; 6) {<br>    console.log(&quot;x is greater than 6&quot;);<br>}else if (x == 6) {<br>     console.log(&quot;x is equal to 6&quot;);<br>}</pre><p><strong><em>Interpreted Language: </em></strong>JavaScript is an interpreted language because it runs without compilation. It allows the user to get the output of their code without the use of a Compiler. An interpreted language is that which relies on another piece of software called an interpreter to run its program rather than the Machine itself.</p><p><strong><em>Input Validation:</em></strong> JavaScript can be used to validate HTML Form input data even before it can be submitted or sent to the server. Validations on HTML Forms can be on password pattern and preferred name patterns can be done using JavaScript on the client-side.</p><p><strong><em>Object-Oriented Programming: </em></strong>this is an ability of programming language to organize and process objects in various ways based on their classes or data type where each object has its own functions and properties, completely different from other objects. For example Wines; there are alcoholic and non-alcoholic wines, alcoholic wines contains alcohol and is capable causing hangovers while non-alcoholic wines might contain sweeteners and is not capable of causing hangovers, instead it is served in formal gatherings. In this example, Wine can be regarded as the class, alcoholic and non-alcoholic wines are two different subclasses of wines, while alcoholic content in alcoholic wines is a property of alcoholic wine, sweeteners in non-alcoholic wines are properties of non-alcoholic wines, the ability of alcoholic wine to cause hangover and non-alcoholic wines to be served at formal gathering can be seen as unique functions. In other words, JavaScript is said to be an object oriented programming because it allows the developer to logically structure code into classes and subclasses where each subclasses can be assigned unique responsibilities or functions and properties. In development, Object Oriented Programming makes it easy to control the programs by being able to categorize and influence individual objects without changing everything.</p><p>Although, JavaScript is not a class based language, it is a prototype based language instead, but it has the ability to replicate the functionalities present in class based languages. It allows for the creation of objects without first defining its classes. The prototype of a particular object is yet another object to which this particular object is linked. The ECMAScript 2015 release introduced the <em>class</em> keyword in JavaScript. It made JavaScript work like an object oriented programming language, but if closely analyzed, prototyping is what is ongoing in the background.</p><pre>class Phone {<br>  constructor(name, version) {<br>    this.name = name;<br>    this.version = version;<br>  }<br>  ring() {<br>    return `${this.name} can ring`;<br>  }<br>  dial() {<br>    return `${this.name} can dial`;<br>  }<br>}<br>let samsung = new Phone(&quot;Samsung&quot;, &quot;A-80&quot;);<br>console.log(samsung);</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/601/1*AKjsE2jKcDzfYAjJiCyz2w.png" /></figure><p>In the example above, the [[Prototype]] references the Phone prototype (which in turn references the Object prototype).</p><p>From this, we can see that the constructor defines the major features while everything outside the constructor (ring() and dial()) are the additional features or prototypes.</p><p><strong><em>Ability to perform In Built Function:</em></strong> an in-built function is a function which was not created by the developer using the language, but is built into the library of the programming language. If a built-in function is called, it executes a runtime call to a function having the same name in the library. JavaScript has many built-in Functions which has facilitated its’ use, they include: <a href="https://www.tutorialspoint.com/javascript/string_tolowercase.htm">toLowerCase()</a>, <a href="https://www.tutorialspoint.com/javascript/string_length.htm">length()</a>, i<a href="https://www.tutorialspoint.com/javascript/string_indexof.htm">ndexOf()</a>, <a href="https://www.tutorialspoint.com/javascript/date_date.htm">Date()</a> etc. i<a href="https://www.tutorialspoint.com/javascript/string_indexof.htm">ndexOf()</a> returns the index within the calling String object of the first occurrence of the specified value, toLowerCase() returns the string value converted to lower case, <a href="https://www.tutorialspoint.com/javascript/string_length.htm">length()</a> returns the length of the string, <a href="https://www.tutorialspoint.com/javascript/date_date.htm">Date()</a> returns today’s date and time etc.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1328838478e7" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Git and GitHub Basics]]></title>
            <link>https://medium.com/@charlesorih/git-and-github-basics-70cc79948c37?source=rss-2246a68f6b65------2</link>
            <guid isPermaLink="false">https://medium.com/p/70cc79948c37</guid>
            <category><![CDATA[git]]></category>
            <category><![CDATA[github]]></category>
            <dc:creator><![CDATA[Charles Oriih]]></dc:creator>
            <pubDate>Sun, 27 Nov 2022 21:03:44 GMT</pubDate>
            <atom:updated>2022-11-27T21:03:44.578Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="An Image with Git Logo and the Title of the article" src="https://cdn-images-1.medium.com/max/640/1*n4HT81z17__ykIuo4_XYEQ.png" /></figure><p><strong>Git</strong></p><p>Git is a free and open source distributed version control system designed to handle everything from small to very large projects with speed and efficiency. Git avails a central platform to manage your code so that you can share and collaborate on your project with others. Version control is a way to keep a track of the changes in the source code so that in situations of error or bug, comparisons can be made between specific code versions and a possibility to revert to any previous version necessary. It is highly recommended in companies or organizations where multiple developers work continuously on a particular source code. Also, Git is said to be distributed because, the entire codebase and history is available on every developer’s computer, which allows for easy branching and merging. Mercurial is another common distributed version control system.</p><p>Furthermore, the importance of <em>Git </em>can never be overemphasized. Where the code base of to a particular software or website is much, the underlying risk of causing error or bugs on the source code ensues. Granting access to just any developer or engineer to the source code is highly risky, Git allows the software engineers the following following capabilities:</p><p>· Uphold the security of the project since it tracks every single change by every developer involved in the project.</p><p>· improved working speed.</p><p>· The Branching capabilities of Git allow different developers to work on different parts of the same project at the same time.</p><p>· flexibility since a developer can work with his team on a project from anywhere in the world.</p><p>· compatibility with various operating systems.</p><p><strong>GitHub</strong></p><p>GitHub is a website and cloud-based service that helps developers store and manage their code, as well as track and control changes to their code. GitHub offers a cloud-based Git repository hosting service which it makes it a lot easier for individuals and teams to use Git for version control and collaboration.</p><p><strong>Using Git and GitHub</strong></p><p>Git is an essential tool in software development yet it has posed as an issue to a lot of developers today because of the technicalities involved and the use of command lines. Due to the fact that this skill is indispensable in the software development space, it has to be properly understood. This article would attempt to explain the use of Git and GitHub under the following subheadings:</p><p>· Setting up Git,</p><p>· Creating a repository,</p><p>· Making A Commit,</p><p>· Git Pull and Git Push,</p><p>· Git Branch,</p><p>· Git Clone,</p><p>· Git Work Flow.</p><p><strong>Setting up Git</strong></p><p>Git must be installed in your device before you can run git commands. Follow the <a href="https://github.com/git-guides/install-git">instructions in the in the documentation </a>to in install Git in your device.</p><p>After the installation, open the git command prompt or terminal in your code editor and run the following commands:</p><pre>git --version</pre><p>this would return the version of Git installed in your device.</p><p>For the sake of integrity, Git requires you to have an identity. This is to enable Git record whoever made a particular change to a Git file. The record Git requires is your username and your email. To register your username and email, run this command on your terminal</p><pre>git config --global user.name &quot;myName&quot;<br></pre><pre>git config --global user.email &quot;myemail@gmail.com&quot;</pre><p>Enter your details within the quotation marks to register your personal details. To confirm if you entered your details correctly, run the following command</p><pre>git config --global --list</pre><p>this would return your username and email.</p><p><strong>Creating a Repository</strong></p><p>A git repository tracks and saves the history of all changes made to the files in a git project. This data is saved in a repository folder directory called “.git”. To make your current working directory a git repository, make sure your terminal is pointing to the exact folder on your device which you wish to convert to a git repository, else, if this is not the case, use <em>change directory</em> command and enter the file path, to point to the file path, then run the <em>git init</em> command.</p><pre>cd &lt;file path&gt;</pre><pre>git init</pre><p>The <em>git init</em> command initializes Git in the folder, converts the folder to a git repository. The <em>git init</em> command returns “Initialized empty Git repository in &lt;file path&gt;” in your terminal.</p><p><strong>Making a Commit</strong></p><p>The <em>git commit</em> command captures a snapshot of the project’s currently staged changes. Committed snapshots can be thought of as “safe” versions of a project. Git will never change a committed file unless you explicitly run commands to change it. Before a commit is done to a file, the file must first be moved to the <em>staging area</em>. Git essentially has four main file statuses which are tracked files, untracked files, staged and unstaged files. A tracked file is a file that Git knows about or files in a Git initialized working directory. Untracked files are any files in your working directory that were not in your last commit and are not in your staging area, Git does not know about this file. Staged files are files whose changes are in Git and marked for commit while unstaged files are files in your working directory or all tracked files or changes that are not in your staging area. To check the status of a file, run the <em>git status</em> command</p><pre>git  status</pre><p>this would return either of the four file statuses in Git. To move a file to the staging area or make the file a staged file, run the <em>git add</em> command,</p><pre>git add example.js</pre><p>this would add only the file whose name is “example.js” into the staging area. It can be tedious if you have a lot of files you wish to add to the staging area. Run the git add . or git add --all command instead, to add all new or modified files to your git repository.</p><pre>git add .</pre><pre>git add --all</pre><p>To <em>commit</em> these all staged files to Git, run the <em>git commit</em> command:</p><pre>git commit –m &quot;your comments goes here&quot;</pre><p>Endeavour to properly state the reason you committed each file within the quotation marks for future reference. When changes are committed, the <em>git status</em> command returns a clean working tree.</p><p><strong>Git Pull and Git Push</strong></p><p>Git push command is used to upload files from the local repository to a remote repository. Pushing is how you transfer commits from your local repository to a remote repository like GitHub. To successfully run this command, you need to have an account with <a href="https://github.com/">GitHub</a>, but if you already have an one, navigate to “New” to create a new repository in GitHub, then enter a repository name you wish to use, for example “<em>project-one</em>”, describe the project what your project is about in the description input area, then click on “Create repository”. This would create a new repository with your chosen project name, in my case “<em>project-one</em>”. After creating this new repository at Github, it would automatically navigate you to your new project page with some basic commands to help you push your work to your newly created remote repository. At this stage, I assume you have already committed your changes to git, but if you haven’t, follow the process explained under “<strong><em>Making a Commit</em></strong>” in this article.</p><p>After committing changes, copy the remote repository link provided in the page that has your GitHub account username and your newly created repository project name that ends with “.git”, go to your local terminal and run the command</p><pre>git remote add origin &lt;paste remote repository link here&gt;</pre><p>It should look like this;</p><pre>git remote add origin https://github.com/Charlestone1/project-one.git</pre><p>After running this command, you have to rename the master branch to main with the following command:</p><pre>git branch -M main</pre><p>then run the <em>git push</em> command:</p><pre>git push -u origin main</pre><p>to upload your local repository to the new remote repository. After this, refresh the GitHub page and see all that was pushed to the remote repository.</p><p>In addition, git pull command is used to download files from a remote repository to a local repository. This is a very useful tool in situations where more than one person is working on a project, to download an up to date remote repository containing changes made even after the repository was cloned by the user. This would avail the user with an up to date repository version before pushing the new changes made by the user to avoid repetition and error. To run the <em>git pull</em> command, go to your terminal and run</p><pre>git pull origin main</pre><p><strong>Git Master/Main Branch and<em> </em>Git Branch</strong></p><p>A branch in Git is simply a lightweight movable pointer to commits. The default branch name in Git is the master/main branch. As you start making commits, you’re given a master branch that points to the last commit you made. Every time you make a commit, the master branch pointer moves forward automatically. The master branch is no different from any other branch in a cloned Git repository, except that historically it’s been the default name used when the first branch is created. Also this master branch can be renamed to main or whatever suites the remote repository owner.</p><p>Git branch is a pointer to a snapshot of your changes. When you want to add a new feature or fix a bug, you generate a new branch to encapsulate your changes without affecting the rest of the project. To create a new branch from that which was cloned from a remote origin, run the <em>git branch</em> command:</p><pre>git branch new-branch-name</pre><p>You will need to point the working directory to the new branch else all the changes made would still be on the master branch. To do this, run the following <em>checkout</em> command:</p><pre>git checkout new-branch-name</pre><p>The checkout command can be used to shuttle between different branches. This new branch can also be pushed to a remote repository the same way the master branch would be pushed.</p><p><strong><em>Git Clone</em></strong></p><p>Git clone is a Git command line utility which is used to target an existing repository and create a clone, or copy of the target repository. Git clone creates a linked copy that will continue to synchronize with the target repository. There are four possible ways to clone a remote repository from GitHub, it includes; the use of HTTPS, SSH, GitHub CLI and Download Zip. This article would only cover two commonly used ways which is; the use of HTTPS and Download zip. To use HTTPS;</p><p>· navigate to the git repository you wish to clone,</p><p>· click on the dropdown “Code” button,</p><p>· ensure HTTPS is selected, and copy the remote repository link that looks like this “https://github.com/Charlestone1/project-two.git”,</p><p>· create a new folder on your device,</p><p>· open the folder with your code editor,</p><p>· open the terminal and run the following <em>git clone</em> command</p><pre>git clone https://github.com/Charlestone1/project-two.git</pre><p>This clones a copy of the repository to your local device. The “Download Zip” creates a zip file of just the current version of the source code for you to download — the project history is not included. To clone through a downloaded zip;</p><p>· click on the option to “Download ZIP” clone below the “Code” dropdown on the target repository you wish to clone.</p><p>· After the ZIP file is has completed its download, unzip the file,</p><p>· Open the unzipped file with your code editor,</p><p>· Initialize git with the <em>git init</em> command and you are all set.</p><p><strong>Git Work Flow</strong></p><p>A successful git workflow can be seen as one that enhances the effectiveness of your team and not be a burden that limits productivity. Some good practices involve;</p><p>· always commit when you have achieved a reasonable milestone,</p><p>· before you push your branch online, pull the main or master branch which is the main source of truth into your local branch, compare both branch to avoid error before you push online,</p><p>· Proper commenting on commits and reviews.</p><p><strong>Creating a Pull Request</strong></p><p>A pull request is an event that takes place in software development when a contributor/developer is ready to begin the process of merging new code changes with the main project repository. A pull request is also referred to as a merge request. To create a pull request when;</p><p>· Go to GitHub, click on the repository you wish to make your request, you will see your recently pushed branch,</p><p>· Go to “Pull request”,</p><p>· select “New pull request”,</p><p>· Here, you will see an option named “base” where you are required to select the main or master branch where you want your new branch to be merged to, and also an option named “compare” which is the new branch you wish to merge with the main branch.</p><p>· Check and compare the code to be merged,</p><p>· Click on the “Create pull request” button below,</p><p>· Modify or add description where necessary,</p><p>· Click on the “Create pull request”,</p><p>· Add reviewers who are part of the team to review your changes before it is added to the master branch. These reviewers can comment on the lines of code and approve when necessary.</p><p>· Adding assignees –members of the team who would receive email notification on every review and approval on the code,</p><p>· Click on the “Merge pull request”,</p><p>· Click on the “Confirm merge”.</p><p>GitHub has many other functions like GitHub Pages used to host websites, adding specific users to a repository and protecting a repository. It is important to state that this article have not highlighted all that is possibilities within Git and GitHub. For further reading, visit the git documentation on the <a href="https://git-scm.com/doc">Git website</a> and GitHub documentation on <a href="https://docs.github.com/en">GitHub Website</a>.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=70cc79948c37" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>