<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Abhiram</title>
    <description>The latest articles on DEV Community by Abhiram (@abhiram55545309).</description>
    <link>https://dev.to/abhiram55545309</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F534999%2F8d811ba6-4eb4-43a5-b8bc-da8aad3b18c9.jpeg</url>
      <title>DEV Community: Abhiram</title>
      <link>https://dev.to/abhiram55545309</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/abhiram55545309"/>
    <language>en</language>
    <item>
      <title>🚀 Demystifying APIs and REST with Spring Boot: Crafting Product Services Made Easy🚀</title>
      <dc:creator>Abhiram</dc:creator>
      <pubDate>Sun, 07 Jan 2024 12:34:10 +0000</pubDate>
      <link>https://dev.to/abhiram55545309/exploring-apis-rest-and-building-a-product-service-with-spring-boot-a-comprehensive-guide-2a96</link>
      <guid>https://dev.to/abhiram55545309/exploring-apis-rest-and-building-a-product-service-with-spring-boot-a-comprehensive-guide-2a96</guid>
      <description>&lt;h2&gt;
  
  
  &lt;strong&gt;What is API&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;API stands for Application Programming Interface. How can we understand API from full form ? Let us simpliy this. We can say it is an interface for an application. Till now we might have created interface for a class. We might have implemented this interface.&lt;/p&gt;

&lt;p&gt;Interface Runnable {&lt;br&gt;
Void run();&lt;br&gt;
                                                                         }&lt;/p&gt;

&lt;p&gt;Any class implemented this interface has to implement run method in it. We can say it is a contract between class and interface ,that whichever class implements this, has to implement this method in it.&lt;/p&gt;

&lt;p&gt;Basically when we create a interface it is like we are creating a contract that whichever class implements this interface has to follow a certain structure ,i.e. it has to implement all the methods or else we will get compilation error.&lt;/p&gt;

&lt;p&gt;Similarly API is also a contract. If any service wants to connect to our API be it front end, third party, anything, it has to follow a certain structure that we created for API. Contract in API is what we will accept in API and what we will return from API.&lt;/p&gt;

&lt;h2&gt;
  
  
  *&lt;em&gt;Major things we will follow in API are *&lt;/em&gt;
&lt;/h2&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;- HTTP methods&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;HTTP stands for Hyper Text transfer protocol. But why we are not discussing HTTPS. Difference between HTTP and HTTPS is protocol. In HTTPS the data will be in encrypted format, in between client and server ,it will not be readable. &lt;/p&gt;

&lt;p&gt;HTTP or HTTPS is used ,how to transfer the text, how to send it in optimized manner. As transfer is happening between two systems we can say two operating systems over network, so we should be having knoweldge about which data structure to use to send the data in optimized way and also about networking and operating systems.&lt;/p&gt;

&lt;p&gt;HTTP methods shows us ,what operations we can use to interact with server.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Xg75VfoI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x8wczahvotj1oqpig2yo.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Xg75VfoI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/x8wczahvotj1oqpig2yo.jpg" alt="Image description" width="602" height="286"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In postman we can see all the HTTP methods, they are basically different methods that we can use to interact with server&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;- Endpoint URL&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;It means ,the URL that our API will be executing. For example we want to create products it will be like &lt;a href="http://www.domain.com"&gt;www.domain.com&lt;/a&gt;, this will be the domain and for creating products it will be &lt;a href="http://www.domain.com/createProducts"&gt;www.domain.com/createProducts&lt;/a&gt;. createProducts is API end point. &lt;/p&gt;

&lt;h2&gt;
  
  
  - &lt;strong&gt;Request&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;-&amp;gt; It is input what we send&lt;/p&gt;

&lt;h2&gt;
  
  
  - &lt;strong&gt;Response&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;-&amp;gt; It is output what we get from API&lt;/p&gt;

&lt;p&gt;For example ,I am running an e-commerce website and I want to use services from razorpay for payment gateway. So for this to happen, the e-commerce websit has to send the order details to razorpay for the transaction to happen, how do we send the data to razorpay ?&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--cmDpR_Vi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/69uoluc8bt9jocjhbzfq.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--cmDpR_Vi--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/69uoluc8bt9jocjhbzfq.jpg" alt="Image description" width="602" height="202"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the above you can see &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;HTTP method is post to create order&lt;/li&gt;
&lt;li&gt;End point URL is /orders.&lt;/li&gt;
&lt;li&gt;Right side of the image, you can -d  which is the request we are sending for example money, currency type etc &lt;/li&gt;
&lt;li&gt;Response we will get like in the below image.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Y_L8u5Wt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hft02k2i9miwqvbe7zqx.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Y_L8u5Wt--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hft02k2i9miwqvbe7zqx.jpg" alt="Image description" width="602" height="124"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;When two applications are talking to each other, they must have well defined API contract.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Above all forms the API contract, which means&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;what is operation we are doing&lt;/li&gt;
&lt;li&gt;what is the end point URL&lt;/li&gt;
&lt;li&gt;what type of information we have to send in request&lt;/li&gt;
&lt;li&gt;what response we can except from API&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Concluding API is set of functionalities or methods that are provided by other system for us to use.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;- What is REST ?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;REST stands for Representation State Transfer. It means that every call we make to API, there should be a transfer of state. &lt;/p&gt;

&lt;p&gt;For example in first call I will call the API  for all the products and In the second call I will call the API for a particular product., now in the second call all the details will be sent again. The authorization etc will happen again in the second call also.&lt;/p&gt;

&lt;p&gt;Every call we make to the backend ,it will be a new call. It may be the same API or different API, it will become a new call. No state will be remembered. Whether we will call the same API 10 times or different API it will be a new call and the previous call state will not be remembered.&lt;/p&gt;

&lt;p&gt;But why do we need to send the data again and again to server ? It reduces the task for server i.e. the server will not remember all the client details, the client  has to provide the details to the server again and again.&lt;/p&gt;

&lt;p&gt;There will be thousands of customers making thousands of calls, if the server has to remember all the details of the users and their call, it will be a huge dataset at server side.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;REST helped to make server less complex and it helped in reducing the development time.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Whenever you see a name REST API’s ,it means API’S are built using REST concept.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  - &lt;strong&gt;API Hands-On&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Let us build API’s related to product service. Let us create two models, one for product and one for category. one product will have one category but one category can have multiple products that means 1: 1 relationship between product and category and many : 1 relationship between category and product.&lt;/p&gt;

&lt;p&gt;So let product model contains&lt;br&gt;
• Productid&lt;br&gt;
• Title&lt;br&gt;
• Price&lt;br&gt;
• Description&lt;br&gt;
• Image&lt;br&gt;
• cateogoryID&lt;/p&gt;

&lt;p&gt;and let category contains&lt;br&gt;
• id&lt;br&gt;
• title&lt;br&gt;
• description&lt;/p&gt;

&lt;p&gt;Now we will build the API’s in controller layer, the controller layer calls service layer and service layer calls repository and repository calls Database, for database we will create models.&lt;/p&gt;

&lt;p&gt;So first we will create Database, from Database we will create models, then we will create repositories and then service layer and in controller we will create the API i e (END POINT URL).&lt;/p&gt;

&lt;p&gt;But right now what we will do is instead of creating Database we will call third party product API’s in service layer. So the data flow will be like&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;- Request will be like&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Client -&amp;gt; API (Controller END POINT URL) -&amp;gt; Service layer -&amp;gt; Third party API
**&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  - Response will be like**
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Third party API -&amp;gt; Service layer -&amp;gt; Controller -&amp;gt; Client&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;We will use this &lt;a href="https://fakestoreapi.com/docs"&gt;https://fakestoreapi.com/docs&lt;/a&gt; third party service which provides API for this demo&lt;/p&gt;

&lt;p&gt;Since we are not using Database do we still need models ? Yes because from API what ever data we return we will send it in models, from models we will create DTO (Data transfer object). So we will always build models even if we call third party or even if we have database.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;What is DTO ?&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Suppose we have a User model in which we have&lt;br&gt;
• UserId&lt;br&gt;
• Email&lt;br&gt;
• Password&lt;br&gt;
• Address&lt;/p&gt;

&lt;p&gt;And we are returning User model data to frontend from API, now we are sending confidential data to frontend. This data can be hacked through browser, so to filter out data and send what is necessary we use DTO&lt;/p&gt;

&lt;p&gt;In DTO we will be having&lt;br&gt;
• UserId&lt;br&gt;
• Email&lt;br&gt;
• Addrress&lt;/p&gt;

