<?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: vivek</title>
    <description>The latest articles on DEV Community by vivek (@notanothervivek).</description>
    <link>https://dev.to/notanothervivek</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%2F614569%2F1d1379ac-f887-4223-984a-067a539101a4.jpg</url>
      <title>DEV Community: vivek</title>
      <link>https://dev.to/notanothervivek</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/notanothervivek"/>
    <language>en</language>
    <item>
      <title>Strategies and Tips to Overcome Procrastination and Increase Productivity</title>
      <dc:creator>vivek</dc:creator>
      <pubDate>Thu, 02 Mar 2023 18:32:14 +0000</pubDate>
      <link>https://dev.to/notanothervivek/strategies-and-tips-to-overcome-procrastination-and-increase-productivity-17f9</link>
      <guid>https://dev.to/notanothervivek/strategies-and-tips-to-overcome-procrastination-and-increase-productivity-17f9</guid>
      <description>&lt;p&gt;Procrastination is something that we have all experienced at some point in our lives. It's that feeling of knowing that we have something important to do, but instead, we put it off until the last possible moment.&lt;/p&gt;

&lt;p&gt;Unfortunately, procrastination can have serious consequences, from missed deadlines and decreased productivity to increased stress and anxiety.&lt;/p&gt;

&lt;p&gt;But, why do we procrastinate, and what can we do to overcome it?  &lt;/p&gt;

&lt;p&gt;In this article, we'll explore the common reasons for procrastination, how it affects people, and what can be done to prevent going into the habit of procrastinating.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--6lgBGNo5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3ymjtpcn6cptuipuo556.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--6lgBGNo5--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/3ymjtpcn6cptuipuo556.png" alt="Procrastination is negatively correlated with academic achievement " width="880" height="462"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Common Reasons for Procrastination
&lt;/h2&gt;

&lt;p&gt;There are several reasons why people procrastinate, and these can vary depending on the individual and the task at hand. Here are some of the most common reasons why people put things off:&lt;/p&gt;

&lt;h3&gt;
  
  
  Fear of Failure
&lt;/h3&gt;

&lt;p&gt;One of the most significant reasons why people procrastinate is the fear of failure. When we are faced with a task that we perceive as difficult or challenging, we may worry that we won't be able to do it well, and that fear can prevent us from getting started.&lt;/p&gt;

&lt;h3&gt;
  
  
  Lack of Motivation
&lt;/h3&gt;

&lt;p&gt;Another reason why people procrastinate is a lack of motivation. If we don't feel excited or interested in a task, it can be challenging to get motivated to start.&lt;/p&gt;

&lt;h3&gt;
  
  
  Perfectionism
&lt;/h3&gt;

&lt;p&gt;Perfectionism is another common reason why people procrastinate. When we set impossibly high standards for ourselves, we may worry that we won't be able to meet them, and that can lead to procrastination.&lt;/p&gt;

&lt;h3&gt;
  
  
  Overwhelm
&lt;/h3&gt;

&lt;p&gt;When we have a lot of tasks to do, it can be overwhelming, and that can make it difficult to know where to start. This feeling of overwhelm can lead to procrastination as we put off starting any task at all.  &lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--Qdw1oeTA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4l19ey1qxdycq9jpn857.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Qdw1oeTA--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/4l19ey1qxdycq9jpn857.png" alt="Procrastination is linked to lower well-being and higher levels of stress" width="880" height="462"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How Procrastination Affects People
&lt;/h2&gt;

&lt;p&gt;Procrastination can have significant consequences for both our personal and professional lives. Here are some of the ways that procrastination can affect us:&lt;/p&gt;

&lt;h3&gt;
  
  
  Decreased Productivity
&lt;/h3&gt;

&lt;p&gt;Procrastination can lead to decreased productivity as we put off important tasks and waste time on less important ones.&lt;/p&gt;

&lt;h3&gt;
  
  
  Missed Deadlines
&lt;/h3&gt;

&lt;p&gt;Procrastination can also lead to missed deadlines, which can have serious consequences, such as lost opportunities or damaged relationships with colleagues or clients.&lt;/p&gt;

&lt;h3&gt;
  
  
  Increased Stress and Anxiety
&lt;/h3&gt;

&lt;p&gt;When we procrastinate, we may worry about the task at hand, which can lead to increased stress and anxiety.&lt;/p&gt;

&lt;h3&gt;
  
  
  Lower Self-Esteem
&lt;/h3&gt;

&lt;p&gt;Procrastination can also lead to lower self-esteem, as we may feel guilty or ashamed about not getting things done.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to Overcome Procrastination
&lt;/h2&gt;

&lt;p&gt;Overcoming procrastination is not easy, but it is possible to try and reduce it's recurrence. Here are some tips and strategies to help you boost productivity and get things done:&lt;/p&gt;

&lt;h3&gt;
  
  
  Set Goals and Prioritize
&lt;/h3&gt;

&lt;p&gt;One way to overcome procrastination is to set clear goals and prioritize your tasks. Write down what you need to do and prioritize them based on their importance and urgency.&lt;/p&gt;

&lt;h3&gt;
  
  
  Break Tasks into Smaller Steps
&lt;/h3&gt;

&lt;p&gt;When you have a large task to do, it can be overwhelming. Breaking it down into smaller, more manageable steps can make it less daunting and help you get started.&lt;/p&gt;

&lt;h3&gt;
  
  
  Eliminate Distractions
&lt;/h3&gt;

&lt;p&gt;Distractions can be a significant barrier to productivity. Try to eliminate distractions, such as social media, emails, or phone calls, while you work on important tasks.&lt;/p&gt;

&lt;h3&gt;
  
  
  Use the Pomodoro Technique
&lt;/h3&gt;

&lt;p&gt;The Pomodoro technique is a time management technique that involves working for a set amount of time (usually 25 minutes) and taking a short break before starting again. This can help you stay focused and avoid burnout.&lt;/p&gt;

&lt;h3&gt;
  
  
  Find Your Motivation
&lt;/h3&gt;

&lt;p&gt;If you're struggling to get motivated, try to find ways to make the task more interesting or enjoyable. For example, if you're writing a report, try to find an angle that interests you or approach it creatively.&lt;/p&gt;

&lt;h3&gt;
  
  
  Overcome Perfectionism
&lt;/h3&gt;

&lt;p&gt;Perfectionism can be a significant barrier to getting things done. To overcome perfectionism, try to focus on progress, not perfection. Celebrate small wins and keep moving forward.&lt;/p&gt;

&lt;h3&gt;
  
  
  Practice Self-Care
&lt;/h3&gt;

&lt;p&gt;Taking care of yourself is essential for productivity. Make sure you're getting enough sleep, eating well, and taking breaks when you need them.&lt;/p&gt;

&lt;h3&gt;
  
  
  Use Positive Self-Talk
&lt;/h3&gt;

&lt;p&gt;Negative self-talk can lead to self-doubt and procrastination. Try to use positive self-talk instead, such as "I can do this" or "I am capable."&lt;/p&gt;

&lt;h3&gt;
  
  
  Get an Accountability Partner
&lt;/h3&gt;

&lt;p&gt;Having someone to hold you accountable can be a powerful motivator. Find a friend, colleague, or coach who can help you stay on track and check in with you regularly.&lt;/p&gt;

&lt;h3&gt;
  
  
  Seek Professional Help
&lt;/h3&gt;

