<?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: CHETAN KHAIRNAR</title>
    <description>The latest articles on DEV Community by CHETAN KHAIRNAR (@chetankhairnar2001).</description>
    <link>https://dev.to/chetankhairnar2001</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%2F524106%2F38c695b3-d664-4b5d-9054-f0b382e2c518.jpeg</url>
      <title>DEV Community: CHETAN KHAIRNAR</title>
      <link>https://dev.to/chetankhairnar2001</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/chetankhairnar2001"/>
    <language>en</language>
    <item>
      <title>How to use the JavaScript to Fetch API</title>
      <dc:creator>CHETAN KHAIRNAR</dc:creator>
      <pubDate>Sun, 13 Dec 2020 15:09:29 +0000</pubDate>
      <link>https://dev.to/chetankhairnar2001/how-to-use-the-javascript-fetch-api-4eop</link>
      <guid>https://dev.to/chetankhairnar2001/how-to-use-the-javascript-fetch-api-4eop</guid>
      <description>&lt;p&gt;&lt;strong&gt;XMLHttpRequest&lt;/strong&gt; was the thing used back then to make request and serve call , but the modern day &lt;strong&gt;JavaScript&lt;/strong&gt; has made significant changes so has made the built-in-clean code now.&lt;/p&gt;

&lt;p&gt;Fetching API is a basic but most important thing to do while making website more responsive, Along comes the Fetch API a new standard to make server request jam-packed with promises and all those things we learned to love over the years.&lt;/p&gt;

&lt;h1&gt;
  
  
  How do we use the Fetch API?
&lt;/h1&gt;

&lt;p&gt;In a very simple manner all you really do is call fetch with the URL you want, by default the Fetch API uses the GET method:&lt;/p&gt;

&lt;p&gt;fetch(url) // Call the fetch function passing the url of the API as a parameter&lt;br&gt;
.then(function() {&lt;br&gt;
    // Your code for handling the data you get from the API&lt;br&gt;
})&lt;br&gt;
.catch(function() {&lt;br&gt;
    // This is where you run code if the server returns any errors&lt;br&gt;
});&lt;/p&gt;

&lt;p&gt;&lt;em&gt;For example:&lt;/em&gt;&lt;br&gt;
If u want to get 10 random users, use css selectors to add a select a button.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;h1&amp;gt;Authors&amp;lt;/h1&amp;gt;
&amp;lt;ul id="authors"&amp;gt;&amp;lt;/ul&amp;gt;
const ul = document.querySelector('authors'); // Get the list where we will place our authors
const url = 'https://randomuser.me/api/?results=10'; // Get 10 random users
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;here is how things work in background&lt;br&gt;
When we input the URL in fetch command in return we get a response. &lt;br&gt;
Then we get a response but the response we get is not JSON but an object with a series of methods we can use depending on what we want to do with the information, these methods include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;clone() - As the method implies this method creates a clone of the response.&lt;/li&gt;
&lt;li&gt;redirect() - This method creates a new response but with a different URL.&lt;/li&gt;
&lt;li&gt;arrayBuffer() - In here we return a promise that resolves with an ArrayBuffer.&lt;/li&gt;
&lt;li&gt;formData() - Also returns a promise but one that resolves with FormData object.&lt;/li&gt;
&lt;li&gt;blob() - This is one resolves with a Blob.
text() - In this case it resolves with a string.&lt;/li&gt;
&lt;li&gt;json() - Lastly we have the method to that resolves the promise with JSON.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;I have created a small and ready to make project using &lt;strong&gt;Funtranslations.com&lt;/strong&gt; where u give a text and using api it can be translated to diff languages&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;var inputbtn=document.querySelector("#inputbtn");
var inputtxt=document.querySelector("#inputtxt");
var outputtxt=document.querySelector("#outputtxt");
var serverurl ="https://api.funtranslations.com/translate/minion.json";

function geturltranslate(text){
  return serverurl+ "?" +"text="+ text;
}
function translate(){
    var inputtext=inputtxt.value;
fetch(geturltranslate(inputtext))
    .then(response =&amp;gt;response.json())
    .then(json =&amp;gt; {
      var translatedtext=json.contents.translated;
      outputtxt.innerText=translatedtext;   //output
    }) 
};
inputbtn.addEventListener("click",translate);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;input:  hello welcome here, have a good Day&lt;br&gt;
output: Hello zhelosa stai, zinot zo zyemus diena&lt;/p&gt;

&lt;p&gt;hence the only use of the APi is to convert the given text into translated text&lt;/p&gt;