&lt;p&gt;From DTO we do&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Hide confidential data&lt;/li&gt;
&lt;li&gt;Reduce pay load size (response)&lt;/li&gt;
&lt;li&gt;Maintains separation between model and actual data we send as response&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;So first we will code&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Models&lt;/li&gt;
&lt;li&gt;DTO’s&lt;/li&gt;
&lt;li&gt;Controller with dummy API&lt;/li&gt;
&lt;li&gt;Service layer calling third party API as well as Database.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--MS1q-Vnz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2k6x09x1fcmrpp10ab8s.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--MS1q-Vnz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2k6x09x1fcmrpp10ab8s.jpg" alt="Image description" width="602" height="259"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In &lt;a href="https://start.spring.io/"&gt;https://start.spring.io/&lt;/a&gt; we will setup the Spring Boot project in a easy manner. I have filled the project data and I have added dependencies such as spring web with which we can REST API’s using spring MVC and Lombok for using getters and setters.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PjmQL1rk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jgz7h8avsngb2gzj7kkg.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PjmQL1rk--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jgz7h8avsngb2gzj7kkg.jpg" alt="Image description" width="602" height="329"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the above picture ,I have imported the project in intellij IDE and I have created the packages for model, dto, service, controller.&lt;/p&gt;

&lt;p&gt;Now we will go to fakestore and by seeing it’s entities and attributes in those entities, we will create our own models.&lt;/p&gt;

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

&lt;h2&gt;
  
  
  Output is can be seen below
&lt;/h2&gt;

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

&lt;p&gt;Below we can see the attributes of products.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---ebXQWGW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dpr15md8uh7kokohuefg.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---ebXQWGW--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dpr15md8uh7kokohuefg.jpg" alt="Image description" width="602" height="278"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I have created product model and I have created attributes as per the products attributes in fakestore api. Make sure that attributes names matches with attributes in fakestore attributes.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pFW6OeXB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w7y9504kiwav868rjnt3.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pFW6OeXB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w7y9504kiwav868rjnt3.jpg" alt="Image description" width="602" height="276"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here we can see the categories reposnse for get all categories.&lt;/p&gt;

&lt;p&gt;We created two DTO’s for the products model. ProductRequestDTO is for incoming data (client request) and ProductResponseDTO is for output data that we send it back to client from REST API.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--U6kOn2x---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cjcwf9oxpfgugrnmcrqk.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--U6kOn2x---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/cjcwf9oxpfgugrnmcrqk.jpg" alt="Image description" width="602" height="311"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here we are adding all the attributes of product model including id as it may help in front-end.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Ay9TmAFV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4ovuow6xui7qwtcneihh.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Ay9TmAFV--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4ovuow6xui7qwtcneihh.jpg" alt="Image description" width="602" height="177"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;We will use @RestController Annotation for Controller. In Spring Boot, a web application can have many end point URL’s (API’s) that clients can use and these are handled by controller’s. Now @RestController annotation is designed specifically for building RESTful API’s&lt;/p&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;h2&gt;
  
  
  If we simplify this
&lt;/h2&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;p&gt;• A controller is the one which decides where each request should go.&lt;br&gt;
• RESTful means that the web service follows a set of principles that make it easy to work with. In the context of Spring Boot, it often means that the service can provide and receive data in a format like JSON or XML and follows certain conventions for how URLs should look.&lt;br&gt;
• @RestController: When a class is marked with @RestController, it's like saying,  this class is a special type of controller, and it's specifically designed to handle requests and responses for RESTful web services.&lt;br&gt;
• @GetMapping, @PostMapping, etc.: Inside a @RestController, we often see methods annotated with things like @GetMapping, @PostMapping, etc. These annotations specify which URLs (endpoints) the methods should handle and what type of HTTP request (GET, POST, etc.)&lt;/p&gt;

&lt;p&gt;Let us create one dummy  REST API in the REST controller which will create two products and return it  and we will call this REST API to see if API is getting invoked or not.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--x3wuAJiQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nk4369xuu87w1i3g0krg.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--x3wuAJiQ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/nk4369xuu87w1i3g0krg.jpg" alt="Image description" width="602" height="279"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here we have created two ProductResponseDTO and we are returning this two as a list from the API.&lt;br&gt;
To set the data to ProductResponseDTO object we have used getters and setters, for that we have used Lombok dependency which will automatically create getters and setters if we use @Getters and @Setters annotations&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--w5meD1b---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/948fls11m421c6w08rxq.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--w5meD1b---/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/948fls11m421c6w08rxq.jpg" alt="Image description" width="602" height="281"&gt;&lt;/a&gt;&lt;/p&gt;

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

&lt;p&gt;In above image we can see response is returned as ResponseEntity. In simple words ResponseEntity is like a bucket which will hold our response and in addition we can add the status of the response. Above we can I have put the status as ok and we are sending the response.&lt;/p&gt;

&lt;p&gt;Inside ResponseEntity we can see, the response can be anything and we can the status also.&lt;br&gt;
Now I will run the SpringBoot application and we will test the API in postman.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--x1PFEdPu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jyp4o95bi3l9cpqy7spn.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--x1PFEdPu--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/jyp4o95bi3l9cpqy7spn.jpg" alt="Image description" width="602" height="299"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Xqakd9-5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lfjizuypfdvv4psd3dtd.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Xqakd9-5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/lfjizuypfdvv4psd3dtd.jpg" alt="Image description" width="602" height="396"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Crucial points&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;How the request reached from postman / client to Spring Boot server or tomcat server&lt;/li&gt;
&lt;li&gt;How the request reached the correct controller and how the response was sent back correctly &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;In the next blog we will cover the above points.&lt;/strong&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>🚀 Mastering Collaboration in Software Development: A Deep Dive into Version Control Systems &amp; Git 🚀</title>
      <dc:creator>Abhiram</dc:creator>
      <pubDate>Sat, 23 Dec 2023 13:26:39 +0000</pubDate>
      <link>https://dev.to/abhiram55545309/mastering-collaboration-in-software-development-a-deep-dive-into-version-control-systems-git-36c8</link>
      <guid>https://dev.to/abhiram55545309/mastering-collaboration-in-software-development-a-deep-dive-into-version-control-systems-git-36c8</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--1ZWus5iR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w70uh6r5qlkmu0y3noyd.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--1ZWus5iR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/w70uh6r5qlkmu0y3noyd.png" alt="Image description" width="247" height="319"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Version Control System:&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;If we see the word Version control system, the meaning which will strike is managing different versions or tracing different versions. &lt;/p&gt;

&lt;p&gt;For example take company Amazon or any other company, do you think the entire code of amazon is written in one go? Or one software engineer has written the entire code?&lt;/p&gt;

&lt;p&gt;Thousands of software engineer might have contributed. Combined all those code, combining all those versions of code makes one code base of any company.&lt;/p&gt;

&lt;p&gt;If I am the only one writing the code, there is no need to maintain the versions of code, but there will be multiple people working on a project. There will be lot of challenges that we may face like &lt;/p&gt;

&lt;p&gt;• Conflicts can happen&lt;br&gt;
• Sync problems can happen (One engineer can be working on latest version &amp;amp; another may be working on old version of codebase. While merging both of their commits to the Master branch we will face the problems due to different versions of code base)&lt;br&gt;
Assume that in a project there are 4 versions of code base V1, V2, V3, V4.  Let us think about a scenario to move from V4 to V3 (previous version)?&lt;/p&gt;

&lt;p&gt;Whenever we get a bug in the production, first thing we check for is what the code changes are made or database changes made in the last few days. If we found out until version V3, the code was functioning properly and there is a bug surfaced now. So we might have missed something like testing or any other think for version V4.&lt;/p&gt;

&lt;p&gt;To fix the BUG we can rollback to previous version V3 and continue working on BUG. This is the reason to maintain the history of the project.&lt;/p&gt;

&lt;p&gt;Another reason for version control system is to maintain all the code changes done by all the team members, so that in future any bug comes they might approach the person who worked on developing the code  to get more details about the feature that he has developed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Types of Version control system&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Centralized VCS&lt;/strong&gt;: Single server that maintains the complete history of codebase. &lt;br&gt;
• One need to be connected to the server all the time.&lt;br&gt;&lt;br&gt;
• If something happens to the server like server crash etc., then we cannot access codebase or we cannot add or modify the code base. This scenario is called as  "Single point of failure"&lt;br&gt;
              Example:- Any file on shared server&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Distributed VCS&lt;/strong&gt;: Allows people to work independently offline, no need to connect to the server all the time &lt;/p&gt;

&lt;p&gt;• People working on codebase should download codebase to their local machines.&lt;br&gt;
• No "Single point of failure" scenario occurs as the codebase is spread across the local machines&lt;/p&gt;

&lt;p&gt;We will discuss about Git as example for Distributed version control system. &lt;br&gt;
• Git - Version control system to track changes&lt;br&gt;
• GitHub - Central repository to host codebase.&lt;/p&gt;

