<?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: Neel Dedhia</title>
    <description>The latest articles on DEV Community by Neel Dedhia (@neel_dedhia).</description>
    <link>https://dev.to/neel_dedhia</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%2F203094%2Fec87e4b6-dfb1-4a02-94f7-a0159d206833.jpg</url>
      <title>DEV Community: Neel Dedhia</title>
      <link>https://dev.to/neel_dedhia</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/neel_dedhia"/>
    <language>en</language>
    <item>
      <title>What it means to be an developer?</title>
      <dc:creator>Neel Dedhia</dc:creator>
      <pubDate>Fri, 11 Feb 2022 07:31:32 +0000</pubDate>
      <link>https://dev.to/neel_dedhia/what-it-means-to-be-an-developer-o1d</link>
      <guid>https://dev.to/neel_dedhia/what-it-means-to-be-an-developer-o1d</guid>
      <description>&lt;p&gt;Hey folks, welcome to the first post of &lt;strong&gt;#DevInit_withNeel&lt;/strong&gt;!&lt;br&gt;
We all want to be a developer, but do we really know who a developer really is, what it means to be one? 🤔&lt;/p&gt;

&lt;p&gt;It's quite easy &amp;amp; simple to just learn some programming language and name yourself as a developer since it's not being given by any examined authority. But you will surely be judged among the professionals when don't meet up to the level of expectations.&lt;/p&gt;

&lt;p&gt;Let's figure out the roadmap to becoming a developer and where are you on this journey:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Typist:&lt;/strong&gt; A person who just types the code but does not produce any relevant output to solve the problem. One might type code already written up somewhere, either for the purpose of copy-pasting or for language migration.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Programmer:&lt;/strong&gt; This level of folks are expected to have a proficiency over language/s. Also, they are well known at Data Structures, Algorithms, Version Controls and produce valuable and optimized outputs.&lt;br&gt;
Here you might think that this is what a developer does, but the hard truth is there's a lot more and this is just a small part of it.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Developer:&lt;/strong&gt; Apart from writing valuable and optimized solutions their professionalism lies in building versatile and scalable software architecture, refactoring the solutions, providing efficiency at computational &amp;amp; storage resources, etc.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Intermediate Developer:&lt;/strong&gt; Someone, who is one the way and in-between programmer &amp;amp; developer. Since this journey is long with loads of stuff to master at. This is where I am currently and growing ahead 🚀&lt;/p&gt;

&lt;p&gt;In developer, I have mentioned "etc" at the end since I am on my way to it so I mentioned what all so far I have figured it out. Let me know in the comments what are the other things a developer should be known of 💭&lt;/p&gt;

&lt;p&gt;That's all folks for today, I hope this read would help you to know where you are and where have to go towards.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;See you all soon again!&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Find me on internet at &lt;a href="https://neeldedhia.bio.link/"&gt;https://neeldedhia.bio.link/&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Console in JS other than console.log()</title>
      <dc:creator>Neel Dedhia</dc:creator>
      <pubDate>Wed, 29 Dec 2021 17:09:01 +0000</pubDate>
      <link>https://dev.to/neel_dedhia/console-in-js-other-than-consolelog-32nf</link>
      <guid>https://dev.to/neel_dedhia/console-in-js-other-than-consolelog-32nf</guid>
      <description>&lt;p&gt;Hey JS folks, we all have been using a very popular method console.log() for things apart from genuine logging. Most of us, once in a lifetime would have come across all the methods console object has to offer apart from console.log(), despite these we still tend to use .log() at times!&lt;/p&gt;

&lt;p&gt;Today, once again when I went through the console object docs on MDN, a thought crossed my mind, what could be the reason we aren't adaptable to the other method in normal scenarios?&lt;/p&gt;

&lt;p&gt;To get a better insight on this, I had initiated a poll on LinkedIn to ask my connections their thought and here are the results.&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%2Fod4z0c22ecoxbbzlh89p.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%2Fod4z0c22ecoxbbzlh89p.png" alt="Linkedin Poll"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;From the results, it is seen that majority of people have found console.log() easy and quick to use. But, all these votes indirectly hint at one answer that is &lt;strong&gt;Unawareness&lt;/strong&gt;. How? let me explain to you…&lt;/p&gt;