&lt;p&gt;If you're struggling with chronic procrastination, it may be helpful to seek professional help. A therapist or coach can help you identify the underlying causes of your procrastination and develop strategies to overcome it.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--rW8l9nMy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dueaae94i7r1jps4znva.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rW8l9nMy--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/dueaae94i7r1jps4znva.png" alt="Up to 95% of students procrastinate" width="880" height="462"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Procrastination is a common issue that can have significant consequences for productivity, well-being, and success. But, with persistence and effort, you can overcome procrastination and achieve your goals.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;As Dale Carnegie said, &lt;strong&gt;"Inaction breeds doubt and fear. Action breeds confidence and courage. If you want to conquer fear, do not sit at home and think about it. Go out and get busy."&lt;/strong&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>productivity</category>
      <category>procrastination</category>
      <category>management</category>
      <category>beginners</category>
    </item>
    <item>
      <title>How to make the Recruitment process "more humane"</title>
      <dc:creator>vivek</dc:creator>
      <pubDate>Sun, 07 Aug 2022 17:30:18 +0000</pubDate>
      <link>https://dev.to/notanothervivek/how-to-make-the-recruitment-process-more-humane-2ikj</link>
      <guid>https://dev.to/notanothervivek/how-to-make-the-recruitment-process-more-humane-2ikj</guid>
      <description>&lt;p&gt;The recruitment process can be life-altering for the candidate, and even for the company. A good team is after all what decides the fate of any company, and every employee contributes towards it. Unfortunately, many times the recruiters and the decision-makers end up turning the selection process into a dreaded ordeal. I'm not saying that everyone does so on purpose, but, it seems to be the case in a huge chunk of the tech industry. This post is just my attempt at bouncing off some ideas that i think need to be heard by the recruitment industry, to help more eligible people to get good jobs.  &lt;/p&gt;




&lt;h2&gt;
  
  
  How &amp;amp; Where a person learned their skills is not a factor
&lt;/h2&gt;

&lt;p&gt;Your team needs a person that can complete the task, if the candidate is capable of doing so, then they are skilled enough. Having a formal education (or college degree) doesn't need to be considered better or worse than a self-taught candidate. &lt;/p&gt;

&lt;p&gt;A self-taught person would have often shown miraculous determination, ability to self-motivate, overcome adversities and grasp concepts by themselves. But, let me be clear, i'm not saying that a formal education is any easier or displays any less calibre. &lt;/p&gt;

&lt;p&gt;My point is that it &lt;strong&gt;shouldn't be a matter of one vs. the other&lt;/strong&gt;. It should just be an &lt;strong&gt;unbiased evaluation&lt;/strong&gt; of the candidate's abilities. &lt;/p&gt;




&lt;h2&gt;
  
  
  Consider candidates as 'people'
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Inform them about rejections &amp;amp; acceptance as soon as possible&lt;/strong&gt;. Don't let uncertainty loom or give false hope. A quick rejection is often less painful than no response. The impact you may be causing could be immeasurable. It is not just a job, it is a matter of 'life'. The candidate needs to plan ahead for their own life, and for that of their loved ones. &lt;/p&gt;

&lt;p&gt;Kids may need new apt schools. Spouses may need to manage their time schedules. People having family members that need medical-assistance would need to make arrangements. Accomodation,travel,facilities ,etc. need to be managed. So many facets of life unnecessarily paused or floating in uncertainty. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;The sooner you give the candidate your decision, the sooner they can have more clarity and resume their next steps in life.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Better Rejections
&lt;/h2&gt;

&lt;p&gt;Along with making them quick, it would also be useful if the &lt;strong&gt;specific criteria that caused the rejection are conveyed to the candidate&lt;/strong&gt;. This can help them improve themselves in those areas, hence increasing their chances of succeeding in their next interview.&lt;/p&gt;

&lt;p&gt;It may seem like a chore, but if you've decided to reject the candidate, you are already fully aware of the shortcomings or the mis-alignment that is present between the role and the candidate. Spending a few minutes to convey this information can  be immensely beneficial to the candidate, and can also give your company a reputation for being someone that doesn't view employees as a mechanical and easily replaceable stand-in.&lt;/p&gt;




&lt;h2&gt;
  
  
  Understand the actual requirements for the role
&lt;/h2&gt;

&lt;p&gt;Casting a broad net to invite people from all possible tech/skills is a waste of your time &amp;amp; their efforts. Also, it just adds more cost to the company, along with drastically increasing the amount of irrelevant applications that your team will need to sift through.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Carefully crafting a set of requirements that are actually relevant&lt;/strong&gt; to the specific role would be helpful for all involved. &lt;strong&gt;Unnecessarily including all possible terms&lt;/strong&gt; into the vacancy ad will not just keep away some good candidates, but it could also lead you to hiring someone that may not be the  best fit. &lt;/p&gt;

&lt;p&gt;Including information about the relevant tech used, responsibilities that will come under the role and the soft-skills that are expected, can help to attract people who are more prepared for the job. This would also &lt;strong&gt;make freshers and self-taught candidates to evaluate themselves better and know that they have a chance to apply&lt;/strong&gt;.&lt;/p&gt;




&lt;h2&gt;
  
  
  Realistic skill matching
&lt;/h2&gt;

&lt;p&gt;Most roles don't need 100% knowledge of every aspect of a tech or language. What you actually need to find are candidates with enough fundamental knowledge, willingness to learn, ability to solve problems &amp;amp; have the right attitude towards others. Then you have a reliable &amp;amp; future-proof team-member.&lt;/p&gt;

&lt;p&gt;Making the terms clear about what concepts will be mandatory for the daily fulfillment of the role, and then mentioning other requirements which could help to excel in the role, could help to give your company and potential applicants, a better understanding of the role. &lt;/p&gt;

&lt;p&gt;Matching the candidate with the actual concepts that are needed to handle a majority of the role is probably enough. The rest can be learned on the job by a good candidate. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Denying candidates without considering that they have the potential to upgrade their skills is not helpful for either party.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Justice In Pay
&lt;/h2&gt;

&lt;p&gt;A job is a means for an income...a way towards financial freedom. There is no denying it. So regardless of how fulfilling or useful a role is, an employee needs a pay that is justified for the effort required and the skills needed. Also, it needs to be a pay not discriminated based on gender, race, nationality, etc but on skill. The employee is not just handling your tasks, but is also contributing a daily chunk of their 'life' towards the job. They deserve to be compensated accordingly. All candidates, are human-beings that deserve equal respect&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;A hard-working individual being denied a decent life due to the biases or prejudices of people , is a stain on all of humanity.&lt;/p&gt;
&lt;/blockquote&gt;




&lt;h2&gt;
  
  
  Experiences over experience
&lt;/h2&gt;

&lt;p&gt;For most jobs, what is required is the ability to solve problems that may arise, or create new things with the use of some basic technology/skills. A newbie that has tried doing a 100 projects or spent a lot of time &amp;amp; efforts on multiple projects could have enough(maybe even more) skills as a person experienced for years at a job. It is naturally subjective to the actual person and the job, but having years of experience alone shouldn't be a prime factor that is considered. &lt;/p&gt;

&lt;p&gt;Sometimes a candidate may be proficient in handling the actual work , but may not know the relevant 'technical term' for what they are doing. Unless it is absolutely necessary for the job ,(maybe for example in case of a teaching role) , *&lt;em&gt;not knowing the exact terminology doesn't have to be a measure of the candidate's skills. *&lt;/em&gt;&lt;/p&gt;




&lt;h2&gt;
  
  
  CONCLUSION
&lt;/h2&gt;

&lt;p&gt;None of this is to point fingers or make it an &lt;strong&gt;US vs. THEM&lt;/strong&gt;. The aim is to suggest that we are all actually part of the same ecosystem. A recruiter today may need to be a candidate tomorrow. A candidate today may own a company or be the decision-maker tomorrow. So, taking the right steps can help to &lt;strong&gt;reinforce that people putting enough effort can get a job without needing to rely on luck or the mood of the recruiter&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;A robust 'process' being in place is certainly a necessity, but, the human element cannot be forgotten. A slight change in mindset, and willingness to evaluate the ramifications of the small decisions that are taken by people, could probably have a large and immediate impact for everyone.&lt;/p&gt;