&lt;p&gt;With Git we can manage changes to files overtime and you can come back and see what the changes are made. We can see the difference between the versions of codebase and we can view who changed what.&lt;/p&gt;

&lt;p&gt;Let us discuss how we can use git by using all its features.&lt;br&gt;
There are 4 git locations&lt;/p&gt;

&lt;p&gt;• Working tree - Contains location of local repo. All brand new files added into the project are called "untracked files" &amp;amp; edited files are called "Modified files" in local. &lt;/p&gt;

&lt;p&gt;• Staging Area - Sort of filtering zone. Suppose there are 5 files I am working on &amp;amp; I want commit only 2, then only 2 will be moved from working tree to Staging area. Files here are called as staged files&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;  Command to move files from working tree to staging
               ** git add file1 file2**

  Command to move files from Staging area to local git repo –
              ** git commit -m "message for commit”**
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;•  Local git repo - Files will be saved to git repo locally here after committing&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; Command to move files from local git repo to remote git repo 
       ** git push origin **

 **_But in the above command what is origin?_**

 Suppose we have a local project that we want to host on 
 multiple remote service providers like GitHub, GitLab. I 
 create repository in GitHub &amp;amp; GitLab.

 Now using Git I want to connect to multiple repositories on 
different service providers.

GitHub &amp;amp; GitLab give us a link after creating repository 
there. The link is the identifier. 

Typing the link to connect to remote repo like GitHub or 
GitLab is difficult because we have to type in the entire URL.
What we do is we maintain a map in Git for mapping the link.

Example: name is origin &amp;amp; value is "link of GitHub remote 
         repo"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;To map this we have command – &lt;strong&gt;git remote add origin "link of GitHub remote repo&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt;: Any name we can give while mapping but first name should always be origin&lt;/p&gt;

&lt;p&gt;Example: &lt;strong&gt;git remote origin2 "GitLab remote repo link"&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"Until the above everything is in local"&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;•Remote git repo (GitHub, GitLab etc) - Central repository to host all codebase.&lt;/p&gt;

&lt;p&gt;Git helps us to connect to multiple remote repo because if GitHub gets hacked &amp;amp; all codebase is deleted, we need to maintain some backup for codebase.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Note&lt;/strong&gt; : "Always remember while designing, always design for failure, always be sure to lookout for failure &amp;amp; have a solution for that"&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Let us do the hands on regarding all the above locations&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt; To turn any project to a local git repository we use command &lt;strong&gt;"git init"&lt;/strong&gt;. Now the project will be initialized to Git repository.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;We have to configure who is the developer for the local repo. For that we use "git config user.name --name" &amp;amp; "git config user.email"&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--5lNtAanI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8mpvykkbdr5dnklrliq6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--5lNtAanI--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8mpvykkbdr5dnklrliq6.png" alt="Image description" width="593" height="179"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Let us create few files &amp;amp; we will come across all the above git locations&lt;/li&gt;
&lt;/ul&gt;

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

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

&lt;ul&gt;
&lt;li&gt;Now we have created a new file &amp;amp; we will see which location the file is using "git status" command.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Here we can see the file is called "untracked files" present in working tree (working tree - contains location of local repo).&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Let us move from working tree to staging area using "&lt;strong&gt;git add .&lt;/strong&gt;" command&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Let us see the output of  " git status" command&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Now we can see “Changed to be committed “which means the file is in staging area &amp;amp; it can be committed.&lt;/p&gt;

&lt;p&gt;If we want to send back the file back to working tree from staging area we can see the above command in the image "&lt;strong&gt;git rm --cached filename&lt;/strong&gt;"&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Command to move from staged to local repo we use " &lt;strong&gt;git commit -m "message"&lt;/strong&gt; " command.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Now if we see git status&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Let us add one more file &amp;amp;  let us modify the first file.&lt;/li&gt;
&lt;/ul&gt;

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

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

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

&lt;ul&gt;
&lt;li&gt;Let us view the git status&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;We can see first file is modified &amp;amp; second file is untracked. Now we will move both of them to staging area and we will commit them.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Let us view the status&lt;/li&gt;
&lt;/ul&gt;

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

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

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

&lt;p&gt;Now copy the link of new repo created in GitHub&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Let us connect local repo to remote repo create din GitHub using " git remote add origin "remote repo link" "&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Let us modify the first file again &amp;amp; let us not commit it &amp;amp; we will see if the changes will be reflected or not in remote repo.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Let us view the status now&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;Let us not commit this change, let us push these to remote repo.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;In GitHub if we go to the commits section, but you can see in the first page that the change that we did not commit is not getting reflected. So it did not get pushed to remote repo.&lt;/li&gt;
&lt;/ul&gt;

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

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

&lt;p&gt;&lt;strong&gt;Let us discuss git branches now.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Suppose we have some code &amp;amp; we have deployed it on one server. Now we want to add one more feature we cannot directly modify the code which is running on the server. &lt;br&gt;
Another idea what we can do is get a copy of the code, make changes and replace the code with the copy but the problem is we may face some bugs which did not identify  and we may lose some history of the codebase.&lt;br&gt;
To solve this git gives us branches with which we can maintain multiple replicas of code.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We will use " git branch "branchName " command to create branch. If we use git branch we can see which branch we are using.&lt;/li&gt;
&lt;/ul&gt;

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

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

&lt;ul&gt;
&lt;li&gt;Now if we see the branches we have 2 branches but we are still on master branch. Now will switch to feature 1 branch using " git checkout " command&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;But the interesting part we will see now is by using "git status" command. Here we can see the first file is modified as feature1 is new branch.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--8OTgaE7d--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/814e2l8phwieduujdgt6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--8OTgaE7d--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/814e2l8phwieduujdgt6.png" alt="Image description" width="600" height="300"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;We can use " git merge " to merge the branch with master&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;We will create a new branch and we will create one more file but will push a new branch to remote repo &amp;amp; we will create pull request.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

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

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

&lt;ul&gt;
&lt;li&gt;After pushing our branch to remote repo, we will create pull request. We can write the changes that we have made and the changes will be displayed to us. Through this the branch will merged to master in remote repo.&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;The thing that we must remember is we should not merge directly to master branch, every time we have to raise a pull request.&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>Understanding the Factory Design Pattern: A Beginner's Guide</title>
      <dc:creator>Abhiram</dc:creator>
      <pubDate>Sat, 01 Apr 2023 06:06:00 +0000</pubDate>
      <link>https://dev.to/abhiram55545309/understanding-the-factory-design-pattern-a-beginners-guide-k32</link>
      <guid>https://dev.to/abhiram55545309/understanding-the-factory-design-pattern-a-beginners-guide-k32</guid>
      <description>&lt;h2&gt;
  
  
  Factory Design Pattern
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Factory method is a &lt;strong&gt;creational pattern&lt;/strong&gt; that uses &lt;strong&gt;factories&lt;/strong&gt; to instantiate objects without having to specify the exact class of the objects that will be created&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Creational Pattern&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Pattern that is related to creation of new objects&lt;/li&gt;
&lt;li&gt;Alternative way of using objects than just a regular constructor.&lt;/li&gt;
&lt;li&gt;Not going to use &lt;strong&gt;new&lt;/strong&gt; keyword to create objects &lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Factories&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Within the context of object-oriented programming we mean methods or functions or other objects that create new objects.&lt;/li&gt;
&lt;li&gt;And the return types from factories are going to be new instances of objects in themselves.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Factories &lt;strong&gt;isolates&lt;/strong&gt; or encapsulates the behaviour of creation of some new object.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In short, the separation between the code that creates products from the code that uses products are &lt;strong&gt;factories&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;we need not modify the client code for creating new types of products.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Follows Open close principle in solid which means *&lt;em&gt;the code should be open for extension and close for modification which means we can add to our code without changing existing code when we want to implement new factories. *&lt;/em&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Fundamental benefits of factory method in terms of designing software - &lt;strong&gt;Different levels of abstraction&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Real world example&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F43rojwjadzu2qy1u5z3l.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F43rojwjadzu2qy1u5z3l.PNG" alt="Coffee served in restaurant"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;When you order a cup of coffee in a restaurant, you do not see how the coffee is served, whether in a glass or ceramic cup.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Once the coffee is served you accept it and drink it.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;No implementation is shared just like how the coffee is served.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;We can think of software design in similar fashion.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;We want to separate our code that takes care of implementation details.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Without changing our core business logic, we want to implement things&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;Every design patten is meant to solve a problem, we will see which problem factory design patten solves&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Suppose we are building custom operating system which plays audio to remotely connected device.&lt;br&gt;
Example: Alexa, Google Assistant device.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;We are going to create Music Player class -&amp;gt; which invokes play method in Alexa.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8ppqz8irlt483olu1xul.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F8ppqz8irlt483olu1xul.PNG" alt="Music Player class invoking Alexa device"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;We have also another class Video Player -&amp;gt; Invokes play method in Alexa.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1ks2pse5vn485h14y25w.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1ks2pse5vn485h14y25w.PNG" alt="Video Player class invoking Alexa device"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Alexa objects are created, and we are invoking play method.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq5w5v65fc7yirvdeiajp.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fq5w5v65fc7yirvdeiajp.PNG" alt="Play method in Alexa"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Consider a scenario, we have to connect to Google Assistant device to play Audio.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;The selection between Amazon Alexa &amp;amp; Google Assistant may vary on set of conditions or configuration.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To support selection, we have to modify Music Player as well as Video player class.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpqhhnpq6qh1d6xsw9ceq.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fpqhhnpq6qh1d6xsw9ceq.PNG" alt="Selection bases on device"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw490x8yxcxucwqbb8fql.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fw490x8yxcxucwqbb8fql.PNG" alt="Video Player Selection"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnmv60m38ko1ocbqpqs6b.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fnmv60m38ko1ocbqpqs6b.PNG" alt="Google Assistant device"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;*&lt;em&gt;Assume there are plenty of classes &amp;amp; we have to continuously modify the changes in All classes. *&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Problems&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Consumer logic has to take care of creating objects on some condition.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Logic to create object should be duplicated in every consumer code.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;whenever new type is introduced, we have to modify the consumer logic.&lt;/p&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;h2&gt;
  
  
  How the factory design pattern solves the above problems
