<?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>Forem: Simon Egersand 🎈</title>
    <description>The latest articles on Forem by Simon Egersand 🎈 (@simeg).</description>
    <link>https://forem.com/simeg</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%2F426691%2F7abed5f9-2c78-4cf5-85c7-10eadacbb196.png</url>
      <title>Forem: Simon Egersand 🎈</title>
      <link>https://forem.com/simeg</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/simeg"/>
    <language>en</language>
    <item>
      <title>5 Tips to Write Clean Code in JavaScript</title>
      <dc:creator>Simon Egersand 🎈</dc:creator>
      <pubDate>Mon, 25 Jul 2022 13:32:23 +0000</pubDate>
      <link>https://forem.com/simeg/5-tips-to-write-clean-code-in-javascript-1h7b</link>
      <guid>https://forem.com/simeg/5-tips-to-write-clean-code-in-javascript-1h7b</guid>
      <description>&lt;p&gt;As you become more experienced with JavaScript there are tips and principles on how to write clean code that you should know.&lt;/p&gt;

&lt;p&gt;The craft of software engineering is a relatively new one. The craft of medicine has existed for thousands of years while software engineering has only been around since the beginning of the 1960s. &lt;strong&gt;We are all still learning how to write clean code.&lt;/strong&gt; There are some principles though that are widely accepted by the community as best practices.&lt;/p&gt;

&lt;p&gt;There are many principles for writing clean code, but I decided to focus on the five most important. These tips are recommendations and not strict rules. Practice these principles and your code will be cleaner!&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Clean Code Is Important
&lt;/h2&gt;

&lt;p&gt;As a beginner, your focus is not necessarily on writing clean code. Your focus should be on getting the code working and your tests passing. As you become more experienced you can start focusing on writing clean code.&lt;/p&gt;

&lt;p&gt;In this article, I define clean code as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Easy to read&lt;/li&gt;
&lt;li&gt;Easy to understand&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Clean code will help you get up-to-speed with and maintain a codebase. &lt;strong&gt;It's always worth the effort of making your code cleaner, even if it takes a longer time to write!&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Write Clean Code in JavaScript
&lt;/h2&gt;

&lt;p&gt;JavaScript, like any other language, has its special quirks. These tips are not necessarily limited to JavaScript and can be used for many other languages.&lt;/p&gt;

&lt;h3&gt;
  
  
  Extract Magic Numbers to Constants
&lt;/h3&gt;

&lt;p&gt;"Magic numbers" refer to numbers that are used directly in the code, without any context. They lack meaning and should be extracted to constants with a meaningful variable name. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bad:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;isOldEnough&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;person&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="c1"&gt;// What does 100 refer to? This is a so-called "magic number"&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;person&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getAge&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="mi"&gt;100&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;p&gt;&lt;strong&gt;Good:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;AGE_REQUIREMENT&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;100&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Now we know what 100 refers to&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;isOldEnough&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;person&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="nx"&gt;person&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getAge&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;=&lt;/span&gt; &lt;span class="nx"&gt;AGE_REQUIREMENT&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;
  
  
  Avoid Boolean Function Arguments
&lt;/h3&gt;

&lt;p&gt;Boolean function arguments are a typical "code smell" (breaking fundamental programming standards). &lt;strong&gt;This is because they lack meaning.&lt;/strong&gt; And it indicates that your function does more than one thing, which you should always avoid!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bad:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;validateCreature&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;creature&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;isHuman&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;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;isHuman&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&gt;// ...&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="c1"&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;p&gt;&lt;strong&gt;Good:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;validatePerson&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;person&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="c1"&gt;// ...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;validateCreature&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;creature&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="c1"&gt;// ...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Encapsulate Conditionals
&lt;/h3&gt;

&lt;p&gt;Long conditional statements are hard to read because you have to keep all of them in your head. By encapsulating them into a function or a variable your code will be easier to reason about. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bad:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;
  &lt;span class="nx"&gt;person&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getAge&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;
  &lt;span class="nx"&gt;person&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getName&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;simon&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;
  &lt;span class="nx"&gt;person&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getOrigin&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sweden&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// ...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Good:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;isSimon&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt;
  &lt;span class="nx"&gt;person&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getAge&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;
  &lt;span class="nx"&gt;person&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getName&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;simon&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;
  &lt;span class="nx"&gt;person&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getOrigin&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sweden&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;isSimon&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// ...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// OR use a function&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;isSimon&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;person&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="p"&gt;(&lt;/span&gt;
    &lt;span class="nx"&gt;person&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getAge&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="mi"&gt;30&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;
    &lt;span class="nx"&gt;person&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getName&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;simon&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt;
    &lt;span class="nx"&gt;person&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;getOrigin&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;sweden&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
  &lt;span class="p"&gt;);&lt;/span&gt;
&lt;span class="p"&gt;};&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;isSimon&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;person&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// ...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Avoid Negative Conditionals
&lt;/h3&gt;

&lt;p&gt;Negative conditionals ("double negation") add an extra condition to your brain when you're reading the code. You would not say "&lt;em&gt;I'm not not sleepy&lt;/em&gt;". You would say "&lt;em&gt;I'm sleepy&lt;/em&gt;". The same practice applies to code!&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bad:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;isCreatureNotHuman&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;creature&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="c1"&gt;// ...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="o"&gt;!&lt;/span&gt;&lt;span class="nx"&gt;isCreatureNotHuman&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;creature&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// ...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Good:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;isCreatureHuman&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;creature&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="c1"&gt;// ...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;isCreatureHuman&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;creature&lt;/span&gt;&lt;span class="p"&gt;))&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="c1"&gt;// ...&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  Don't Use If Statements
&lt;/h3&gt;

&lt;p&gt;This might sound crazy, but hear me out! If statements are easy to understand but do not scale. As soon as you have more than one or two if statements in the same function the code easily becomes hard to reason about.&lt;/p&gt;

&lt;p&gt;Instead, use a switch statement or, if possible, a data structure like Array, Set, or Map. &lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Bad:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;isMammal&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;creature&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;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;creature&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;human&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;creature&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;dog&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt; &lt;span class="k"&gt;else&lt;/span&gt; &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;creature&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;cat&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;
  &lt;span class="c1"&gt;// ...&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;false&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;p&gt;&lt;strong&gt;Good:&lt;/strong&gt;&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;isMammal&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;creature&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;switch&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;creature&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;human&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;dog&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="k"&gt;case&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;cat&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
    &lt;span class="c1"&gt;// ...&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;true&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
    &lt;span class="nl"&gt;default&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt;
      &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="kc"&gt;false&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="c1"&gt;// OR even better, use a data structure&lt;/span&gt;

&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;isMammal&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;creature&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;const&lt;/span&gt; &lt;span class="nx"&gt;mammals&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;human&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;dog&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;cat&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="cm"&gt;/* ... */&lt;/span&gt;&lt;span class="p"&gt;];&lt;/span&gt;
  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;mammals&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;includes&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;creature&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;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;These are my five most important principles for writing clean code in JavaScript. Practice makes perfect, and the same goes for writing code. If you already follow these principles today - keep it up! I'm sure you've practiced writing code a lot. If not - don't be discouraged! We all start somewhere 🙂&lt;/p&gt;

&lt;p&gt;To summarise:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Extract Magic Numbers to Constants&lt;/li&gt;
&lt;li&gt;Avoid Boolean Function Arguments&lt;/li&gt;
&lt;li&gt;Encapsulate Conditionals&lt;/li&gt;
&lt;li&gt;Avoid Negative Conditionals&lt;/li&gt;
&lt;li&gt;Don't Use If Statements&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Connect with me on &lt;a href="https://twitter.com/prplcode"&gt;Twitter&lt;/a&gt;, &lt;a href="https://linkedin.com/in/simeg"&gt;LinkedIn&lt;/a&gt;, or &lt;a href="https://github.com/simeg"&gt;GitHub&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>Write Git Commit Messages That Your Colleagues Will Love</title>
      <dc:creator>Simon Egersand 🎈</dc:creator>
      <pubDate>Fri, 01 Jul 2022 12:58:58 +0000</pubDate>
      <link>https://forem.com/simeg/write-git-commit-messages-that-your-colleagues-will-love-1757</link>
      <guid>https://forem.com/simeg/write-git-commit-messages-that-your-colleagues-will-love-1757</guid>
      <description>&lt;p&gt;Git commit messages are how we communicate to our future selves. They help you understand &lt;em&gt;why&lt;/em&gt; a certain line of code was added to the code base. That's why knowing how to write a good Git commit message is important.&lt;/p&gt;

&lt;p&gt;We've all been there; "&lt;em&gt;Git is confusing&lt;/em&gt;", "&lt;em&gt;Why can't I just push to the main branch?&lt;/em&gt;", "&lt;em&gt;No one will ever read this message&lt;/em&gt;". These thoughts are normal and most people that have learned Git can probably relate. You might not appreciate good commit messages until you work with a code base that's been around for years. Or when you return to an old project of yours.&lt;/p&gt;