&lt;p&gt;Also, making things more humane for everyone helps the industry as a whole (not to mention, it is the right thing to do anyway). We need to remind ourselves that we belong to the same 'social animal' group (humans) that need to support each other to survive, and thrive. We should not stoop down to being predators and preys that fear each other or relish in the suffering of another. &lt;/p&gt;




&lt;p&gt;&lt;strong&gt;&lt;em&gt;This was obviously not some research-driven article, and is probably the exact opposite of it. So, I'm sure there'll be many disagreements to the points I've mentioned above. Feel free to add them in the comments so that we can learn from each other. The whole point is to have a healthy discussion about all this so that we can make each other aware and move forward towards whatever is right..together.&lt;/em&gt;&lt;/strong&gt;&lt;/p&gt;

</description>
      <category>recruitment</category>
      <category>interview</category>
      <category>hiringprocess</category>
      <category>jobhunt</category>
    </item>
    <item>
      <title>Programmer Burnout - identify, prevent and overcome it</title>
      <dc:creator>vivek</dc:creator>
      <pubDate>Sun, 07 Aug 2022 09:49:02 +0000</pubDate>
      <link>https://dev.to/notanothervivek/programmer-burnout-identify-prevent-and-overcome-it-k7c</link>
      <guid>https://dev.to/notanothervivek/programmer-burnout-identify-prevent-and-overcome-it-k7c</guid>
      <description>&lt;p&gt;As programmers, we tend to stay stuck to our screens and rarely interact in real life. Pulling an all-nighter to debug, getting a glimpse of sleep, using coffee to power you through the day may be the norm, but often it can put you on the road to a burnout. &lt;/p&gt;

&lt;p&gt;&lt;em&gt;Even though I'm mostly mentioning programmers, do remember that it is equally applicable to all professions.&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  WHAT IS PROGRAMMER BURNOUT
&lt;/h2&gt;

&lt;p&gt;That feeling of... &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;having too many things to do, but not enough time&lt;/li&gt;
&lt;li&gt;none of my efforts seem to help me get ahead like others&lt;/li&gt;
&lt;li&gt;feeling depressed &amp;amp; unmotivated&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;....can all be signs of a burnout creeping in. &lt;/p&gt;

&lt;p&gt;In extreme cases, a burnout makes you feel completely exhausted of energy, will-power and hope. You feel like you have lost control over your day-to-day work or life, and find no meaning or purpose in pursuing your goals. It often feels like your life is going into a spiraling pit, and you meltdown in helplessness. &lt;/p&gt;

&lt;p&gt;But, it can also be much more subtle and still have almost the same impact on your life. &lt;/p&gt;

&lt;p&gt;Sometimes you may experience *&lt;em&gt;loss in productivity, feel devoid of motivation, brain fog, inability to focus, detachment from non-work related aspects of life *&lt;/em&gt;,etc. and may be pushing it aside. Gradually it may creep up more frequently, until one day you realize you've lost control. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Being mindful&lt;/strong&gt; of your day-to-day emotional changes can help to identify whether you are on the path to a burnout. Maintaining a journal can help a lot with this. It can not only make you more aware of your emotions and the way you spend your time, but also help to identify any negative patterns or habits that need to be changed in your routine. &lt;/p&gt;

&lt;h2&gt;
  
  
  COMMON SCENARIOS THAT LEAD TO PROGRAMMER BURNOUT
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Juggling more than you can handle
&lt;/h3&gt;

&lt;p&gt;All of us want to get a lot done. But, in that urge, we end up filling our available time to the brim, with all sorts of tasks. This leads to a lot of your efforts being wasted at multiple points instead of being focused at a few places that may actually help you the most.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Initially, focus on the high impact tasks alone. The type of things that are absolutely essential.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Gradually, you can add more tasks and see how it seems to affect your daily productivity. More importantly, you can see how the new tasks impact your ability to complete your essential tasks.&lt;/p&gt;

&lt;h3&gt;
  
  
  Planning ideally instead of realistically
&lt;/h3&gt;

&lt;p&gt;When you have the liberty to do so, choose practical plans over ideal plans. Customize your day based on your own 'active times' of the day &amp;amp; allow buffer times for when things could go longer than expected. Realize your own productivity level and plan for it. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Don’t expect to push yourself at 100% throughout the day. &lt;br&gt;
You are after all human.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Making non-sustainable plans
&lt;/h3&gt;

&lt;p&gt;Don't include long term tasks without considering whether you have enough space in your existing routine to sustain it in the long term. This also means you need to say 'No' to a few (and often a lot of) things. &lt;/p&gt;

&lt;p&gt;‘Spur of the moment’ motivation may make you feel like you can put an extra 10% effort for some new task or activity. But, that surge in enthusiasm may go after a few days, and you’ll end up with an extra task that now feels like a burden. &lt;/p&gt;

&lt;h3&gt;
  
  
  Focusing only on results
&lt;/h3&gt;

&lt;p&gt;Most days, we put a lot of effort towards a goal, without achieving it. But, that doesn't mean you failed. Trial and error is a part of getting closer to your goals. Acknowledge your efforts, identify blockers and try again next time.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Your day is not just a set of metrics.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Even if you aimed to get 20 things done, but did only 10-12 of them, it is still a productive day. Keep yourself flexible in plans &amp;amp; in your self-appreciation. Modify your plans to be more realistic. &lt;/p&gt;

&lt;h3&gt;
  
  
  Comparisons
&lt;/h3&gt;

&lt;blockquote&gt;
&lt;p&gt;Remember that you are on your own road, your own journey.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;A lot of anxiety comes from feeling like you can't catch up with others ahead of you. This often leads to feelings of inadequacy and imposter syndrome.  Just, compare with your past self &amp;amp; improve. Take your time to reach your goals, &lt;strong&gt;in your own pace&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Improper Sleep
&lt;/h3&gt;

&lt;p&gt;As workloads increase, the first thing sacrificed is often sleep. It may be unavoidable, but regularly doing so can disrupt your sleep cycle. Improper sleep can reduce your productivity, which leads to more time being spent on finishing work, that ultimately means you get lesser time to sleep. This loop can easily lead to a burnout. &lt;/p&gt;

&lt;p&gt;Fixing a schedule for your sleep, and sticking to it, is crucial to maintain a healthy work-life balance. &lt;/p&gt;

&lt;h3&gt;
  
  
  Avoiding social interactions
&lt;/h3&gt;

&lt;p&gt;Sharing a conversation with someone that you are comfortable with, can not just ease stress but also, widen your perspective. Each person has different preferences when it comes to the level of social interaction that they are comfortable with. Find some groups or events that share your common interests and force yourself to come out of your comfort zone. You don't have to confine yourself to your existing social groups. Meet new people and gather fresh perspectives. Don't take yourself too seriously. Have some silly fun.&lt;/p&gt;

&lt;p&gt;The quantity of interactions isn't significant, only the quality matters. Simple gestures like a gentle smile, a hug or a compliment, can do wonders to boost your mood. Venting out in the presence of friends could act as a natural way to destress.&lt;/p&gt;

&lt;h3&gt;
  
  
  Lack of breaks
&lt;/h3&gt;

&lt;p&gt;Include physical &amp;amp; mental breaks in your routine. While working on a tough issue, spend a fixed time on it then pause &amp;amp; divert your mind for a while. You could even work on some other easier problem...or have fun jumping about , listening to music, playing some games, etc. &lt;/p&gt;

&lt;p&gt;But, &lt;strong&gt;keep a timer for your breaks&lt;/strong&gt; . This can prevent productive time leaking out of your day. The lack of time due to your long breaks should not be the reason you added more stress to your day. &lt;/p&gt;

&lt;h3&gt;
  
  
  Not unwinding often
