<?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 Shonali Romeshika on Medium]]></title>
        <description><![CDATA[Stories by Shonali Romeshika on Medium]]></description>
        <link>https://medium.com/@shonaliromeshika05?source=rss-826adf7cf6cc------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*-mFo6-rl8xo4el79Orkd4g.jpeg</url>
            <title>Stories by Shonali Romeshika on Medium</title>
            <link>https://medium.com/@shonaliromeshika05?source=rss-826adf7cf6cc------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 05:33:33 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@shonaliromeshika05/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[Experience during the MERN stack project (Research Project Management Tool)]]></title>
            <link>https://medium.com/@shonaliromeshika05/experience-during-the-mern-stack-project-research-project-management-tool-aa96ec9e2517?source=rss-826adf7cf6cc------2</link>
            <guid isPermaLink="false">https://medium.com/p/aa96ec9e2517</guid>
            <category><![CDATA[projects]]></category>
            <category><![CDATA[mern-stack]]></category>
            <category><![CDATA[research-management]]></category>
            <category><![CDATA[university]]></category>
            <category><![CDATA[sliit]]></category>
            <dc:creator><![CDATA[Shonali Romeshika]]></dc:creator>
            <pubDate>Tue, 17 May 2022 03:15:40 GMT</pubDate>
            <atom:updated>2022-05-17T03:15:40.629Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ukhcA1RwIrfzMztIqo3S6A.png" /></figure><p>I am a Software Engineering Undergraduate at the Sri Lanka Institute of Information Technology. I am writing this article to share my experiences during a group project which is done from the MERN stack.</p><p>In 3rd year there is a module called AF(Application Frameworks) which is about various application frameworks, such as nodeJS, KoaJS, ExpressJS, ReactJS, and Spring Boot. As an assignment of this module, we were assigned a project to complete within this semester. We were assigned the project of developing a web application for the Research Project Management Tool using the MERN stack. Following is a brief description of the MERN stack.</p><h4>MERN Stack</h4><p><strong>MERN</strong> stands for MongoDB, ExpressJS, ReactJS, and NodeJS. This stack is built up with these 4 technologies.</p><ul><li>M(MongoDB) — MongoDB is a open-source, NoSQL, and document-based database system. It has strong query capabilities with aggregations using JavaScript.</li><li>ExpressJS — Express JS, or simply Express, is a Node JS backend web application framework distributed under the MIT License as free and open-source software. It is intended for the development of web applications and APIs.</li><li>ReactJS — React is a JavaScript library for creating dynamic and fast user interfaces for web and mobile applications. React is an open-source library. It is a reusable component-based frontend library.</li><li>NodeJS — NodeJS is a cross-platform, open-source back-end JavaScript runtime environment that uses the V8 engine to execute JavaScript code outside of a web browser.</li></ul><h4>Requirements of the project</h4><p>There are 3 main users of the system. They are admin, student, and staff. Also, the staff is categorized into 3 types. They are the supervisor, co-supervisor, and panel member.</p><p><strong>User characteristics of each user</strong></p><ul><li>Admin — Delete/update users, create submission types, allocate panel members to student groups, create marking schemes, upload document/presentation templates, and view roles.</li><li>Student — Register, create student groups, register research topic, request supervisor, request co-supervisor, submit documents, download templates.</li><li>Supervisor / Co-Supervisor —Register, should be a staff member, accept topics, chat with the groups, and evaluate documents submitted by groups using the provided marking scheme.</li><li>Panel Member — should be a staff member, the admin will add them to a panel, evaluate topics, and evaluate students’ presentations according to the provided marking scheme.</li></ul><p>After identifying the requirements of the project, we divided the tasks of the project equally. My task was to build the student groups function of both the backend and frontend. There are CRUD operations, which means Create student groups, Retrieving them, Updating, and Deleting them. To start our project our group leader created a repository on Github with the initial folder structures. Then all of us cloned that into our devices and started to do the project. Then I created the REST API of my function using MongoDB and ExpressJS. After creating the REST API of my function I pushed them into our repository. Then we integrated our backend. After finishing the backend implementations, we started to develop the frontend using ReactJS.</p><p>I have gained a lot of benefits from doing this project. I improved both my technical and soft skills. As this is my first ever experience of using the MERN stack, I gained a lot of knowledge about these technologies. Also, I experienced how to maintain a codebase in Github. Not only these but also I improved my communication, leadership, team working, and time management skills throughout this project.</p><p>Developing a Research Project Management tool using the MERN stack was not easy for me. Because this was the first time I used MERN stack. But our university lecturers gave us huge support. Also, my group members supported me a lot.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aa96ec9e2517" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction to React JS]]></title>
            <link>https://towardsdev.com/introduction-to-react-js-df06464ebc1b?source=rss-826adf7cf6cc------2</link>
            <guid isPermaLink="false">https://medium.com/p/df06464ebc1b</guid>
            <category><![CDATA[angular]]></category>
            <category><![CDATA[vuejs-2]]></category>
            <category><![CDATA[reactjs]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Shonali Romeshika]]></dc:creator>
            <pubDate>Mon, 16 May 2022 18:10:33 GMT</pubDate>
            <atom:updated>2022-05-25T10:02:22.508Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*NNal5Qpy7LZ8koNIyYyFMQ.png" /></figure><p>This article aims to give an introduction to React JS. React JS is a JavaScript library that is used to create fancy user interfaces for mobile and web applications. Now let’s look at the content of this article.</p><ul><li>What is React?</li><li>Why should you choose React?</li><li>Features of React</li><li>Components, State, and Props</li><li>React Vs Angular Vs Vue</li></ul><h3>What is React?</h3><p>React was built by Facebook and released to the public in May of 2013, with regular Maintainance since then. React is a JavaScript library for creating dynamic and fast user interfaces for web and mobile applications.</p><p><strong>Important: </strong>Some people think that React is a framework. But React is a <strong>library</strong>, not a framework.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/190/1*je8AbQ6OHr4in9B5VeDSjA.jpeg" /><figcaption>Some people think that React is a framework. But React is a <strong>library</strong>, not a framework.</figcaption></figure><p>React is an open-source library. It is a reusable component-based frontend library.</p><h3>Why should you choose React?</h3><p>New tools are being launched on a regular basis, and there are several libraries and frameworks to pick from. Among these libraries and frameworks, there are various reasons for choosing React.</p><ul><li><strong>Speed</strong></li></ul><p>React simply allows developers to use separate components of their application on both the client-side and the server-side, resulting in a faster development process. Simply put, various developers can create separate areas of the program, and any modifications made will not affect the application’s logic.</p><ul><li><strong>Flexibility</strong></li></ul><p>React code is easier to maintain and more versatile than other frontend frameworks because of its modular nature. Companies save a large amount of time and money as a result of this flexibility.</p><ul><li><strong>Reusable Components</strong></li></ul><p>One of the key advantages of React JS is the ability to reuse components. Developers save time since they don’t have to build many codes for the same functionalities. Furthermore, any modifications made to one section of the program will have no effect on other parts.</p><ul><li><strong>Easy to learn</strong></li></ul><p>React is considerably easier to learn than other popular front-end frameworks like Angular and Vue.</p><h3>Features of React</h3><h4>JSX — JavaScript Syntax Extension</h4><p>JSX is a JavaScript syntactic extension. It is used in association with React to describe the user interface. You can write HTML structures in the same file as JavaScript code by using JSX. Simply JSX is a combination of JS and HTML.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*QLDEp3c_XWlzOMpWJBGM6g.png" /></figure><p>Because it avoids the use of complicated JS DOMS structures, JSX makes the code easier to understand and debug.</p><h4>Virtual DOM(Document Object Model)</h4><p>The Document Object Model (DOM) is a data representation of the objects that make up a web document’s structure and content.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/292/1*kDr-O3d_BfwrpyvRR6SKnA.png" /></figure><p>React creates a virtual DOM which is an exact copy of the real DOM. When an object’s state changes, Virtual DOM updates only that object in the real DOM rather than all of them. Therefore, manipulating virtual DOM is faster than manipulating real DOM.</p><h4>One-way data binding</h4><p>This means data flows are in only one direction. One-way data binding of React keeps everything modular and fast. One-way data-binding means that nest child components within the parent components.</p><h4>Extensions</h4><p>React has many extensions that we can use to create full-fledged frontend applications. It provides server-side rendering. This means that the application is rendered on the server rather than in the browser.</p><ul><li>React Native which is a React extension that is used for developing mobile applications.</li><li>Other Extensions — Flux, Redux (Flux is the application architecture that Facebook uses for developing web applications).</li></ul><h4>Debugging</h4><p>React applications are easy to debug due to a larger, active developer community.</p><h3>Components, State, and Props</h3><h4>Components</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*TdI0YTnpoB3mb6S-7NJrMw.jpeg" /><figcaption>React Components. Source: <a href="https://www.techdiagonal.com/">https://www.techdiagonal.com/</a></figcaption></figure><p>Components are the foundation of every React application, and most applications are made up of numerous components. A component is a piece of the User Interface. It divides the user interface into separate, reusable components that may be processed independently.</p><h4>State</h4><p>A component’s state is an object that contains data. This information has an impact on a component’s output. When an object’s state changes, the component is re-rendered on the screen.</p><h4>Props (Properties)</h4><p>Props allow passing arguments or data to components. Properties make components more dynamic. Props are passed to components in the same manner as HTML tag attributes are.</p><h3>React Vs Angular Vs Vue</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/400/1*6N2bP2UoC6Cpor0Qvuejmw.png" /></figure><h4>React</h4><ul><li>Open source, front-end JavaScript library.</li><li>Use to develop web and mobile applications.</li><li>Developed by Facebook.</li><li>React represents the view part of the MVC framework.</li><li>Use virtual DOM.</li><li>Use one-way data binding.</li></ul><h4>Angular</h4><ul><li>Open source, front-end JavaScript framework.</li><li>Use to develop single-page applications.</li><li>Developed by Google.</li><li>Angular is a fully-fledged MVC framework.</li><li>Use real DOM.</li><li>Use two-way data binding.</li></ul><h4>Vue</h4><ul><li>Open source, front-end JavaScript framework.</li><li>Use to develop user interfaces and single-page applications.</li><li>Developed by Evan You. He was a former Google employee.</li><li>Vue represents the view and model parts of the MVC framework.</li><li>Use virtual DOM.</li><li>Use two-way data binding.</li></ul><p>React developers earn more money when compared to other web development technologies. React is gaining popularity and is being adopted by many companies. As you can see follow, React is the most popular library for building User Interfaces.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/725/0*s-um1q7pLVNnBZPh.jpg" /></figure><p>Finally, I can say that learning React is worth it!!!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/258/1*hw3gQMP0kxC6ki-EemX8ag.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=df06464ebc1b" width="1" height="1" alt=""><hr><p><a href="https://towardsdev.com/introduction-to-react-js-df06464ebc1b">Introduction to React JS</a> was originally published in <a href="https://towardsdev.com/">Towards Dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Build a REST API with Koa]]></title>
            <link>https://javascript.plainenglish.io/koa-js-and-rest-api-cd0770fbe916?source=rss-826adf7cf6cc------2</link>
            <guid isPermaLink="false">https://medium.com/p/cd0770fbe916</guid>
            <category><![CDATA[nodejs]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[rest-api]]></category>
            <dc:creator><![CDATA[Shonali Romeshika]]></dc:creator>
            <pubDate>Fri, 13 May 2022 10:24:21 GMT</pubDate>
            <atom:updated>2022-05-31T01:19:28.623Z</atom:updated>
            <content:encoded><![CDATA[<h4>A tutorial on how to build a REST API using Koa.</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hhxfMQlaZ50pkSQfXPQIbQ.png" /></figure><p>By reading this article you can gain some knowledge about Koa and REST API. Also, you can get to know how to build a REST API with Koa.</p><h3>Introduction to Koa</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/500/1*suXzT3k1lYrtR91XRDN7gA.png" /></figure><p>Koa is an open-source Node.js web application framework. It was designed by the same team that designed Express. It is designed for developing web applications and web APIs. The framework is designed to provide a more small, expressive, and reliable base for web applications and APIs.</p><h4>Build a Koa Application</h4><p>Let’s build a small web application with Koa. To build it first you have to install Node.js on your device. Then create a folder in which all project-related files will be stored.</p><p>Then we should initialize it as a Node.js project. To do that enter the following command on the terminal:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/a6e5f7be25cffca8f61eb1148beacc78/href">https://medium.com/media/a6e5f7be25cffca8f61eb1148beacc78/href</a></iframe><p>npm init is used to set up the package.json file. The -y flag is used to simply generate an empty npm project without going through a questionnaire. Then you will get a package.json file similar to the following:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/8e4d76e384fb6bf154166039a8c568aa/href">https://medium.com/media/8e4d76e384fb6bf154166039a8c568aa/href</a></iframe><p>Then you should add the koa js dependency. To do that enter the following command on the terminal:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/b393988068c29bae4c572f3997680fcb/href">https://medium.com/media/b393988068c29bae4c572f3997680fcb/href</a></iframe><p>After that create a file called app.js and insert the following code:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f4b7d99503059f72174e5316a878c01f/href">https://medium.com/media/f4b7d99503059f72174e5316a878c01f/href</a></iframe><p>Finally, enter the following command on the terminal and run the application:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/f0eaf711c5ff9110f40ae8ff7da8626c/href">https://medium.com/media/f0eaf711c5ff9110f40ae8ff7da8626c/href</a></iframe><p>Now go to the http://localhost:3000 in your browser window. You should see the following in the browser window:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TZEZbd7t5MQVsVl_L8fYNQ.png" /></figure><p>Congratulations! Now you have built your first Koa application.</p><h3>Introduction to REST API</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/373/1*3gUGUk7yEHORgeXcOiexkg.png" /></figure><p>REST is an architectural style that stands for REpresentational State Transfer. It was first presented by Roy Fielding in 2000. REST is resource-based which means it is built around things or resources. Those resources are identified by URIs. Multiple URIs may refer to the same resource. JSON or XML is used to pass data. It is lightweight, scalable, and maintainable.</p><h4>REST API Methods</h4><p>Standard HTTP method requests can be used to create, view, edit, and remove resources, as shown in the table below:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mV4Dt-grmk_R23uoOaJz_A.png" /></figure><h4>HTTP Codes</h4><p>A server response to a browser request is an HTTP status code. When you visit a website, your browser makes a request to the server, which the server responds to with a three-digit code called the HTTP status code.</p><ul><li>200 — OK</li><li>201 — Created</li><li>202 — Accepted</li><li>204 — No content</li><li>301 — Moved permanently</li><li>302 — Found</li><li>304 — Not modified</li><li>400 — Bad request</li><li>401 — Unauthorized</li><li>403 — Forbidden</li><li>404 — Not found</li><li>405 — Method not allowed</li><li>409 — Conflict</li><li>412 — Precondition failed</li><li>500 — Internal server error</li><li>502 — Bad gateway</li><li>503 — Service unavailable</li></ul><h3>Build a REST API with Koa</h3><p>I hope now you have a basic idea about Koa and the REST API. Let’s get started to build a REST API with Koa. First, follow the instructions in the above first koa application, until you reach the install Koa dependency.</p><p>Then enter the following command on the terminal. Nodemon is a tool that helps in the development of Node.js apps by automatically restarting them when file changes in the directory are detected. From installing nodemon you don’t need to run your app again and again when you do modifications.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/71ceedf4e5389525f662e7d8f111d1ea/href">https://medium.com/media/71ceedf4e5389525f662e7d8f111d1ea/href</a></iframe><p>After installing nodemon add the following to the “scripts” section of the package.json file:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/6c39abf1174fca9f93c219df0b5707d6/href">https://medium.com/media/6c39abf1174fca9f93c219df0b5707d6/href</a></iframe><p>Then install the following dependencies as well:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/c09675e460c31c674055f97895fdad51/href">https://medium.com/media/c09675e460c31c674055f97895fdad51/href</a></iframe><p>Now create a file called app.js and insert the following code to it:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/59dba9f142bba36f8e2ded16ae6d698a/href">https://medium.com/media/59dba9f142bba36f8e2ded16ae6d698a/href</a></iframe><p>Then create another file called items.js and insert the following code:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/552107753b07c88f30f051e5f1262906/href">https://medium.com/media/552107753b07c88f30f051e5f1262906/href</a></iframe><h4>GET Method</h4><p>Below is the code for handling a GET request in Koa. Add the following code to items.js:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/ff440486088eef33497530b9009e9aa3/href">https://medium.com/media/ff440486088eef33497530b9009e9aa3/href</a></iframe><p>To run this, you have to first insert the routes file in app.js and invoke them:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/4fac388cda4e8627c15a66fa2f983e0e/href">https://medium.com/media/4fac388cda4e8627c15a66fa2f983e0e/href</a></iframe><p>Now you have created the GET method. Enter the following command on the terminal to run the app:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/906b0c7b269f72708c76eb58edb2e897/href">https://medium.com/media/906b0c7b269f72708c76eb58edb2e897/href</a></iframe><p>Visit the URL <a href="http://localhost:3000/books">http://localhost:3000/items</a> . If you can see the following on the browser, you have created the GET method successfully:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/561/1*y-6rNIAbLccdNzhAtybHVw.png" /></figure><p>In the above, we created a route to GET all items. Now we are going to create a route to fetch an item by its id. To do that insert the following code into the items.js file:</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/746081450574306425f1099b73af182a/href">https://medium.com/media/746081450574306425f1099b73af182a/href</a></iframe><p>Now we can get a particular item’s details. Enter http:localhost:3000/items/101in your browser window and you will get the following result:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/476/1*nvkx0qaxWpFss31CyrshMQ.png" /></figure><p>You must deliver an error message with an HTTP code of 404 if the id does not exist or is incorrect: http:localhost:3000/items/108</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/158/1*IHmUWrPp5DTdi72NWlPjrg.png" /></figure><h4>POST Method</h4><p>At last, we are going to build a route to handle the POST method. To build the POST route add the following code to items.js.</p><iframe src="" width="0" height="0" frameborder="0" scrolling="no"><a href="https://medium.com/media/88e1d1693946a393ab6f3b2309729b43/href">https://medium.com/media/88e1d1693946a393ab6f3b2309729b43/href</a></iframe><p>To test if this POST method works successfully, you can use the Postman API platform.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/926/1*xfhwqajecGj2wVVbaDph1w.png" /></figure><p>Then visit the URL <a href="http://localhost:3000/books">http://localhost:3000/items</a>. You can see the items along with the newly added item.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/558/1*uXVR4u5-3Gj7kFaHHGoxbw.png" /></figure><p>Now you have finished creating a REST API with Koa. I hope you gained some basic knowledge about Koa and REST API through this article.</p><p>The whole code for this article can be found in the following Github repository:</p><p><a href="https://github.com/ShonaliRomeshika/KoaJS-REST/tree/main">GitHub - ShonaliRomeshika/KoaJS-REST</a></p><p><em>More content at </em><a href="https://plainenglish.io/"><strong><em>PlainEnglish.io</em></strong></a><em>. Sign up for our </em><a href="http://newsletter.plainenglish.io/"><strong><em>free weekly newsletter</em></strong></a><em>. Follow us on </em><a href="https://twitter.com/inPlainEngHQ"><strong><em>Twitter</em></strong></a><em> and </em><a href="https://www.linkedin.com/company/inplainenglish/"><strong><em>LinkedIn</em></strong></a><em>. Check out our </em><a href="https://discord.gg/GtDtUAvyhW"><strong><em>Community Discord</em></strong></a><em> and join our </em><a href="https://inplainenglish.pallet.com/talent/welcome"><strong><em>Talent Collective</em></strong></a><em>.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=cd0770fbe916" width="1" height="1" alt=""><hr><p><a href="https://javascript.plainenglish.io/koa-js-and-rest-api-cd0770fbe916">Build a REST API with Koa</a> was originally published in <a href="https://javascript.plainenglish.io/">JavaScript in Plain English</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction to Version Controlling]]></title>
            <link>https://towardsdev.com/introduction-to-version-controlling-c714524fb336?source=rss-826adf7cf6cc------2</link>
            <guid isPermaLink="false">https://medium.com/p/c714524fb336</guid>
            <category><![CDATA[repositories]]></category>
            <category><![CDATA[git]]></category>
            <category><![CDATA[merge-conflicts]]></category>
            <category><![CDATA[version-control]]></category>
            <category><![CDATA[github]]></category>
            <dc:creator><![CDATA[Shonali Romeshika]]></dc:creator>
            <pubDate>Tue, 22 Mar 2022 07:22:09 GMT</pubDate>
            <atom:updated>2022-03-23T08:44:06.537Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2TFAm2rHSkGfEKmniRNg8A.png" /></figure><h4><strong>What is Version Control?</strong></h4><p>Version control allows software teams to keep track of changes to the code while also improving communication and collaboration among team members. Version control makes it easier to develop software in a continuous and straightforward manner.</p><p>We can use Version Control in the following situations.</p><ul><li>If there are so many individuals in different places and also they have to work on the same project.</li><li>If a project should be completed into several versions and keep all commits of those versions in a single place.</li><li>When It may be necessary to revert to a previous version to determine the root cause of a bug.</li><li>When it is useful to know what modifications were made to prior versions of the source code or where the changes were made in a file.</li><li>All efforts will be wasted if the user’s system or disk fails and there is no backup.</li></ul><h4>Benefits of Version Controlling</h4><ul><li>By keeping track of all code modifications, the Version Control System assists the development team in managing the source code.</li><li>The changes made by developers are saved for future reference and can be utilized to determine the underlying cause of any given problem if necessary.</li><li>Because all versions of the code are saved, developers can go back at any moment and compare prior versions of the code to assist in the correction of the error.</li><li>Version Control Systems are well-known for ensuring a smooth and continuous flow of code updates, preventing engineers from becoming irritated.</li><li>Version management can help you avoid having several and/or out-of-date versions of the same document.</li><li>Software configuration management can be done in a practical and secure way with version control.</li></ul><h4>Version Control Terminology</h4><p>Now, let’s consider some usually used words in Version Controlling.</p><ul><li><strong>Repository</strong> — A repository is a collection of files or directories that are subject to version control.</li><li><strong>Commit</strong> — A commit is a procedure that sends the most recent source code modifications to the repository.</li><li><strong>Branch</strong> — There are times when you want to try something new or commit changes to the repository that might break something else in your code. You can construct a <strong>branch</strong> instead of directly committing this code to the main set of files. Multiple branches are usually permitted at the same time.</li><li><strong>Master Branch </strong>— Also referred to as <strong>Main Branch</strong>. The master branch is<strong> </strong>the<strong> </strong>default branch. This is where the most stable code is being placed.</li><li><strong>Merge</strong> — Combining branches together to update the master branch.</li><li><strong>Merge Conflict </strong>— When combining two branches, but you or someone else has made modifications to the same elements in a file, merge conflicts occur. We can start with the main branch and then commit to that branch. Then two distinct persons can come up with unique features. Another user may, for example, make a new fix for our project and merge it back into the main branch. In addition, we could work on our own feature branch and make a repair for our project, which we could then merge back into the project, but if another fix has been produced before that, merge conflicts are likely to occur.</li></ul><h3>What is Git?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/348/1*qbqpy2CEHLCQuN_wE8XMmw.png" /></figure><p>There are several Version Control Systems used at present. Some of them are Git, CVS, SVN, Mercurial, Monotone, Bazaar, TFS, and VSTS.</p><p>Git is the most popular version control system. It is free and open-source. Git consists of the following characteristics.</p><ul><li>Supports non-linear development in a big way.</li><li>Model for a distributed repository.</li><li>HTTP, FTP, and ssh are all compatible with existing systems and protocols.</li><li>Capable of managing projects ranging in size from small to large.</li><li>History can be verified via cryptography.</li><li>Merge strategies that can be plugged in.</li><li>Design with a toolkit.</li><li>Explicit object packing on a regular basis.</li><li>Garbage builds up until it is collected.</li></ul><h4>Benefits of Git</h4><ul><li>Super-fast and efficient performance.</li><li>Cross-platform.</li><li>Changes to the code can be simply and clearly tracked.</li><li>Simple to maintain and dependable.</li><li>Offers git bash, a fantastic command-line utility.</li><li>Also includes a Git GUI that allows you to easily re-scan, modify the status of the code, sign off, commit, and push the code with only a few clicks.</li></ul><h3>Basic Git Commands</h3><p><strong>SETUP</strong></p><p>Configuring user information is used across all local repositories.</p><ul><li>set a name that is identifiable for credit when reviewing version history.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/352/1*9eGKtwBp2mhEnX4T4xDXrw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/366/1*iizWsSrOwZNDMQNaQQkInw.png" /><figcaption>Example</figcaption></figure><ul><li>set an email address that will be associated with each history marker.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/339/1*5t2VCo9yCmOLYKlRfpqvzQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/343/1*3Vmh4dzaAQFv-xwDySi0Zg.png" /><figcaption>Example</figcaption></figure><p><strong>SETUP &amp; INIT</strong></p><p>Configuring user information, initializing, and cloning repositories.</p><ul><li><strong>git init </strong>—<strong> </strong>initialize an existing directory as a Git repository.</li><li><strong>git clone [url]</strong> — retrieve an entire repository from a hosted location via URL</li></ul><p><strong>STAGE &amp; SNAPSHOT</strong></p><p>Working with snapshots and the Git staging area.</p><ul><li><strong>git status </strong>— show modified files in the working directory, staged for your next commit.</li><li><strong>git add [file] </strong>— add a file as it looks now to your next commit (stage)</li><li><strong>git reset [file] </strong>— unstage a file while retaining the changes in the working directory.</li><li><strong>git diff</strong> — what is changed but not staged.</li><li><strong>git commit -m “[descriptive message]”</strong> — commit your staged content as a new commit snapshot.</li></ul><h3>What is GitHub?</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*i8sw5qT53NeXnAzrgAZyyQ.png" /></figure><p>There are a lot of services available nowadays to host your Git repositories. Some of them are <a href="https://aws.amazon.com/codecommit/"><strong>Amazon AWS CodeCommit</strong></a>, <a href="https://bitbucket.org/"><strong>Bitbucket</strong></a>, <a href="http://www.codebasehq.com/"><strong>Codebase</strong></a>, <a href="http://gitlab.com/"><strong>GitLab</strong></a>, <a href="https://launchpad.net/"><strong>Launchpad</strong></a>,<strong> </strong><a href="https://rhodecode.com/"><strong>RhodeCode</strong></a>, and <a href="https://github.com/"><strong>GitHub</strong></a><strong>.</strong></p><p>As mentioned above GitHub is an Internet hosting service for Git-based software development and version control. It includes Git’s distributed version control and source code management (SCM) features, as well as its own. Every project has access control and collaboration tools like bug tracking, feature requests, task management, continuous integration, and wikis.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c714524fb336" width="1" height="1" alt=""><hr><p><a href="https://towardsdev.com/introduction-to-version-controlling-c714524fb336">Introduction to Version Controlling</a> was originally published in <a href="https://towardsdev.com/">Towards Dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Difference of var, let, and const keywords of JavaScript]]></title>
            <link>https://towardsdev.com/lets-sort-out-the-confusion-of-var-let-and-const-keywords-of-javascript-8b9a317a6459?source=rss-826adf7cf6cc------2</link>
            <guid isPermaLink="false">https://medium.com/p/8b9a317a6459</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[scopes]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[let-const-var]]></category>
            <category><![CDATA[coding]]></category>
            <dc:creator><![CDATA[Shonali Romeshika]]></dc:creator>
            <pubDate>Sun, 27 Feb 2022 20:38:41 GMT</pubDate>
            <atom:updated>2022-03-29T02:22:09.187Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/703/1*rljXNEbm8GWD6wOehISdsg.png" /></figure><p>If you don’t sort out the difference between ‘var’, ‘let’, and ‘const’ keywords in JavaScript, it will likely cause a lot of bugs in your code. This is why you should get to know about ‘var’, ‘let’, and ‘const’ keywords. Those 3 keywords are used to declare variables in JavaScript. Although they are used to declare variables there are differences among those keywords. From reading this article you can figure out when to use which keyword.</p><p>Before moving into var, let, and const we should first know about the scope of the JavaScript. Scope means the accessibility of variables from different parts of the code. There are 2 types of scopes in JavaScript.</p><p><strong>1.</strong> <strong>Global Scope</strong></p><p>In JavaScript whole document is considered as global scope. This global scope consists of other functions and blocks. A block is a piece of code bounded by {}. A block can be a function, if condition, switch, or loop. If a variable declares outside of a block that variable, consider it as a global variable.</p><p>Below example, the variable called ‘number’ is a global variable. Because it is in outside of the blocks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/302/1*i7AEQeP6IwUACn_dpmWGHQ.png" /></figure><p><strong>2.</strong> <strong>Local Scope</strong></p><p>Local Scope is divided into Function scope and Block scope. A variable declares in a function called a function scoped variable. The variables declared inside a function cannot be accessible outside of that function. Below ‘color’ variable is a function scoped variable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/295/1*oVS6xUyvu4GgN5BqwCuTlw.png" /></figure><p>A variable declared in a block is called a block scoped variable. The variables declared inside a block cannot be accessible outside of that block. Below ‘word’ variable is a function scoped variable.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/302/1*m_xU2j8VrP8cJPd9FUbPHQ.png" /></figure><h3><strong>Var</strong></h3><p>The var is the oldest keyword used to declare variables in JavaScript. The variables declared using the var keyword are global scoped or function scoped. A variable declared outside a function can be accessed globally and a variable declared inside a function can be accessed within that function.</p><p>Let’s figure out more about the var keyword using the following examples.</p><p>Example(var) 1:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/300/1*srCBw2CuIA7v-jtyHCRx4w.png" /><figcaption>Example (var) 1</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/210/1*MPDWEBf-YO9GvVZ4dloSkQ.png" /><figcaption>The output of Example (var) 1</figcaption></figure><p>A globally scoped variable declared using the var keyword can be used inside a function.</p><p>Example(var) 2:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/298/1*AARbKeZfja7HrJrE6GDBow.png" /><figcaption>Example (var) 2</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/331/1*EnulF_C40jW41rQjlYXIvw.png" /><figcaption>The output of Example (var) 2</figcaption></figure><p>A function scoped variable declared using the var keyword cannot be used outside that function.</p><p>Example(var) 3:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/312/1*RZW7H9TxxhW96fDUrDtTJw.png" /><figcaption>Example (var) 3</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/141/1*E6Jf0SYe49m1RfCmXbR3sA.png" /><figcaption>The output of Example (var) 3</figcaption></figure><p>In the above example, there are 2 variables with the same name declared in 2 different scopes. We receive the first output as undefined because the ‘num’ variable is not assigned inside the function at that time.</p><p>Example(var) 4</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/292/1*NNDDN2o66wBIC09s8RjqzQ.png" /><figcaption>Example (var) 4</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/161/1*B5nqvmqVmxDFgJ2pY_pkyg.png" /><figcaption>The output of Example (var) 4</figcaption></figure><p>We can replace the value of a global variable that is declared as ‘var’ inside a function.</p><p>Example(var) 5:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/309/1*qkBpjFU_6Qoz6on8yQ8dGA.png" /><figcaption>Example (var) 5</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/161/1*B5nqvmqVmxDFgJ2pY_pkyg.png" /><figcaption>The output of Example (var) 5</figcaption></figure><p>We can re-declare the same variable declared as var inside a function.</p><h3><strong>let</strong></h3><p>The let keyword is introduced in ES6. The variables declared using the let keyword are block scoped. A variable declared inside a block can be accessed within that particular block. The let is used for variables that can be changed as we proceed through the program.</p><p>Let’s figure out more about the let keyword using the following examples.</p><p>Example(let) 1:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/292/1*OcRt1SEpM37vpvtA2wAXUA.png" /><figcaption>Example (let) 1</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/502/1*N2WEXHwuemAVthZfUtOJqQ.png" /><figcaption>The output of Example (let) 1</figcaption></figure><p>If we declare a variable using let in the block scoped, we can’t re-declare that variable.</p><p>Example(let) 2:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/291/1*uqSVWUZyk4TPp1bmqLXk-g.png" /><figcaption>Example (let) 2</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/217/1*1LAuf-W_1VdbMeXl9UmQhA.png" /><figcaption>The output of Example (let) 2</figcaption></figure><p>If we declared a variable using let in the block scoped, we can replace the value of the variable.</p><p>Example(let) 3:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/284/1*EsbnfuRxAgP4WVFUCiS1vA.png" /><figcaption>Example (let) 3</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/376/1*YUOcg2xh0SsU6TVjookW7g.png" /><figcaption>The output of Example (let) 3</figcaption></figure><p>The variable called fruit is defined as let in the block scope. Therefore, we can’t use the variable declared using let outside the block. That’s why we get an error.</p><p>Example(let) 4:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/299/1*PSFiOceRh3JU46WDZF4kpg.png" /><figcaption>Example (let) 4</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/231/1*RaeUw1SF-BULXedX9iXQXg.png" /><figcaption>The output of Example (let) 4</figcaption></figure><p>The variable ‘num’ which is assigned 10 is in the global scope and the variable ‘num’ which is assigned 30 is in the block scope.</p><p>Example(let) 5:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/310/1*TiIqS0vpaWaFM2HyRhZheg.png" /><figcaption>Example (let) 5</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/208/1*eSRqLEBPHp0U7r6zhIx6pQ.png" /><figcaption>The output of Example (let) 5</figcaption></figure><p>We can replace the value of a variable inside a block that is defined in the global scope.</p><h3><strong>const</strong></h3><p>The const keyword is introduced in ES6. The variables declared using the const keyword are block scoped. A variable declared inside a block can be accessed within that particular block. The variables declared as const are constants. This means those variables don’t change till the end of the program.</p><p>Let’s figure out more about the const keyword using the following examples.</p><p>Example(const) 1:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/303/1*adT775HgQuGKRq2RZpzWgg.png" /><figcaption>Example (const) 1</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/526/1*jWKmW8NN4otOVh-t2aNuAA.png" /><figcaption>The output of Example (const) 1</figcaption></figure><p>If we declared a variable using const in the block scoped, we can’t re-declare that variable.</p><p>Example(const) 2:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/308/1*2KLMZt4BUxsVMC-2FXDO8w.png" /><figcaption>Example (const) 2</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/395/1*uDEDNQSZbuU92T33Z4BQYA.png" /><figcaption>The output of Example (const) 2</figcaption></figure><p>If we declared a variable using const, we cannot replace the value of the variable. Because it is a constant.</p><p>Example(const) 3:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/321/1*T99PNzOWfsGcB4_HBs-gGA.png" /><figcaption>Example (const) 3</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/467/1*AYIQ-7rmBWDhMwnzvvmnhQ.png" /><figcaption>The output of Example (const) 3</figcaption></figure><p>The variable called fruit is defined as const in the block scope. Therefore, we can’t use the variable declared using const outside the block. That’s why we get an error.</p><p>Example(const) 4:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/323/1*5GZFjSBw1TK8-D1g1DbXGw.png" /><figcaption>Example (const) 4</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/218/1*VledLn9n5Lw1PyOdIxaGgA.png" /><figcaption>The output of Example (const) 4</figcaption></figure><p>The variable ‘num’ which is assigned 10 is in the global scope and the variable ‘num’ which is assigned 50 is in the block scope.</p><p>Example(const) 5:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/327/1*kgvt_NkbCc2h__BUVuH6kQ.png" /><figcaption>Example (const) 5</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/471/1*4z3Kv7iZ_OA5kLEqNJqELQ.png" /><figcaption>The output of Example (const) 5</figcaption></figure><p>We cannot replace the value of a variable that is defined as const, therefore we get an error.</p><p>Now I hope you have sorted out the confusion among var, let, and const keywords in JavaScript.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=8b9a317a6459" width="1" height="1" alt=""><hr><p><a href="https://towardsdev.com/lets-sort-out-the-confusion-of-var-let-and-const-keywords-of-javascript-8b9a317a6459">Difference of var, let, and const keywords of JavaScript</a> was originally published in <a href="https://towardsdev.com/">Towards Dev</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>