&lt;p&gt;In this article, I'll show you how to write Git commit messages that you and your colleagues will love.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Git Commit Messages Are Important
&lt;/h2&gt;

&lt;p&gt;Have you opened up an old project and checked the commit messages with &lt;code&gt;git log&lt;/code&gt;? If not, I recommend you do that now. If they're not filled with "Fix styling" or "Add endpoint" then great job! If you're like the rest of us, read on 😄&lt;/p&gt;

&lt;p&gt;Or perhaps you joined a company with a code base that's been around for a few years. And you're trying to understand why some piece of code was added. Will you break anything if you change it? In this case, a good commit message is invaluable.&lt;/p&gt;

&lt;p&gt;Simply put, by writing good Git commit messages you are future-proofing yourself and your colleagues. And as developers, we are reading &lt;strong&gt;a lot&lt;/strong&gt; more code than writing it. &lt;/p&gt;

&lt;h3&gt;
  
  
  Reading vs. Writing Code
&lt;/h3&gt;

&lt;p&gt;Uncle Bob (&lt;em&gt;Robert C. Martin - author of popular programming books such as Clean Code&lt;/em&gt;) says&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;“Indeed, the ratio of time spent reading versus writing is well over 10 to 1. We are constantly reading old code as part of the effort to write new code. ...[Therefore,] making it easy to read makes it easier to write.” (&lt;a href="https://www.goodreads.com/quotes/835238-indeed-the-ratio-of-time-spent-reading-versus-writing-is"&gt;ref.&lt;/a&gt;)&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;At times, to understand the code you will also need to read the commit message. I hope that you now see that the effort of writing a good commit message is worth it!&lt;/p&gt;

&lt;h2&gt;
  
  
  How To Write Good Git Commit Messages
&lt;/h2&gt;

&lt;p&gt;Now that you're convinced that commit messages are important, let's look at how you can write them in a way that your colleagues will love!&lt;/p&gt;

&lt;p&gt;A commit message consists of two parts: the &lt;strong&gt;subject line&lt;/strong&gt; and &lt;strong&gt;the body&lt;/strong&gt;. Here's an example from the &lt;a href="https://github.com/bitcoin/bitcoin/commit/eb0b56b19017ab5c16c745e6da39c53126924ed6"&gt;bitcoin&lt;/a&gt; repo.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;commit eb0b56b19017ab5c16c745e6da39c53126924ed6
Author: Pieter Wuille &amp;lt;pieter.wuille@gmail.com&amp;gt;
Date:   Fri Aug 1 22:57:55 2014 +0200

   Simplify serialize.h's exception handling

   Remove the 'state' and 'exceptmask' from serialize.h's stream
   implementations, as well as related methods.
   ...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The first line is the subject and what follows after the new-line is the body.&lt;/p&gt;

&lt;h3&gt;
  
  
  Focus On The Why
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;This is the most important rule.&lt;/strong&gt; And it's also the most common mistake. Commit messages should explain &lt;em&gt;why&lt;/em&gt; the code was added, not &lt;em&gt;what&lt;/em&gt; was added. To see the &lt;em&gt;what&lt;/em&gt; I can just read the code. But to understand the &lt;em&gt;why&lt;/em&gt; I can only guess.&lt;/p&gt;

&lt;p&gt;Even if I'm the author of the code, I will eventually forget the &lt;em&gt;why&lt;/em&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Use Imperative Mood In The Subject Line
&lt;/h3&gt;

&lt;p&gt;&lt;em&gt;Imperative mood&lt;/em&gt; means "&lt;em&gt;used to demand or require that an action be performed&lt;/em&gt;". This is the mood Git uses by default, and so should you.&lt;/p&gt;

&lt;p&gt;For example, the &lt;code&gt;git revert&lt;/code&gt; command will create a so-called "revert commit" for you. This commit will have a subject line with an imperative mood - "Revert 'Add field to schema'".&lt;/p&gt;

&lt;p&gt;You can think about it that you are telling the system/app/etc. how to behave. This might be awkward at first but you'll get used to it.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Note: You can write in whatever mood you prefer for commit bodies.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Restrict Subject Line Length to 50 Characters
&lt;/h3&gt;

&lt;p&gt;Have you ever seen a commit message on GitHub that ends with &lt;code&gt;...&lt;/code&gt;? That's because GitHub truncates the subject line if it goes above 72 characters. The rest of the subject line moves to the commit body.&lt;/p&gt;

&lt;p&gt;50 characters is the recommendation by GitHub. The limit exists to make the commit more readable. And you're forced to explain your code changes in a concise and comprehensible way.&lt;/p&gt;

&lt;p&gt;If you're having problems explaining your code changes with 50 characters you might be committing too many changes at once. If this is the case, you should split the commit into multiple commits.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;These are the three most important rules to follow when writing Git commit messages. &lt;strong&gt;If you follow these rules your colleagues will quickly understand what the commit is about&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;To summarise:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Focus On The Why&lt;/li&gt;
&lt;li&gt;Use Imperative Mood In Subject Line&lt;/li&gt;
&lt;li&gt;Restrict Subject Line Length to 50 Characters&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;To learn more git commit best practices, check out &lt;a href="https://cbea.ms/git-commit/"&gt;this excellent blog post&lt;/a&gt;.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Connect with me on &lt;a href="https://twitter.com/prplcode"&gt;Twitter&lt;/a&gt;, &lt;a href="https://linkedin.com/in/simeg"&gt;LinkedIn&lt;/a&gt;, or &lt;a href="https://github.com/simeg"&gt;GitHub&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>git</category>
      <category>beginners</category>
    </item>
    <item>
      <title>6 Lessons Learned Maintaining a Popular Open-Source Project</title>
      <dc:creator>Simon Egersand 🎈</dc:creator>
      <pubDate>Wed, 08 Jun 2022 15:18:38 +0000</pubDate>
      <link>https://forem.com/simeg/6-lessons-learned-maintaining-a-popular-open-source-project-1fpg</link>
      <guid>https://forem.com/simeg/6-lessons-learned-maintaining-a-popular-open-source-project-1fpg</guid>
      <description>&lt;p&gt;Between 2016 and 2018 I maintained an open-source project with +800k downloads/month. I learned six invaluable lessons by doing this, and I will now share them with you.&lt;/p&gt;

&lt;h2&gt;
  
  
  How It All Started 🛫
&lt;/h2&gt;

&lt;p&gt;I joined Spotify in 2016 and my team needed a React date picker component. I searched GitHub and found many but eventually decided on one. I integrated it into our website and read the code and documentation. And I quickly realized there was room for improvement in this project. So I made a few PRs to add a code linter, some refactoring, and documentation improvements.&lt;/p&gt;

&lt;p&gt;The owner of the project was the one reviewing and approving my pull requests (PRs). And here's where I saw my opportunity! I e-mailed him and asked if he needed help maintaining the project, and he happily welcomed me to the team! &lt;em&gt;Wow!&lt;/em&gt; It felt like I had just joined a secret club! I had always wanted to maintain a popular open-source project, and it was exciting.&lt;/p&gt;

&lt;h2&gt;
  
  
  Maintaining an Open-Source Project 🛠
&lt;/h2&gt;

&lt;p&gt;I had never maintained an open-source project before so I didn't know what to expect! The project was popular and there were a bunch of unresolved issues and unmerged PRs. I started by resolving these and moved on to improving the code quality.&lt;/p&gt;

&lt;p&gt;Once I got to know the code base I made more significant improvements, changes to the API for example.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lessons Learned 👩‍🏫
&lt;/h2&gt;

&lt;p&gt;Two years and &lt;a href="https://github.com/arqex/react-datetime/commits?author=simeg"&gt;154 commits later&lt;/a&gt; and I learned a lot! Here are my six most valuable lessons.&lt;/p&gt;

&lt;h3&gt;
  
  
  People Are Bad at Reading Documentation 🗒
&lt;/h3&gt;

&lt;p&gt;I spent time writing documentation and improving the onboarding experience for the component. Still, I got questions that were answered in the documentation. It kept happening, and I would try to make the documentation more visible, but it didn't help. &lt;/p&gt;

&lt;p&gt;The habit of "&lt;em&gt;I can't make it immediately work, so I'm gonna ask!&lt;/em&gt;" is a bad one. As a software engineer, you will need to read documentation to learn and move forward. There won't always be someone to answer your question, and then what will you do?&lt;/p&gt;

&lt;h3&gt;
  
  
  Good Code Is Subjective 😋
&lt;/h3&gt;

&lt;p&gt;I was a junior engineer when I started maintaining this project. I thought I had things figured out, but oh boy was I wrong. I had the fortune of working with more experienced engineers on this project and I learned a lot. I was confident and thought "&lt;em&gt;This is how you write good code&lt;/em&gt;". And then someone would make a PR that would completely go against my beliefs, and I had to re-evaluate what good code looks like.&lt;/p&gt;

