<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Johan Melin</title>
    <description>The latest articles on DEV Community by Johan Melin (@theproductivecoder).</description>
    <link>https://dev.to/theproductivecoder</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%2F676920%2Fc839ba33-6b06-4b31-97c5-3b036e2b8a90.png</url>
      <title>DEV Community: Johan Melin</title>
      <link>https://dev.to/theproductivecoder</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/theproductivecoder"/>
    <language>en</language>
    <item>
      <title>Do not use destructuring on import</title>
      <dc:creator>Johan Melin</dc:creator>
      <pubDate>Fri, 31 Dec 2021 13:50:02 +0000</pubDate>
      <link>https://dev.to/theproductivecoder/do-not-use-destructuring-on-import-1440</link>
      <guid>https://dev.to/theproductivecoder/do-not-use-destructuring-on-import-1440</guid>
      <description>&lt;p&gt;When importing it is common to use destructuring, but it seems to have its drawbacks. By not using destructuring I got a bundled JavaScript file down from 76kb to 7kb.&lt;/p&gt;

&lt;p&gt;I made a simple web app that prints hello world in camelcase to the console.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;const lodash = require('lodash') &lt;br&gt;
console.log(lodash.camelCase('hello world'))&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--BbsdD_Pn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2z6yjwzm2bz1bdmun424.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--BbsdD_Pn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/2z6yjwzm2bz1bdmun424.png" alt="result of webpack-bundle-analyzer" width="245" height="109"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;After bundling it with webpack the bundled js file was 76kb. Checking out the file with webpack-bundle-analyzer it seems to have loaded the whole of lodash. Maybe it would be smaller with destructoring.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;const {camelCase} = require('lodash') &lt;br&gt;
console.log(camelCase('hello world'))&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now the file is 70kb. Not a huge saving. I tried another syntax.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;const camelCase = require('lodash/camelCase') &lt;br&gt;
console.log(camelCase('hello world'))&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--dwzWwKrn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/87fafjiqsl12hekx9dpp.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--dwzWwKrn--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/uploads/articles/87fafjiqsl12hekx9dpp.png" alt="result of webpack-bundle-analyzer" width="247" height="108"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Now the bundled file was only 7kb, a huge saving. I got the same results whether using nodejs require or ES6 import syntax. Try it out in your own projects and see if you have similar results.&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Learning to code</title>
      <dc:creator>Johan Melin</dc:creator>
      <pubDate>Fri, 30 Jul 2021 09:11:37 +0000</pubDate>
      <link>https://dev.to/theproductivecoder/learning-to-code-1fkh</link>
      <guid>https://dev.to/theproductivecoder/learning-to-code-1fkh</guid>
      <description>&lt;p&gt;There are lots of free resources available to start learning coding online.&lt;br&gt;
Here are some to get you started.&lt;/p&gt;

&lt;ol&gt;
  Learning to code:
  &lt;li&gt;
    W3Schools
  &lt;/li&gt;
  &lt;li&gt;
    FreeCodeCamp
  &lt;/li&gt;
  Taking it further:
  &lt;li&gt;
    JavaTpoint
  &lt;/li&gt;
  &lt;li&gt;
    GeeksforGeeks
  &lt;/li&gt;
  &lt;li&gt;
    DEV Community
  &lt;/li&gt;
  Testing your knowledge:
  &lt;li&gt;
    LeetCode
  &lt;/li&gt;
  &lt;li&gt;
    HackerRank
  &lt;/li&gt;
  &lt;li&gt;
    LinkedIn
  &lt;/li&gt;
  Asking for help:
  &lt;li&gt;
    StackOverflow
  &lt;/li&gt;
  Extra:
  &lt;li&gt;
    Udemy
  &lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;Learning to code:&lt;/h2&gt;

&lt;p id="w3schools"&gt;&lt;a href="https://www.w3schools.com/" rel="noopener noreferrer"&gt;1. W3Schools&lt;/a&gt;&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%2Fslrgaihq1kyg9wv5xsm0.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%2Fslrgaihq1kyg9wv5xsm0.png" alt="w3schools"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Reference website to learn about web technologies online. Learn about HTML, CSS, JavaScript, Python, SQL and much more. 
It also has a built in editor so you can play around with code without leaving the site.&lt;/p&gt;

