<?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: Ori Volfovitch</title>
    <description>The latest articles on DEV Community by Ori Volfovitch (@orivolfo).</description>
    <link>https://dev.to/orivolfo</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%2F187685%2Fff3fb41e-1f2c-420d-87ec-492ae7e79ab2.png</url>
      <title>DEV Community: Ori Volfovitch</title>
      <link>https://dev.to/orivolfo</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/orivolfo"/>
    <language>en</language>
    <item>
      <title>All (or just most) of what you need to know about handling Promises</title>
      <dc:creator>Ori Volfovitch</dc:creator>
      <pubDate>Sun, 06 Oct 2019 09:06:05 +0000</pubDate>
      <link>https://dev.to/orivolfo/all-or-just-most-of-what-you-need-to-know-about-handling-promises-59eh</link>
      <guid>https://dev.to/orivolfo/all-or-just-most-of-what-you-need-to-know-about-handling-promises-59eh</guid>
      <description>&lt;p&gt;I Don't use Promises on a daily basis. But when I do, all I need is a simple usage example of how to handle them. What I find instead are over complex examples, many articles about &lt;em&gt;async programming&lt;/em&gt; and the &lt;em&gt;theory&lt;/em&gt; behind Promises in JavaScript.&lt;br&gt;
I end up re-learning Promises for a few minutes to realize that in most cases there are only 2 - 3 main ways I actually handle the Promises.&lt;/p&gt;

&lt;p&gt;So, I made a &lt;a href="https://github.com/ori-volfo/promise-sandbox"&gt;Github repository called "Promise Sandbox"&lt;/a&gt; with the 3 main usages that I need, and made sure that the code will be as short and as simple as possible.&lt;br&gt;
In this example, I only execute 2 Promises. A long one and a short one.&lt;br&gt;
You can add more but it will only make the code longer and more complex, and it will not get you any more insights.&lt;/p&gt;

&lt;p&gt;Let's dive straight into code!&lt;/p&gt;
&lt;h2&gt;
  
  
  Promise execution
&lt;/h2&gt;

&lt;p&gt;So, I am executing 2 simple Promises here. currently set to resolve (you can flip the annotations if you would like them to be rejected).&lt;br&gt;
longPromise - set to be resolved after 10 seconds.&lt;br&gt;
shortPromise - set to be resolved after 2 seconds.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;longPromise&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;reject&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;setTimeout&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nx"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;longPromise resolved&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
            &lt;span class="c1"&gt;// reject('longPromise rejected');&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="mi"&gt;10000&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="kd"&gt;var&lt;/span&gt; &lt;span class="nx"&gt;shortPromise&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;reject&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;setTimeout&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
            &lt;span class="nx"&gt;resolve&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;shortPromise resolved&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
            &lt;span class="c1"&gt;// reject('shortPromise rejected');&lt;/span&gt;
        &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="mi"&gt;2000&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
    &lt;span class="p"&gt;})&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h2&gt;
  
  
  Handling Options
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Classic chaining
&lt;/h3&gt;

&lt;p&gt;The good old way to handle Promises.&lt;br&gt;
This is a shortcut to find yourself in &lt;em&gt;callback hell&lt;/em&gt;.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;longPromise&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;then&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// logs: longPromise resolved&lt;/span&gt;
        &lt;span class="nx"&gt;shortPromise&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
            &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;then&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// logs: shortPromise resolved&lt;/span&gt;
            &lt;span class="p"&gt;})&lt;/span&gt;
            &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;catch&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
                &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// logs: shortPromise rejected&lt;/span&gt;
            &lt;span class="p"&gt;})&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;catch&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// logs: longPromise rejected&lt;/span&gt;

        &lt;span class="c1"&gt;// shortPromise is unhandled in case longPromise was rejected&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h4&gt;
  
  
  Edited:
&lt;/h4&gt;

&lt;p&gt;As bloggers &lt;a href="https://dev.to/karataev"&gt;Eugene Karataev&lt;/a&gt; and &lt;a href="https://dev.to/joetex"&gt;Joel Ruiz&lt;/a&gt; suggested, we can dodge callback hell simply by &lt;strong&gt;returning&lt;/strong&gt; the following Promise, instead of just calling it.&lt;br&gt;
This will flatten our nesting and make the code much more readable:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;longPromise&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;then&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// logs: longPromise resolved&lt;/span&gt;
        &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;shortPromise&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="p"&gt;})&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;then&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="c1"&gt;// logs: shortPromise resolved&lt;/span&gt;
    &lt;span class="p"&gt;})&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="k"&gt;catch&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
        &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;error&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// One catch to reject them all!&lt;/span&gt;
    &lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  Promise all