&lt;p&gt;Now as a senior engineer I see that good code is not always objective. Sure, we agree on some good practices. But there will always be someone that disagrees with you, and with good reasons!&lt;/p&gt;

&lt;h3&gt;
  
  
  Good Git Commit Messages Are Rare 🤔
&lt;/h3&gt;

&lt;p&gt;This is what surprised me the most about maintaining an open-source project. In an open-source world on GitHub using Git we have a limited space to communicate with our future selves. We should use that space wisely and by best effort try to be as clear as we can when writing commit messages.&lt;/p&gt;

&lt;p&gt;That's how I feel anyway, but most people don't seem to agree. I would see PRs without any description and a commit message saying "&lt;em&gt;Fix render bug&lt;/em&gt;". Not only is this a bad practice, but it also slows down the process of getting your PR merged.&lt;/p&gt;

&lt;h3&gt;
  
  
  Merging Someone Else’s PR Is a Great Feeling 😍
&lt;/h3&gt;

&lt;p&gt;If you ever contributed to an open-source project you know the feeling of getting your PR merged. It feels great! &lt;em&gt;I'm part of something bigger!&lt;/em&gt; And now I can tell you that it also feels great being the one to press the &lt;em&gt;Merge&lt;/em&gt; button. It's a win-win-win situation. The PR author, the maintainer, and the people using the project all win. &lt;/p&gt;

&lt;h3&gt;
  
  
  People Are Awesome! 🤩
&lt;/h3&gt;

&lt;p&gt;People take time out of their lives to contribute to a component used by people they don't know. This is what open-source is about, in my opinion. People coming together for the greater good. If you're not contributing to an open-source project today, give it a try. If you are, keep doing what you do, you are awesome ⭐️.&lt;/p&gt;

&lt;h3&gt;
  
  
  It’s Fun but Can Get Exhausting 😰
&lt;/h3&gt;

&lt;p&gt;I had fun maintaining the project, but no matter how much time I spent fixing bugs there would always be new ones. The component was more complex than I first thought. At times there seemed like there was a never-ending stream of new issues being created.&lt;/p&gt;

&lt;p&gt;It was basically me alone maintaining it, at this point, with support from a couple of other people. I felt a responsibility because there were &lt;em&gt;real people&lt;/em&gt; having &lt;em&gt;real issues&lt;/em&gt;. And I could help by fixing the bugs. And so I did. A lot. But it never stopped, and that's when I got exhausted.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why I Stopped ✋
&lt;/h2&gt;

&lt;p&gt;After two years of working on the project, I realized one day it had gone a month without me touching the project. This is when I decided to stop. I e-mailed the owner and explained. He said it was cool and thanked me for the help. He even sent me some Stuff We All Get (SWAG) from his company! A t-shirt and some stickers. Thanks, Javier!&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Maintaining an open-source project is fun. People are awesome! But it can be exhausting.&lt;/p&gt;

&lt;p&gt;Here's a summary of the lessons I learned:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;People Are Bad at Reading Documentation 🗒&lt;/li&gt;
&lt;li&gt;Good Code Is Subjective 😋&lt;/li&gt;
&lt;li&gt;Good Git Commit Messages Are Rare 🤔&lt;/li&gt;
&lt;li&gt;Merging Someone Else’s PR Is a Great Feeling 😍&lt;/li&gt;
&lt;li&gt;People Are Awesome! 🤩&lt;/li&gt;
&lt;li&gt;It’s Fun but Can Get Exhausting 😰&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;If you ever get a chance to try it I recommend you do. There are a million projects out there looking for help, be brave and start contributing! You have nothing to lose.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Connect with me on &lt;a href="https://twitter.com/prplcode"&gt;Twitter&lt;/a&gt;, &lt;a href="https://linkedin.com/in/simeg"&gt;LinkedIn&lt;/a&gt;, or &lt;a href="https://github.com/simeg"&gt;GitHub&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://prplcode.dev"&gt;prplcode.dev&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>programming</category>
      <category>opensource</category>
    </item>
    <item>
      <title>Boost Your Software Engineer Career With These 4 Soft Skills</title>
      <dc:creator>Simon Egersand 🎈</dc:creator>
      <pubDate>Tue, 31 May 2022 13:30:59 +0000</pubDate>
      <link>https://forem.com/simeg/boost-your-software-engineer-career-with-these-4-soft-skills-1ol9</link>
      <guid>https://forem.com/simeg/boost-your-software-engineer-career-with-these-4-soft-skills-1ol9</guid>
      <description>&lt;p&gt;Being a good software engineer is not only about your technological skills. You are working with people, and so you need what's called &lt;a href="https://www.thebalancecareers.com/list-of-soft-skills-2063770"&gt;soft skills&lt;/a&gt;. Soft skills are at least as important, if not more, as technical skills to progress in your career.&lt;/p&gt;

&lt;p&gt;In this post, I'll share my favorite soft software engineer skills you need to progress in your career. &lt;/p&gt;

&lt;h2&gt;
  
  
  4 Soft Skills to Boost Your Software Engineer Career
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Teamwork 🤝
&lt;/h3&gt;

&lt;p&gt;If you ever work at a company you will most likely work in a team. You will work with other software engineers, an engineering manager, and maybe even a product manager. You must learn how to work together with them.&lt;/p&gt;

&lt;p&gt;I've seen examples of people who fail to work with the team, and the entire team suffers because of it. Not to mention, it will seriously stagger your progression in your career.&lt;/p&gt;

&lt;h4&gt;
  
  
  What It Means to Work in a Team
&lt;/h4&gt;

&lt;p&gt;To work in a team is different from working alone (&lt;em&gt;duh!&lt;/em&gt;). You need to consider your team members and include them in your decision-making. Maybe you will need to get your code reviewed before shipping to production. This forces you to learn how to create pull requests (PR). Preferably PRs that are easy to review.&lt;/p&gt;

&lt;p&gt;To summarise: When you work in a team, you have to think about the people you work with. This applies when you make decisions, write code, communicate, and more.&lt;/p&gt;

&lt;h4&gt;
  
  
  How Do You Work in a Team?
&lt;/h4&gt;

&lt;p&gt;So how do you work in a team? Most of us learn this the hard way. I certainly did. Here are the best tips I've learned along the way:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Be empathetic&lt;/strong&gt;. 💚 Always. Your team might consist of members with different backgrounds. Maybe from different countries. This is a good thing! You should leverage this instead of trying to do things your way. See things from other's perspectives and you will learn something new, that's a promise.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do the things you commit to&lt;/strong&gt;. It's a big pet peeve when someone says "&lt;em&gt;Yeah, I'll take care of that&lt;/em&gt;" and then don't. &lt;strong&gt;It's fine to don't do everything you commit to&lt;/strong&gt;, but then you should communicate that to your team. "&lt;em&gt;I know I said I would do X, but something happened and I didn't have time, can someone else do it, please?&lt;/em&gt;". It doesn't have to be harder than that.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Assume best intention&lt;/strong&gt;. You should always assume your team members have the best intention when they do or say things. Lose trust in your team and you'll suffer negative effects for yourself and your team.&lt;/p&gt;

&lt;p&gt;And lastly, &lt;strong&gt;life happens!&lt;/strong&gt; This is something my manager always says, "&lt;em&gt;life happens&lt;/em&gt;". It means that life is unpredictable. Things will happen in people's lives that they cannot control. These things might impact their work, and that's normal. Don't judge someone because they're unable to perform at their max, take a day off, or miss a meeting. To take care of a sick child, partner, or anything else is more important. &lt;strong&gt;Life is unpredictable!&lt;/strong&gt; Work is just one part of life.&lt;/p&gt;

&lt;h3&gt;
  
  
  Communication 🗣️
&lt;/h3&gt;

&lt;p&gt;You will need good communication skills when you work in a team. You will have meetings, lots of them. Daily stand-ups, project discussions, retrospectives, and more. In these meetings, you should share what's on your mind and what you have been thinking about.&lt;/p&gt;

&lt;p&gt;If you don't communicate it might reflect poorly on you. Your team might not think that you care, or that your mind is elsewhere during the meeting. &lt;strong&gt;It's OK to not have an opinion, but you can still communicate by asking questions.&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Compromise
&lt;/h3&gt;

&lt;p&gt;If you can't compromise you will have a hard time as a software engineer. It's a skill you will &lt;strong&gt;need to learn&lt;/strong&gt;, like it or not. Sometimes you need to compromise on the code you write. It might accumulate tech debt, but in the grand scheme of things, it makes sense. At other times you have to compromise with a team member on what approach to take. Swallow your ego and accept it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Positivity 😸
&lt;/h3&gt;

&lt;p&gt;And lastly, positivity! Who wants to work with a grouch? No one! Positivity and kindness go a long way. Who doesn't love the person who comes into the office and greets you with a smile? :)&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;These are my four favorite soft skills as a software engineer. I guarantee you that these soft skills will help your career. Being proficient in the technical aspects of being a software engineer is very important. But the soft skills are what make people want to work with you, and can open up new possibilities in your career.&lt;/p&gt;