&lt;p&gt;One uses any method which is either well known or has seen them the most while learning (this makes us easy &amp;amp; quick to re-use in real scenarios) the best example for this could be "variable i in loops".&lt;br&gt;
If one is unaware of the ability of a function and how can it make your code robust and look good, then one may never find it needful in using.&lt;/p&gt;

&lt;p&gt;The console.log() is only to put a message which is not strongly bound to the logical part of the code, it can be used as an affirmation to something. Eg: "User landed homepage from google-search". The other methods offered by the console are bound to specific usage under special scenarios. Using them increases our code &amp;amp; console readability.&lt;/p&gt;

&lt;p&gt;Let me show you a few methods which have real meaning and application and I hope it would help you to switch from console.log() then onwards.&lt;/p&gt;
&lt;h2&gt;
  
  
  1. console.count() &amp;amp; console.countReset()
&lt;/h2&gt;

&lt;p&gt;Let's assume you want to keep a count of how many click the user makes on the button. The code with .log() might look like this 👇&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;let userClickCounter = 0;
function watchUserClicks(){
  userClickCounter++;
  console.log(`User Clicked ${userClickCounter}`);
}
function resetCounter(){
  userClickCounter = 0;
  console.log("User Clicked reset");
}
&amp;lt;/script&amp;gt;
&amp;lt;button onclick="watchUserClicks()"&amp;gt;Click Me to without pause&amp;lt;/button&amp;gt;
&amp;lt;button onclick="resetCounter()"&amp;gt;Reset me if you pause&amp;lt;/button&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now. let me show you the other way 👇&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function watchUserClicks(){
  console.count(`User Clicked`);
}
function resetCounter(){
  console.log("User Clicked");
}
&amp;lt;/script&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here the need for variable and its related code is eliminated thereby, making the code optimal and readable.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. console.dir()
&lt;/h2&gt;

&lt;p&gt;This method shows all the properties of the JS Object. The console.log() prints out toString representation whereas console.dir() prints out a navigatable tree. Check out the difference below 👇&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%2Fi661tsgm3lf720gcevb4.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%2Fi661tsgm3lf720gcevb4.png" alt="console.dir() vs console.log() output"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This method comes to the real help when you want to show a single Dom Element like this 👇&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%2Fgodv89ovgh5rhp5xvqqy.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%2Fgodv89ovgh5rhp5xvqqy.png" alt="Dom Element in console.dir() and console.log()"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  3. console.trace()
&lt;/h2&gt;

&lt;p&gt;If you are working on a very complex code architecture wherein the function you are writing has multiple call sources(it can be called from various methods directly or indirectly). You're function isn't working for some scenario and you don't who is the one calling and how is it called at caller's end. The trace() method will come to the rescue and help you getting to know trace of origin of this function call. This would save your tones of time about getting to know the code architecture just for one single call messing up. Let's see this with the example below👇&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const myTask = (task) =&amp;gt; youDoIt(task);
const youDoIt = (task) =&amp;gt; letJuniorDoIt(task);
const letJuniorDoIt = (task) =&amp;gt; forwardToFriend(task);
const forwardToFriend = (task) =&amp;gt; forwardToLoyalFriend(task);
const forwardToLoyalFriend = (task) =&amp;gt; {
 if(!!task){
  console.log('Worked on task: ' + task);
 }
 else{
  // !! will convert undefined, null, false, 0, '',  into false
  console.trace('Invalid task to work on'); 
 } 
}
// You aren't aware of where these lines are written in the project
myTask('Priority Task');
forwardToFriend('Bug in the code');
letJuniorDoIt('Easy Task');
forwardToLoyalFriend('Job Saver task');
youDoIt('');
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Let's see how trace() method helps you here:&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%2Frw6f6y3liz7jb6u63d28.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%2Frw6f6y3liz7jb6u63d28.png" alt="Example of console.trace() method"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  4. console.time() and console.timeEnd()
&lt;/h2&gt;

&lt;p&gt;When you are working on a complex algorithm, time is one of the main factor you need to look on simultaneously. This is where you can use these console methods to know how much time your algorithm is taking to execute.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;function Factorial(n) {
    let fact=1;
    console.time('Calculate Factorial');
for (let i = 2; i &amp;lt;= n; i++){
        fact = fact * i;
    }
console.timeEnd('Calculate Factorial');
    return fact;
}
&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%2Fhoscox2dv182tpgd1bpb.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%2Fhoscox2dv182tpgd1bpb.png" alt="Factorial in JS with console.time() &amp;amp; console.timeEnd()"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  5. console.table()
&lt;/h2&gt;