&lt;/h3&gt;

&lt;p&gt;Batching all promises into an array. Handling &lt;strong&gt;all at once&lt;/strong&gt;. &lt;br&gt;
If you are using &lt;em&gt;Node&lt;/em&gt;, i suggest you &lt;code&gt;JSON.stringify&lt;/code&gt; the logged data.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nb"&gt;Promise&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;all&lt;/span&gt;&lt;span class="p"&gt;([&lt;/span&gt;&lt;span class="nx"&gt;longPromise&lt;/span&gt;&lt;span class="p"&gt;(),&lt;/span&gt; &lt;span class="nx"&gt;shortPromise&lt;/span&gt;&lt;span class="p"&gt;()]).&lt;/span&gt;&lt;span class="nx"&gt;then&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;function&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;data&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;});&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;h3&gt;
  
  
  Async await (Thank you ES6!)
&lt;/h3&gt;

&lt;p&gt;Or actually ES8, to be more accurate.&lt;br&gt;
If you don't want to deal with the async quirks of JS, let the new &lt;em&gt;async-await&lt;/em&gt; functionality to take care of it. make sure you wrap your &lt;strong&gt;await&lt;/strong&gt;s in an &lt;strong&gt;async&lt;/strong&gt; function.&lt;br&gt;
In this example, i made the async function to be an &lt;a href="https://developer.mozilla.org/en-US/docs/Glossary/IIFE"&gt;IIFE&lt;/a&gt; to make sure that it invokes Immediately.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;async&lt;/span&gt; &lt;span class="p"&gt;()&lt;/span&gt;&lt;span class="o"&gt;=&amp;gt;&lt;/span&gt;&lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;long&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;longPromise&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;short&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;await&lt;/span&gt; &lt;span class="nx"&gt;shortPromise&lt;/span&gt;&lt;span class="p"&gt;();&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;long&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;   &lt;span class="c1"&gt;// logs: longPromise resolved&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;short&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;  &lt;span class="c1"&gt;// logs: shortPromise resolved&lt;/span&gt;
&lt;span class="p"&gt;})();&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;This should work fine on any browser (Except IE. IE is not a browser!).&lt;/p&gt;

&lt;h2&gt;
  
  
  All the rest that was not mentioned
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;If you don't care whether the promise is resolved or reject, when handling a single promise use &lt;code&gt;.finally()&lt;/code&gt; instead of &lt;code&gt;.then()&lt;/code&gt; and/or &lt;code&gt;.catch()&lt;/code&gt;.&lt;/li&gt;
&lt;li&gt; In addition to &lt;code&gt;Promise.all()&lt;/code&gt; you also have &lt;code&gt;Promise.race()&lt;/code&gt; which is like &lt;code&gt;Promise.all()&lt;/code&gt;, but will be invoked once the first promise is fulfilled.&lt;/li&gt;
&lt;li&gt;There is also the &lt;code&gt;Promise.allSettled()&lt;/code&gt; which is still new, and not yet supported by most browsers and Node below version 12.9.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>promise</category>
      <category>javascript</category>
      <category>async</category>
      <category>explainlikeimfive</category>
    </item>
    <item>
      <title>Entering a new developer’s position: how to do it right?
</title>
      <dc:creator>Ori Volfovitch</dc:creator>
      <pubDate>Thu, 03 Oct 2019 06:04:39 +0000</pubDate>
      <link>https://dev.to/orivolfo/entering-a-new-developer-s-position-how-to-do-it-right-il6</link>
      <guid>https://dev.to/orivolfo/entering-a-new-developer-s-position-how-to-do-it-right-il6</guid>
      <description>&lt;h1&gt;
  
  
  A developer's roadmap to a new job
&lt;/h1&gt;