&lt;p&gt;Because honestly, who would you rather work with? Some grouchy technical genius who lacks empathy, or an average programmer that you connect and have fun with?&lt;/p&gt;

&lt;h2&gt;
  
  
  Learn More About Software Engineering
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/simeg/what-skills-do-you-think-makes-a-great-software-engineer-1b14"&gt;What Skills Makes a Great Software Engineer?&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/simeg/5-good-habits-of-a-software-engineer-3ocp"&gt;5 Good Habits of a Software Engineer&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Connect with me on &lt;a href="https://twitter.com/prplcode"&gt;Twitter&lt;/a&gt;, &lt;a href="https://linkedin.com/in/simeg"&gt;LinkedIn&lt;/a&gt;, or &lt;a href="https://github.com/simeg"&gt;GitHub&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://prplcode.dev"&gt;prplcode.dev&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>career</category>
      <category>programming</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Deploy An Express Node.js Application to Heroku Quickly and Easily</title>
      <dc:creator>Simon Egersand 🎈</dc:creator>
      <pubDate>Sat, 28 May 2022 13:55:57 +0000</pubDate>
      <link>https://forem.com/simeg/deploy-an-express-nodejs-application-to-heroku-quickly-and-easily-25c8</link>
      <guid>https://forem.com/simeg/deploy-an-express-nodejs-application-to-heroku-quickly-and-easily-25c8</guid>
      <description>&lt;p&gt;With Heroku, you can deploy your Express Node.js application to production in just a few steps. In this post, I'll show you a step-by-step guide to deploying your Express Node.js application to Heroku.&lt;/p&gt;

&lt;p&gt;To quickly get started you can use my repo template &lt;a href="https://github.com/simeg/express-heroku-example"&gt;simeg/express-heroku-example&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Heroku?
&lt;/h2&gt;

&lt;p&gt;Heroku is a Platform as a Service (PaaS), and should not be confused with Service as a Service (SaaS). It offers a hobby plan where you can deploy your applications for free, with some limitations.&lt;/p&gt;

&lt;p&gt;For all my hobby website projects I use Heroku. I've created things like &lt;a href="https://github.com/simeg/sudoku-js"&gt;sudoku-js&lt;/a&gt; and &lt;a href="https://github.com/simeg/impossible-tic-tac-toe"&gt;impossible-tic-tac-toe&lt;/a&gt;. See the About sections for links to the applications.&lt;/p&gt;

&lt;h2&gt;
  
  
  Preparation
&lt;/h2&gt;

&lt;p&gt;First, install the Heroku CLI. If you're on macOS run&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ brew tap heroku/brew &amp;amp;&amp;amp; brew install heroku
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;p&gt;Otherwise, head over to &lt;a href="https://devcenter.heroku.com/articles/heroku-cli#install-the-heroku-cli"&gt;Heroku's website&lt;/a&gt;.&lt;/p&gt;
&lt;h2&gt;
  
  
  Deploy Node.js Application to Heroku
&lt;/h2&gt;

&lt;p&gt;Now that you have the CLI installed, we can start writing some code. We will use a minimal example with an HTTP Express server.&lt;/p&gt;
&lt;h3&gt;
  
  
  Node.js Application
&lt;/h3&gt;

&lt;p&gt;Bootstrap a Node.js application with &lt;code&gt;npm init&lt;/code&gt;. Then add Express as a dependency with &lt;code&gt;npm i --save express&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Now let's look at our slim Express server in &lt;code&gt;index.js&lt;/code&gt;.&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;



&lt;p&gt;You can read more about &lt;a href="https://expressjs.com/"&gt;Express here&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;This HTTP server is simple. It has one &lt;code&gt;GET&lt;/code&gt; endpoint which returns the &lt;code&gt;200&lt;/code&gt; and the text &lt;code&gt;Hello World!&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Now that we have the server ready, we need some extra things to be able to deploy it to Heroku. First of all, we need a &lt;code&gt;Procfile&lt;/code&gt;.&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;This is the file that Heroku reads when it starts the application. As you can see the file runs &lt;code&gt;npm start&lt;/code&gt;, so we need to create that too. We add it to &lt;code&gt;package.json&lt;/code&gt;.&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;Also, notice the &lt;code&gt;engines&lt;/code&gt; section. This is for Heroku to know what runtime to use to run your application. You can see what Node.js versions Heroku support on &lt;a href="https://devcenter.heroku.com/articles/nodejs-support#node-js-runtimes"&gt;this site&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Deploy to Heroku
&lt;/h3&gt;

&lt;p&gt;There are a few ways to deploy to Heroku. We will use git which is the easiest way.&lt;/p&gt;

&lt;p&gt;Now that all the code is written we need to commit it.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;git add &lt;span class="nb"&gt;.&lt;/span&gt;
&lt;span class="nv"&gt;$ &lt;/span&gt;git commit &lt;span class="nt"&gt;-m&lt;/span&gt; &lt;span class="s2"&gt;"Initial commit"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Then we need to create an application on Heroku.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;heroku create
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This command also adds a git remote called &lt;code&gt;heroku&lt;/code&gt;. This remote is where we push to deploy our application. Let's do that now!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;git push heroku main
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At this point, Heroku will try to figure out what build pack to use. Essentially, what type of application are you deploying? Because we have a &lt;code&gt;package.json&lt;/code&gt; file in our root, it knows it's a Node.js application.&lt;/p&gt;

&lt;p&gt;When the command is done it will output a URL. Let's open it!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;...
https://thawing-beyond-32509.herokuapp.com/ deployed to Heroku
...
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And we can see &lt;code&gt;Hello World!&lt;/code&gt; in the browser. Easy as pie!&lt;/p&gt;

&lt;p&gt;Now you can check the logs for your application.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nv"&gt;$ &lt;/span&gt;heroku logs &lt;span class="nt"&gt;--tail&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Now you know how to deploy a Node.js application to Heroku. Heroku provides great tooling to quickly get something up and running. But this is just the start! Express allows you to build complex web applications. And with Heroku, you can quickly deploy them to production.&lt;/p&gt;

&lt;p&gt;Check out Heroku's &lt;a href="https://devcenter.heroku.com/articles/node-best-practices"&gt;Best Practices for Node.js Development&lt;/a&gt; for tips and tricks. And their &lt;a href="https://devcenter.heroku.com/categories/nodejs-support"&gt;page about Node.js&lt;/a&gt; is also useful.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Connect with me on &lt;a href="https://twitter.com/prplcode"&gt;Twitter&lt;/a&gt;, &lt;a href="https://linkedin.com/in/simeg"&gt;LinkedIn&lt;/a&gt;, or &lt;a href="https://github.com/simeg"&gt;GitHub&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://prplcode.dev"&gt;prplcode.dev&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>node</category>
      <category>tutorial</category>
      <category>webdev</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Why Learning Functional Programming in JavaScript Will Make You a Better Developer</title>
      <dc:creator>Simon Egersand 🎈</dc:creator>
      <pubDate>Mon, 23 May 2022 14:58:48 +0000</pubDate>
      <link>https://forem.com/simeg/why-learning-functional-programming-in-javascript-will-make-you-a-better-developer-j72</link>
      <guid>https://forem.com/simeg/why-learning-functional-programming-in-javascript-will-make-you-a-better-developer-j72</guid>
      <description>&lt;p&gt;Functional programming (abbreviated as FP) is a programming paradigm that's popular in JavaScript. JavaScript treats functions as &lt;a href="https://developer.mozilla.org/en-US/docs/Glossary/First-class_Function"&gt;first-class citizens&lt;/a&gt; and this makes it easy to write functional programming in JavaScript.&lt;/p&gt;

&lt;p&gt;This post will tell you the basics and benefits of functional programming and how to use them in JavaScript.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Functional Programming?
&lt;/h2&gt;

&lt;p&gt;Functional programming is a way of writing software with specific principles. The idea is that these principles will&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Make it easier to write, test, and debug the code&lt;/li&gt;
&lt;li&gt;Make it easier to reason about the code&lt;/li&gt;
&lt;li&gt;Improve developer productivity&lt;/li&gt;
&lt;li&gt;And more&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Core Principles in Functional Programming
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Pure Functions
&lt;/h3&gt;

&lt;p&gt;Functions should be pure. Pure functions always produce the same output and have no side effects affecting the output. Side effects are anything that's outside the control of the function. E.g. any input/output (I/O) such as reading from a database/file or using &lt;code&gt;console.log&lt;/code&gt;. Or even a static variable.&lt;/p&gt;

&lt;p&gt;Here's a simple example&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h4&gt;
  
  
  But I Need I/O?
&lt;/h4&gt;