&lt;/h3&gt;

&lt;p&gt;Try to have some outdoor/offline time once every 2-3 days. Go for a jog, walk, pet/feed some animals, play some mild sports, etc. Find something simple that you enjoy away from work, and spend time on it. This way, you can balance your work and reduce the intensity of pressure on yourself.&lt;/p&gt;

&lt;h3&gt;
  
  
  Physical inactivity
&lt;/h3&gt;

&lt;p&gt;Your mind is intrinsically linked to your body. So make sure you give your physical fitness some well-deserved attention. &lt;/p&gt;

&lt;p&gt;Incorporating some mild exercise into your work routine doesn't need to be complicated. Something as simple as doing a few jumping jacks, stretching a little to all directions while sitting, walking to and fro in your room, etc. are all effective ways to improve circulation and reduce physical stress. &lt;/p&gt;

&lt;p&gt;This is not just good for your overall health, but also acts as a helpful break from any monotonous work that may be making your mind exhausted. Also, make sure you maintain proper posture while working. Spending long durations in the wrong posture can cause irreparable damage to your back, neck and arms.&lt;/p&gt;

&lt;h2&gt;
  
  
  TAKEAWAY
&lt;/h2&gt;

&lt;p&gt;I realize that many of us may feel like we don't really have the luxury of being able to choose our tasks or routine for the day, since a lot of it may be dictated by external factors. But, wherever you can, try to incorporate the above points , even if it is in a small manner. Sometimes, small changes can have big impacts in the long run. &lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;If you feel like you need someone to talk to, please don't hesitate to reach out to me on Twitter @&lt;a href="https://twitter.com/notAnotherVivek"&gt;notAnotherVivek&lt;/a&gt;&lt;/p&gt;
&lt;/blockquote&gt;

</description>
      <category>productivity</category>
      <category>burnout</category>
      <category>programming</category>
      <category>health</category>
    </item>
    <item>
      <title>Attention Developers : 11 Must-Do Things When You Become A Ghost</title>
      <dc:creator>vivek</dc:creator>
      <pubDate>Sat, 28 Aug 2021 19:59:23 +0000</pubDate>
      <link>https://dev.to/notanothervivek/attention-developers-11-must-do-things-when-you-become-a-ghost-3l02</link>
      <guid>https://dev.to/notanothervivek/attention-developers-11-must-do-things-when-you-become-a-ghost-3l02</guid>
      <description>&lt;p&gt;Visit your coffee-addicted friends..replace their coffee with decaf versions&lt;/p&gt;




&lt;p&gt;Delete all the bookmarks your friend has,on Twitter and their browser&lt;/p&gt;




&lt;p&gt;Go to your friend's boss's calendar or scheduling tool and change all the meeting dates/times just for them.&lt;/p&gt;




&lt;p&gt;Randomly change the ++,--,&amp;gt;,&amp;lt; in your friend's codes when they are away from their laptop&lt;/p&gt;




&lt;p&gt;Open your friend's fav messaging app and send the message : "It's done. We shall never speak of it again. Just act like nothing happened" to everyone in their contact list. Doing it via email is also a bonus&lt;/p&gt;




&lt;p&gt;Go to the github profile of your dev friends/enemies and post their github commit history online&lt;/p&gt;




&lt;p&gt;Help more candidates get jobs , by forming a Ghost Startup with a large team that monitors job posts &amp;amp; matches them with the right candidates...along with informing people about rejections...send your co-ghosts to make a true review of the candidate's efforts..&lt;/p&gt;




&lt;p&gt;Go see Elon Musk's twitter account password as he types it. Login when he is sleeping and tweet random but useful stuff that could manipulate things into helping good people. He already tweets a lot of random stuff..so probably ..nobody will think it's weird..not even him.&lt;/p&gt;




&lt;p&gt;Schedule updates for all the laptops,mobiles, gaming consoles,etc. that your friend has...such that it runs when they usually play/work&lt;/p&gt;




&lt;p&gt;Setup malware on your friend's laptop, such that it will do a public livestream of all the google search and calculator entries that they make.&lt;/p&gt;




&lt;p&gt;To atone for all your sins , go to the house of some CodeNewbies and debug their codes when they sleep..mention clear changes to help them progress better.&lt;/p&gt;




&lt;p&gt;Attention Ghosts : this should not be taken as a literal reference guide. I'm not liable for any actions that y'all take now or in the future due to reading this.&lt;/p&gt;




&lt;p&gt;Disclaimer : if you do plan to commit the above crimes,please use my affiliate code 'meow' when you register at Hell&lt;/p&gt;




&lt;p&gt;Follow me on Twitter &lt;a href="//twitter.com/notAnotherVivek"&gt;@notAnotherVivek&lt;/a&gt; to learn more ways to ruin the life of others 😁😁&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How To Overcome The Fear Of Public Speaking</title>
      <dc:creator>vivek</dc:creator>
      <pubDate>Mon, 09 Aug 2021 08:01:30 +0000</pubDate>
      <link>https://dev.to/notanothervivek/how-to-overcome-the-fear-of-public-speaking-kd9</link>
      <guid>https://dev.to/notanothervivek/how-to-overcome-the-fear-of-public-speaking-kd9</guid>
      <description>&lt;p&gt;The main fear that people have while public speaking is the "fear of judgement" when they speak, and not the inabilty or incompetence for speaking. We fear being perceived as inferior or foolish. Tackling this fear is our main challenge.&lt;/p&gt;

&lt;p&gt;Imagine you've seen a film with your friends &amp;amp; then start discussing it on the way back home. Each person may have a different opinion.Y'all share your feelings &amp;amp; experience. It's just an expression of your thoughts. You don't have to feel bad about it.&lt;/p&gt;

&lt;p&gt;Most of public speaking is similar.We are just conveying our thoughts in a friendly &amp;amp; understandable manner. You sre just navigating through your own mind &amp;amp; sharing it with others.They are free to accept or reject it. It doesn't have to feel like a personal insult.&lt;/p&gt;