&lt;/h2&gt;

&lt;p&gt;**&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Consumer has to place their decision, factory pattern will take care of all the decisions to produce products.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Factory Method exposes one public class through which we can pass our condition.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Rule driven logic is now abstract to consumer, just call factory and we have to place our choice.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fciq3w7746ecrswwqb6jl.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fciq3w7746ecrswwqb6jl.PNG" alt="Factory Method"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxhylmvhgcj0xhhisz40w.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fxhylmvhgcj0xhhisz40w.PNG" alt="Just calling factory method by passing device choice"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How to decide if one should use Factory design Pattern&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;If we have multiple derived classes and consumer can request either of them based on certain condition.&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>What Everyone Ought to Know About Singelton design pattern</title>
      <dc:creator>Abhiram</dc:creator>
      <pubDate>Thu, 02 Mar 2023 04:10:26 +0000</pubDate>
      <link>https://dev.to/abhiram55545309/what-everyone-ought-to-know-about-singelton-design-pattern-387d</link>
      <guid>https://dev.to/abhiram55545309/what-everyone-ought-to-know-about-singelton-design-pattern-387d</guid>
      <description>&lt;h2&gt;
  
  
  Singleton Pattern
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Singleton Pattern says that just "define a class that has only one instance and provides a global point of access to it".&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--EQhC-Q7r--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c9xy2lbmmmfzzvkshp1m.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--EQhC-Q7r--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/c9xy2lbmmmfzzvkshp1m.jpg" alt="UML of Singleton design pattern" width="618" height="325"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The above image depicts the UML of Singleton design pattern&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  UML - Unified Modeling Language
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Popular for diagrammatic notation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;For Visualization, to understand &amp;amp; remember.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In UML, first block is considered as the class, second block is considered as Attributes &amp;amp; third block is considered as Methods&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Signs used such as +, -, # have certain meaning. They will tell which Access modifier is being used.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;(+) - Public&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;(-) - Private&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;(#) - Protected&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Steps to create Singleton design pattern
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Through constructor the client can create many objects of a class&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;So make the constructor as private.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Now, how do we get the instance of the class&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Create getInstance method which checks if instance is null or not. If instance is not null, return the same instance or call the constructor to create new instance.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Now how the client can call this method? because methods are called by objects&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Client doesn't have object, so no access to constructor. Use static keyword. We do not need instance of the class if we use static.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--t9MCAcpp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qwi39cn0d53yuruioxcg.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--t9MCAcpp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qwi39cn0d53yuruioxcg.PNG" alt="Code walkthrough of Singleton design pattern" width="625" height="428"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Multithreading and how to handle Multiple threads
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;In main method, do mistake purposefully in System.out.println we will see error exception in thread main which means main is a thread &amp;amp; by running it we are getting the error.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Normally code runs line by line but if we want 2 things to run simultaneously, then it will be multithreading.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Do Ctrl + Shift + Escape, you will get Task manager go to performance tab in that We can view how many cores are there &amp;amp; in each core 2 threads can be run. So Logical processors = 2 * Cores.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;At a time only (Logical processors = 2 * Cores) threads can be run.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In Task manager We will see thousands of threads working at a time. But the (Logical processors = 2 * Cores) threads will take turns &amp;amp; switch within microseconds. That is why we see thousand of threads in numbers.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s---Oik1Mmw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8fqopn4zmv7fzwclb672.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s---Oik1Mmw--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/8fqopn4zmv7fzwclb672.PNG" alt="Task Manager - Performance" width="555" height="694"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Why we are handling Mutiple threads in Singleton design pattern&lt;/strong&gt;
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;If 2 threads access the getInstance method, both threads will check if instance is null or not. To both of them instance will be null and each thread will create one obecjt.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;But our objective in Singleton design pattern is to create one object and use it for all instances. So to avoid this we will use synchronized key word.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;To handle multiple threads we will be using &lt;strong&gt;synchronized&lt;/strong&gt; key word. What it does is it will lock the operation until one thread operation is completed. So that multiple threads can not use a method at a time.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Qrc10JWJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hwafl8l20ten2mlk7whn.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Qrc10JWJ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hwafl8l20ten2mlk7whn.PNG" alt="Handling Multiple threads in Singleton design pattern " width="800" height="420"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;In above image we can view we made the getInstance method synchronized so that multiple threads can not access it at the same time&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Cons of Singleton design pattern
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;p&gt;Should be handled carefully in Multithreaded environment&lt;/p&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;               Happy Reading
&lt;/code&gt;&lt;/pre&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>beginners</category>
      <category>programming</category>
      <category>designpatterns</category>
      <category>design</category>
    </item>
    <item>
      <title>Why Design Patterns ?</title>
      <dc:creator>Abhiram</dc:creator>
      <pubDate>Thu, 16 Feb 2023 15:36:10 +0000</pubDate>
      <link>https://dev.to/abhiram55545309/why-design-patterns--j9a</link>
      <guid>https://dev.to/abhiram55545309/why-design-patterns--j9a</guid>
      <description>&lt;p&gt;As a developer, as we work on enterprise application problems using a programming language. We document the best practices &amp;amp; common recurring problems and proven solutions to those problems.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;The recurring problems and ready-made solutions which can be applied universally are &lt;strong&gt;Design Patterns&lt;/strong&gt;
&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Design Patterns
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Helps to identify recurring problems + Ready-made solution to it.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Example: If you want to create one instance of the class no matter how many times the objects have been created, we can use a design pattern.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Idea of design pattern was born in Civil Engineering.&lt;/li&gt;
&lt;li&gt;Gang of Gour have popularized design patterns through their book. &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Why Design Patterns
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Reuse of particular situation &amp;amp; solution.&lt;/li&gt;
&lt;li&gt;Application Structure will get better.&lt;/li&gt;
&lt;li&gt;As it is proved and used universally, any developer can understand the flow of Application easily.&lt;/li&gt;
&lt;li&gt;Provides common language across all community.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Types Of Design Patterns
&lt;/h2&gt;

