<?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: The Ninja Programmer</title>
    <description>The latest articles on DEV Community by The Ninja Programmer (@theninjaprogrammer).</description>
    <link>https://dev.to/theninjaprogrammer</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%2F578216%2F43786f09-de62-4860-9bee-3286c4843fb6.jpg</url>
      <title>DEV Community: The Ninja Programmer</title>
      <link>https://dev.to/theninjaprogrammer</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/theninjaprogrammer"/>
    <language>en</language>
    <item>
      <title>Take your localhost API to be accessible from WWW</title>
      <dc:creator>The Ninja Programmer</dc:creator>
      <pubDate>Tue, 13 Apr 2021 13:19:51 +0000</pubDate>
      <link>https://dev.to/theninjaprogrammer/take-your-localhost-api-to-be-accessible-from-www-4d9</link>
      <guid>https://dev.to/theninjaprogrammer/take-your-localhost-api-to-be-accessible-from-www-4d9</guid>
      <description>&lt;p&gt;In this post, we will tell you how you can take the API on your machine to be accessible from WWW by using a powerful and free tool called ngrok.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;The Problem&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Many times we developers develop APIs for our apps. But when we are working in a team and you need to give access to your API to other team members, you just have one option, upload it to a server. This process is very time-consuming. &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;The Solution&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Wouldn't it be easy to simply take the API from localhost to WWW so that anyone could access it? Well, that's exactly what NGrok does for you. &lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;How does it help?&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Suppose, I am developing an API that gives me the list of food items. As I am developing it on my machine, the URL to access this would be&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%2Fdlrq7beelwg24y43az5d.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%2Fdlrq7beelwg24y43az5d.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
Now, I would like my colleague to access this endpoint. So, to do that, I will use ngrok.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Step 1:&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Simply visit &lt;a href="https://ngrok.com/" rel="noopener noreferrer"&gt;https://ngrok.com/&lt;/a&gt; and download the ngrok.&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%2Fsonex34w1q7flc9dm4wn.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%2Fsonex34w1q7flc9dm4wn.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Step 2:&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Now before using ngrok you have to first set the auth token. So simply go to the ngrok site and get the auth token by creating the account. Now run the below command with your auth token.&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%2Feu75la53f42h9z2966pz.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%2Feu75la53f42h9z2966pz.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Step 3:&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Lastly, just run the below command by specifying the port no on which you want to receive the request from WWW.&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%2Fli271nu2n5uskuerem0b.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%2Fli271nu2n5uskuerem0b.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In My case, it is 80 because my xampp is running on port 80.&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%2Fpecexpdbi2szf9wtvqwy.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%2Fpecexpdbi2szf9wtvqwy.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;strong&gt;Result&lt;/strong&gt;
&lt;/h3&gt;

&lt;p&gt;Now you will get a random WWW URL from NGROK.&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%2Feylmk47e0l4ly4rqk0nn.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%2Feylmk47e0l4ly4rqk0nn.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
By using this URL anyone can access your localhost API.&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%2Fwzef11hb8walrfrmmkmc.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%2Fwzef11hb8walrfrmmkmc.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thank you for reading!&lt;/p&gt;

&lt;p&gt;Follow us on Instagram&lt;br&gt;
&lt;a href="https://www.instagram.com/the.ninja.programmer/" rel="noopener noreferrer"&gt;https://www.instagram.com/the.ninja.programmer/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>tutorial</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Things you should consider while using StackOverflow!</title>
      <dc:creator>The Ninja Programmer</dc:creator>
      <pubDate>Mon, 12 Apr 2021 14:20:12 +0000</pubDate>
      <link>https://dev.to/theninjaprogrammer/things-you-should-consider-while-using-stackoverflow-1d29</link>
      <guid>https://dev.to/theninjaprogrammer/things-you-should-consider-while-using-stackoverflow-1d29</guid>
      <description>&lt;p&gt;We developers love StackOverflow. Life as a developer would have been so hard without it. I know it has saved you many times as it has saved me over the years.&lt;/p&gt;

&lt;p&gt;But, be a bit careful while using the solutions from stack overflow directly. &lt;/p&gt;

&lt;p&gt;Take the following points into consideration while using solutions from it.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. The time when the question was answered
&lt;/h2&gt;

&lt;p&gt;Being in tech, things change at a drastic rate. The time when the question was answered is very important because the solution might have been the best back in say, 2015 according to the tech stack at that time. &lt;/p&gt;

&lt;p&gt;But maybe in 2020 or 2021, a better solution could exist with improvements in the tech stack and new versions. The solution in 2015 and 2020 or 2021 could be significantly different.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Accepted answers are not always the best ones
&lt;/h2&gt;

&lt;p&gt;Don't think that the accepted answer is the best one. No, it does work that way. Maybe, the unaccepted answer could be more good and optimal. This could happen because the better answer was posted after the accepted answer.&lt;br&gt;
So, the next time you are on StackOverflow, don't just copy the accepted answer.&lt;br&gt;
Spend time scrolling through all the answers.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Some comments are GOLD
&lt;/h2&gt;