&lt;p&gt;(Sidenote -Of course this isn't about ignoring opinions or criticism while forming your ideologies,beliefs &amp;amp; thoughts. This is pertaining only to basic public speaking &amp;amp; conversations that you have with peers ,  after you form your informed opinions &amp;amp; thoughts)&lt;/p&gt;




&lt;p&gt;Realize that others are not as bothered about you as you think.&lt;/p&gt;

&lt;p&gt;This is just a few minutes in the life of the listener..they will go on with other things in their life..even if you embarass yourself. &lt;br&gt;
If you keep fearing it, you'll just keep increasing the chances of a mistake.&lt;/p&gt;




&lt;p&gt;Being yourself is important. &lt;/p&gt;

&lt;p&gt;If you are trying to put on an act, it will get unnecessarily more difficult to focus on your actual task of giving the talk. Whether you are silly,strict,humorous or grumpy... just be you&lt;/p&gt;




&lt;p&gt;Knowledge helps to keep things flowing. &lt;/p&gt;

&lt;p&gt;You'll naturally be able to talk more confidently about a topic that you know well. Gathering information regularly &amp;amp; understanding your topic can help you steer the conversation back even if you stray away.&lt;/p&gt;

&lt;p&gt;This is applicable to both, one-sided talks &amp;amp; general discussions amongst peers. Staying updated on your niche/topic can help you search through info you already know,instead of analysing &amp;amp; figuring out stuff during the conversation&lt;/p&gt;




&lt;p&gt;Familiarity instills confidence&lt;/p&gt;

&lt;p&gt;If it is a pre-decided talk,then putting effort into practising often is essential. The more you repeat the same sequence of points, the more comfortable you'll get with it. This will translate into appearing confident about your content.&lt;/p&gt;

&lt;p&gt;But don't do so in a monotonous &amp;amp; mechanical manner. Talking to yourself, friends you are comfortale with ,recording selfies,etc. can help you reinforce the info &amp;amp; let you evaluate the places that you seem to be struggling with. It can also help you find your own natural style.&lt;/p&gt;




&lt;p&gt;Body language matters&lt;/p&gt;

&lt;p&gt;Sometimes appearing confident will actually trick you into feeling confident. Things like having proper posture,being well-groomed, having control over your body language, choosing an attire that is comfortable,etc. can portray yourself well&lt;/p&gt;




&lt;p&gt;If you feel really tensed about maintaining eye-contact with a crowd, here are 2 things you can try:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;glance at the forehead &amp;amp; above of the audience. It can make it seem to them like you are gently maintaining eye-contact,while avoiding the discomfort for you.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;have some friends sit at random places amongst the crowd &amp;amp; just look at them instead while you talk. Another option is to even find some objects in the venue that are at the same level as the audience, &amp;amp; look at them at times,in the general direction of the audience.&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;It's alright to pause. &lt;/p&gt;

&lt;p&gt;It is not a sign of ignorance. Pacing yourself aptly &amp;amp; giving small pauses can help you regain composure &amp;amp; also let your audience process the info better. You don't have to pressurize yourself into eliminating all pauses.&lt;/p&gt;




&lt;p&gt;Asking questions. &lt;/p&gt;

&lt;p&gt;If you feel you need a break to calm your nerves,then just drop a simple question to the audience. Ask if they have understood things so far. Or if anyone wants you to cover a previous topic again,etc. Anything that puts the focus onto others for a short span.&lt;/p&gt;

&lt;p&gt;Try to keep things simple. You can have notes with a short list of points. Then just explain them like a  normal conversation, and in your own words. Avoiding unnecessary jargon &amp;amp; narrating things in layman terms,can often be more relatable &amp;amp; make it easier on you.&lt;/p&gt;




&lt;p&gt;A good exercise is to try &amp;amp; turn simple everyday task into your own TED talk. Randomly start talking to yourself in the sower about the day you had, or to your pet while cooking. It can make your speech more fluent,&amp;amp; improve your ability to focus on your train of thought.&lt;/p&gt;




&lt;p&gt;I've had my own struggles with public speaking when i was young. The above points helped me overcome them. Just sharing them in the hopes that it can be helpful to others as well. &lt;/p&gt;

&lt;p&gt;Pls don't hesitate to send me a DM on Twitter ( &lt;a href="https://www.twitter.com/notAnotherVivek"&gt;@notAnotherVivek&lt;/a&gt; ) if you want any help regarding this. We can improve together.&lt;/p&gt;

</description>
      <category>publicspeaking</category>
      <category>softskills</category>
      <category>presentations</category>
      <category>fear</category>
    </item>
    <item>
      <title>DEBUGGING IN JAVASCRIPT - without fancy tools (for beginners or codeNewbies)</title>
      <dc:creator>vivek</dc:creator>
      <pubDate>Wed, 04 Aug 2021 21:26:31 +0000</pubDate>
      <link>https://dev.to/notanothervivek/debugging-in-javascript-without-fancy-tools-for-beginners-or-codenewbies-3nmi</link>
      <guid>https://dev.to/notanothervivek/debugging-in-javascript-without-fancy-tools-for-beginners-or-codenewbies-3nmi</guid>
      <description>&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%2Fyz7a5gjozzgnu0bj8xgf.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%2Fyz7a5gjozzgnu0bj8xgf.png" alt="DEBUGGING IN JAVASCRIPT - without fancy tools (for beginners/codeNewbies)"&gt;&lt;/a&gt;&lt;br&gt;
Debugging can often be one of the most frustrating parts of programming. But, it can also be the part that teaches you the most about your code , and the programming language.&lt;/p&gt;

&lt;p&gt;There are lots of dedicated tools &amp;amp; libraries for debugging, but often they can seem overwhelming, especially when you're a beginner. So, instead let's look at some reallyyyy basic ways to debug your javascript .&lt;/p&gt;
&lt;h1&gt;
  
  
  The main trick is to...wait for it.. &lt;code&gt;use console.log()&lt;/code&gt; and &lt;code&gt;comments&lt;/code&gt; for everything.
&lt;/h1&gt;

&lt;p&gt;I can already feel a grave being dug for my web developer credentials due to this suggestion 😁&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/13e1UmAEwdj7vG/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/13e1UmAEwdj7vG/giphy.gif" alt="grave being dug"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;But, i believe in the power of "Keeping Things Simple", especially while learning. So, i'm taking the risk of suggesting some absolutely basic steps in this post . &lt;/p&gt;



&lt;h1&gt;How and Where to use console.log()&lt;/h1&gt;

&lt;p&gt;As you probably already know, console.log() helps to display the variables and info that you pass to it. Console also has many other useful functions, but,for the sake of absolute simplicity, we'll restrict ourselves to just console.log()&lt;/p&gt;

&lt;h2&gt;using console.log() with a comma and not a +&lt;/h2&gt;

&lt;p&gt;Most often, we see console.log() being used with string concatenation style, or without any description.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;console.log(weird_cat_names)

console.log('value'+list_of_cringe_memories)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These 2 approaches are certainly valid, but they may cause errors when the data type is not a &lt;code&gt;string&lt;/code&gt;. For example, if you wanted to  console.log() a json response from some API, the above approach might show errors. &lt;/p&gt;

&lt;p&gt;One way to avoid such an issue is to use a &lt;code&gt;,&lt;/code&gt; before the variable.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;console.log('the api response = ',response_variable);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This makes the browser parse the variable aptly and provides much more information about the variable, which can ease the debugging process.&lt;/p&gt;

&lt;h2&gt;being descriptive&lt;/h2&gt;

&lt;p&gt;Just randomly passing variables to console.log() could end up making your code seem even more confusing, since you may get a lot of outputs but not know where it happened. &lt;/p&gt;

&lt;p&gt;To prevent this, try being really specific and add the name of the function, or what you are expecting to see in that line of code,etc.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;console.log('response value inside for loop, in make_money() function = ',response_variable);
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It can also help you get a better idea of the flow of your code. Since you may also be using some asynchronous functions in javascript (which can be really frustrating at the start) being able to see the order of functions being executed can help you detect issues faster (especially related to the functions being called in an order that you did not expect).&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/11Rm2wxPFKsqPu/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/11Rm2wxPFKsqPu/giphy.gif" alt="grave being dug"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;(FYI - i've written a blog post about promises and async-await functions of javascript, that's aimed at absolute beginners and explained in non-technical terms :  &lt;a href="https://notanothervivek.com/nodejs-and-javascript-for-beginners-understanding-promises-and-async-functions" rel="noopener noreferrer"&gt;Without any codes , let's Understand PROMISES and ASYNC functions in Nodejs / Javascript (for beginners)&lt;/a&gt;  . Hope you'll check it out as well )&lt;/p&gt;




&lt;h2&gt;adding console.log() at all major steps&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;as soon as a function starts, to know if it has received all the right input parameters&lt;/li&gt;
&lt;li&gt;before ending a function, to know if the function has processed things according to your plan and given the right output&lt;/li&gt;
&lt;li&gt;inside event listeners, to see if a particular event has been triggered or not&lt;/li&gt;
&lt;li&gt;after any manipulation of data ; like concatenating strings, adding numbers, parsing json, stringifying json/data , etc. &lt;/li&gt;
&lt;li&gt;when you get information from a 3rd party API or datbase&lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;some common types of errors to look out for&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;parsing errors&lt;/strong&gt;  : mostly due to a function expecting a specific &lt;code&gt;charset&lt;/code&gt; or &lt;code&gt;data type&lt;/code&gt;).&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;incorrect syntax&lt;/strong&gt;  : minor differences like typos or extra spaces can often be the only error in your code. It may seem like such errors may be highlighted by the IDE, but there may also be instances where the typo version is frustratingly similar to some other valid function/class/object, which makes the IDE ignore it as an error.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;variables being undefined&lt;/strong&gt; : variables that are not initialized or ones that are out of the present scope, may be undefined and cause your script to malfunction. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;functions being replaced&lt;/strong&gt; : while using plugins in your IDE, sometimes your functions may be replaced unintentionally by some other very similar function or class.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;memory leaks&lt;/strong&gt; : sometimes when a function or data type is given a lot of data without being cleared efficiently, it can slowly add up and create issues. This is often rare unless you are handling large objects or processing binary data. So i would recommenr to not go about prematurely optimizing,  unless it really seems to be a viable issue in your use-case. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;infinite loops&lt;/strong&gt; : an improperly used iterator, like &lt;code&gt;for&lt;/code&gt; or &lt;code&gt;while&lt;/code&gt;, can often make everything stuck, since it doesn't have a satisfactory/finite &lt;strong&gt;stop&lt;/strong&gt; condition. console.log() inside such iterators can help you easily detect if such an issue is there in your code .&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;function not getting triggered&lt;/strong&gt; : event listeners or 3rd party library functions may sometimes not be working, because they were not actually triggered by your code. &lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;permission errors&lt;/strong&gt; : while trying to get information from 3rd party sites, or even your own server, there may be permission errors that block the request, for security reasons.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;version mismatch&lt;/strong&gt; : different versions of libraries probably have minor changes that can cause conflicts with previously working codes. Using a different version can often solve some issues. &lt;/li&gt;
&lt;/ul&gt;