&lt;p&gt;An application without I/O is not that useful. Functional programming is not about eliminating I/O. Instead, you should separate the business logic from I/O. Any side effects should be handled at the edges of our processes, and not in the middle of them. By doing this you achieve pure business logic that is easily testable.&lt;/p&gt;

&lt;p&gt;JavaScript is not a purely functional programming language. So there's nothing from stopping you doing whatever you feel comfortable with though. &lt;a href="https://en.wikipedia.org/wiki/Haskell_(programming_language)"&gt;Haskell&lt;/a&gt;, on the other hand, is an example of a purely functional programming language. In Haskell, you're enforced to use the functional programming principles.&lt;/p&gt;

&lt;h3&gt;
  
  
  Immutable State
&lt;/h3&gt;

&lt;p&gt;Immutable state means that the state should not change. Instead of changing the state, in functional programming we &lt;strong&gt;copy it&lt;/strong&gt;. This might seem counter-intuitive: why would we want to copy state instead of changing it?&lt;/p&gt;

&lt;p&gt;In JavaScript, you can pass values by reference. This can be dangerous. Let's look at an example.&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h3&gt;
  
  
  Recursion
&lt;/h3&gt;

&lt;p&gt;With recursion, lists are not iterated using &lt;code&gt;for&lt;/code&gt;, &lt;code&gt;while&lt;/code&gt;, or &lt;code&gt;do...while&lt;/code&gt; because they mutate state (increasing the counter, for example). Instead, in functional programming functions such as &lt;code&gt;map()&lt;/code&gt;, &lt;code&gt;filter()&lt;/code&gt;, and &lt;code&gt;reduce()&lt;/code&gt; are used.&lt;/p&gt;

&lt;p&gt;The word "recursion" scared me for a long time, I have to admit. But in JavaScript, you can quickly see the benefits of readability and productivity using these functions.&lt;/p&gt;

&lt;p&gt;Let's look at an example!&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;h2&gt;
  
  
  Functional Programming in JavaScript
&lt;/h2&gt;

&lt;p&gt;I showed you briefly how to use &lt;code&gt;map()&lt;/code&gt; already. Let's dig into it some more.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;map()&lt;/code&gt; iterates over your list, one element at a time, and lets you replace it with something new. This is useful for updating a value for all elements in a list, for example. It then returns a new list, leaving the old one unmodified. So it follows the functional programming principle of not modifying state.&lt;/p&gt;

&lt;p&gt;And there are two more functions you should know about, &lt;code&gt;filter()&lt;/code&gt; and &lt;code&gt;reduce()&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;filter()&lt;/code&gt; will let you filter out unwanted elements from a list. This is useful for removing elements that meet certain criteria from a list. E.g. "&lt;em&gt;filter out fruit that's more expensive than 5&lt;/em&gt;. And just like &lt;code&gt;map()&lt;/code&gt;, it returns a new list.&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;&lt;code&gt;reduce()&lt;/code&gt; will let you "reduce" a list of elements into a single value. This is useful for working with numbers.&lt;/p&gt;


&lt;div class="ltag_gist-liquid-tag"&gt;
  
&lt;/div&gt;


&lt;p&gt;This function was the hardest one to understand for me. I recommend you check out the &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/reduce"&gt;MDN Web Docs&lt;/a&gt; about it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Now you know what functional programming is about, why it's useful, and how to use it in JavaScript. It might take some time to get used to but it's well worth the effort. The functions we covered are available in all major programming languages. This is not something specific to JavaScript.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Connect with me on &lt;a href="https://twitter.com/prplcode"&gt;Twitter&lt;/a&gt;, &lt;a href="https://linkedin.com/in/simeg"&gt;LinkedIn&lt;/a&gt;, or &lt;a href="https://github.com/simeg"&gt;GitHub&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://prplcode.dev"&gt;prplcode.dev&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>programming</category>
      <category>tutorial</category>
    </item>
    <item>
      <title>Top 4 Free Coding Resources for Students</title>
      <dc:creator>Simon Egersand 🎈</dc:creator>
      <pubDate>Mon, 16 May 2022 15:19:04 +0000</pubDate>
      <link>https://forem.com/simeg/top-four-free-coding-resources-for-students-ml0</link>
      <guid>https://forem.com/simeg/top-four-free-coding-resources-for-students-ml0</guid>
      <description>&lt;p&gt;As a student, free coding resources allow you to try out professional tools and services that you otherwise would have to pay for. Fortunately, there are companies that realize the value of allowing students to try their services for free. If you're a student, use this opportunity to get your hands on some quality resources!&lt;/p&gt;

&lt;p&gt;&lt;em&gt;(I am not affiliated, associated, authorized, endorsed by, or in any way officially connected with any of these companies)&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Free Coding Resources for Students
&lt;/h2&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://education.github.com/pack"&gt;GitHub Student Developer Pack&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;This is most likely the best free coding resource for a student you'll find.&lt;/strong&gt; You'll get access to a TON of services, subscriptions, and credits. Get a free domain, experiment with a cloud provider, free premium courses, and a lot more. For example:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;1-year domain name registration on the .me TLD (Namecheap)&lt;/li&gt;
&lt;li&gt;$100 in platform credit for new users (DigitalOcean)&lt;/li&gt;
&lt;li&gt;12-month subscription of Canva's Pro tier (Canva)&lt;/li&gt;
&lt;li&gt;Access to 25+ Microsoft Azure cloud services plus $100 in Azure credit (Microsoft Azure)&lt;/li&gt;
&lt;li&gt;6-months access to all courses and workshops (FrontendMasters)&lt;/li&gt;
&lt;li&gt;And more!&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--AyOtrQ1v--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hra307hdiszmel8xe85x.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AyOtrQ1v--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/hra307hdiszmel8xe85x.png" alt="GitHub's Octocat" width="800" height="665"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I used this when I was a student to deploy a website with my own domain. And to get access to a bunch of awesome courses. I learned a lot, which &lt;a href="https://dev.to/simeg/how-my-github-profile-landed-me-a-job-at-spotify-4hnn"&gt;helped me get a job at Spotify&lt;/a&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://www.jetbrains.com/community/education/#students"&gt;JetBrains Free Educational License&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;JetBrains is the company behind the popular IDEAs: IntelliJ, WebStorm, PyCharm, and more. As a student (or teacher) you get access to the professional versions.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--W758h1pz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b1dm14gh02xdshqsy6zr.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--W758h1pz--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/b1dm14gh02xdshqsy6zr.png" alt="JetBrains Logo" width="880" height="880"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Personally, these are my favorite IDEAs and what I use in my day-to-day. When I was a student, I tried a few IDEAs but JetBrains products are simply the best, in my opinion. I won't go into why, but I do recommend you pick up a license.&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://www.heroku.com/"&gt;Heroku&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Heroku is a platform to deploy your applications. You can for example deploy a website or a backend service. Additionally, Heroku allows you to attach resources such as a database, monitoring, and more. They provide step-by-step guides which makes it easy.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--VReY4plh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kxef4apcddl073lyud7z.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--VReY4plh--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/kxef4apcddl073lyud7z.png" alt="Heroku Logo" width="880" height="372"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Most of these resources can be used with the free hobby tier, which makes it perfect for personal projects. I've used Heroku for many years. It's my go-to service to deploy personal projects and make them available on the web.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;The free hobby tier is not specific for students, anyone can use it!&lt;/strong&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  &lt;a href="https://unity.com/products/unity-student"&gt;Unity Student Plan&lt;/a&gt;
&lt;/h3&gt;

&lt;p&gt;Is game development more your kind of thing? Then you should check out the Unity Student Plan. Unity is a cross-platform game engine that was used for games such as Overcooked, Disco Elysium, Hollow Knight, and more. I mean, just look at &lt;a href="https://en.wikipedia.org/wiki/List_of_Unity_games"&gt;this list&lt;/a&gt;!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--SJOWyRiH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k1tls18sgr93dhrrljt6.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--SJOWyRiH--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/k1tls18sgr93dhrrljt6.png" alt="Unity Logo" width="880" height="306"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The gaming industry is growing, fast! And that comes with a growing need for game developers. Getting experience with an application like Unity will make it easy to find your first job.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;These are my top four free coding resources for students. I remember discovering these when I was a student and found it quite amazing they are all free. If you're a student, be sure to check them out. This is an opportunity to experiment with tools and services that professionals use.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Connect with me on &lt;a href="https://twitter.com/prplcode"&gt;Twitter&lt;/a&gt;, &lt;a href="https://linkedin.com/in/simeg"&gt;LinkedIn&lt;/a&gt;, or &lt;a href="https://github.com/simeg"&gt;GitHub&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://prplcode.dev"&gt;prplcode.dev&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>programming</category>
      <category>career</category>
    </item>
    <item>
      <title>How My GitHub Profile Landed Me a Job at Spotify</title>
      <dc:creator>Simon Egersand 🎈</dc:creator>
      <pubDate>Sun, 15 May 2022 09:50:41 +0000</pubDate>
      <link>https://forem.com/simeg/how-my-github-profile-landed-me-a-job-at-spotify-4hnn</link>
      <guid>https://forem.com/simeg/how-my-github-profile-landed-me-a-job-at-spotify-4hnn</guid>
      <description>&lt;p&gt;This is the experience of how my GitHub profile got me a job at Spotify. The key was my GitHub profile and the various repos I had worked on the years before. This post will be personal, and the key takeaway is the importance of a portfolio. It doesn't have to be a good portfolio (mine certainly wasn't). But having &lt;em&gt;a&lt;/em&gt; portfolio can be the difference between getting the job or not.&lt;/p&gt;