&lt;p&gt;Entering a new job, any job, is exciting. It could be a positive or a negative experience, depending on your personality, dynamics with the new colleagues, understanding your new responsibilities and many other factors.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;TL;DR – Try the pro-active approach. &lt;br&gt;
Integration is faster for those who take initiative.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;As a developer you also have the pressure to learn the product quickly, and know your whereabouts in the code, while learning your responsibilities.&lt;br&gt;
Your employer is aware that while he is paying you a salary (high salary, you are a developer!), it will take a while before you actually &lt;strong&gt;become productive and worth the pay you get&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;Your learning curve, and the time it will take you to become lucrative for the company, is crucial to your success in this company. Being an easy adapter can never be underestimated, and whether you are a good coder and an experienced developer, this skill is not granted.&lt;/p&gt;

&lt;p&gt;Your team leader will probably have an agenda ready for your first week, or so. If he made plans for you, that’s great! follow them. But, I would suggest to go for the &lt;strong&gt;pro-active approach&lt;/strong&gt; (with &lt;em&gt;no discrepancies to your team leader's agenda!&lt;/em&gt;). &lt;br&gt;
If you want to prove yourself to your team leader, teammates and yourself, here are the actions that will help you fit in and deliver quickly:&lt;/p&gt;
&lt;h2&gt;
  
  
  Getting to know the colleagues and your interactions with them
&lt;/h2&gt;

&lt;p&gt;On the first day, you are not going to write any code. In fact, it might take a few days. Developer’s mistakes are very expensive, and we don’t want to make any of those! We have to make sure we know what we are doing.&lt;br&gt;
What you should do on your first days, is schedule 1 on 1 meetings with your new colleagues.&lt;br&gt;
First and most important is to meet with you team leader and teammates. On that, I will expand in the next paragraph. But to get the bigger picture, you must go through a few more work mates.&lt;/p&gt;

&lt;p&gt;Start the meetings with a short small talk to make the meeting pleasant and make a good first impression. Questions like - how long have they been working for this company, and how do they feel about it. Just to make the conversation flow. &lt;br&gt;
Before asking any professional questions, let them lead the conversation and let them have their own take on your job and responsibilities. They might add important issues that you haven’t thought of. Then, make sure you went over these topics according to your colleague’s position: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Project manager - work flow (Scrum, Agile, Kanban), project management technologies (like Jira, TFS, etc…) and how to use them, who assigns you with tasks and bugs, who gives time estimations, who prioritizes your tasks. If there is no project manager in your team, the responsibilities are split between your team leader and product manager.&lt;/li&gt;
&lt;li&gt;Product manager – The product (past, present and future plans), monetization (or better – how does the $money$ get in?), product pitfalls and work flow.&lt;/li&gt;
&lt;li&gt;QA engineer – work flow and pitfalls.&lt;/li&gt;
&lt;li&gt;CTO / R&amp;amp;D / Tech lead / any high ranking superior – the product, responsibilities, pitfalls, present and future challenges. Expectations.&lt;/li&gt;
&lt;li&gt;Team leader – this is your direct superior. It will take more than just one meeting, and this is crucial to your success, thus, I will expand more about this in the next step.&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Getting to know the team and work environment
&lt;/h2&gt;

&lt;p&gt;First meeting with your TL, should start like the previous mentioned meetings (small talk, then let him lead). on your turn to ask questions, make sure you know the following:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Project architecture (there might be more then one project)&lt;/li&gt;
&lt;li&gt;Frameworks in use (Angular/Vue/React for frontend, any CMS  like Wordpress/ Drupal / SharePoint or MVC in the backend like Laravel/ Symphony / Springboot )&lt;/li&gt;
&lt;li&gt;source-code management (GIT, SVN, etc…)&lt;/li&gt;
&lt;li&gt;DB (MySQL , MongoDB, etc…)&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You can and you should do a retake on this meeting with your teammates.&lt;/p&gt;
&lt;h2&gt;
  
  
  Getting to know the technologies
&lt;/h2&gt;

&lt;p&gt;After talking to your TL, he might mention a technology you don’t know or don’t remember.&lt;br&gt;
It’s very important to stop at this point and take a few days to learn it, before diving in to the actual code. If you are using a technology like Laravel, or Wordpress, take at least 3 – 6 days to learn the basics. Get your hands dirty and build a mini site with minimal functionality according to the guides you found on the web.&lt;br&gt;
If it’s a frontend technology like React or Angular, take another 2 – 5 days to learn the basics and build a small project like a task manager. Again, try to apply the architecture you found in the web guides.&lt;/p&gt;
&lt;h2&gt;
  
  
  Getting to know the project architecture
&lt;/h2&gt;

&lt;p&gt;Once you have acquired basic skills in the framework technologies, it’s time to dive into the projects files. Ask your TL and teammates to describe the architecture, and if you notice any differences from what you know about these technologies (ergo, how should a Laravel or React project look like), confront them in a professional manner. Ask why was it done this way, and not that way.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Ask for a description of the &lt;strong&gt;work folders&lt;/strong&gt;. Approach this as if you are going into a library for the first time, and you are trying to learn its order.
If in a library you would have categories like: science fiction, adventures, comedy, miscellaneous and etc…, in a typical dev project you would have categories like: framework core files, templates, classes, UI functions, services, general files and etc...
You might also have files that are not where they belong, due to legacy issues.
Also, know the location of the configuration files. You hardly get to make any changes in them, but knowing their whereabouts is very important.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Objects &amp;amp; Classes&lt;/strong&gt; – it will probably take you more than a while to learn ALL the objects &amp;amp; classes, there would be only a few that you will make constant changes in them. Try to focus on them.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Routing&lt;/strong&gt; – how does it work? Very important to find your way around inside the project.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Plugins&lt;/strong&gt; - 3rd party software that you use in the project.&lt;/li&gt;
&lt;li&gt;Debug - Understand &lt;strong&gt;where does the code starts&lt;/strong&gt;. Get your hands dirty and start debugging. 
Have a look at the product, find something that catches your eye, and find it in the code. Make changes and revert.&lt;/li&gt;
&lt;/ol&gt;
&lt;h2&gt;
  
  
  Getting to know the coding style
&lt;/h2&gt;

&lt;p&gt;One might say this is part of the architecture. I would like to give it an extra attention, this is the bits and bytes of your team’s work;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Naming conventions - does the functions and variables use camel case or underscores? Do the functions name make sense to you?&lt;/li&gt;
&lt;li&gt;Design patterns  - getting to know the applied design patterns in the code. How are they applied? Are there any design patterns that you are not familiar with? Stop and learn them.&lt;/li&gt;
&lt;li&gt;Git messages convention.&lt;/li&gt;
&lt;li&gt;Documentation – hopefully for you, your new team documents the code. &lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Get your credentials
&lt;/h2&gt;

&lt;p&gt;Another reason that developer’s first days of work are slow is lack of credentials.&lt;br&gt;
Without them you will constantly get stuck. Make sure your TL and IT manager give you all the credentials you need: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Email&lt;/li&gt;
&lt;li&gt;Project management tool (Jira, TFS, etc…)&lt;/li&gt;
&lt;li&gt;Cloud, Servers, DB&lt;/li&gt;
&lt;li&gt;Server build tools&lt;/li&gt;
&lt;li&gt;Dashboards or CMS access&lt;/li&gt;
&lt;li&gt;Communication tools (Slack, Teams, etc…)&lt;/li&gt;
&lt;/ul&gt;
&lt;h2&gt;
  
  
  Getting your first task
&lt;/h2&gt;

&lt;p&gt;The moment you solve your first task is crucial for the primal impression you give your superiors. Push your team leader to have a “mini-task” ready for you, and try to solve on the first week.&lt;br&gt;
Just to get things going. &lt;em&gt;Don’t make the “ignition” a long tedious process&lt;/em&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  Summarize
&lt;/h2&gt;

&lt;p&gt;Sitting on the fence, waiting to become an active and productive team member is a bad practice. Push yourself and show initiative. If it brings you joy, you are definitely on the right track!&lt;br&gt;
Now, all that’s left is:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight"&gt;&lt;pre class="highlight plaintext"&gt;&lt;code&gt;worker = new Worker();
worker.init();  
&lt;/code&gt;&lt;/pre&gt;&lt;/div&gt;



&lt;p&gt;// Any comments? Please share!&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>career</category>
      <category>productivity</category>
      <category>howto</category>
    </item>
    <item>
      <title>Installing Xdebug on PHPStorm for dummies</title>
      <dc:creator>Ori Volfovitch</dc:creator>
      <pubDate>Sun, 15 Sep 2019 19:12:19 +0000</pubDate>
      <link>https://dev.to/orivolfo/installing-xdebug-on-phpstorm-for-dummies-4k8a</link>
      <guid>https://dev.to/orivolfo/installing-xdebug-on-phpstorm-for-dummies-4k8a</guid>
      <description>&lt;p&gt;When I was asked to install Xdebug on my environment at work, I found multiple guides on the web. None of them were exactly what I needed.&lt;br&gt;
At my workplace, we use &lt;em&gt;PHPStorm&lt;/em&gt; as an IDE, and our local environment is &lt;em&gt;Wamp&lt;/em&gt; (the headline says &lt;strong&gt;for dummies&lt;/strong&gt;).&lt;/p&gt;

&lt;p&gt;So, after scavenging information from multiple guides, I finally got it to work, and wrote it in a document for my teammates.&lt;/p&gt;

&lt;p&gt;Lucky for you, I like to share!&lt;/p&gt;

&lt;h2&gt;
  
  
  Step by step:
&lt;/h2&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Go to &lt;em&gt;php.ini&lt;/em&gt; file, make sure that &lt;strong&gt;xdebug.remote_enable = 1&lt;/strong&gt;.&lt;br&gt;
if you are not sure where is your &lt;em&gt;php.ini&lt;/em&gt; file is, and you are using Wamp, you have shortcut from your taskbar:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--TLBpmHYM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/5hog9bfsirmznk4iqpmf.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--TLBpmHYM--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/5hog9bfsirmznk4iqpmf.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;br&gt;
Then:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dfgOHViZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/0lwfw01361q4vherp31c.jpg" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dfgOHViZ--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/0lwfw01361q4vherp31c.jpg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;In PHPStorm, go to  &lt;strong&gt;File | Settings | Languages &amp;amp; Frameworks | PHP&lt;/strong&gt; and&lt;br&gt;
choose:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;PHP level =&amp;gt; 5.5 in my case. if you are not what is your PHP version, echo &lt;a href="https://www.php.net/manual/en/function.phpinfo.php"&gt;phpinfo()&lt;/a&gt;. &lt;/li&gt;
&lt;li&gt;CLI interpreter =&amp;gt; add a new interpreter from a Local
Path with the following definitions:
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--rcpul8pn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/hfe9lvke4zxfchof43cc.png" alt="Alt Text"&gt;
If you are using &lt;em&gt;Wamp&lt;/em&gt;, I assume you have that file in the Wamp folder like i did.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;In &lt;strong&gt;File | Settings | Languages &amp;amp; Frameworks | PHP | Debug&lt;/strong&gt;&lt;br&gt;
make sure the Xdebug definitions are as following:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--d73MOLSB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/rgab08yukzjoht2l488t.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--d73MOLSB--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/rgab08yukzjoht2l488t.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;Go to &lt;strong&gt;Run | Edit Configurations&lt;/strong&gt; and add a new &lt;em&gt;PHP Web Page&lt;/em&gt;&lt;br&gt;
configuration with the following definitions:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--pDQNBtlR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/nqq6t07vab89e9pv7cpn.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--pDQNBtlR--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/nqq6t07vab89e9pv7cpn.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;define a &lt;em&gt;localhost server&lt;/em&gt; if needed&lt;/li&gt;
&lt;li&gt;
&lt;em&gt;Start URL&lt;/em&gt; is the address of the page you would like to start the debugging.&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Go to &lt;strong&gt;Run | Web Server Debug Validation&lt;/strong&gt; and make sure the&lt;br&gt;
debugger is configured properly:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hhbIVPAh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/d69fvs22t2waf8jxvszk.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hhbIVPAh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/d69fvs22t2waf8jxvszk.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;
&lt;p&gt;And finally, start debugging:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Press the &lt;strong&gt;Start Listening for PHP Debug&lt;/strong&gt; Connections:
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--CbBghRVX--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/8m4vcqthqn01jlrdwi3o.png" alt="Alt Text"&gt;
&lt;/li&gt;
&lt;li&gt;Press the &lt;strong&gt;Debug&lt;/strong&gt; button, or &lt;strong&gt;Shift + F9&lt;/strong&gt;
&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--Npv8H-qo--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/07xhqotb86t3mvg7rgb3.png" alt="Alt Text"&gt;
&lt;/li&gt;
&lt;/ul&gt;
&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Happy Debugging!&lt;/p&gt;

</description>
      <category>php</category>
      <category>phpstorm</category>
      <category>xdebug</category>
      <category>wamp</category>
    </item>
  </channel>
</rss>