&lt;h2&gt;commenting,  instead of deleting code&lt;/h2&gt;

&lt;p&gt;One way to find the exact spot that may be causing an error, is to comment out most of the code and then run the script after uncommenting in small batches. This can give you an understanding of what parts are working well, and identify the exact function or line which seems to  be messing things up. &lt;/p&gt;

&lt;p&gt;Often we'll need to keep trying multiple options to get one function to work. Instead of deleting and re-writing things often, it can be helpful if we just comment out our trials that didn't work. Then you can delete them later on. This can help you keep track of the approaches that you've already tried, and also prevent accidentally deleting a line that was already working.&lt;/p&gt;




&lt;h3&gt;Bonus Tip&lt;/h3&gt;



&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const taco_type = ["soggy", "crunchy", "spicy"];
for (const the_choice of taco_type) { 
    console.log(the_choice); 
}
//when drunk &amp;amp; clueless, refer -&amp;gt; https://stackoverflow.com/questions/9329446/for-each-over-an-array-in-javascript
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In your learning phase, try to add comments with the specific link that helped you sort out some issue. This can not act as a life-saving reference when you look at some parts of your code after a few days and wonder what in the world you did. [Beleive me, i've been there more times than i can honorably admit]&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/13Qumr2SLqrl5e/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/13Qumr2SLqrl5e/giphy.gif" alt="grave being dug"&gt;&lt;/a&gt;&lt;/p&gt;




&lt;h2&gt;giving headlines to blocks of code&lt;/h2&gt;

&lt;p&gt;Adding extra comments to your codes can help in making your code less chaotic.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;// START OF HACKING HASHNODE
function start_hacking(is_movie){
   while(is_movie === true ){
            tippity_tappity();
            i_am_in();
     }//while..is_movie ..true
}//start hacking

function tippity_tappity(){

}//tippity_tappity()


function i_am_in(){
let do = "put on sunglasses";
console.log(do); 
}//i'm in

//END OF HACKING HASHNODE

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

&lt;/div&gt;



&lt;p&gt;Giving headlines to different sections can help you to identify which section you are looking at. Adding comments to the ends of functions and &lt;code&gt;}&lt;/code&gt; in general, can help to keep track of where functions or iterators end, and prevent accidentally deleting them or adding extra code in the wrong place. &lt;/p&gt;




&lt;h2&gt;Confession&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/4ZvxPywN6FB0BKIrmA/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/4ZvxPywN6FB0BKIrmA/giphy.gif" alt="grave being dug"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Before i end the post, i'll be the first to point out that all this info is probably a &lt;code&gt;stone-age type approach&lt;/code&gt; to debugging,and some may be very &lt;code&gt;captain obvious&lt;/code&gt; type info as well. But, i'm hoping that if it helps atleast one newbie developer,then it's worth writing the post. &lt;/p&gt;




&lt;h3&gt;THAT'S ALL DEV FAM 😃&lt;/h3&gt;

&lt;p&gt;Thanks again for taking out the time to read my post.&lt;/p&gt;

&lt;p&gt;Hope you'll follow me on  &lt;a href="https://www.twitter.com/notAnotherVivek" rel="noopener noreferrer"&gt;Twitter &lt;/a&gt; so that we can get to know each other, and grow together. Please feel free to DM me if you need any help with HTML,CSS,JS,NodeJS,MySQL,MongoDB or Redis while learning them. &lt;/p&gt;

&lt;p&gt;Wishing good things for you always.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>debugging</category>
      <category>codenewbie</category>
      <category>programming</category>
    </item>
    <item>
      <title>Understanding Async Await and Promises in Nodejs (Javascript) without any codes</title>
      <dc:creator>vivek</dc:creator>
      <pubDate>Mon, 26 Jul 2021 21:53:22 +0000</pubDate>
      <link>https://dev.to/notanothervivek/understanding-async-await-and-promises-in-nodejs-javascript-without-any-codes-28kd</link>
      <guid>https://dev.to/notanothervivek/understanding-async-await-and-promises-in-nodejs-javascript-without-any-codes-28kd</guid>
      <description>&lt;p&gt;Asynchronous functions and Promises in Nodejs (and javascript) are often a bit difficult for all of us to grasp when  we start out learning. Frankly, i still mess it up at times, inspite of using them often. There are already a lot of detailed 'technical' explanations for the concepts, and they are certainly an excellent resource to get a really good in-depth grasp of how everything works in Nodejs. But in this post i'll be trying &lt;strong&gt;to explain the basic idea behind the same concepts,  in a more 'casual' way&lt;/strong&gt;, similar to how i would have wanted it explained to myself while i was starting out to learn  programming. I'll &lt;strong&gt;not be using any actual lines of code&lt;/strong&gt;, and will instead try  to just explain the concept and flow &lt;strong&gt;in a "non-technical" or simple manner&lt;/strong&gt;.  &lt;/p&gt;

&lt;p&gt;The only things you need to know about as a prerequisite :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Tacos &lt;/li&gt;
&lt;li&gt;Pizza&lt;/li&gt;
&lt;li&gt;Fishbowl&lt;/li&gt;
&lt;li&gt;Some really basic Javascript (what is a js function, and how to invoke it)&lt;/li&gt;
&lt;li&gt;I love cats (not really relevant to anything here,  but just letting you know that since we are practically friends now, i would appreciate receiving pics of your pet cats 😄 ) &lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  INTRODUCING THE NODEJS EVENT LOOP
&lt;/h2&gt;

&lt;p&gt;Nodejs has a main '&lt;strong&gt;controller&lt;/strong&gt;' or 'processor' (a single thread..could be called the nodejs event loop) which actually goes about doing all the work. It works by maintaining a to-do 'list' of 'items', which we shall call the '&lt;strong&gt;tick list&lt;/strong&gt;' (the items could vaguely be called 'ticks' ,like the ticks of the seconds-hand of a clock...the needle keeps on ticking/moving to the next step). Since we have only one controller which basically goes about running all the main functions that we ask it to run, if we keep the controller stuck for a long time on  completing one specific step/function , it will not be able to handle anything else. This is called &lt;strong&gt;'blocking' the event loop&lt;/strong&gt;. Our aim is ,to try and let the controller keep moving between tasks , without being stuck on one for long. We help the controller do so by using '&lt;strong&gt;Promises&lt;/strong&gt;'.   &lt;/p&gt;