&lt;h2&gt;
  
  
  Spotify Interview
&lt;/h2&gt;

&lt;p&gt;Before Spotify, I worked as a software engineer at a different company. It was my first job after university and it was all right. I learned how software was being developed professionally which was fun and interesting. One day, I get an e-mail from Spotify and they were asking for applications for 3-month internships. I immediately sent them my CV.&lt;/p&gt;

&lt;p&gt;A couple of days later I receive a phone call and I get called for an interview. The day of the interview is approaching and I'm starting to feel sick 😨. On the day of the interview, I had a fever, but I took some medicine and went there anyway. The interview did not go well. We talked and did some coding exercises on the board. I completely blacked out (partially because of the medicine). The last thing I said was "Please, check out my GitHub profile" and they said they would.&lt;/p&gt;

&lt;p&gt;After the interview, I was so disappointed in myself 😔. I returned home to my job, which now seemed boring and bleak.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Call Back
&lt;/h2&gt;

&lt;p&gt;A few days pass and I get a phone call. It was the recruiter! He said they liked me and would like to offer me the internship! Wow, what a feeling! 😃 I accepted, and a few weeks later I quit my current job. My friends and colleagues were surprised I would quit my full-time job for a 3-month internship, but I didn't care. My two greatest passions in life are technology and music, and I was going to be working with both! 💻🎸&lt;/p&gt;

&lt;h2&gt;
  
  
  Internship Ends
&lt;/h2&gt;

&lt;p&gt;The deal with the internship was, that if they liked me they would offer me a permanent job. The date when my internship was ending was quickly approaching. I was nervous, but I had learned so much and met a lot of people from different parts of the world so I was happy either way. We had a meeting and they said they would like to offer me a permanent job. Again, bliss! I felt such a relief and of course, excitement!&lt;/p&gt;

&lt;h2&gt;
  
  
  My GitHub Profile
&lt;/h2&gt;

&lt;p&gt;Later, I was talking to someone in my team about my interview. I told her how bad it went, and how surprised I was to still get the offer. She told me something like "&lt;em&gt;Yeah, they told me it went bad. But when we looked at your GitHub profile we saw that you actually can code. And that's why we wanted you&lt;/em&gt;".&lt;/p&gt;

&lt;p&gt;My profile did not contain a lot; some HTML, CSS, and JavaScript websites I had built for fun and to learn. Before the interview, I looked through the code to make sure it looked nice and tidy.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;I got an internship that later led to a permanent job at Spotify, thanks to my GitHub profile. I realized how crucial having &lt;em&gt;a&lt;/em&gt; portfolio is. It doesn't have to be the best, just something to show what you can do. This was 6 years ago. I still work at Spotify, now as a Senior Software Engineer. It turned out to be an amazing place to work so I haven't found a good reason to leave.&lt;/p&gt;

&lt;p&gt;If I can do it, you can too!! 👊 Thanks for reading.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Connect with me on &lt;a href="https://twitter.com/prplcode"&gt;Twitter&lt;/a&gt;, &lt;a href="https://linkedin.com/in/simeg"&gt;LinkedIn&lt;/a&gt;, or &lt;a href="https://github.com/simeg"&gt;GitHub&lt;/a&gt;&lt;/em&gt;&lt;br&gt;
&lt;em&gt;Originally published at &lt;a href="https://prplcode.dev"&gt;prplcode.dev&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>career</category>
      <category>github</category>
      <category>programming</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Vim — Why You Should Use It!</title>
      <dc:creator>Simon Egersand 🎈</dc:creator>
      <pubDate>Sat, 14 May 2022 13:38:04 +0000</pubDate>
      <link>https://forem.com/simeg/vim-why-you-should-use-it-4hg6</link>
      <guid>https://forem.com/simeg/vim-why-you-should-use-it-4hg6</guid>
      <description>&lt;p&gt;Vim is a powerful text editor, and in this post, I will convince you to use it. Feared and loved by coders and writers, it’s a controversial text editor, and with good reasons. It has a steep learning curve, but it’s well worth it. In this post, I’ll explain why you should use Vim or Vim key bindings in your favorite IDE.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Vim?
&lt;/h2&gt;

