<?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: Nikesh Kumar T K</title>
    <description>The latest articles on DEV Community by Nikesh Kumar T K (@nikeshkumartk).</description>
    <link>https://dev.to/nikeshkumartk</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%2F859107%2Fff245d7c-5609-4f86-b7c6-5d1e625cdbc7.jpeg</url>
      <title>DEV Community: Nikesh Kumar T K</title>
      <link>https://dev.to/nikeshkumartk</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nikeshkumartk"/>
    <language>en</language>
    <item>
      <title>Securing Your Serverless APIs: Mastering JWT Authorization in AWS API Gateway with the Serverless Framework(Cognito)</title>
      <dc:creator>Nikesh Kumar T K</dc:creator>
      <pubDate>Sat, 04 Nov 2023 07:22:42 +0000</pubDate>
      <link>https://dev.to/nikeshkumartk/securing-your-serverless-apis-mastering-jwt-authorization-in-aws-api-gateway-with-the-serverless-frameworkcognito-3n44</link>
      <guid>https://dev.to/nikeshkumartk/securing-your-serverless-apis-mastering-jwt-authorization-in-aws-api-gateway-with-the-serverless-frameworkcognito-3n44</guid>
      <description>&lt;p&gt;Authorizing API endpoints is crucial for protecting your production application from unauthorized access. By using authorizers, you can permit only authorized users to access these endpoints, bolstering security.&lt;/p&gt;

&lt;p&gt;The traditional method of authorization involves writing middlewares that decode and verify the token sent by the client. In this process, the request first reaches the middleware, and only after successful verification, it is forwarded to the respective handlers or controllers.&lt;/p&gt;

&lt;p&gt;In this serverless era, authorization has become more easier and can be implemented quicky. In this article, we will look at implementing jwt authorizers that verifies users from cognito pool before reaching the lamda function that handles the request. We use serverless framework to configure and deploy our lamda functions.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Prerequisites&lt;/strong&gt;&lt;br&gt;
AWS account&lt;br&gt;
Node js installed&lt;br&gt;
serverless cli configured with aws&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create a serverless project.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Navigate to the folder where you want to create the project and type serverless in the terminal. Create a basic node js httpApi project by choosing option from the terminal. This will create a serverless.yml file in your directory.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Create a cognito user pool.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In the aws management console, go to cognito and create a new userpool.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Configure functions and events in your serverless.yaml&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;service: your-service-name
useDotenv: true

plugins:
  - serverless-plugin-typescript
  - serverless-offline

provider:  
  name: aws
  runtime: nodejs18.x
  region: ${env:YOUR_AWS_REGION}

httpApi: 
   authorizers:
      yourAuthorizer:
        type: jwt
        identitySource: $request.header.Authorization
        issuerUrl: https://cognito-idp.${env:YOUR_AWS_REGION}.amazonaws.com/${env:YOUR_COGNITO_POOL_ID}
        audience:
          - ${env:YOUR_COGNITO_APP_CLIENT_ID}

functions:
    yourFunctionName:
    handler: handlers/authorizedFunction.httpHandler
    events:
      - httpApi:
          path: /authorizedFunction
          method: post #You can specify the method you needed here.
          authorizer:
            name: yourAuthorizer
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Create your lamda function&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function handler(event, ctx, callback) {
  const response = {
    statusCode: 200,
    body: JSON.stringify({
      message: "Hello from authorized function",
    }),
  };
  return response;
}

module.exports.httpHandler = handler
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Deploy your lamda function.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Now deploy your lamda function by typing the command serverless in the terminal. Make sure, you have configured your aws credentials in the your system.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Send request from the client by adding access token in the authorization headers&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const token = 'your-bearer-token';

const dataToSend = {
 test_data:"This is a test data"
};

const headers = {
  'Authorization': `Bearer ${token}`,
  'Content-Type': 'application/json', 
}