&lt;p&gt;Some comments just below the answers tell you more than the answer itself. It could be right from correcting the answer to pointing out why we should not use it. Sometimes, the comments explain the code better than the original author. Look out for such comments, they are life-saving.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Do not downvote, if you did not understand the answer
&lt;/h2&gt;

&lt;p&gt;Don't just downvote someone because a lot of other people have. It's very easy to put someone down. Only downvote if you understand the shortcomings of the code or if you know the potential side effects it could have.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Be responsible while answering
&lt;/h2&gt;

&lt;p&gt;Don't blindly answer questions! You need to be responsible enough to tell the good points, bad points, better solutions (if exists), and justify why you are giving this as an answer.&lt;/p&gt;

&lt;p&gt;Thank you for reading.&lt;br&gt;
Let us know your thoughts in the comments below.&lt;/p&gt;

&lt;p&gt;Follow us on Instagram for more&lt;br&gt;
&lt;a href="https://www.instagram.com/the.ninja.programmer"&gt;https://www.instagram.com/the.ninja.programmer&lt;/a&gt;&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>programming</category>
      <category>beginners</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Things only bad developers do</title>
      <dc:creator>The Ninja Programmer</dc:creator>
      <pubDate>Sat, 10 Apr 2021 15:26:44 +0000</pubDate>
      <link>https://dev.to/theninjaprogrammer/things-only-bad-developers-do-efe</link>
      <guid>https://dev.to/theninjaprogrammer/things-only-bad-developers-do-efe</guid>
      <description>&lt;p&gt;As a developer, our job is not only limited to wring the code. There are a few more things that we must do apart from writing code.&lt;/p&gt;

&lt;p&gt;Today, we will tell you a few points that you &lt;strong&gt;should not&lt;/strong&gt; do as a developer.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Writing Over Optimized Code
&lt;/h2&gt;

&lt;p&gt;It's always good to write optimized code, but it's also important to make sure that we don't over-optimize it. Let's say, you are working in a team and you are assigned to write a function that does something. Suppose, you come up with a solution that does that job in 2 or 3 lines, but it's over-optimized and not very easily readable.&lt;/p&gt;

&lt;p&gt;If other team members are trying to understand this function, they will hardly understand what your code is doing and how is it working, because it's hardly readable due to being over-optimized. &lt;/p&gt;

&lt;p&gt;Always write optimized code, &lt;strong&gt;but not at the cost of readability and ease of understanding.&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Pushing untested code into production
&lt;/h2&gt;

&lt;p&gt;No matter how much sure you are about your code and its working, pushing it directly to production without testing it, is a BAD decision.&lt;/p&gt;

&lt;p&gt;You might feel like doing this when you have made a really small change and not feel like testing it.&lt;/p&gt;

&lt;p&gt;But, there could be chances that that change might not be implemented as you wanted.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Pushing commented code in production
&lt;/h2&gt;

&lt;p&gt;This is very dangerous. You might think what harm it might do? But, when code comes under maintenance or updations and some other dev starts working with the code, there are always chances that he might uncomment it and screw up the entire application. Also, it might create unnecessary confusion.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Not considering the bad scenarios
&lt;/h2&gt;

&lt;p&gt;Your code will not always run in an ideal scenario or your users will not always use the app as you want them to use. So, ignoring all the basic bad scenarios is the worst thing to do. If you do that, your code will horribly fail.&lt;/p&gt;

&lt;p&gt;As a developer, always consider, manage all the bad scenarios. Make sure your code is ready to face the worst of conditions.&lt;/p&gt;

&lt;p&gt;Thanks for reading.&lt;br&gt;
Let us know your thoughts in the comments below&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>programming</category>
      <category>productivity</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>Some tips for your first job as a developer</title>
      <dc:creator>The Ninja Programmer</dc:creator>
      <pubDate>Sat, 10 Apr 2021 07:15:42 +0000</pubDate>
      <link>https://dev.to/theninjaprogrammer/some-tips-for-your-first-job-as-a-developer-3ib9</link>
      <guid>https://dev.to/theninjaprogrammer/some-tips-for-your-first-job-as-a-developer-3ib9</guid>
      <description>&lt;h2&gt;
  
  
  Be honest
&lt;/h2&gt;

&lt;p&gt;Never lie if you don't know something. Let your manager know about it.&lt;/p&gt;

&lt;h2&gt;
  
  
  No showing off!
&lt;/h2&gt;

&lt;p&gt;No Manager likes a newbie telling him/her how they should go about the business.&lt;/p&gt;

&lt;h2&gt;
  
  
  Be Motivated!
&lt;/h2&gt;

&lt;p&gt;You have to justify your selection in the company and prove you have all that it takes.&lt;/p&gt;

&lt;h2&gt;
  
  
  Learn from your teammates
&lt;/h2&gt;

&lt;p&gt;Always learn from your seniors and their experiences.&lt;/p&gt;