&lt;h2&gt;
  
  
  STORY TIME
&lt;/h2&gt;

&lt;p&gt;To try and understand the basic flow of how Nodejs handles functions, let's take a short story as an example. Assume you are at a restaurant and have a plate of food comprising french fries 🍟, a burger 🍔, tacos 🌮 and a slice of pizza 🍕 (like a really tasty one, not the pineapple on pizza kind..but if you really like those, i won't judge you, i'll just give you an awkward look 😁 ).&lt;/p&gt;

&lt;h3&gt;
  
  
  ASYNCHRONOUS
&lt;/h3&gt;

&lt;p&gt;You start by eating some fries, then take a bite from the pizza slice and also stuff some tacos anytime your mouth is not already chewing. Each mouthful is a different dish. In between, you have a craving for some donuts and call the waiter over and tell him your  order. While he goes to get your donuts, you continue eating your food. When the donuts are ready, you receive them and immediately dig into them , along with all the other food.&lt;/p&gt;

&lt;h3&gt;
  
  
  SYNCHRONOUS
&lt;/h3&gt;

&lt;p&gt;You start by eating your french fries, but don't move to any other food until you finish all your fries.You make a continuous chain of fries go into your mouth. Then you move to the pizza slice and don't eat anything else until it is over. Now you call the waiter and tell you want donuts. The waiter goes to get them, but you don't eat anything when the waiter goes to the kitchen. You just sit and stare blankly , wondering why you are burying your sorrows with so much junk food. The waiter takes his own sweet time and finally arrives with the donuts, releasing you from your thoughts of existential crisis. You continue eating food only after that.&lt;/p&gt;

&lt;h2&gt;
  
  
  HOW THE STORY RELATES TO NODEJS
&lt;/h2&gt;

&lt;p&gt;In this analogy, &lt;code&gt;you&lt;/code&gt; are the &lt;code&gt;main controller&lt;/code&gt; , each type of &lt;code&gt;food&lt;/code&gt; is a different &lt;code&gt;function&lt;/code&gt; and the &lt;code&gt;waiter&lt;/code&gt; is a &lt;code&gt;3rd party API&lt;/code&gt; call or a &lt;code&gt;database&lt;/code&gt; process. In asynchronous code, the controller keeps moving to the next possible step to execute, anytime it is free. Like if you have 2 bites from the pizza slice, and then have some tacos, then get back &amp;amp; continue the pizza where you left off. The eating of tacos does not need the whole pizza to be over, it just needs your mouth to have a  pause in between eating pizza.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/l2JI0ZqziioxYFNEQ/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/l2JI0ZqziioxYFNEQ/giphy.gif" alt="Tacos make me happy"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now you must be thinking : i really crave some Tacos, wonder if that place at the corner of the street would be open now 🤔 . Also, you probably have a few questions about Nodejs like :&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;What are promises in Nodejs ? &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How does Nodejs handle so  many concurrent requests ? &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How to avoid blocking the event loop in  Nodejs ?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How to make Nodejs functions non-blocking ? &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How to use async and await in Nodejs ?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;How to run cpu-intensive functions in  Nodejs ?&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Why did the chicken cross the road? to fulfill a nodejs promise..wait..sorry that one doesn't belong here..oops..getting back to our topic &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  What are Promises in Node.js ?
&lt;/h2&gt;

&lt;p&gt;Promises are like their name suggests, similar to a promise that you give a friend. Promises in Nodejs are like an I.O.U slip that a function gives back immediately when it is called. The controller just keeps the slip and then goes onto processing other functions. Later on, the function gets back to the controller and replaces the I.O.U with the actual status of it's task, which could either be a success or a failure. &lt;/p&gt;

&lt;h2&gt;
  
  
  STORY TIME AGAIN
&lt;/h2&gt;

&lt;p&gt;Let's look at another example to get a better understanding of the basic concept of promises in  Nodejs. Suppose your friend gives you a fishbowl to clean the water. You get it and 'promise' your friend that you will clean it and give it back to them. Your friend goes on doing other things , while you are cleaning the fish bowl. Now, after a while there are 2 possible outcomes&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;you clean the fishbowl as expected&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;maybe some problem (error) occurs, and you are not able to complete the cleaning...let's assume the bowl broke.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;So, either when you complete the cleaning, or when the bowl breaks, your work related to the fishbowl is technically over, so you inform your friend that it was cleaned (your promise was resolved/fulfilled) or that the bowl broke (your promise is rejected or not fulfilled). &lt;/p&gt;

&lt;p&gt;Basically, you have given an update regarding the previous promise that you had given your friend. Now, your friend can  decide what to do next with that information : accept the cleaned bowl and do something, or analyse the broken bowl and decide to buy a new one.  &lt;/p&gt;

&lt;p&gt;In this analogy, your &lt;code&gt;friend&lt;/code&gt; is the &lt;code&gt;main controller&lt;/code&gt; and &lt;code&gt;you&lt;/code&gt; are the &lt;code&gt;function&lt;/code&gt; that is called which returns a '&lt;strong&gt;promise&lt;/strong&gt;'. The controller just holds onto the promise and then goes about doing other tasks. It comes back to the promise when it gets a response regarding the status of the promise : resolved or rejected. This status update is referred to as the &lt;strong&gt;promise getting 'settled'&lt;/strong&gt;. &lt;/p&gt;

&lt;p&gt;The controller then sees what we have asked it to do (to decide what function it needs to run next) , to handle the data set returned , or the error message. While coding, we define the '&lt;strong&gt;next steps&lt;/strong&gt;' based on the response of the promise. So from the controller's point of view, initially the function that returns the promise is added as an 'item' in it's &lt;em&gt;tick list&lt;/em&gt;. It immediately gets a 'promise' as a response, and then moves onto whatever item is next in it's &lt;em&gt;tick list&lt;/em&gt;. &lt;/p&gt;

&lt;p&gt;When the promise gets resolved/rejected , it is added as an item in  the &lt;em&gt;tick list&lt;/em&gt; and then the controller checks what we have instructed it to do. This basically keeps continuing.  Even when to us it may seem like the requests are reaching Nodejs at the exact same time, most  often there will  be a difference of a few milliseconds between them, and one request gets added to the &lt;em&gt;tick list&lt;/em&gt; after the other. So your Nodejs program is able to handle a large number of concurrent requests easily.&lt;/p&gt;

&lt;p&gt;Your aim while writing codes in Nodejs, is to reduce the main controller being stuck doing some single work for a long time. Such long processes should ideally be handled by some other service like a database, separate server, 3rd party ,etc. or else, you can create '&lt;strong&gt;workers&lt;/strong&gt;' . Workers are like mini-main-controllers. Your main controller can push tasks that need intensive processing to such worker threads and continue handling other tasks. The worker and the main controller are able to communicate with each other through a few limited means, and they can use it to pass data between them. &lt;/p&gt;