axios.post('your api url', dataToSend, { headers })
  .then((response) =&amp;gt; {
    console.log('POST request successful:', response.data);
  })
  .catch((error) =&amp;gt; {
    console.error('Error making POST request:', error);
  });
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;In the above code snippets i have used sample function and sample values. You can replace them with your real values.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Detect Operating System using javascript.</title>
      <dc:creator>Nikesh Kumar T K</dc:creator>
      <pubDate>Mon, 12 Dec 2022 15:16:32 +0000</pubDate>
      <link>https://dev.to/nikeshkumartk/detect-operating-system-using-javascript-301f</link>
      <guid>https://dev.to/nikeshkumartk/detect-operating-system-using-javascript-301f</guid>
      <description>&lt;p&gt;Detecting the operating system of the user is crucial if you are developing a website for any tools or software. So that you can provide recommendations of software that suits the user's operating system which can be windows, mac, or Linux.&lt;/p&gt;

&lt;p&gt;Javascript is efficient enough to do this for us. We can make use of the javascript navigator object to access the details of a user. The navigator object has a function called userAgent that returns a string that consists of details about the user's system.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;
let os = navigator.userAgent;
console.log(os);

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

&lt;/div&gt;



&lt;p&gt;The output of above code is&lt;br&gt;
&lt;code&gt;&lt;br&gt;
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;To determine the type of os,we have to check wheather the returned string contains the name of the os at any index position.To ensure this we can call indexOf method on returned string&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let os = navigator.userAgent.indexOf("Windows");
console.log(os);

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

&lt;/div&gt;



&lt;p&gt;The output of above code is 13 since index of the word &lt;em&gt;Windows&lt;/em&gt; is at 13 position in returned string.&lt;/p&gt;

&lt;p&gt;This same method can be implemented to detect any operating system which will help you to provide better user experience&lt;/p&gt;

</description>
      <category>mysql</category>
      <category>database</category>
    </item>
    <item>
      <title>React useMemo for optimization</title>
      <dc:creator>Nikesh Kumar T K</dc:creator>
      <pubDate>Fri, 09 Dec 2022 12:50:11 +0000</pubDate>
      <link>https://dev.to/nikeshkumartk/react-usememo-for-optimization-150p</link>
      <guid>https://dev.to/nikeshkumartk/react-usememo-for-optimization-150p</guid>
      <description>&lt;p&gt;Have you ever used useMemo() hook in your react application ?.&lt;/p&gt;

&lt;p&gt;useMemo is an amazing react hook that helps us to optimize our components in react.In this blog, i will show you how we can implement useMemo in our components to make our application more efficent and optimized.&lt;/p&gt;

&lt;p&gt;Basically what useMemo do is it catches the data or result of a specific operation.In react, when we changes the state of a variable, the component is rerendered.Each time when the component is rendered, all the operations/calculations are performed again.&lt;br&gt;
This will ultimately affect performance of our app if the operation is an expensive one.&lt;br&gt;
                          We can avoid this by using useMemo.It takes a callback function and a dependency as arguments.All the operations that have to be performed is wrapped inside callback.Here, the operation is performed only if the state of dependency variable changes even if the component is rerendered.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;useMemo implementation&lt;/strong&gt;&lt;/u&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import { useMemo, useState } from "react";