&lt;h2&gt;
  
  
  Maintain a good rapport with your managers
&lt;/h2&gt;

&lt;p&gt;Apart from working hard and adding value to your organization, it's very important to be on good terms with your managers. It will help you in growing in the organization.&lt;/p&gt;

&lt;p&gt;Follow us on Instagram for more such content&lt;br&gt;
&lt;a href="https://www.instagram.com/the.ninja.programmer/"&gt;https://www.instagram.com/the.ninja.programmer/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Let us know your thoughts in the comments below 👇&lt;/p&gt;

</description>
      <category>career</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>A LIFE-SAVING GitHub Feature that you need to know RIGHT NOW!</title>
      <dc:creator>The Ninja Programmer</dc:creator>
      <pubDate>Mon, 15 Feb 2021 15:32:02 +0000</pubDate>
      <link>https://dev.to/theninjaprogrammer/a-life-saving-github-feature-that-you-need-to-know-right-now-54he</link>
      <guid>https://dev.to/theninjaprogrammer/a-life-saving-github-feature-that-you-need-to-know-right-now-54he</guid>
      <description>&lt;p&gt;Ever browsed a Github repository and felt the pain of not being able to view the code without having to download the entire repository? &lt;/p&gt;

&lt;p&gt;It's huge pain, especially when you simply want to look through the code.&lt;/p&gt;

&lt;p&gt;Wouldn't it be great if we could simply view the code while browsing without having to download the entire repo?&lt;/p&gt;

&lt;p&gt;Well, this problem has been solved! A great tool that will help you to view the code on the go, that too, in one of our favorites and powerful code editor, &lt;strong&gt;VS Code!&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Wondering how to do it?
&lt;/h2&gt;

&lt;p&gt;You can do this in just 3 steps:&lt;/p&gt;

&lt;p&gt;Step 1 - Go to any GitHub repository&lt;br&gt;
&lt;strong&gt;For Example: &lt;/strong&gt;&lt;br&gt;
&lt;a href="https://github.com/iamrohitsuthar/quizller"&gt;https://github.com/iamrohitsuthar/quizller&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step2 - Just put &lt;strong&gt;1s&lt;/strong&gt; in the between of Github and .com in the address bar and see the magic happen.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--LRBQXINd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/zfcvhxgglhkyezcyaw58.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--LRBQXINd--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/zfcvhxgglhkyezcyaw58.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Step 3 - Wow! The repository opens in an online VS Code editor!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Y6jKhWex--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/q1tp5k2ixea0esqpwkbz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Y6jKhWex--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/q1tp5k2ixea0esqpwkbz.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Isn't it time-saving for devs?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Let us know your thoughts in the comments below&lt;/p&gt;

&lt;p&gt;Follow us on instagram&lt;br&gt;
&lt;a href="https://www.instagram.com/the.ninja.programmer/"&gt;https://www.instagram.com/the.ninja.programmer/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>github</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>Importance of Writing Clean Code</title>
      <dc:creator>The Ninja Programmer</dc:creator>
      <pubDate>Fri, 12 Feb 2021 14:23:11 +0000</pubDate>
      <link>https://dev.to/theninjaprogrammer/importance-of-writing-clean-code-10ab</link>
      <guid>https://dev.to/theninjaprogrammer/importance-of-writing-clean-code-10ab</guid>
      <description>&lt;p&gt;Writing clean code is very important, especially in apps that are big in size and where multiple teams are working.&lt;br&gt;
&lt;br&gt;&lt;br&gt;
&lt;strong&gt;1. Extension becomes easy&lt;/strong&gt;&lt;br&gt;
Following proper architecture and writing clean code makes it easy to extend the functionalities of your application. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;2. A new developer will find it less difficult to understand your code&lt;/strong&gt;&lt;br&gt;
Whenever a new dev gets added to the team, he/she will find it less complicated to read the code and understand what has been written. In contrast to that, the unclean code will require a lot of time and effort to understand.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;3. Making changes becomes easy&lt;/strong&gt;&lt;br&gt;
A clean code will allow you to make changes more efficiently. Like, changing one thing in a part will not break the other features. If you have experienced this, you know how bad it can become.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;4. Testing and Debugging the Code becomes much more simple&lt;/strong&gt;&lt;br&gt;
Finding bugs in an unclean and the code that is all over the place is a big ask. There are also chances that some bugs might be caused due to the non-neat code itself!&lt;/p&gt;

&lt;h3&gt;
  
  
  How to write clean code ?
&lt;/h3&gt;

&lt;p&gt;It's not that difficult. Following best architectural patterns, naming conventions, wring self descriptive code will do the job for you.&lt;/p&gt;

&lt;p&gt;Follow us on instagram:&lt;br&gt;
&lt;a href="https://www.instagram.com/the.ninja.programmer/"&gt;https://www.instagram.com/the.ninja.programmer/&lt;/a&gt;&lt;/p&gt;

</description>
      <category>codenewbie</category>
      <category>productivity</category>
      <category>javascript</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