&lt;p&gt;checkout the site for more translation&lt;br&gt;
&lt;a href="https://funtranslations.com/"&gt;TranslationApi&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>html</category>
      <category>css</category>
    </item>
    <item>
      <title>Coding vs Programming: what to choose</title>
      <dc:creator>CHETAN KHAIRNAR</dc:creator>
      <pubDate>Wed, 02 Dec 2020 07:57:04 +0000</pubDate>
      <link>https://dev.to/chetankhairnar2001/coding-vs-programming-what-to-choose-5h3p</link>
      <guid>https://dev.to/chetankhairnar2001/coding-vs-programming-what-to-choose-5h3p</guid>
      <description>&lt;h1&gt;
  
  
  &lt;strong&gt;Lets talk about&lt;/strong&gt;
&lt;/h1&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;Coding(Competitive programming)&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;Programming(development)&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  What is Coding?
&lt;/h3&gt;

&lt;p&gt;Coding is basically the act of translating codes from human language to a machine-based language. It can also be called a subset of programming since it is the foundation of programming. A coder has to be multilingual and has to write codes in different programming languages such as Java, C, Python, R based on the requirement. With the help of codes, you are providing instructions and information to the computer.&lt;br&gt;&lt;br&gt;
     Coding used for implementing the fundamentals of computer programming in one way is also programming.&lt;br&gt;
So In coding u make small programs which can be used to solve day-to-day problems&lt;/p&gt;

&lt;h3&gt;
  
  
  What is Programming?
&lt;/h3&gt;

&lt;p&gt;Programming is a bigger aspect than coding, which is one of the parts of it. It is the process of developing an executable software program that is implemented without any errors. It is the programmer’s job to analyze a problem in the code and provide solutions.&lt;br&gt;
A programmer creates complex programs, read, and executed by the machine providing a complete set of instructions for computers to perform. It takes years to become a professional programmer. If you can build a program and ensure that it doesn’t have errors, you can consider yourself that you have leveled up in your career as a successful programmer.&lt;/p&gt;

&lt;h2&gt;
  
  
  &lt;strong&gt;Difference between Coding and Programming&lt;/strong&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Yz9_-QMx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.upgrad.com/blog/wp-content/uploads/2020/09/main-qimg-d44da3cb5f13b1b40769886e5232114c.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Yz9_-QMx--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://www.upgrad.com/blog/wp-content/uploads/2020/09/main-qimg-d44da3cb5f13b1b40769886e5232114c.jpg" alt="Alt text of image"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Basic Difference&lt;br&gt;
Coding is a part of programming that deals with converting the language into binary commands for the machine. Programming is the process of creating a program that follows certain standards and performing a certain task.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Scope&lt;br&gt;
Coding is about translating the requirement logic into machine-understandable code. In contrast, programming demands analysis and conceptualization of different aspects of any program and finding solutions to any issues that may occur during the process. It also involves critical parameters such as debugging, compiling, testing, and implementation.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Tools&lt;br&gt;
Coding doesn’t require so many software tools to be accomplished. Just a simple text editor like WordPad or Notepad would suffice. Nowadays, an IDE and debug tools such as Eclipse, Bootstrap, Delphi, ATOM are also used.&lt;br&gt;
Programming requires document review and performing analysis along with coding that requires extra tools. The tools needed in the process are code analysis tools, code generators, databases, testing frameworks, linkers, compilers, code editors, GUI designers, assemblers, debuggers, and performance analysis tools. &lt;br&gt;
A programmer is expected to know the advanced concepts of Git and Github, Database tools, analytical tools such as Apache Spark, presentation tools, cloud tools since it has a broader scope.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Skills&lt;br&gt;
Coders are needed to have basic knowledge of programming languages. Programming would require creating algorithms, math models, data processing, and data structures know-how. A programmer needs a specialized degree and experience to write logic, analyze, design, and write complex programs. He also applies his imagination and analytical skills for solving specific problems. He is also expected to understand and create complex data structures and algorithms.&lt;br&gt;
The coder’s job is to follow the programmer’s technical specifications to write code and ensure that the final outcome meets the requirements.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  &lt;em&gt;Conclusion&lt;/em&gt;
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;AT&lt;/strong&gt; the end of the day both programmers as well as coders are chosen to Solve a &lt;em&gt;Problem&lt;/em&gt; in Product Company&lt;br&gt;
You must try out both then decide whichone soot's u the Most&lt;br&gt;
&lt;strong&gt;F&lt;/strong&gt;inal wording find Your passion AND Go for it&lt;br&gt;
This world has endless problems to be solved hence U will find your Right fit,&lt;strong&gt;have patience but be Passionate with your Work&lt;/strong&gt;&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--IbSnyMoa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://p0.pikrepo.com/preview/479/567/success-ahead-signage.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--IbSnyMoa--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://p0.pikrepo.com/preview/479/567/success-ahead-signage.jpg" alt="Alt text of Image"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>java</category>
      <category>python</category>
      <category>css</category>
      <category>react</category>
    </item>
  </channel>
</rss>