&lt;p&gt;[*sidenote :  It's not that the main controller cannot handle intensive processing. It's just that if your website or app is being used by mutliple people at once, then the main controller will be stuck on one request for too long and hence unable to process anything else. This will make the server unresponsive to further requests. But, if you  wanted to make some cpu-intensive program for your own personal use, you can still easily do it in Nodejs , since in that case you are willing to wait for the long processes to  complete and know that you won't be making any new requests while the main controller is already busy. *]&lt;/p&gt;

&lt;p&gt;Two common ways in which promises are handled in Nodejs are via  : &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;then / catch&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;async await&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  THEN() , CATCH() in Nodejs
&lt;/h2&gt;

&lt;p&gt;In Nodejs, one way to handle promises and specify what steps needs to be done next, is by using '&lt;strong&gt;.then()&lt;/strong&gt;' and '&lt;strong&gt;.catch()&lt;/strong&gt;'. &lt;strong&gt;then()&lt;/strong&gt; is used to tell what needs to be done when the promise is resolved, and &lt;strong&gt;catch()&lt;/strong&gt; is used to specify what should happen when a promise is rejected. It is used to instruct the controller on what it needs to do next, once the promise is settled. It is almost like an if-else condition that we are using to tell the controller exactly what it needs to do next, based on the promise's outcome. &lt;/p&gt;

&lt;h2&gt;
  
  
  STORY TIME YET AGAIN
&lt;/h2&gt;

&lt;p&gt;We could think of it like a set of inter-dependant tasks you are assigning to your friends while you are planning for a party. One day you think you should have a mini-party and call your friends :  &lt;a href="https://twitter.com/csaba_kissi"&gt;Csaba&lt;/a&gt; , &lt;a href="https://twitter.com/darkgaro"&gt;Faruk&lt;/a&gt; and  &lt;a href="https://twitter.com/RickHunter7"&gt;Alberto &lt;/a&gt; , who agree to make an awesome cake. The plan is : Faruk makes the batter , Alberto bakes it and Csaba decorates it.  &lt;/p&gt;

&lt;p&gt;Now, in this analogy you are the 'spirit' that posesses each friend and makes them do the works...yeah..that's just a bit too weird ain't it...hmm...well,maybe we could also consider it as you are the **Ratatouille **that gets each person to do the work they are supposed to...yeah, That's much better.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://i.giphy.com/media/cJeMxgn9kUIG4/giphy.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://i.giphy.com/media/cJeMxgn9kUIG4/giphy.gif" alt="Ratatouille in control"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now if everyone did all the work simultaneously, nothing would get done. You are after all just one rat, however talented you are, and can't be everywhere at once. So while, you are making Faruk prepare the batter, Alberto and Csaba are free, since they technically can't start their work without Faruk passing the batter. As soon as Faruk makes the batter, you switch to controlling Alberto and receive the batter and keep it in the oven. &lt;/p&gt;

&lt;p&gt;This is like the controller was told to wait for the promise of the batter, and '&lt;strong&gt;then&lt;/strong&gt;' since it was successful, it went to the next step we have told it to do, which is baking.     &lt;/p&gt;

&lt;p&gt;Now,there are two possible outcomes here as well :&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;the cake is baked perfectly and Alberto takes it out&lt;/li&gt;
&lt;li&gt;the cake gets burnt , and the cake plan needs to get discarded or re-done&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;If the cake ends up being perfect, it is passed to Csaba, and '&lt;strong&gt;then&lt;/strong&gt;' he decorates it marvellously. But, if the cake ends up getting burnt, we can't give it to Csaba and instead we make Alberto put it in  the garbage bin , similar to an error being caught by using &lt;strong&gt;.catch()&lt;/strong&gt;. &lt;/p&gt;

&lt;h2&gt;
  
  
  ASYNC and AWAIT in Nodejs
&lt;/h2&gt;

&lt;p&gt;This is generally the most preferred method for handling promises since it is easier to understand and simpler to code. The word '&lt;strong&gt;async&lt;/strong&gt;' is added before the definition of the function , and is used to denote that the function returns a 'promise'. The 'await' keyword can be used only inside functions which have been tagged with the '&lt;strong&gt;async&lt;/strong&gt;' keyword. Adding 'await' before a function call , indicates that a promise is expected to be returned , and that the controller can make a note of it and move onto other tasks, then return once the promise is settled. (It kinda tells the controller to wait for the promise to be completed before proceeding to the next line of code) . This is especially useful when the results returned by the awaited function are needed in the lines that follow. &lt;/p&gt;

&lt;p&gt;When the controller sees that a function is '&lt;strong&gt;awaited&lt;/strong&gt;' ,it makes a note of the promise and then goes to perform the next item in it's &lt;strong&gt;tick list&lt;/strong&gt;. Once, the previously awaited promise is &lt;strong&gt;settled&lt;/strong&gt;, the controller comes back to that line and then continues processing the next steps based on whether the promise was resolved or rejected. This helps us to have more control on the sequence of the functions that need to be performed, without needing to necessarily create a chain of .then() functions. &lt;/p&gt;

&lt;p&gt;Just adding the word '&lt;strong&gt;await&lt;/strong&gt;' will not automatically make a function asynchronous. We need to make sure that the function itself is one that returns a promise and is asynchronous. Many functions in Nodejs have an 'async' version and a 'sync' version. So, choosing the async version specifically in such cases will naturally help us.   &lt;/p&gt;

&lt;p&gt;Some functions like json.parse and json.stringify make the  controller stuck until their processing is over. So if we have a large json object that needs to be parsed/stringified, it would make the controller unable to handle any other requests until it is over. &lt;/p&gt;

&lt;p&gt;Since we generally may be using only relatively small json objects at a time, processing it may not necessarily be a noticeable block of the event loop. But, depending on your use-case you may need some non-blocking option for it. This is where the concept of '&lt;strong&gt;streaming&lt;/strong&gt;' comes to our rescue. Here, kinda similar to how we stream videos on  Netflix or Youtube, we get the actual data in smaller chunks. We also often use '&lt;strong&gt;Buffer&lt;/strong&gt;' for this purpose which act like temporary storages for the chunk and then pass the info. &lt;/p&gt;

&lt;p&gt;So , for example, if we have about 1000 parameters in our large json object, instead of the controller being forced to process the whole 1000, the controller is allowed to have small breaks in  between, like maybe once every 100 parameters are processed. This break lets the controller to be free to handle any other requests while also being able to get back and process the next 100 parameters of the json object. &lt;/p&gt;

&lt;p&gt;This streaming of data concept is also useful  in situations where we need to manipulate or process large data sets from a database or 3rd party REST API , etc. If for example, we wanted to process a million  rows of data, handling it all at once would obviously seem like a bad idea. So , instead the data is streamed from the database to the controller in small chunks, which again allows the controller to process any other requests, while also making  progress in analysing the database rows. &lt;/p&gt;

&lt;h2&gt;
  
  
  WHAT DID WE LEARN
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;our aim while coding should be to avoid blocking the event loop&lt;/li&gt;
&lt;li&gt;async/await is a great way  to use promises&lt;/li&gt;
&lt;li&gt;breaking functions into individual tasks could help to avoid  blocking&lt;/li&gt;
&lt;li&gt;splitting data into chunks/streams is better when heavy processing is needed&lt;/li&gt;
&lt;li&gt;i really need to improve my writing skills...well, that's more of a learning for me than you..but still  😁&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  THAT'S ALL DEV FAM 😃
&lt;/h2&gt;

&lt;p&gt;If you've read till here, then I want you to know that i'm grateful that you took the time to do so and proud of your willingness to read new resources while learning. &lt;/p&gt;

&lt;h3&gt;
  
  
  Kudos dear reader.
&lt;/h3&gt;

&lt;p&gt;I hope i was able to atleast clear out some concepts related to asynchronouse functions and promises in Nodejs. (and really reallyyyyy hope i didn't make things worse for you)&lt;/p&gt;

&lt;p&gt;** Hope you'll follow me on  &lt;a href="https://www.twitter.com/notAnotherVivek"&gt;Twitter&lt;/a&gt; so that we can get to know each other , and grow together. **&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--PpvPPyEC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1627311578394/J0UUmJi9B.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--PpvPPyEC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://cdn.hashnode.com/res/hashnode/image/upload/v1627311578394/J0UUmJi9B.jpeg" alt="20210726_201204.jpg"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thanks again for taking out the time to read my post. &lt;/p&gt;

&lt;p&gt;Wishing good things for you always.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