&lt;p&gt;Vim is a free and open-source text editor. It was first published in 1991. The name stands for Vi IMproved (vi is a different text editor). It's known for its steep learning curve and how hard it is to exit. As of today, 2.6M people have viewed the question "&lt;a href="https://stackoverflow.com/questions/11828270/how-do-i-exit-the-vim-editor" rel="noopener noreferrer"&gt;How do I exit the Vim editor?&lt;/a&gt;" on StackOverflow. But don't let this frighten you! (and by the way, it's &lt;code&gt;:wq&lt;/code&gt; to save and exit)&lt;/p&gt;

&lt;h2&gt;
  
  
  Why You Should Use Vim
&lt;/h2&gt;

&lt;p&gt;Here are four reasons why you should use Vim (or Vim key bindings).&lt;/p&gt;

&lt;h3&gt;
  
  
  Efficiency
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;The key bindings&lt;/strong&gt;. They are optimized for efficiency, so your hands stay where you learned to put them: left hand on &lt;code&gt;asdf&lt;/code&gt; and right hand on &lt;code&gt;jkl&lt;/code&gt;. It offers many shortcuts and forces you to only use the keyboard (that's right, throw away your mouse!). Once you learn the shortcuts, even the basic ones, you'll quickly be more efficient at writing text and code. You can edit text, navigate your document, and execute commands without leaving Vim.&lt;/p&gt;

&lt;p&gt;I won't go into details here exactly what key bindings are available. Read on to find out where to learn them.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;Vim key bindings are available for all popular IDEs. So you can enjoy all the cool modern features while using Vim's awesome key bindings.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  Customizable
&lt;/h3&gt;

&lt;p&gt;Not only does it come with a ton of shortcuts, but you can also create your own! And even your own plugins. There's a big community for plugins. At &lt;a href="https://vimawesome.com/" rel="noopener noreferrer"&gt;VimAwesome&lt;/a&gt; there are currently ~20k plugins available. And there are many plugin managers to make it easy to manage your plugins.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;When Vim starts it reads a configuration file called &lt;code&gt;.vimrc&lt;/code&gt;. This is where you put your custom shortcuts and load your plugins.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  It's Available &lt;em&gt;Everywhere&lt;/em&gt;
&lt;/h3&gt;

&lt;p&gt;Vim is available pretty much everywhere. Whether you're using Windows, macOS or a UNIX based distribution, it's there. This makes it convenient to work in environments without graphical user interface (GUI). Such as a Raspberry Pi.&lt;/p&gt;

&lt;p&gt;There are even extensions for your favorite browser that adds key bindings.&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;a href="https://chrome.google.com/webstore/detail/vimium/dbepggeogbaibhgnhhndojpepiihcmeb?hl=en" rel="noopener noreferrer"&gt;Vimium&lt;/a&gt; (Chrome)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://addons.mozilla.org/en-US/firefox/addon/vimium-ff/" rel="noopener noreferrer"&gt;Vimium-FF&lt;/a&gt; (Firefox)&lt;/li&gt;
&lt;li&gt;
&lt;a href="https://apps.apple.com/us/app/vimari/id1480933944?mt=12" rel="noopener noreferrer"&gt;Vimari&lt;/a&gt; (Safari)&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  You Will Feel Awesome
&lt;/h3&gt;

&lt;p&gt;I saved this point for last but it might be the most important one. Using these key bindings will make you feel awesome, I promise. Your coworkers will envy your speed, and your parents will consider you a genuine computer wizard! 🧙‍♀️&lt;/p&gt;

&lt;p&gt;Now that I've convinced you to use it, let me tell you where you can learn it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Where to Learn
&lt;/h2&gt;

&lt;p&gt;I recommend you start with &lt;code&gt;vimtutor&lt;/code&gt;. It's an application available in macOS and UNIX based distributions. For Windows, you need to install Vim to get access to it.&lt;/p&gt;

&lt;p&gt;Simply type &lt;code&gt;vimtutor&lt;/code&gt; in your terminal to start learning!&lt;/p&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fh5bgc5c14mjfdg6yzl6i.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%2Fh5bgc5c14mjfdg6yzl6i.png" alt="vimtutor"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Once you learn the basics there's this &lt;a href="https://vim.rtorr.com/" rel="noopener noreferrer"&gt;awesome cheat sheet&lt;/a&gt;. And endless tutorials online.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;Vim is a powerful text editing application that’s heavily used by software engineers. There are key binding plugins for all major IDEs, so you can enjoy the cool features of your IDE while still using Vim key bindings. It's highly customizable and its community is very active. Start learning today by typing &lt;code&gt;vimtutor&lt;/code&gt; in your terminal!  &lt;/p&gt;




&lt;p&gt;&lt;em&gt;Connect with me on &lt;a href="https://twitter.com/prplcode" rel="noopener noreferrer"&gt;Twitter&lt;/a&gt;, &lt;a href="https://linkedin.com/in/simeg" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt;, or &lt;a href="https://github.com/simeg" rel="noopener noreferrer"&gt;GitHub&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://prplcode.dev" rel="noopener noreferrer"&gt;prplcode.dev&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>vim</category>
      <category>programming</category>
      <category>writing</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Why Testing Your Code Is Important</title>
      <dc:creator>Simon Egersand 🎈</dc:creator>
      <pubDate>Thu, 12 May 2022 15:08:01 +0000</pubDate>
      <link>https://forem.com/simeg/why-testing-your-code-is-important-2114</link>
      <guid>https://forem.com/simeg/why-testing-your-code-is-important-2114</guid>
      <description>&lt;p&gt;Testing your code is an important part of the software development process. It's how you confirm that your code behaves as you want it to. It also allows you to find and fix bugs early on before they have a chance to cause problems in production.&lt;/p&gt;

&lt;p&gt;In this article, we'll go over why testing your code is important. There are many different ways of testing your code, and we'll cover the most important way -- unit testing.&lt;/p&gt;

&lt;h2&gt;
  
  
  Always Test Your Code
&lt;/h2&gt;

&lt;p&gt;Before we talk about the &lt;em&gt;why's&lt;/em&gt;, let's talk about the &lt;em&gt;what&lt;/em&gt;. What is code testing? &lt;strong&gt;It's making sure your code works the way you want it to work&lt;/strong&gt;. Easy as that. &lt;/p&gt;

&lt;p&gt;Now, why should you bother testing your code? Imagine you have a program with a single module. It's responsible for one thing and one thing only. Testing it might seem like overkill (but I recommend always testing your code). Now imagine your program has five modules that all do different things. Additionally, the modules communicate with each other. Your program now has many possible states and testing all states manually will take up a lot of your precious time.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Instead, you should write tests to confirm the behavior!&lt;/strong&gt; By testing your code, you also protect yourself against breaking features when you add new code. You want to write quality code, right? That's not possible without testing it.&lt;/p&gt;

&lt;h2&gt;
  
  
  Unit Testing Your Code
&lt;/h2&gt;

&lt;p&gt;There are various types of tests that you can run on your code, but unit tests are the most important. They allow you to test individual units of code in isolation.&lt;/p&gt;

&lt;p&gt;Let's look at this JavaScript function.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;incrementByOne&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;input&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;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;input&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;input&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&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;p&gt;Now let's write some tests. I like to start by testing the "happy path".&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;test&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;should increment by 1&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;input&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;9&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;actual&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;incrementByOne&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;expected&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="nx"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;actual&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;toBe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;expected&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;p&gt;And then for the fun part; the edge cases!&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;test&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;should return 0 when negative input&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;input&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;actual&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;incrementByOne&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;expected&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="nx"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;actual&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;toBe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;expected&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;p&gt;We've now tested everything, and have 100% test coverage. And we're happy, &lt;em&gt;or are we&lt;/em&gt;?&lt;/p&gt;

&lt;p&gt;I chose JavaScript because it's &lt;a href="https://developer.mozilla.org/en-US/docs/Glossary/Dynamic_typing"&gt;dynamically typed&lt;/a&gt;, and we're allowed to pass any type into our function (&lt;em&gt;psst! This is a good reason to instead use &lt;a href="https://www.typescriptlang.org/"&gt;TypeScript&lt;/a&gt;&lt;/em&gt;).&lt;/p&gt;

&lt;p&gt;What happens if we pass a &lt;code&gt;string&lt;/code&gt;?&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;test&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;should increment by 1&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;input&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;my-string&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;actual&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;incrementByOne&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;expected&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;???;&lt;/span&gt;

  &lt;span class="nx"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;actual&lt;/span&gt;&lt;span class="p"&gt;).&lt;/span&gt;&lt;span class="nx"&gt;toBe&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;expected&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;p&gt;The function will return &lt;code&gt;my-string1&lt;/code&gt; because the &lt;code&gt;+&lt;/code&gt; operator works between types in JavaScript. This is not what we want, so let's fix it.&lt;/p&gt;

&lt;p&gt;Let's update the function to handle this case.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;incrementByOne&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;input&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;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="k"&gt;typeof&lt;/span&gt; &lt;span class="nx"&gt;input&lt;/span&gt; &lt;span class="o"&gt;!==&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;number&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;throw&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;TypeError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Only number type allowed&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;if&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;input&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;input&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&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;p&gt;And now let's add another test to our test suite.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight javascript"&gt;&lt;code&gt;&lt;span class="nx"&gt;test&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;should throw when non-number input&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;input&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;my-string&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

  &lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;expected&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="k"&gt;new&lt;/span&gt; &lt;span class="nx"&gt;TypeError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="s1"&gt;Only number type allowed&lt;/span&gt;&lt;span class="dl"&gt;'&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
  &lt;span class="nx"&gt;expect&lt;/span&gt;&lt;span class="p"&gt;(()&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;incrementbyOne&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;input&lt;/span&gt;&lt;span class="p"&gt;)).&lt;/span&gt;&lt;span class="nx"&gt;toThrowError&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;expected&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;p&gt;This was a simple example. Websites and programs are never trivial though, and I hope you can see the value of testing your code now. Testing your code is a crucial part of delivering high-quality software. &lt;strong&gt;And it should be a fundamental part of your software development process!&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Unit testing is not a silver bullet, and it is not a substitute for other forms of testing, such as system testing and user acceptance testing. But, unit testing is an important part of the software testing process and should not be ignored.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;When it comes to code, testing is key to avoiding bugs and ensuring that your code runs as expected. By taking the time to test your code, you can avoid costly mistakes and ensure that your code is ready for prime time.&lt;/p&gt;

&lt;p&gt;Enjoyed this post? Then check out &lt;a href="https://dev.to/simeg/stop-using-meaningless-test-values-2gg4"&gt;Stop using meaningless test values!&lt;/a&gt;&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Connect with me on &lt;a href="https://twitter.com/prplcode"&gt;Twitter&lt;/a&gt;, &lt;a href="https://linkedin.com/in/simeg"&gt;LinkedIn&lt;/a&gt; and &lt;a href="https://github.com/simeg"&gt;Github&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://prplcode.dev"&gt;prplcode.dev&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>testing</category>
      <category>programming</category>
      <category>beginners</category>
      <category>javascript</category>
    </item>
    <item>
      <title>6 Mistakes Junior Developers Make and How to Avoid Them</title>
      <dc:creator>Simon Egersand 🎈</dc:creator>
      <pubDate>Tue, 10 May 2022 14:49:40 +0000</pubDate>
      <link>https://forem.com/simeg/6-mistakes-junior-developers-make-and-how-to-avoid-them-5e9h</link>
      <guid>https://forem.com/simeg/6-mistakes-junior-developers-make-and-how-to-avoid-them-5e9h</guid>
      <description>&lt;p&gt;Junior developers make many mistakes. Believe me, I’ve been one myself. But there are ways you can avoid them.&lt;/p&gt;

&lt;p&gt;In this article, we’ll take a look at 6 of the most common mistakes junior developers make and offer advice on how to avoid them.&lt;/p&gt;

&lt;h2&gt;
  
  
  Mistakes Junior Developers Make and How to Avoid Them
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Focusing on Code Instead of the Big Picture 🖼
&lt;/h3&gt;

&lt;p&gt;It’s easy to get bogged down in the details when you’re starting out. But it’s important to remember that code is only a small part of the development process. Focusing on the big picture will help you understand the overall goal of your project and help you make better decisions. To come up with good solutions you need to spend time thinking. Do you think the author of React came up with the idea for the framework in a day? Not likely.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Not Reading Documentation 📄
&lt;/h3&gt;

&lt;p&gt;Junior developers often don’t read documentation, or they only read it superficially. But the fact is, that documentation is an important source of information. And you need to read it in-depth if you want to be a successful developer.&lt;/p&gt;

&lt;p&gt;Documentation can help you learn the syntax and usage of a language or library, as well as how to use a tool or library properly. It can also help you understand the API for a particular software system. So, be sure to read the documentation.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Ignoring Best Practices
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Best practices are there for a reason&lt;/strong&gt; – they make development faster, easier, and more reliable. Junior developers can speed up their learning process by paying attention to best practices and following them.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Not Asking Questions 🙋‍♀️
&lt;/h3&gt;

