<?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: emertola</title>
    <description>The latest articles on DEV Community by emertola (@emertola).</description>
    <link>https://dev.to/emertola</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%2F238327%2F17f2f407-1fa4-4d9f-8919-05293a9c9862.jpg</url>
      <title>DEV Community: emertola</title>
      <link>https://dev.to/emertola</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/emertola"/>
    <language>en</language>
    <item>
      <title>Random Front-end codes I learned today (#001) - Array destructure</title>
      <dc:creator>emertola</dc:creator>
      <pubDate>Sat, 23 Jan 2021 12:52:47 +0000</pubDate>
      <link>https://dev.to/emertola/random-javascript-codes-i-learned-today-001-array-destructure-3gpe</link>
      <guid>https://dev.to/emertola/random-javascript-codes-i-learned-today-001-array-destructure-3gpe</guid>
      <description>&lt;p&gt;Without further intro, I'll go straight to the point.&lt;/p&gt;

&lt;h3&gt;
  
  
  What is Array destructure?
&lt;/h3&gt;

&lt;p&gt;As &lt;a href="https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Destructuring_assignment"&gt;MDN&lt;/a&gt; describes it, &lt;em&gt;destructuring&lt;/em&gt; is a way of unpacking values from, in our case, an Array (or properties from an Object, but we'll focus on the Array on this topic).&lt;/p&gt;

&lt;p&gt;There are a lot times, when I want to access a value from an array, say the first value, and store it in a variable, this is what I normally do:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--ZolxZx5o--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/komj1r0c57d66sx7gl4j.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--ZolxZx5o--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/komj1r0c57d66sx7gl4j.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;With array destructuring, I discovered that I can do that in just a single line of code.&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--myeQG_uC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/bvqz78f6dc1ny1ei88cs.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--myeQG_uC--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/bvqz78f6dc1ny1ei88cs.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This means that the first value of the array (which is &lt;strong&gt;pencil&lt;/strong&gt;) will immediately be stored to a variable &lt;em&gt;pencil&lt;/em&gt;. It could also be another variable name, and it'll still be of the same result:&lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--AlGFlsGY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/0l8e5mjpsgk8jkzoc9oi.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--AlGFlsGY--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/0l8e5mjpsgk8jkzoc9oi.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>Dev Discovery - Angular stops hot reloading on my VSCode Editor</title>
      <dc:creator>emertola</dc:creator>
      <pubDate>Tue, 08 Oct 2019 04:42:33 +0000</pubDate>
      <link>https://dev.to/emertola/dev-discovery-angular-stops-hot-reloading-on-my-vscode-editor-n7d</link>
      <guid>https://dev.to/emertola/dev-discovery-angular-stops-hot-reloading-on-my-vscode-editor-n7d</guid>
      <description>&lt;p&gt;Normally, your angular app will re-compile after hitting that save (ctrl+s) and will reload your page on the browser. But when your app gets bigger, as I understand it correctly, it will have some memory leak and will stop the hot reloading. A small popup will appear on your VS Code and will give you the following error:&lt;/p&gt;

&lt;p&gt;&lt;em&gt;"Visual Studio Code is unable to watch for file changes in this large workspace" (error ENOSPC)&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;This gives you a notification that you need to increase the size of your watcher to listen for file changes. You can check/view your current watcher size by typing the following on your terminal:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;cat /proc/sys/fs/inotify/max_user_watches
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;I have experienced this using a linux/ubuntu OS, and to resolve this, you can increase the size of the watcher by typing:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ sudo sysctl fs.inotify.max_user_watches=524288
$ sudo sysctl -p
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;em&gt;skip the $ symbol&lt;/em&gt;&lt;/p&gt;

&lt;p&gt;Your watcher is now updated to listen to 524288 or 512 MB of file changes.&lt;/p&gt;

&lt;p&gt;Finally, re-run your app (i.e. ctrl+c and npm start or ng serve).&lt;/p&gt;

&lt;p&gt;Resources:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://code.visualstudio.com/docs/setup/linux#_visual-studio-code-is-unable-to-watch-for-file-changes-in-this-large-workspace-error-enospc"&gt;https://code.visualstudio.com/docs/setup/linux#_visual-studio-code-is-unable-to-watch-for-file-changes-in-this-large-workspace-error-enospc&lt;/a&gt;&lt;/li&gt;
&lt;li&gt;&lt;a href="https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers#the-technical-details"&gt;https://github.com/guard/listen/wiki/Increasing-the-amount-of-inotify-watchers#the-technical-details&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>devdiscovery</category>
      <category>angular</category>
      <category>vscode</category>
      <category>hotreload</category>
    </item>
    <item>
      <title>Help - Angular live reload suddenly stops</title>
      <dc:creator>emertola</dc:creator>
      <pubDate>Tue, 01 Oct 2019 05:05:53 +0000</pubDate>
      <link>https://dev.to/emertola/help-angular-live-reload-suddenly-stops-1flo</link>
      <guid>https://dev.to/emertola/help-angular-live-reload-suddenly-stops-1flo</guid>
      <description>&lt;p&gt;I am using VS Code as my editor. Usually, every time I hit save (Ctrl + s) it automatically compiles and live reload the browser. But now it stops, sometimes it goes back to normal without me tweaking anything. I am running the app using 'npm start' or 'npm run start' to run both the 'ng serve' and a proxy config.&lt;/p&gt;

&lt;p&gt;Does anyone encountered this, and what is your resolution to this? Thanks&lt;/p&gt;

</description>
      <category>angular</category>
      <category>vscode</category>
      <category>livereloadproblem</category>
    </item>
    <item>
      <title>Dev Journey - roughly 6 years until a serious developer exposure</title>
      <dc:creator>emertola</dc:creator>
      <pubDate>Sun, 29 Sep 2019 14:33:07 +0000</pubDate>
      <link>https://dev.to/emertola/dev-journey-roughly-6-years-until-a-serious-developer-exposure-4kle</link>
      <guid>https://dev.to/emertola/dev-journey-roughly-6-years-until-a-serious-developer-exposure-4kle</guid>
      <description>&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--wuRWSCg7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/t31aftut7rr9fz35pxh8.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--wuRWSCg7--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://thepracticaldev.s3.amazonaws.com/i/t31aftut7rr9fz35pxh8.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;6 years, but during those times I did not stop of having a serious career path and have that exposure. I never gave up, not that I just waited and see if things would happen. I did my homework - those sleepless nights watching video tutorials, reading some articles and blogs, googling and searching other's approach in Stackoverflow. I did not stop improving myself until I got an offer.&lt;/p&gt;

&lt;p&gt;How about you, how long did it tested you until you got your dev exposure?&lt;/p&gt;

&lt;p&gt;Feel free to share :)&lt;/p&gt;

</description>
    </item>
  </channel>
</rss>