&lt;p&gt;The best method vs console.log() to show an object in JS. This method is used to represent complex objects or arrays in tabular format. This method takes away all the hard work of inspecting at an object that console.log gives. With .table() you can easily view the objects sort them based on columns and traverse through.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const teamData = {
    Lead: {
        id: 'L01',
        firstname: "John",
        email: "john@gmail.com"
    },
    manager: {
        id: 'M01',
        firstname: "Alice",
        email: "aliceInwander@gmail.com"
    },
    developer: {
        id: 'D01',
        firstname: "Bob",
        email: "bobthebuilder@gmail.com"
    },
    tester: {
        id: 'T01',
        firstname: 'Dexter',
        email: 'dexterLab@gmail.com'
    }
}
console.table(teamData);
&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%2F7133tjjiuh765anglskd.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%2F7133tjjiuh765anglskd.png" alt="console.table() to show team data"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This method also gives a cherry for the cake. You can print selective columns from an object like below 👇&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;console.table(teamData, ['id', 'email']);
&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%2Ffawwzpdzg77s37n0efji.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%2Ffawwzpdzg77s37n0efji.png" alt="Console.table with specific columns"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;There are other methods too and I would like to get to know from you which other methods you find are insightful and better than using console.log. Let me know if you need part 2 of this article discussing the rest of the methods console object has to offer.&lt;/p&gt;

&lt;p&gt;I hope this read was fruitful and now you won't fall in any of the voting options that I had mentioned at the beginning. Share this article with your friends and colleagues at work, to make them aware of the hidden gems JS console has and make their life easier too.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lastly, introducing myself
&lt;/h2&gt;

&lt;p&gt;Hey 👋 I'm Neel Dedhia, a full-stack web developer I like to write articles about concepts that are odds but yet important towards growth in knowledge in tech. Also, I like to give and share my knowledge with my connections to mutually grow here with updated resources. If you like reading this article and looking forward to seeing more or to discuss with me on such topics, you can follow me here or connect me from the below sources:&lt;br&gt;
Portfolio - &lt;a href="http://neeldedhia.bio.link/" rel="noopener noreferrer"&gt;http://neeldedhia.bio.link/&lt;/a&gt;&lt;br&gt;
Linkedin - &lt;a href="https://www.linkedin.com/in/neel-dedhia/" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/neel-dedhia/&lt;/a&gt;&lt;br&gt;
Twitter - &lt;a href="https://twitter.com/neel_dedhia" rel="noopener noreferrer"&gt;https://twitter.com/neel_dedhia&lt;/a&gt;&lt;br&gt;
Dev.to - &lt;a href="https://dev.to/neel_dedhia"&gt;https://dev.to/neel_dedhia&lt;/a&gt;&lt;br&gt;
Instagram - &lt;a href="https://instagram.com/arsictography" rel="noopener noreferrer"&gt;https://instagram.com/arsictography&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thank you! for reading till this end, wish you all a Merry Christmas and Happy New Year!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>programming</category>
    </item>
    <item>
      <title>CSS Perspective WHW(What? How? When?)</title>
      <dc:creator>Neel Dedhia</dc:creator>
      <pubDate>Sat, 12 Sep 2020 10:47:14 +0000</pubDate>
      <link>https://dev.to/neel_dedhia/css-perspective-whw-what-how-when-3463</link>
      <guid>https://dev.to/neel_dedhia/css-perspective-whw-what-how-when-3463</guid>
      <description>&lt;p&gt;&lt;strong&gt;Hey Folks!&lt;/strong&gt; join me to discuss &lt;em&gt;WHW(what? how? when?) about CSS Perspective&lt;/em&gt; along with creative examples and some hidden secrets.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://medium.com/@neeldedhia/css-perspective-whw-286262a505d8"&gt;https://medium.com/@neeldedhia/css-perspective-whw-286262a505d8&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Click the claps if you like it and let me know your thoughts in the comments section.&lt;/p&gt;

</description>
      <category>css</category>
      <category>webdev</category>
      <category>html</category>
      <category>3danimation</category>
    </item>
  </channel>
</rss>