&lt;p&gt;Another common mistake junior developers make is not asking questions. Again, this can be due to a lack of confidence, or feeling like you should already know the answer.&lt;/p&gt;

&lt;p&gt;But the fact is, you won’t know everything, and you won’t always be able to figure things out on your own. Asking questions is a good way to learn and gain knowledge. Not asking questions can lead to misunderstandings and errors.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Underestimating the Importance of Practice
&lt;/h3&gt;

&lt;p&gt;Junior developers often underestimate the importance of practice. It’s not enough to just learn the theory – you also need to practice what you have learned.&lt;/p&gt;

&lt;p&gt;Practice makes perfect, and the more you practice, the better you will become. Try to find opportunities to practice your skills, whether it’s through tutorials, exercises, or projects. No one is born a great developer, everything takes practice!&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Forgetting to Celebrate Small Victories 🎉
&lt;/h3&gt;

&lt;p&gt;It can be easy to get caught up in the work and forget to celebrate your successes. Taking the time to celebrate small victories is an important way to stay motivated and keep up your morale.&lt;/p&gt;

&lt;p&gt;Avoiding these mistakes will help you move up the career ladder quickly and smoothly. But don’t forget that everyone makes mistakes – the key is to learn from them and move on!&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;It’s important for junior developers to understand common mistakes so they can try to avoid them. By becoming aware of the most common errors, junior developers can focus on fixing these issues and become better developers.&lt;/p&gt;

&lt;h2&gt;
  
  
  Learn More About Software Engineering
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://dev.to/simeg/what-skills-do-you-think-makes-a-great-software-engineer-1b14"&gt;What Skills Makes a Great Software Engineer?
&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://dev.to/simeg/5-good-habits-of-a-software-engineer-3ocp"&gt;5 Good Habits of a Software Engineer&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Connect with me on Twitter &lt;a href="https://twitter.com/prplcode"&gt;@prplcode&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published on &lt;a href="https://prplcode.dev"&gt;https://prplcode.dev&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>programming</category>
      <category>career</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>8 Habits of Highly Productive People</title>
      <dc:creator>Simon Egersand 🎈</dc:creator>
      <pubDate>Mon, 09 May 2022 14:43:06 +0000</pubDate>
      <link>https://forem.com/simeg/8-habits-of-highly-productive-people-o1p</link>
      <guid>https://forem.com/simeg/8-habits-of-highly-productive-people-o1p</guid>
      <description>&lt;p&gt;There are habits of highly productive people that make them accomplish a lot, every day. Did you ever have one of those days, where you finished &lt;strong&gt;everything&lt;/strong&gt; on your to-do list? Imagine having those days &lt;strong&gt;every day&lt;/strong&gt;. This is what the days for highly productive people look like and here are some of their habits.&lt;/p&gt;

&lt;h2&gt;
  
  
  Productive People Are Just Like Us
&lt;/h2&gt;

&lt;p&gt;Productive people are not robots. They are like you and me, with the difference that they know where and how to spend their time to get things done. By practicing their habits we can all become more productive. It won’t happen overnight but every little step counts!&lt;/p&gt;

&lt;h2&gt;
  
  
  Habits of Highly Productive People
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Don’t Multi-Task
&lt;/h3&gt;

&lt;p&gt;At first, this might seem counter-intuitive. But it’s a scientific fact that doing two things at the same time reduces your productivity.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;Doing more than one task at a time, especially more than one complex task, takes a toll on productivity.&lt;br&gt;
&lt;a href="https://www.apa.org/topics/research/multitasking"&gt;American Psychological Association&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Our brains are bad at context switching, which is exactly what happens when you multi-task. Like with computers, context switching (for threads) is expensive. So if you’re doing something else while reading this article — one thing at a time, please!&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Take More Brakes
&lt;/h3&gt;

&lt;p&gt;If you spend more time working, you’d expect more results, right? Unfortunately, that’s not how our brains work. We get distracted and lose focus after working for a longer period of time. Research shows that breaks, even as short as 3 minutes long, improve your productivity. And if you add some stretching exercises with your breaks you’ll be even more productive.&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;&lt;em&gt;These results provide evidence that frequent short breaks from continuous computer-mediated work can benefit worker productivity and well-being […]&lt;br&gt;
&lt;a href="https://www.tandfonline.com/doi/abs/10.1080/001401397188396"&gt;HENNING et al., 2001&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;
&lt;/blockquote&gt;

&lt;h3&gt;
  
  
  3. Focus on the Most Important Tasks First
&lt;/h3&gt;

&lt;p&gt;Start your day by taking a few minutes to make a to-do list with all the tasks you want to finish. Then rank them, and start working on the most important one. By doing this, you reduce the risk of procrastination. Because it’s easy to spend the day doing the easy tasks that are less important. Instead, you should spend your time on the most impactful tasks you have.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Apply the 80/20 Rule
&lt;/h3&gt;

&lt;p&gt;The 80/20 rule (also known as the &lt;a href="https://en.wikipedia.org/wiki/Pareto_principle"&gt;Pareto Principle&lt;/a&gt;), says that only 20% of what you do each day produces 80% of your results. With this in mind, highly productive people identify 20% of their most impactful work for the day. The 80% that’s left they try to cut from their schedules to find more tasks that will have more impact. And this is what you should do too! Do it tomorrow and you’ll notice the difference.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Do The Challenging Tasks Before Lunch
&lt;/h3&gt;

&lt;p&gt;We all know the feeling of coming back from lunch and sitting down, trying to get back into the zone. It’s difficult because our bodies are busy! It’s spending energy ingesting and processing the food we consumed. This is why you should do your most challenging tasks before lunch. Repetitive tasks or meetings you can save for after lunch. By maintaining a schedule like this you’ll definitely be more productive.&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Automate The Repetitive Work
&lt;/h3&gt;

&lt;p&gt;Performing repetitive work not only kills your motivation but also hinders your productivity. If you find yourself in this position try to think of ways of automating this task. This can be simple things such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Learn keyboard shortcuts&lt;/li&gt;
&lt;li&gt;Compose a list of steps for common tasks (what is also known as an algorithm)&lt;/li&gt;
&lt;li&gt;If you have programming knowledge, write a programming script for a common task&lt;/li&gt;
&lt;/ul&gt;

&lt;h3&gt;
  
  
  7. Get a Good Day’s Start
&lt;/h3&gt;

&lt;p&gt;Studies have shown that morning is the &lt;a href="https://lifehacker.com/the-best-time-of-day-to-get-ideas-according-to-science-1541494290"&gt;best time of day for creative thinking&lt;/a&gt;. To give yourself the best chance for creative thinking you need a good morning ritual. A healthy breakfast, meditation, reading, and exercise are activities that sharpen your brain.&lt;/p&gt;

&lt;p&gt;Especially in these times of remote work (&lt;em&gt;see here to read about &lt;a href="https://dev.to/simeg/4-lessons-learned-working-remotely-for-2-years-3de0"&gt;4 Lessons Learned Working Remotely for +2 Years&lt;/a&gt;&lt;/em&gt;), it’s easy to neglect the importance of a good morning ritual. To be highly productive you need to get a good day’s start.&lt;/p&gt;

&lt;h3&gt;
  
  
  8. Identify and Reduce Distractions
&lt;/h3&gt;

&lt;p&gt;If you’re like me, you’re getting distracted throughout the day by e-mails and push notifications. If you want to be productive you need to identify and reduce these types of distractions. This you can do from your phone or application settings. Ask yourself, do you &lt;em&gt;need&lt;/em&gt; a sound notification when you receive an e-mail? Getting into the zone takes time but you can easily get brought back out of it by a single sound notification. &lt;strong&gt;Value your productivity higher!&lt;/strong&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;To summarise:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Don’t Multi-Task&lt;/li&gt;
&lt;li&gt;Take More Breaks&lt;/li&gt;
&lt;li&gt;Focus on the Most Important Tasks First&lt;/li&gt;
&lt;li&gt;Apply the 80/20 Rules&lt;/li&gt;
&lt;li&gt;Do The Challenging Tasks Before Lunch&lt;/li&gt;
&lt;li&gt;Automate The Repetitive Work&lt;/li&gt;
&lt;li&gt;Get a Good Day’s Start&lt;/li&gt;
&lt;li&gt;Identify and Reduce Distractions&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;You &lt;em&gt;too&lt;/em&gt; can become a highly productive person! It’s not magic or unhealthy, it’s a mindset and requires dedication. Personally, I’m not a highly productive person but I’m working on it every day. While it’s hard sometimes I remind myself it’s for the best.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;Connect with me on Twitter &lt;a href="https://twitter.com/prplcode"&gt;@prplcode&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Originally published at &lt;a href="https://prplcode.dev"&gt;https://prplcode.dev&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>productivity</category>
      <category>career</category>
      <category>motivation</category>
    </item>
  </channel>
</rss>