&lt;p id="freecodecamp"&gt;&lt;a href="https://www.freecodecamp.org/" rel="noopener noreferrer"&gt;2. FreeCodeCamp&lt;/a&gt;&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%2Frkle8i8h8a532kjwdugh.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%2Frkle8i8h8a532kjwdugh.png" alt="freecodecamp"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;An interactive web development learning platform. Learn about HTML5, CSS, JavaScript, Python, Algorithms, Data Structures, Node, jQuery, React, Python and much more.
Also gives you a certification after completing a course.&lt;/p&gt;

&lt;h2&gt;Taking it further:&lt;/h2&gt;

&lt;p id="javatpoint"&gt;&lt;a href="https://www.javatpoint.com/" rel="noopener noreferrer"&gt;3. JavaTpoint&lt;/a&gt;&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%2F058ct0hf00putovvmdww.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%2F058ct0hf00putovvmdww.png" alt="javatpoint"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Read up on subjects like digital marketing, functional programming, AI, testing and much more.&lt;/p&gt;

&lt;p id="geeksforgeeks"&gt;&lt;a href="https://www.geeksforgeeks.org/" rel="noopener noreferrer"&gt;4. GeeksforGeeks&lt;/a&gt;&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%2Fbnm3gpuywaurzcsux2ev.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%2Fbnm3gpuywaurzcsux2ev.png" alt="geeksforgeeks"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Well explained articles related to computer science and programming.&lt;/p&gt;

&lt;p id="devcommunity"&gt;&lt;a href="https://dev.to/"&gt;5. DEV Community&lt;/a&gt;&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%2Fx5tj4hukab7wzuehr8gc.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%2Fx5tj4hukab7wzuehr8gc.png" alt="devcommunity"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This site. =)&lt;/p&gt;

&lt;h2&gt;Test your knowledge:&lt;/h2&gt;

&lt;p id="leetcode"&gt;&lt;a href="https://leetcode.com/" rel="noopener noreferrer"&gt;6. LeetCode&lt;/a&gt;&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%2Fqsj53lqb6433ofu1adxq.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%2Fqsj53lqb6433ofu1adxq.png" alt="leetcode"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Try programming puzzles and get scored on runtime and memory usage.&lt;/p&gt;

&lt;p id="hackerrank"&gt;&lt;a href="https://www.hackerrank.com/" rel="noopener noreferrer"&gt;7. HackerRank&lt;/a&gt;&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%2Fqkkjoct7rh12gv1kvhef.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%2Fqkkjoct7rh12gv1kvhef.png" alt="hackerrank"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Programming puzzles with certifications for topics like CSS, JavaScript, Problem Solving and much more.&lt;/p&gt;

&lt;p id="linkedin"&gt;&lt;a href="https://www.linkedin.com/" rel="noopener noreferrer"&gt;8. Linkedin&lt;/a&gt;&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%2Fsdxrbkf0id1qwfz4dvui.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%2Fsdxrbkf0id1qwfz4dvui.png" alt="linkedin"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;LinkedIn is not only for looking for a new job, but also has a section where you can test your skills in several categories like Front End Development.&lt;/p&gt;

&lt;h2&gt;Need help:&lt;/h2&gt;

&lt;p id="stackoverflow"&gt;&lt;a href="https://stackoverflow.com/" rel="noopener noreferrer"&gt;9. StackOverflow&lt;/a&gt;&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%2Fg1cyqxmn3kfgeiogoana.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%2Fg1cyqxmn3kfgeiogoana.png" alt="stackoverflow"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Question and answer website for programmers. When you get stuck, this is the next step after Googling.&lt;/p&gt;

&lt;h2&gt;Extra:&lt;/h2&gt;

&lt;p id="udemy"&gt;&lt;a href="https://www.udemy.com/" rel="noopener noreferrer"&gt;10. Udemy&lt;/a&gt;&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%2F9xmx682hdhsigbaes47t.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%2F9xmx682hdhsigbaes47t.png" alt="udemy"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;The only paid alternative in the list, Udemy is a course provider with videos on most topics.
Some courses can be expensive, but most of them are available for a recurring discount of around €12.&lt;/p&gt;

&lt;p&gt;Hopefully some of these will be of use to you.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>beginners</category>
      <category>javascript</category>
      <category>html</category>
    </item>
  </channel>
</rss>