&lt;p&gt;Types of design pattern depends on the problem.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Core pattern catalogue.&lt;/li&gt;
&lt;li&gt;Java EE patterns catalogue.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Core pattern catalogue - &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Creational Design Pattern
(Deals with problem's related to Object creation)
&lt;/li&gt;
&lt;li&gt;Structural Design Pattern
(Deals with problem's related to Relationship between classes)
&lt;/li&gt;
&lt;li&gt;Behavorial Design Pattern
(Deals with problem's related to communication should happen 
between objects and classes)
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyr767ljvwurhnwg5z5jh.PNG" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fyr767ljvwurhnwg5z5jh.PNG" alt="Figure depicts Types of Design patterns" width="729" height="678"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How To Study &amp;amp; Use Design Patterns?
&lt;/h2&gt;

&lt;p&gt;After learning the basics of object-oriented programming, one should follow the three-step learning process given below:&lt;/p&gt;

&lt;p&gt;Acceptance: First, try to accept the fact that design patterns solve commonly occurring problems in object-oriented software design. Hence, when we are developing any object-oriented software we should not complicate the process by reinventing the wheel.&lt;/p&gt;

&lt;p&gt;Recognition: Recognize the importance of following the best practices while developing object-oriented software applications. Read about the problems that are solved using design patterns and identify similar problems in your own development work. In this way, we may find a way to use these design patterns efficiently.&lt;/p&gt;

&lt;p&gt;Internalization: Once a suitable design pattern is identified for our software application, we can try to implement it and add it internally to our application in such a way that it provides reusability, manageability, and extensibility.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Java Strings...</title>
      <dc:creator>Abhiram</dc:creator>
      <pubDate>Wed, 27 Jul 2022 11:37:11 +0000</pubDate>
      <link>https://dev.to/abhiram55545309/java-strings-55c9</link>
      <guid>https://dev.to/abhiram55545309/java-strings-55c9</guid>
      <description>&lt;h2&gt;
  
  
  Java String
&lt;/h2&gt;

&lt;p&gt;In Java, string is basically an object that represents sequence of char values. An array of characters works same as Java string. For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;char[] ch={'A','B','C','D','E','F','G','H','I','J'};  
String s=new String(ch);  
Is same as
String s="ABCDEFGHIJ"; 

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

&lt;/div&gt;



&lt;p&gt;Java String class provides a lot of methods to perform operations on strings such as compare(), concat(), equals(), split(), length(), replace(), compareTo()&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;CharSequence Interface&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The CharSequence interface is used to represent the sequence of characters. String, StringBuffer and StringBuilder classes implement it. It means, we can create strings in Java by using these three classes.&lt;/p&gt;

&lt;p&gt;The Java String is immutable which means it cannot be changed. Whenever we change any string, a new instance is created String objects are immutable. Immutable simply means unmodifiable or unchangeable.. For mutable strings, you can use StringBuffer and StringBuilder classes.&lt;/p&gt;

&lt;p&gt;Generally, String is a sequence of characters. But in Java, string is an object that represents a sequence of characters. The java.lang.String class is used to create a string object.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;There are two ways to create String object:&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;1.    By string literal&lt;/strong&gt;&lt;br&gt;
&lt;strong&gt;2.    By new keyword&lt;/strong&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;When string literal is used to create a string object first it checks whether this string already exists in String Pool. String Pool is a set of string constants that sits in the heap area. If the string already exists in this String Pool then a reference is returned else a new string object is created in this pool and the reference of this newly created object is returned.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;When a new keyword is used to create a string object it always creates an object in the heap area and a reference of this object is returned. While creating a string object in the heap area it checks if this string object is present in String Pool or not. If the string object is not present in String Pool then it creates a new object in String Pool as well. But the newly created string variable will always point to the string object in the heap and not in the String Pool.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;String Pool Example
public class Main {

        public static void main(String[] args) {

            String name1 = "Tom";
            String name2 = "Tom";//name1.intern();

            String name3 = new String("Bob");
            String name4 = "Bob";

            System.out.println(name1 == name2);
            System.out.println(name3 == name4);

        }
    }

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

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;output :&lt;br&gt;
true&lt;br&gt;
false&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1z01dzq9xnh0ud1al7pm.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2F1z01dzq9xnh0ud1al7pm.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;StringBuilder :&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;• StringBuilder represents a mutable sequence of characters.&lt;br&gt;
• The instance of this class does not guarantee Synchronization and hence should not be used in multi-threaded environments.&lt;br&gt;
• Wherever possible we should always try to use StringBuilder instead of StringBuffer as StringBuilder is faster than StringBuffer under most implementations.&lt;/p&gt;

&lt;p&gt;Below are the StringBuilder class’s methods and descriptions. They can be used as an individual method or in combination.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt; append(): Appends the string representation of the specified argument to the specified StringBuilder instance sequence.&lt;/li&gt;
&lt;li&gt; insert(): Inserts the string representation of the specified argument to the specified StringBuilder instance sequence.
&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;String builder example
public class Main {

        public static void main(String[] args) {

            StringBuilder stringBuilder = new StringBuilder("Abhiram");
            System.out.println(stringBuilder);
            stringBuilder.append(" Karnam");
            System.out.println(stringBuilder);
            stringBuilder.insert(8," Rama");
            System.out.println(stringBuilder);
}}
output:
Abhiram
Abhiram Karnam
Abhiram Rama Karnam

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

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Note: insert method can be used for appending the string at the end of the specified string using the length() function.
stringBuilder.insert("Abhiram".length()," Karnam");
//this results "Abhiram Karnam"
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;&lt;strong&gt;StringBuffer :&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;• StringBuffer class represents a thread-safe, mutable sequence of characters.&lt;/p&gt;

&lt;p&gt;• A string buffer is like a String but it can be modified. At any point in time, it contains some particular sequence of characters, but the length and content of the sequence can be changed through certain method calls.&lt;/p&gt;

&lt;p&gt;• The methods of StringBuffer class are synchronized where necessary so that all the operations on any particular instance behave as if they occur in some serial order that is consistent with the order of the method calls made by each of the individual threads involved.&lt;/p&gt;

&lt;p&gt;• The principal operations on a StringBuffer instance are the append and insert methods, which are overloaded so as to accept data of any type. Each converts a given data to a string and then appends or inserts the characters of that string to the string buffer.&lt;/p&gt;

&lt;p&gt;• The append method always adds these characters at the end of the buffer and the insert method adds the characters at a specified point.&lt;/p&gt;

&lt;p&gt;Below are StringBuffer class methods and descriptions. They can be used as an individual method or in combination. These methods are synchronized and can be used for a multi-threaded environment.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;append(): Appends the string representation of the specified argument to the specified StringBuffer instance sequence.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;insert(): Inserts the string representation of the specified argument to the specified StringBuffer instance sequence.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;String buffer example
public class Main {

        public static void main(String[] args) {

            StringBuffer stringBuffer = new StringBuffer("Abhiram");
            System.out.println(stringBuffer);
            stringBuffer.append(" Karnam");
            System.out.println(stringBuffer);
            stringBuffer.insert(8, "Rama ");
            System.out.println(stringBuffer);
        }
    }

output:
Abhiram
Abhiram Karnam
Abhiram Rama Karnam

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

&lt;/div&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Java String Example
public class StringExample{    
public static void main(String args[]){    
String s1="java";//creating string by Java string literal    
char ch[]={'s','t','r','i','n','g','s'};    
String s2=new String(ch);//converting char array to string    
String s3=new String("example");//creating Java string by new keyword    
System.out.println(s1);    
System.out.println(s2);    
System.out.println(s3);    
}}    

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

&lt;/div&gt;


&lt;p&gt;The above code, converts a char array into a String object. And displays the String objects s1, s2, and s3 on console using println() method.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Following are some features of String which makes String objects immutable.&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;1. ClassLoader:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A ClassLoader in Java uses a String object as an argument. Consider, if the String object is modifiable, the value might be changed and the class that is supposed to be loaded might be different.To avoid this kind of misinterpretation, String is immutable.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. Thread Safe:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As the String object is immutable we don't have to take care of the synchronization that is required while sharing an object across multiple threads.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Security:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;As we have seen in class loading, immutable String objects avoid further errors by loading the correct class. This leads to making the application program more secure. Consider an example of banking software. The username and password cannot be modified by any intruder because String objects are immutable. This can make the application program more secure.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Heap Space:&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The immutability of String helps to minimize the usage in the heap memory. When we try to declare a new String object, the JVM checks whether the value already exists in the String pool or not. If it exists, the same value is assigned to the new object. This feature allows Java to use the heap space efficiently.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Why String class is Final in Java?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The reason behind the String class being final is because no one can override the methods of the String class. So that it can provide the same features to the new String objects as well as to the old ones.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;**Happy reading friends....**
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>Java Arrays.....</title>
      <dc:creator>Abhiram</dc:creator>
      <pubDate>Wed, 27 Jul 2022 10:01:13 +0000</pubDate>
      <link>https://dev.to/abhiram55545309/java-arrays-59ld</link>
      <guid>https://dev.to/abhiram55545309/java-arrays-59ld</guid>
      <description>&lt;h2&gt;
  
  
  Array ?
&lt;/h2&gt;

&lt;p&gt;In your coding journey, you will find that arrays are used in many problems, no matter which programming language you choose, the usage of arrays will be there.&lt;/p&gt;

&lt;p&gt; An Array is a collection of similar data types stored in contiguous memory locations.&lt;br&gt;
 At the time of declaration of an array, you must specify the type of data with the array name&lt;br&gt;
 . You can access different elements present in an array using their index.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Array declaration syntax in Java:&lt;/strong&gt;&lt;br&gt;
int [] intArray;&lt;/p&gt;

&lt;p&gt;• An array is fixed in length i.e static in nature.&lt;br&gt;
• An array can hold primitive types and object references.&lt;br&gt;
• In an array when a reference is made to a nonexistent element, an IndexOutOfRangeException occurs&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Advantages&lt;/strong&gt;&lt;br&gt;
o   Code Optimization: It makes the code optimized, we can retrieve or sort the data efficiently.&lt;br&gt;
o   Random access: We can get any data located at an index position.&lt;br&gt;
&lt;strong&gt;Disadvantages&lt;/strong&gt;&lt;br&gt;
o   Size Limit: We can store only the fixed size of elements in the array. It doesn't grow its size at runtime. To solve this problem, collection framework is used in Java which grows automatically.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;There are two types of array.&lt;/strong&gt;&lt;br&gt;
o   Single Dimensional Array&lt;br&gt;
o   Multidimensional Array&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Example of Java Array&lt;/strong&gt;&lt;br&gt;
Let's see the simple example of java array, where we are going to declare, instantiate, initialize and traverse an array.Java Program : how to declare, instantiate, initialize  and traverse the Java array.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;class Testarray{  
public static void main(String args[]){  
int a[]=new int[5];//declaration and instantiation  
a[0]=10;//initialization  
a[1]=20;  
a[2]=70;  
a[3]=40;  
a[4]=50;  
//traversing array  
for(int i=0;i&amp;lt;a.length;i++)//length is the property of array  
System.out.println(a[i]);  
}}  

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;For-each Loop for Java Array&lt;/strong&gt;&lt;br&gt;
We can also print the Java array using for-each loop. The Java for-each loop prints the array elements one by one. It holds an array element in a variable, then executes the body of the loop.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//Java Program to print the array elements using for-each loop  
class Testarray1{  
public static void main(String args[]){  
int arr[]={33,3,4,5};  
//printing array using for-each loop  
for(int i:arr)  
System.out.println(i);  
}}  

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Anonymous Array in Java&lt;/strong&gt;&lt;br&gt;
Java supports the feature of an anonymous array, so you don't need to declare the array while passing an array to the method.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//Java Program to demonstrate the way of passing an anonymous array to method.

class TestAnonymousArray{
//creating a method which receives an array as a parameter
static void printArray(int arr[]){
for(int i=0;i&amp;lt;arr.length;i++)
System.out.println(arr[i]);
}
public static void main(String args[]){
printArray(new int[]{10,22,44,66});//passing anonymous array to method
}}

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

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;ArrayIndexOutOfBoundsException&lt;/strong&gt;&lt;br&gt;
The Java Virtual Machine (JVM) throws an ArrayIndexOutOfBounds Exception if length of the array in negative, equal to the array size or greater than the array size while traversing the array.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Multidimensional Array in Java&lt;/strong&gt; &lt;br&gt;
In such case, data is stored in row and column based index (also known as matrix form).&lt;br&gt;
&lt;code&gt;Example to instantiate Multidimensional Array in Java&lt;br&gt;
int[][] arr=new int[3][3];//3 row and 3 column  &lt;br&gt;
&lt;/code&gt;&lt;br&gt;
&lt;strong&gt;Example of Multidimensional Java Array&lt;/strong&gt;&lt;br&gt;
Let's see the simple example to declare, instantiate, initialize and print the 2Dimensional array.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; //Java Program to illustrate the use of multidimensional array  

class Testarray3{  
public static void main(String args[]){  
//declaring and initializing 2D array  
int arr[][]={{1,2,3},{2,4,5},{4,4,5}};  
//printing 2D array  
for(int i=0;i&amp;lt;3;i++){  
 for(int j=0;j&amp;lt;3;j++){  
   System.out.print(arr[i][j]+" ");  
 }  
 System.out.println();  
}  
}}  

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

&lt;/div&gt;



&lt;p&gt;Output&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsi0auzuyqmjissi3md86.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fsi0auzuyqmjissi3md86.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;Copying a Java Array&lt;/strong&gt;&lt;br&gt;
We can copy an array to another by the arraycopy() method of System class.&lt;br&gt;
Syntax of arraycopy method&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Syntax of arraycopy method
public static void arraycopy(  
Object src, int srcPos,Object dest, int destPos, int length  )  

//Java Program to copy a source array into a destination array in Java  

class TestArrayCopyDemo {  
    public static void main(String[] args) {  
        //declaring a source array  
        char[] copyFrom = { 'd', 'e', 'c', 'a', 'f', 'f', 'e',  
                'i', 'n', 'a', 't', 'e', 'd' };  
        //declaring a destination array  
        char[] copyTo = new char[7];  
        //copying array using System.arraycopy() method  
        System.arraycopy(copyFrom, 2, copyTo, 0, 7);  
        //printing the destination array  
        System.out.println(String.valueOf(copyTo));  
    }  
}  

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

&lt;/div&gt;



&lt;p&gt;Output&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs7g3aechlf0ckdptub2t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fs7g3aechlf0ckdptub2t.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Cloning an Array in Java&lt;/strong&gt;&lt;br&gt;
Since, Java array implements the Cloneable interface, we can create the clone of the Java array. If we create the clone of a single-dimensional array, it creates the deep copy of the Java array. It means, it will copy the actual value. When the clone method is invoked upon an array, it returns a reference to a new array which contains (or references) the same elements as the source array.&lt;br&gt;
So in your example, int[] arr is a separate object instance created on the heap and int[] carr is a separate object instance created on the heap. (Remember all arrays are objects).&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//Java Program to clone the array  
class Testarray1{  
public static void main(String args[]){  
int arr[]={33,3,4,5};  
System.out.println("Printing original array:");  
for(int i:arr)  
System.out.println(i);  

System.out.println("Printing clone of the array:");  
int carr[]=arr.clone();  
for(int i:carr)  
System.out.println(i);  

System.out.println("Are both equal?");  
System.out.println(arr==carr);  

}}  

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

&lt;/div&gt;



&lt;p&gt;Output&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhx7g6z8mifuhjazbk7hw.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fhx7g6z8mifuhjazbk7hw.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Addition of 2 Matrices in Java&lt;/strong&gt;&lt;br&gt;
Let's see a simple example that adds two matrices.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//Java Program to demonstrate the addition of two matrices in Java  

class Testarray5{  
public static void main(String args[]){  
//creating two matrices  
int a[][]={{1,3,4},{3,4,5}};  
int b[][]={{1,3,4},{3,4,5}};  

//creating another matrix to store the sum of two matrices  
int c[][]=new int[2][3];  

//adding and printing addition of 2 matrices  
for(int i=0;i&amp;lt;2;i++){  
for(int j=0;j&amp;lt;3;j++){  
c[i][j]=a[i][j]+b[i][j];  
System.out.print(c[i][j]+" ");  
}  
System.out.println();//new line  
}  

}}  

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

&lt;/div&gt;



&lt;p&gt;output&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fawrg83idmfueg1w7lrng.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fawrg83idmfueg1w7lrng.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Multiplication of 2 Matrices in Java&lt;/strong&gt;&lt;br&gt;
In the case of matrix multiplication, a one-row element of the first matrix is multiplied by all the columns of the second matrix which can be understood by the image given below.&lt;br&gt;
&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fno16iaxhb5vumdmtzkit.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fno16iaxhb5vumdmtzkit.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//Java Program to multiply two matrices  
public class MatrixMultiplicationExample{  
public static void main(String args[]){  
//creating two matrices    
int a[][]={{1,1,1},{2,2,2},{3,3,3}};    
int b[][]={{1,1,1},{2,2,2},{3,3,3}};    

//creating another matrix to store the multiplication of two matrices    
int c[][]=new int[3][3];  //3 rows and 3 columns  

//multiplying and printing multiplication of 2 matrices    
for(int i=0;i&amp;lt;3;i++){    
for(int j=0;j&amp;lt;3;j++){    
c[i][j]=0;      
for(int k=0;k&amp;lt;3;k++)      
{      
c[i][j]+=a[i][k]*b[k][j];      
}//end of k loop  
System.out.print(c[i][j]+" ");  //printing matrix element  
}//end of j loop  
System.out.println();//new line    
}    
}}  

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

&lt;/div&gt;



&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftdvkp0ugwa2jf4h4hbki.png" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Ftdvkp0ugwa2jf4h4hbki.png" alt="Image description"&gt;&lt;/a&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;** ** Happy reading friends..... ****
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
    </item>
    <item>
      <title>Algorithm...</title>
      <dc:creator>Abhiram</dc:creator>
      <pubDate>Mon, 28 Mar 2022 13:41:59 +0000</pubDate>
      <link>https://dev.to/abhiram55545309/algorithm-176k</link>
      <guid>https://dev.to/abhiram55545309/algorithm-176k</guid>
      <description>&lt;h2&gt;
  
  
  What Is An Algorithm?
&lt;/h2&gt;

&lt;p&gt;In mathematics and computer science, an algorithm is a finite sequence of well-defined instructions, typically used to solve a class of specific problems or to perform a computation.&lt;/p&gt;

&lt;p&gt;A good algorithm should be optimized in terms of time and space. Different types of problems require different types of algorithmic-techniques to be solved in the most optimized manner. There are many types of algorithms&lt;/p&gt;

&lt;p&gt;example,&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;An algorithm to add two numbers:

Take two number inputs

Add numbers using the + operator

Display the result
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;Important basic rules to follow&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Input and output should be defined precisely.&lt;/li&gt;
&lt;li&gt;Each step in the algorithm should be clear and unambiguous.&lt;/li&gt;
&lt;li&gt;Algorithms should be most effective among many different ways to solve a problem.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Why are Algorithms Important ?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The ability to define clear steps to solve a problem, is crucial in many different fields. Knowingly or unknowingly, we use algorithms and algorithmic thinking all the time. It allows us  to break down problems and find the best possible solutions in terms of discrete steps.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The efficiency of an algorithm depends on two parameters:

1. Time Complexity

2. Space Complexity
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;**Time Complexity: **Time Complexity is defined as the number of times a particular instruction set is executed rather than the total time is taken. It is because the total time taken also depends on some external factors like the compiler used, processor’s speed, etc.&lt;/p&gt;

&lt;p&gt;**Space Complexity: **Space Complexity is the total memory space required by the program for its execution.&lt;/p&gt;

&lt;h2&gt;
  
  
  Types of Algorithms
&lt;/h2&gt;

&lt;p&gt;Algorithms are classified based on the concepts that they use to accomplish a tasks. Below are the widely known and widely used few algorithm techniques.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Divide and conquer algorithms&lt;/strong&gt; – &lt;br&gt;
In Divide and Conquer algorithms, the idea is to solve the problem in two sections, Divide the problem into smaller subproblems of the same type; solve those smaller problems, and combine those solutions to solve the original problem.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Brute force algorithms –&lt;/strong&gt; &lt;br&gt;
This is the most basic and simplest type of algorithm. A Brute Force Algorithm is the straightforward approach to a problem i.e., the first approach that comes to our mind on seeing the problem. More technically it is just like try all possible solutions until a satisfactory solution is found.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Greedy algorithms –&lt;/strong&gt; &lt;br&gt;
Find an optimal solution at the local level with the intent of finding an optimal solution for the whole problem.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Recursive algorithms –&lt;/strong&gt; &lt;br&gt;
Solve the lowest and simplest version of a problem to then solve increasingly larger versions of the problem until the solution to the original problem is found.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Backtracking algorithms –&lt;/strong&gt; &lt;br&gt;
Divide the problem into subproblems, each which can be attempted to be solved; however, if the desired solution is not reached, move backwards in the problem until a path is found that moves it forward.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Dynamic programming algorithms –&lt;/strong&gt; &lt;br&gt;
This type of algorithm is also known as the memorization technique because in this the idea is to store the previously calculated result to avoid calculating it again and again. In Dynamic Programming, divide the complex problem into smaller overlapping subproblems and storing the result for future use.&lt;/p&gt;

&lt;p&gt;Break a complex problem into a collection of simpler subproblems, then solve each of those subproblems only once, storing their solution for future use instead of re-computing their solutions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Sorting Algorithms
&lt;/h2&gt;

&lt;p&gt;A sorting algorithm is an algorithm that puts elements of a list in a certain order. Sorting is often an important first step in algorithms that solves more complex problems. There are a large number of sorting algorithms, each with their own benefits and costs. Below, we will focus on some of the more famous sorting algorithms.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Linear sort:&lt;/strong&gt; &lt;br&gt;
Find the smallest element in the list to be sorted, add it to a new list, and remove it from the original list. Repeat this until the original list is empty.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bubble sort:&lt;/strong&gt; &lt;br&gt;
Compare the first two elements in the list, and if the first is greater than the second, swap them. Repeat this with every pair of adjacent elements in the list. Then, repeat this process until the list is fully sorted.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Insertion sort:&lt;/strong&gt;&lt;br&gt;
 Compare each element in the list to all the prior elements until a smaller element is found. Swap these two elements. Repeat this process until the list is fully sorted.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Why Data Structures..</title>
      <dc:creator>Abhiram</dc:creator>
      <pubDate>Mon, 28 Mar 2022 09:18:42 +0000</pubDate>
      <link>https://dev.to/abhiram55545309/why-data-structures-5bl4</link>
      <guid>https://dev.to/abhiram55545309/why-data-structures-5bl4</guid>
      <description>&lt;p&gt;Data structures are used in computing to make it easy to locate and retrieve information. &lt;/p&gt;

&lt;p&gt;Primitive data structures are simple ways for programming languages to represent basic values. These include data types like integer, char (character), Boolean, pointers, and the like. &lt;/p&gt;

&lt;p&gt;Non-primitive data structures provide ways of storing multiple values in a single variable. These include arrays, linked lists, stacks, graphs, trees etc..&lt;/p&gt;

&lt;p&gt;In each case, the way the data is "structured" makes it easy to retrieve or manipulate.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;- They should be efficient. 
Data structures make programs more productive with regards to time. ...
- They should be reusable.
 Once a data structure is implemented, it needs to demonstrate
 an ability to be used for other, similar data needs. ...
- They should remain hidden.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Types of Data Structure&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Basically, data structures are divided into two categories:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;- Linear data structure&lt;/li&gt;
&lt;li&gt;- Non-linear data structure&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Linear data structures&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;In linear data structures, the elements are arranged in sequence one after the other. Since elements are arranged in particular order, they are easy to implement.&lt;/p&gt;

&lt;p&gt;Popular linear data structures are:&lt;br&gt;
&lt;strong&gt;&lt;em&gt;1. Array Data Structure&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;An array is a data structure that contains a group of elements. Typically these elements are all of the same data type, such as an integer or string. Arrays are commonly used in computer programs to organize data so that a related set of values can be easily sorted or searched.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--sw6LTE-B--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/napmi2dt2yjrhbp89yj8.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--sw6LTE-B--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/napmi2dt2yjrhbp89yj8.jpeg" alt="Image description" width="380" height="160"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;2. Stack Data Structure&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Stack is a linear data structure which follows a particular order in which the operations are performed. The order may be LIFO (Last In First Out) or FILO (First In Last Out). It works just like a pile of plates where the last plate kept on the pile will be removed first. &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--RSE9rQl5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ggpg3gg9lg4tma01uw8j.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--RSE9rQl5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ggpg3gg9lg4tma01uw8j.jpeg" alt="Image description" width="272" height="180"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;3. Queue Data Structure&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The queue is a linear data structure used to represent a linear list. It allows insertion of an element to be done at one end and deletion of an element to be performed at the other end&lt;/p&gt;

&lt;p&gt;Unlike stack, the queue data structure works in the FIFO principle where first element stored in the queue will be removed first.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--E-xSNtTF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ljn21z63nxb4d1cvy2w7.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--E-xSNtTF--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/ljn21z63nxb4d1cvy2w7.jpg" alt="Image description" width="164" height="180"&gt;&lt;/a&gt;&lt;br&gt;
&lt;strong&gt;&lt;em&gt;4. Linked List Data Structure&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;A linked list is the most sought-after data structure when it comes to handling dynamic data elements. A linked list consists of a data element known as a node. And each node consists of two fields: one field has data, and in the second field, the node has an address that keeps a reference to the next node. Each node contains the data items and address to the next node.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--oBQpK2Mr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xuww3snf8ajwvakxziux.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--oBQpK2Mr--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/xuww3snf8ajwvakxziux.jpg" alt="Image description" width="222" height="180"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Non linear data structures&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;Unlike linear data structures, elements in non-linear data structures are not in any sequence. Instead they are arranged in a hierarchical manner where one element will be connected to one or more elements.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;1. Graph Data Structure&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Graphs in data structures are used to address real-world problems in which it represents the problem area as a network like telephone networks, circuit networks, and social networks. For example, it can represent a single user as nodes or vertices in a telephone network, while the link between them via telephone represents edges.&lt;/p&gt;

&lt;p&gt;In graph data structure, each node is called vertex and each vertex is connected to other vertices through edges.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--aWoCsG-M--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/axrij13yy5p6e5hcdxis.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--aWoCsG-M--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/axrij13yy5p6e5hcdxis.jpg" alt="Image description" width="337" height="266"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;em&gt;2. Trees Data Structure&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Among various real-world applications, the tree data structure is used to demonstrate relationships between different nodes with the parent-child hierarchy. It is also called a hierarchic data structure because of this. It is most popular for simplifying and speeding up searching and sorting.&lt;br&gt;
Similar to a graph, a tree is also a collection of vertices and edges. However, in tree data structure, there can only be one edge between two vertices.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--HNZThAa5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qj1y9jy40icpe7abshaw.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--HNZThAa5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/qj1y9jy40icpe7abshaw.jpg" alt="Image description" width="314" height="180"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>What is Hacktoberfest and Why you should care</title>
      <dc:creator>Abhiram</dc:creator>
      <pubDate>Mon, 07 Dec 2020 11:37:27 +0000</pubDate>
      <link>https://dev.to/abhiram55545309/what-is-hacktoberfest-and-why-you-should-care-2g0c</link>
      <guid>https://dev.to/abhiram55545309/what-is-hacktoberfest-and-why-you-should-care-2g0c</guid>
      <description>&lt;p&gt;Hacktoberfest is open to everyone in our global community. Whether you're a developer, student learning to code, event host, or company of any size, you can help drive growth of open source and make positive contributions to an ever-growing community.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--atjXgEYE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/kjp4t5frkf7fomvy4sal.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--atjXgEYE--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/kjp4t5frkf7fomvy4sal.png" alt="Alt Text" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
During the entire month of October, all you have to do is contribute to any open source projects and open at least 4 pull requests. &lt;/p&gt;

&lt;p&gt;Yes, any project and any kind of contributions. You don’t need to be an expert in programming or coding. It can be a be a bug fix, improvement, or even a documentation change! And win an awesome T-shirt and awesome stickers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why should I do it ?
&lt;/h2&gt;

&lt;p&gt;Support open source , it’s not just about the t-shirts or stickers. Its about supporting open source. Its about celebrating open source, and giving it back. If you’ve never contributed to open source before, this is the perfect time to get started because Hacktoberfest provides a large list of available contribution opportunities.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fZ-jrZ-K--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/q0jzvf7gu14q025dyfep.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fZ-jrZ-K--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/q0jzvf7gu14q025dyfep.png" alt="Alt Text" width="800" height="430"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  5 ways to contribute to open source during Hacktoberfest
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;Start with open source you use every day&lt;/li&gt;
&lt;li&gt;Explore based on your interests&lt;/li&gt;
&lt;li&gt;Encourage projects to participate in Hacktoberfest&lt;/li&gt;
&lt;li&gt;Use and improve documentation&lt;/li&gt;
&lt;li&gt;Skip the code and host an event&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Reasons why you should contribute to open source projects
&lt;/h2&gt;

&lt;p&gt;Contributing to an open source project helps you gain a much deeper knowledge about the software.Moreover, it is absolutely normal that your changes won’t be accepted in the first run. &lt;/p&gt;

&lt;p&gt;However, this way you get in touch with other experienced people working on the project, giving you valuable insights and feedback, as well. In fact, getting in touch with the people, who actually develop the code base of an open source project, is  beneficial .&lt;/p&gt;

&lt;p&gt;Most software projects have a roadmap, that aims to help you to plan for the future. These usually include bug fixes and features at varying granularity lined up in a rough schedule, ranging from weeks to years. For commercial, closed source projects this roadmap, however, is of little help, when it comes to dealing with the risks of not finishing essential parts of it in time. &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--AX_ipeGm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/h4uulyr22o9y6a26vo9f.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AX_ipeGm--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/h4uulyr22o9y6a26vo9f.png" alt="Alt Text" width="520" height="292"&gt;&lt;/a&gt;&lt;br&gt;
Open source contribution can be an amazing learning experience. It allows you to give back to and be a part of communities that build valuable open source software. It enables you to make software that you use better. Although it can be tough to start, once you get the hang of it, it is immensely rewarding.&lt;/p&gt;

</description>
      <category>teamtanaychallenge</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Alternatives to Github</title>
      <dc:creator>Abhiram</dc:creator>
      <pubDate>Mon, 07 Dec 2020 08:21:43 +0000</pubDate>
      <link>https://dev.to/abhiram55545309/alternatives-to-github-13do</link>
      <guid>https://dev.to/abhiram55545309/alternatives-to-github-13do</guid>
      <description>&lt;p&gt;I have recently started using Github.I used to think Github as an Online platform just to hold files.Now, by using Github for my project , I was truly amazed by its true potential.&lt;/p&gt;

&lt;p&gt;I will explain it with an example.&lt;/p&gt;

&lt;p&gt;Imagine you are given a room to do whatever you want to with your accessories , customize our furniture as per your suitability any time. Permitted to share the place with some one, bring people to come at your place and party together and you don’t have to pay or rent all this with any bills. How cool would that be…!!&lt;/p&gt;

&lt;p&gt;Github is a similar space. You have got a free space to hold all types of files ie - python, java, c, html, js, nodejs,images etc. You may customize your code any day, any time, any where . You can give access to people to contribute, commit changes to your work. Download your project’s code and use it for their work. Follow you and your work and lot more.&lt;/p&gt;

&lt;h3&gt;
  
  
  Pros of GitHub
&lt;/h3&gt;

&lt;ol&gt;
&lt;li&gt;It makes it easy to contribute to your open source projects&lt;/li&gt;
&lt;li&gt;Documentation&lt;/li&gt;
&lt;li&gt;Showcase your work&lt;/li&gt;
&lt;li&gt;Markdown&lt;/li&gt;
&lt;li&gt;Track changes in your code across versions&lt;/li&gt;
&lt;/ol&gt;

&lt;h3&gt;
  
  
  Cons of Github
&lt;/h3&gt;

&lt;p&gt;1.You have to be careful with merge operations; a bad merge can be painful to reverse.&lt;br&gt;
2.Searching is good but not great.&lt;br&gt;
3.Restrictions on file size and repository size.&lt;/p&gt;

&lt;h2&gt;
  
  
  Alternatives to Github
&lt;/h2&gt;

&lt;h4&gt;
  
  
  bitbucket
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--rqb49Znp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/cgnx3smu62xvvr0suqth.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rqb49Znp--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/cgnx3smu62xvvr0suqth.png" alt="Alt Text" width="100" height="98"&gt;&lt;/a&gt;&lt;br&gt;
 Bitbucket is more flexible than GitHub.While GitHub comes &lt;br&gt;
 with a lot of features and allows you to create your own workflows, Bitbucket arguably has more flexibility built-in.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--WraNDKi5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/q1lgy7f9ih4ctvme8t41.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--WraNDKi5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/q1lgy7f9ih4ctvme8t41.jpg" alt="Alt Text" width="800" height="450"&gt;&lt;/a&gt;&lt;br&gt;
Bitbucket can also import from Git, CodePlex, Google Code, SourceForge, and SVN. GitHub, meanwhile, can import from Git, SVN, HG, and TFS. Using Bitbucket, you can work precisely the way that you want, without having to try and jam a square peg into a round hole.&lt;/p&gt;

&lt;h4&gt;
  
  
  Gitlab
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--4k1j-Zcx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/mnz23u8osm5xy7hjp8ok.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--4k1j-Zcx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/mnz23u8osm5xy7hjp8ok.jpg" alt="Alt Text" width="150" height="150"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;GitLab is a repository that only lets its team of web developers collaborate on codes. GitLab allows its users to locate a repository inside an organization while using the free plan.GitLab documents are similar to documentation for a language with a search bar, listing all the documents required for the installer. &lt;br&gt;
With GitLab you can set and modify people’s permissions according to their role. In GitHub, you can decide if someone gets a read or write access to a repository.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--V0Eb02JO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/9y8c7lraryhx1d8ey13h.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--V0Eb02JO--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/9y8c7lraryhx1d8ey13h.png" alt="Alt Text" width="528" height="231"&gt;&lt;/a&gt;&lt;br&gt;
With GitLab you can provide access to the issue tracker (for example) without giving permission to the source code. This is obviously great for larger teams and enterprises with role-based contributors.&lt;/p&gt;

&lt;h4&gt;
  
  
  AWS CodeCommit
&lt;/h4&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ua0bQ3rH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/x0tuybpvk8w76xwjnukj.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ua0bQ3rH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/x0tuybpvk8w76xwjnukj.png" alt="Alt Text" width="90" height="100"&gt;&lt;/a&gt;&lt;br&gt;
Amazon's Git-based version control service is also an ideal for companies which are using other AWS services. With scalable cloud storage and no size limits.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--FJ7n70uD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/9qqoodt8izrmghvdqt9m.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--FJ7n70uD--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_800/https://dev-to-uploads.s3.amazonaws.com/i/9qqoodt8izrmghvdqt9m.png" alt="Alt Text" width="460" height="305"&gt;&lt;/a&gt;&lt;br&gt;
Offers easy Access and Integration .AWS CodeCommit tool is designed for collaborative software development.Allows helps you to transfer files to and from AWS CodeCommit using HTTPS or SSH .It allows you to create as many repositories&lt;/p&gt;

&lt;h3&gt;
  
  
  My thought
&lt;/h3&gt;

&lt;p&gt;Developers who prefer to use Git as the core of their source code management workflow, but don't want to rely on GitHub, have plenty of options. GitHub may still dominate the market, but depending on your specific needs and use cases, a competing platform may be a better fit.&lt;/p&gt;

</description>
      <category>teamtanaychallenge</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