export default function App() {
  const data = [1, 2, 3, 4, 5, 6, 7, 8, 9];

  const [check1, setCheck1] = useState(false);
  const [check2, setCheck2] = useState(false);

  const sum = useMemo(() =&amp;gt; {
    console.log("Calculating");
    return data.reduce((acc, data) =&amp;gt; acc + data, 0);
  }, [check1]);
  console.log(sum);
  return (
    &amp;lt;div style={{ height: "100vh", display: "grid", placeContent: "center" }}&amp;gt;
      &amp;lt;button 
        onClick={() =&amp;gt; setCheck1((p) =&amp;gt; !p)}&amp;gt;Button1&amp;lt;/button&amp;gt;

      &amp;lt;button 
        onClick={() =&amp;gt; setCheck2((p) =&amp;gt; !p)}&amp;gt;Button2&amp;lt;/button&amp;gt;
    &amp;lt;/div&amp;gt;
  );
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;When the above component is rendered,if you look in the console,it will print "Calculating sum " only when Button1 is clicked.When Button2 is clicked only the sum is printed in the console.This is because i passed the variable check1 as the dependency to the useMemo hook.Hence the sum is calculated only when the state of check1 changes.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Conclusion&lt;/u&gt;&lt;/strong&gt;&lt;br&gt;
Consider using using useMemo in your next react project.It will help you to optimize complex architectures.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>react</category>
      <category>node</category>
      <category>javascript</category>
    </item>
    <item>
      <title>Javascript Higher order functions map,reduce and filter for beginners</title>
      <dc:creator>Nikesh Kumar T K</dc:creator>
      <pubDate>Wed, 07 Dec 2022 14:41:03 +0000</pubDate>
      <link>https://dev.to/nikeshkumartk/javascript-higher-order-functions-mapreduce-and-filter-for-beginners-3f2o</link>
      <guid>https://dev.to/nikeshkumartk/javascript-higher-order-functions-mapreduce-and-filter-for-beginners-3f2o</guid>
      <description>&lt;p&gt;In this tutorial i will explain the basic concepts of javascript higher order fuctions and its usecases with hands on examples.&lt;/p&gt;

&lt;p&gt;Before diving deep into the map,reduce and filter, lets understand what is a higher order function.The defenition of higher order function is &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A higher order function is a function that takes a function as an argument, or returns a function. &lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;In otherwords we can consider higher order functions as functions that allows us to do specific tasks such as filtering,looping etc more faster than the typical way of doing that.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;map fuction&lt;/strong&gt;&lt;/u&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%2Fel5j9ggmjgjwqbw9iumn.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%2Fel5j9ggmjgjwqbw9iumn.png" alt="Javascript higher order function map,core concepts,array methods"&gt;&lt;/a&gt;&lt;br&gt;
We all are familiar with the basic forloop.Obvisiously that is one of the basic concept of any programming language.We use forloop to loop through an array and to perform some operations with array elements.But a basic forloop is not returning us anything.Here, the map function come into the picture.We can use javascript map functions on arrays that allows us to loop through each array elements and will return a new array.We can modify the array elements if needed.&lt;br&gt;
If the above explanation doesn't make sense to you, no problem.You will defenitely understand it as we move forward with the examples.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const numbers = [1,2,3,4,5,6,7,8];
   const modifiedArray = array.map((number,index) =&amp;gt; {
     number * 2
   })
  console.log(modifiedArray)

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

&lt;/div&gt;



&lt;p&gt;Output&lt;/p&gt;

&lt;p&gt;&lt;code&gt;[2,4,6,8,10,12,14,16]&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;In the above code snippet, we are applying map function on an array numbers that consists of 8 elements.We want an array that contains each elements of the array numbers multiplyed by 2. The map function takes an anonymous function as callback.The anonymous function have two parameters.The first parameter is an array element and second parameter is index of corresponding element.&lt;/p&gt;

&lt;p&gt;Map fuction is super common in javascript frameworks like react.We know that react returns jsx that is pretty similar to html.Consider a scenario where we want to render each elements of the array without hardcoding them into html.Here, we can make use of map fuction to loop through the array and return each element within html tags&lt;br&gt;
eg:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const App = () =&amp;gt; {

const fruits = ["apple","orange","mango","pineapple"];

return(
&amp;lt;&amp;gt;
{
fruits.map(fruit =&amp;gt; 

&amp;lt;h3&amp;gt; fruit &amp;lt;/h3&amp;gt;

}
&amp;lt;/&amp;gt;
)
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Output&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%2Fitul7pjyt0g9wacd5m75.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%2Fitul7pjyt0g9wacd5m75.png" alt="Image description"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;Filter&lt;/strong&gt;&lt;/u&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%2Fnxqps563zmfmdu3piq4u.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%2Fnxqps563zmfmdu3piq4u.png" alt="Javascript higher order function filter,core concepts,array methods"&gt;&lt;/a&gt;&lt;br&gt;
Filter is a javascript high order function that can be used to filter items from an array.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const data = [1,2,3,4,5]
const filteredArray = data.filter((data) =&amp;gt; data != 4)
console.log(filteredArray)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The syntax of filter function is pretty similar to map function.Filter function takes a callback function as argument which contains each array elements as arguments and return a filtered array based on the given condition.The above example will console [1,2,3,5] since the condition for filtering is that the element should not be equal to 4&lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;Reduce&lt;/strong&gt;&lt;/u&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%2Fg1baojs4hmw3mzd08gd4.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%2Fg1baojs4hmw3mzd08gd4.png" alt="Javascript higher order function reduce,core concepts,array methods"&gt;&lt;/a&gt;&lt;br&gt;
The reducer function seems a little tricy compared to map and filter.Reducer basically returns a single value that is the accumulated result of the function.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const data = [1,2,3,4,5];
const sum = data.reduce((acc, data) =&amp;gt; {
  return acc + data; //Adding cuurent elemt to the accumulator
}, 0);
console.log(sum);

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

&lt;/div&gt;



&lt;p&gt;Reducer mainly takes two parameters.The first one is a callback function that has an accumulator and the array element(The element we get when we loop through the array.Similar to map and filter functions).The second parameter is an initial value of accumulator.The operation that we have to perform is written in the body of callback function and the value is returned.The output of above example will be 21.In the above example we are adding the current element to the accumulator value and returning it&lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;Conclusion&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;In this we looked at the popular javascript higher order functions that we can use to make our code more efficient. &lt;/p&gt;

&lt;p&gt;`&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>node</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Why tailwind ?</title>
      <dc:creator>Nikesh Kumar T K</dc:creator>
      <pubDate>Wed, 21 Sep 2022 17:27:51 +0000</pubDate>
      <link>https://dev.to/nikeshkumartk/why-tailwind--g3h</link>
      <guid>https://dev.to/nikeshkumartk/why-tailwind--g3h</guid>
      <description>&lt;p&gt;Tailwind is an amazing utility-first css framework that boosts our development process. Anyone, who is familiar with normal css can easily migrate to tailwind css for faster development and designing of webpages.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;Merits of tailwind&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;It gives more flexibility to developers.&lt;/li&gt;
&lt;li&gt;It has awesome documentation. So that we can easily reach out 
for what we needed.&lt;/li&gt;
&lt;li&gt;It allows creating custom classes so that we can customize the 
classes in the way we needed.&lt;/li&gt;
&lt;li&gt;&lt;p&gt;It can be added via CDN or installed using npm.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Its documentation contains guides to installing tailwind in different &lt;br&gt;
frameworks like React js, Vue js, Next js, etc.&lt;/p&gt;

&lt;p&gt;So, i strongly recommend all the upcoming developers to start using tailwind for saving time and building incredible pieces of stuff.&lt;/p&gt;
&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>css</category>
      <category>tailwindcss</category>
      <category>webdev</category>
    </item>
    <item>
      <title>NPM OR YARN.</title>
      <dc:creator>Nikesh Kumar T K</dc:creator>
      <pubDate>Thu, 07 Jul 2022 12:36:44 +0000</pubDate>
      <link>https://dev.to/nikeshkumartk/npm-or-yarn-lke</link>
      <guid>https://dev.to/nikeshkumartk/npm-or-yarn-lke</guid>
      <description>&lt;p&gt;&lt;u&gt;&lt;strong&gt;WHAT IS NPM?&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;NPM stands for Node Package Manager which is a package manager for nodejs.It have the CLI tool that helps us to install, manage, and remove Node.js packages.Moreover npm is the world's largest Software Registry. The registry contains over 800,000 code packages. Open-source developers use npm to share software. Many organizations also use npm to manage private development.&lt;/p&gt;

&lt;p&gt;&lt;u&gt;&lt;strong&gt;WHAT IS YARN?&lt;/strong&gt;&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;Yarn is introduced by the facebook in 2016 as a replacement of npm.It was developed with an objective to offer more advanced features that npm doesnot have  and create a more secure, stable, and efficient product.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;DIFFERENCE BETEWEEN NPM AND YARN&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;1.&lt;u&gt;&lt;strong&gt;INSTALLATION&lt;/strong&gt;&lt;/u&gt;&lt;br&gt;
  &lt;em&gt;NPM&lt;/em&gt; - npm is installed automatically when node is &lt;br&gt;
               installed.&lt;br&gt;
  &lt;em&gt;YARN&lt;/em&gt; - yarn is installed using npm.&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;             npm install yarn --global
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;p&gt;2.&lt;strong&gt;&lt;u&gt;LOCK FILE&lt;/u&gt;&lt;/strong&gt;&lt;br&gt;
  &lt;em&gt;NPM&lt;/em&gt; - npm createes a package-lock.json file&lt;br&gt;
 &lt;em&gt;YARN&lt;/em&gt; - yarn creates a yarn lock file.&lt;/p&gt;

&lt;p&gt;3.&lt;u&gt;&lt;strong&gt;SPEED&lt;/strong&gt;&lt;/u&gt;&lt;br&gt;
&lt;em&gt;NPM&lt;/em&gt; - npm install packages sequentially&lt;br&gt;
 &lt;em&gt;YARN&lt;/em&gt; - yarn install packages parallel&lt;/p&gt;

&lt;p&gt;4.SECURITY&lt;/p&gt;

&lt;p&gt;&lt;em&gt;NPM&lt;/em&gt; - Security threats were a significant issue in early versions of NPM. As of version 6, NPM performs a security audit every time you install a package. This helps prevent vulnerabilities and ensures there aren't any conflicting dependencies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;YARN&lt;/u&gt;&lt;/strong&gt; - Yarn performs a security check as a background process while downloading packages. It uses the package license information to ensure it doesn't download any malicious scripts or cause any dependency conflicts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt; ADVANTAGES &lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;&lt;u&gt;NPM&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;usage is easy for developers who follows old workflows.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;save space due to the optimization in package &lt;br&gt;
    installations.&lt;br&gt;
&lt;strong&gt;&lt;u&gt; YARN&lt;/u&gt;&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;newer versions of Yarn offer a more secure form of version &lt;br&gt;
locking.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;increased performance due to parallel installation of packages&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>I developed a live news app using bling news API and react.</title>
      <dc:creator>Nikesh Kumar T K</dc:creator>
      <pubDate>Fri, 01 Jul 2022 16:25:39 +0000</pubDate>
      <link>https://dev.to/nikeshkumartk/i-developed-a-live-news-app-using-bling-news-api-and-react-5ch6</link>
      <guid>https://dev.to/nikeshkumartk/i-developed-a-live-news-app-using-bling-news-api-and-react-5ch6</guid>
      <description>&lt;p&gt;I used react and bling news API to create a live news app which update the news from different categories.I got the API from &lt;a href="//rapidapi.com"&gt;rapid api .com&lt;/a&gt;.I used css flexbox to make the application responsive.It is a very beginner friendly project which gives us a basic idea about APIs and how can we integrate them with our apps .I am leaving the live link of app with the linl of my github repo.&lt;br&gt;
&lt;a href="//nik-news-app.netlify.app"&gt;Live link of app&lt;/a&gt;.&lt;br&gt;
&lt;a href="https://github.com/Nikeshkumar-tk/Live-news-app"&gt;Github link&lt;/a&gt;.&lt;/p&gt;

</description>
      <category>react</category>
      <category>javascript</category>
      <category>css</category>
      <category>api</category>
    </item>
    <item>
      <title>I developed a random quote generating app using react and api.adviceslip.com</title>
      <dc:creator>Nikesh Kumar T K</dc:creator>
      <pubDate>Fri, 24 Jun 2022 16:10:17 +0000</pubDate>
      <link>https://dev.to/nikeshkumartk/i-developed-a-random-quote-generating-app-using-react-and-apiadviceslipcom-5646</link>
      <guid>https://dev.to/nikeshkumartk/i-developed-a-random-quote-generating-app-using-react-and-apiadviceslipcom-5646</guid>
      <description>&lt;p&gt;I used react and api.adviceslip.com to create a random quote generating app.Since i am a beginner to development,i am pretty sure that this is a best project for beginners in react.I am leaving the live link of the app along with the link of my github repo.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://nikquoteapp.netlify.app/"&gt;Live link of project&lt;/a&gt;&lt;br&gt;
&lt;a href="https://github.com/Nikeshkumar-tk/quote-generator"&gt;Github link&lt;/a&gt;&lt;/p&gt;

</description>
      <category>react</category>
      <category>webdev</category>
      <category>javascript</category>
      <category>node</category>
    </item>
    <item>
      <title>How to deal with errors while coding</title>
      <dc:creator>Nikesh Kumar T K</dc:creator>
      <pubDate>Sun, 19 Jun 2022 14:03:49 +0000</pubDate>
      <link>https://dev.to/nikeshkumartk/how-to-deal-with-errors-while-coding-4a78</link>
      <guid>https://dev.to/nikeshkumartk/how-to-deal-with-errors-while-coding-4a78</guid>
      <description>&lt;p&gt;Errors are the usual thing that occur in our journey of programming.&lt;br&gt;
Beginners are the primary group who are exposed to the hesitation caused by errors.There is also a possibibility of droping programming field due to errors in beginners.But one thing we should remeber is&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The skill of a programmer is not writting a bunch of code&lt;br&gt;
 without error,but finding the optimal solution for error&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;When we solve a particular error we can understand the core reasons for that error and avoid such &lt;br&gt;
situations of error later in our code&lt;br&gt;
The usual categories of error that occur are&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;syntax error -ocuurs when we violates the rules of a programming language.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;logical error-occurs due to the improper logic in the code.&lt;br&gt;
&lt;strong&gt;How to deal with syntax errors&lt;/strong&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;By using the plugins and editors that can detect syntax errors instandly.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Usual case of syntax errors are missing parenthesis,semicolons etc.So, make sure they are inserted properly.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;How to deal with logical errors&lt;/strong&gt;&lt;br&gt;
  It is difficult to detect logical errors at compile time.It can be avoided by&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;By using try-catch block for complex code for tracing the error.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;By making a better comprehention in the logic of the code.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;Use Stack Overflow for debugging&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--fp95VRh2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/971bxvxnx8iw9hlidmfz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--fp95VRh2--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/971bxvxnx8iw9hlidmfz.png" alt="Image description" width="880" height="345"&gt;&lt;/a&gt;&lt;br&gt;
                       Stack Overflow is the biggest community of programmer where we can find the solutions for our errors.I usually used to copy paste my error message in stack overflow.Programmers who faced  similar errors might posted their issue and there will be solutions.If no solutions found you can ask for help by mentioning your isuue with your code snippet.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>What is APIs.</title>
      <dc:creator>Nikesh Kumar T K</dc:creator>
      <pubDate>Thu, 16 Jun 2022 04:41:04 +0000</pubDate>
      <link>https://dev.to/nikeshkumartk/what-is-apis-4opa</link>
      <guid>https://dev.to/nikeshkumartk/what-is-apis-4opa</guid>
      <description>&lt;p&gt;API stands for Application Programming Interface.It allows different softwares to talk to eachother.It is used by developers to integrate different services into their product.&lt;/p&gt;

&lt;p&gt;API created by server side scripting languages are used by clients to interact with webserver.&lt;/p&gt;

&lt;p&gt;For instance lets consider a MERN stack web app in which API is created by node js which is connected with mongo database.The created API is used by REACT, which is a front end javascript library.Here front end interact with webserver using API&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;EXAMPLES OF API&lt;/strong&gt; &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Booking movie tickets&lt;/li&gt;
&lt;li&gt;Acessing weather info&lt;/li&gt;
&lt;li&gt;Travel bookings&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;strong&gt;DIFFERENT TYPES OF APIs&lt;/strong&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;REST API&lt;/li&gt;
&lt;li&gt;RPC&lt;/li&gt;
&lt;li&gt;Composite APIs&lt;/li&gt;
&lt;li&gt;Internel APIs&lt;/li&gt;
&lt;/ul&gt;

</description>
    </item>
    <item>
      <title>BEST PROGRAMMING LANGUAGE TO START CODING.</title>
      <dc:creator>Nikesh Kumar T K</dc:creator>
      <pubDate>Tue, 14 Jun 2022 04:49:15 +0000</pubDate>
      <link>https://dev.to/nikeshkumartk/best-programming-language-to-start-coding-50ok</link>
      <guid>https://dev.to/nikeshkumartk/best-programming-language-to-start-coding-50ok</guid>
      <description>&lt;p&gt;I started my coding by learning c,c++and java.C gave me basic undestanding in how instructions are executed in a program.I learned the basic concepts of loops,arrays,variables,datatypes etc.&lt;br&gt;
Learning java was a wonderful experience for me.In the begining it was difficult for me to catchup the object oriented concept.However,eventually i learned what are classes and how objects are created in java.Now i am in a good shape with java.Learning java helped me to easily catch up new languags with object oreinted concepts.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;So, i strongly recomment new commers to the coding field to start with java and c&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://www.javatpoint.com/java-tutorial"&gt;java tutorial&lt;/a&gt;&lt;br&gt;
&lt;a href="https://www.javatpoint.com/c-programming-language-tutorial"&gt;Learn c programming&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
