<?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: KCoder</title>
    <description>The latest articles on DEV Community by KCoder (@kristof1345).</description>
    <link>https://dev.to/kristof1345</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%2F1053127%2Fc47fb1e1-d3f3-40fa-88e6-dcfbebf475cf.png</url>
      <title>DEV Community: KCoder</title>
      <link>https://dev.to/kristof1345</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/kristof1345"/>
    <language>en</language>
    <item>
      <title>The biggest enemies of a developer - Part 1</title>
      <dc:creator>KCoder</dc:creator>
      <pubDate>Tue, 30 May 2023 16:49:07 +0000</pubDate>
      <link>https://dev.to/kristof1345/the-biggest-enemies-of-a-developer-part-1-386</link>
      <guid>https://dev.to/kristof1345/the-biggest-enemies-of-a-developer-part-1-386</guid>
      <description>&lt;h2&gt;
  
  
  Dealing with frustration and overwhelmness as a Dev
&lt;/h2&gt;

&lt;p&gt;As a developer, there will be a lot of things trying to make your life harder. Whether its your boss or a stupid bug. Its important to cope with all this and not get overwhelmed by it.&lt;/p&gt;

&lt;p&gt;I noticed that I wasn't really good at coping with these things. I felt frustrated and overwhelmed a lot. It affected not just my work but also my personal life.&lt;/p&gt;

&lt;p&gt;So I researched a little and summarized a couple of points that might help you out.&lt;/p&gt;

&lt;h2&gt;
  
  
  How to cope with frustration
&lt;/h2&gt;

&lt;p&gt;Coding is frustrating, ok?&lt;br&gt;
I don't care what anybody says it is not easy to code.&lt;/p&gt;

&lt;p&gt;At first, your code runs fine, then you accidentally remove a semicolon and your whole house catches on fire.&lt;/p&gt;

&lt;p&gt;But jokes aside. Here is what I found helpful over the years:&lt;/p&gt;

&lt;h3&gt;
  
  
  Take a break
&lt;/h3&gt;

&lt;p&gt;I found that 99% of the time when you feel frustrated about programming the best thing you can do is hit the shutdown button and take a break(please don't be like me and save your files first...).&lt;/p&gt;

&lt;p&gt;Close your laptop and go for a walk. Play with your kids. Read or do something that would make you forget about that bug you are currently stuck on.&lt;/p&gt;

&lt;p&gt;Then when you feel ready get back to it, and you will feel way better.&lt;br&gt;
This lets your mind take a break. This way it can process all that information you dumped there unconsciously.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Fun fact:&lt;/strong&gt; Our unconscious is way more powerful than our conscious.&lt;/p&gt;

&lt;h3&gt;
  
  
  Accept it
&lt;/h3&gt;

&lt;p&gt;Remind yourself that frustration is normal.&lt;/p&gt;

&lt;p&gt;You are doing hard things that not everybody would be capable to do so it's understandable if you feel frustrated.&lt;/p&gt;

&lt;p&gt;Try to view it as a sign that you are getting out of your comfort zone and making progress.&lt;br&gt;
Essentially that's what is it all about - &lt;strong&gt;constantly learning new things&lt;/strong&gt;.&lt;/p&gt;

&lt;h3&gt;
  
  
  Remember that you are not alone
&lt;/h3&gt;

&lt;p&gt;Come on now, there are a lot of developers out there just like you who got stuck on the same problem. No reason for you to feel frustrated.&lt;/p&gt;

&lt;p&gt;Try Googleing the problem.&lt;br&gt;
Somebody probably already encountered it and uploaded the solution for it. If not ask for help on forums such as Stack Overflow(and hope not to get downvoted to depression).&lt;/p&gt;

&lt;p&gt;If you don't find a solution online but still manage to solve the problem try to be your own savior and upload it somewhere.&lt;br&gt;
This way the next person won't have to go through what you went through.&lt;/p&gt;

&lt;p&gt;Thanks for reading this article. Part 2 is coming soon.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>learning</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Iterating over emojis with for/of?</title>
      <dc:creator>KCoder</dc:creator>
      <pubDate>Wed, 24 May 2023 17:14:18 +0000</pubDate>
      <link>https://dev.to/kristof1345/iterating-over-emojis-with-forof-4dfo</link>
      <guid>https://dev.to/kristof1345/iterating-over-emojis-with-forof-4dfo</guid>
      <description>&lt;h3&gt;
  
  
  This will be a short one
&lt;/h3&gt;

&lt;p&gt;In ES6 strings are by default iterable with a for/of loop character-by-character. When iterating over strings, they are iterated by the Unicode codepoint, not by UTF-16 characters.&lt;/p&gt;

&lt;p&gt;This can leave room for unexpected behavior. Let's look at this string for example: "I🧡😀".&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;let&lt;/span&gt; &lt;span class="nx"&gt;str&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;I🧡😀&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;str&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;length&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// =&amp;gt; 5&lt;/span&gt;

&lt;span class="k"&gt;for&lt;/span&gt; &lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;char&lt;/span&gt; &lt;span class="k"&gt;of&lt;/span&gt; &lt;span class="nx"&gt;str&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="nx"&gt;console&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;log&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;char&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// =&amp;gt; "I", "🧡", "😀"&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This string has a &lt;code&gt;.length&lt;/code&gt; of 5 because the two emojis require each two UTF-16 characters to represent. But when you iterate over them with a &lt;code&gt;for/of&lt;/code&gt; loop, the loop body will run three times, once for each codepoint "I", "🧡", "😀".&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to learn way more from coding than ever before</title>
      <dc:creator>KCoder</dc:creator>
      <pubDate>Thu, 18 May 2023 09:09:39 +0000</pubDate>
      <link>https://dev.to/kristof1345/how-to-learn-way-more-from-coding-than-ever-before-25dm</link>
      <guid>https://dev.to/kristof1345/how-to-learn-way-more-from-coding-than-ever-before-25dm</guid>
      <description>&lt;h3&gt;
  
  
  Want to become a superhero programmer?
&lt;/h3&gt;

&lt;p&gt;As a developer, learning is your superpower. It is especially important now that frameworks and new tech emerges every 2 days. The faster you can learn something, the more valuable you will be. So let's look at a couple of tricks I use to help me learn new stuff and not forget what I already learned.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Make sure that you understand the concepts&lt;/li&gt;
&lt;li&gt;Apply what you learned(Practice)&lt;/li&gt;
&lt;li&gt;Take notes&lt;/li&gt;
&lt;li&gt;Debug&lt;/li&gt;
&lt;li&gt;Find a community&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  1. Make sure that you understand the concepts
&lt;/h2&gt;

&lt;p&gt;When learning to code you can't memorize code, I know because I did it for a long time. But memorizing code won't get you far. If you actually want to learn something, make sure you understand the working of it. But not just what it does but why it does it too.&lt;br&gt;
For example: Take an "if...else" statement or a logical operator like "&amp;amp;&amp;amp;". Besides understanding what it does when you use it in your code, you should look a little deeper and understand why it does that thing.&lt;/p&gt;

&lt;h2&gt;
  
  
  2.Apply what you learned(Practice)
&lt;/h2&gt;

&lt;p&gt;We can all agree, that learning without actually applying the concepts you learned, is just wasting your time. I mean, why did you even learn it if you are not going to apply it in real life? It doesn't make sense.&lt;br&gt;
You need to apply things to avoid eventually forgetting them. When you apply them in practice your brain builds connections. This way you will actually remember those concepts you applied.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Take notes
&lt;/h2&gt;

&lt;p&gt;I do this when taking courses, or just generally learning new concepts that I didn't know about before. And let me tell you that taking notes, is just as important as watching a course. Because when you take a course writing down a couple of concepts throughout it, after finishing, you will have a summary of it on paper, that you can come back to any time.&lt;br&gt;
This method also helps you to better understand concepts because it forces you to write down concepts in your own words.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Debug
&lt;/h2&gt;

&lt;p&gt;The majority of programmers HATE debugging(not that I love it). It is a tedious process and sometimes the problem is just a missing semicolon. &lt;br&gt;
But what I noticed is that when I actually find the bugs in my code and solve them. I remember those problems and the solutions to them way better in the future. This is because I already encountered them before.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Find a community
&lt;/h2&gt;

&lt;p&gt;Finding and joining a good community can be a little tricky, but it's definitely worth it. In a community, you can share your code and finished projects, and the community would give feedback on it. You also would be able to provide feedback on other people's code.&lt;br&gt;
Be open to feedback, whether it's good or bad because it's all an opportunity to learn something new.&lt;/p&gt;

&lt;p&gt;Thanks for reading!&lt;/p&gt;

</description>
      <category>learning</category>
      <category>webdev</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>The Struggles of Becoming a Self Thaught Developer</title>
      <dc:creator>KCoder</dc:creator>
      <pubDate>Fri, 05 May 2023 19:46:22 +0000</pubDate>
      <link>https://dev.to/kristof1345/the-struggles-of-becoming-a-self-thaught-developer-4njo</link>
      <guid>https://dev.to/kristof1345/the-struggles-of-becoming-a-self-thaught-developer-4njo</guid>
      <description>&lt;h3&gt;
  
  
  Want to become a web developer?
&lt;/h3&gt;

&lt;p&gt;Cool, you don't need a degree for that.&lt;/p&gt;

&lt;p&gt;You don't even need to go through a boot camp or pay for an expensive course.&lt;/p&gt;

&lt;p&gt;You can learn web development by yourself. This is known as a self-taught developer. While it can be a rewarding experience, it also comes with its own set of challenges. But if this doesn't scare you off. Let's see a couple of the problems self-taught developers face.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Learning resources
&lt;/h2&gt;

&lt;p&gt;When it comes to learning how to code, the first step is to decide which method of learning is best for you. With so many resources available, such as courses, YouTube tutorials, and so on, this can be a daunting task.&lt;/p&gt;

&lt;p&gt;Afterall, the decision is yours to make, as you know yourself best. But, I can offer one piece of advice: no matter which route you choose, stick with it. Don't jump from one course to the next halfway through. I know from experience that this is not a productive approach. Instead, commit to the path you have chosen and stick with it through to the end.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Burnout
&lt;/h2&gt;

&lt;p&gt;Burnout can appear at different times and levels for each individual. It might happen to you too at some point in your career, no matter how motivated you are. Self-taught web developers are particularly vulnerable to burnout. Thankfully there are a few ways to combat it.&lt;/p&gt;

&lt;h3&gt;
  
  
  Having a purpose/vision
&lt;/h3&gt;

&lt;p&gt;Having a clear purpose or vision in front of you will help you to avoid burnout and push through harder times.&lt;/p&gt;

&lt;h3&gt;
  
  
  Taking a break
&lt;/h3&gt;

&lt;p&gt;Taking a break when you start to feel burnt out is also beneficial. It allows you to take a step back and look at the situation from a new perspective.&lt;/p&gt;

&lt;h3&gt;
  
  
  Loving what you do
&lt;/h3&gt;

&lt;p&gt;If you love to do something, or if you are interested in that thing, it will be way easier to avoid burnout.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Loneliness
&lt;/h2&gt;

&lt;p&gt;Loneliness is one of the biggest demons of a self-taught developer. Having friends is great. But if you can't share your journey with someone, it can be difficult to stay motivated and inspired.&lt;/p&gt;

&lt;p&gt;Of course, it is possible to be a lonely web developer. But it is much more enjoyable and rewarding when you have someone to share it with.&lt;/p&gt;

&lt;p&gt;If you don't have someone in your life who does the same thing you do, don't worry - you are not alone. There are thousands of lonely developers out there. My advice would be to join a community, whether it's online or in person. Doing so can be a great experience and can open up a wealth of knowledge and support.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Study methods
&lt;/h2&gt;

&lt;p&gt;When it comes to learning something on your own, the key is to create a plan and then turn it into a habit. This way, it will become almost automatic and you won't have to think about it - you'll just do it.&lt;/p&gt;

&lt;p&gt;If you're learning to code, you're likely juggling other responsibilities too. So how do you find the time to code every day? If you're having trouble finding time, it's likely because you're not dedicated enough. But let's say you can make the time - the next question is how much time should you dedicate to coding daily? The answer to this depends on you and your goals, but dedicating 1-2 hours a day is more than enough.&lt;/p&gt;

&lt;p&gt;Remember, it's not about who does the most work in a day, it's about who is the most consistent.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Tutorial hell
&lt;/h2&gt;

&lt;p&gt;You've likely heard of the term "tutorial hell" before. It's one of the biggest mistakes you can make when learning to code.&lt;/p&gt;

&lt;p&gt;Tutorial hell looks something like this: You start out learning from a course. You watch the course and copy the code, feeling amazing that you've learned something new. But when you try to recall it the next day, you realize you've forgotten it and have to start from the beginning again. When you're stuck in this never-ending cycle, you might feel like you're learning to code. But that is an illusion. When you want to build something without a tutorial, you get stuck.&lt;/p&gt;

&lt;p&gt;My suggestion to you is to take notes. That's right - take a course and take notes. When you finish a lesson, review the lesson notes and I guarantee you'll remember way more than before.&lt;/p&gt;

&lt;p&gt;Thanks for reading!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>beginners</category>
      <category>programming</category>
    </item>
    <item>
      <title>Mutable Object References</title>
      <dc:creator>KCoder</dc:creator>
      <pubDate>Mon, 01 May 2023 11:00:00 +0000</pubDate>
      <link>https://dev.to/kristof1345/mutable-object-references-big</link>
      <guid>https://dev.to/kristof1345/mutable-object-references-big</guid>
      <description>&lt;p&gt;Mutable values are values that can be changed without an entirely new value. In JavaScript objects and arrays are mutable by default.&lt;br&gt;
As already said in a previous post about Immutable Primitive Values, there is a fundamental difference in JavaScript between primitive values (undefined, null, booleans, numbers, and strings) and objects (including arrays and functions).&lt;/p&gt;

&lt;p&gt;First, objects are mutable:&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;let&lt;/span&gt; &lt;span class="nx"&gt;obj&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nx"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;2&lt;/span&gt;              &lt;span class="c1"&gt;// obj = { x: 2 }&lt;/span&gt;
&lt;span class="nx"&gt;o&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;y&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;3&lt;/span&gt;              &lt;span class="c1"&gt;// obj = { x: 2, y: 3 }&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Second, objects are not compared by  value, two objects are not equal even if they have the exact same values, this is true for arrays too:&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;let&lt;/span&gt; &lt;span class="nx"&gt;o&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="p"&gt;},&lt;/span&gt; &lt;span class="nx"&gt;p&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt; &lt;span class="na"&gt;x&lt;/span&gt;&lt;span class="p"&gt;:&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="p"&gt;}&lt;/span&gt;
&lt;span class="nx"&gt;o&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;p&lt;/span&gt;                         &lt;span class="c1"&gt;// false&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[],&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
&lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;                         &lt;span class="c1"&gt;// false&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;JavaScript objects and arrays are compared by &lt;em&gt;reference&lt;/em&gt;, two objects values are the same if and only if they &lt;em&gt;refer&lt;/em&gt; to the same underlying object:&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;let&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;[]&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt;     &lt;span class="c1"&gt;// b refers to a&lt;/span&gt;
&lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt;
&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt;          &lt;span class="c1"&gt;// 1 - changes are also visible in the array a&lt;/span&gt;
&lt;span class="nx"&gt;a&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;       &lt;span class="c1"&gt;// true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Thanks for Reading!&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>webdev</category>
      <category>tutorial</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Immutable Primitive Values</title>
      <dc:creator>KCoder</dc:creator>
      <pubDate>Thu, 27 Apr 2023 11:00:00 +0000</pubDate>
      <link>https://dev.to/kristof1345/immutable-primitive-values-1ogl</link>
      <guid>https://dev.to/kristof1345/immutable-primitive-values-1ogl</guid>
      <description>&lt;p&gt;In JavaScript, a primitive is data that is not an object, and has no methods or props, such as:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;strong&gt;null&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;undefined&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;number&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;string&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;bigint&lt;/strong&gt;&lt;/li&gt;
&lt;li&gt;&lt;strong&gt;boolean&lt;/strong&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;There is a fundamental difference between primitive values and objects. Well first primitives are &lt;strong&gt;immutable&lt;/strong&gt;: there is no way to change a primitive value. This is obvious for numbers and booleans. It is not so obvious for strings, however.&lt;br&gt;
Since strings are like arrays of characters, you might expect to be able to alter the character at any specified index. In fact, JavaScript does not allow this, and all string methods that appear to return a modified string are, in fact, returning a new string value. For example:&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;let&lt;/span&gt; &lt;span class="nx"&gt;str&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;hello world&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;span class="nx"&gt;str&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;toUpperCase&lt;/span&gt;&lt;span class="p"&gt;()&lt;/span&gt;  &lt;span class="c1"&gt;// "HELLO WORLD"&lt;/span&gt;
&lt;span class="nx"&gt;str&lt;/span&gt;                &lt;span class="c1"&gt;// "hello world" - the official is not modified&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Primitives are also &lt;strong&gt;compared by value&lt;/strong&gt;: two values are the same only if they have the same value.&lt;br&gt;
Again this sounds fair for numbers, booleans, null and undefined because there is no other way to compare them. But again this is not so obvious for strings. If you compare two string values, JavaScript treats them as equal if, and only of, they have the same length and if the char at each index is the same.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>beginners</category>
      <category>programming</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Rounding errors in JavaScript</title>
      <dc:creator>KCoder</dc:creator>
      <pubDate>Fri, 21 Apr 2023 09:16:00 +0000</pubDate>
      <link>https://dev.to/kristof1345/rounding-errors-in-javascript-2b93</link>
      <guid>https://dev.to/kristof1345/rounding-errors-in-javascript-2b93</guid>
      <description>&lt;p&gt;JavaScript uses the IEEE-754 floating-point representation, which is a binary representation, that is capable of exactly representing fractions like 1/2 and 1/8. This is great and all, but the fractions we most commonly use are decimal ones, such as: 1/10 and 1/100.&lt;/p&gt;

&lt;p&gt;Numbers in JavaScript have a lot of precision but the problem is that  floating point representations cannot exactly represent numbers like 0.1 or 0.01. They can very closely approximate decimal numbers, but the fact that numbers like these can't be exactly represented can lead to problems.&lt;/p&gt;

&lt;p&gt;Example:&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;let&lt;/span&gt; &lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;3&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="kd"&gt;let&lt;/span&gt; &lt;span class="nx"&gt;y&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;2&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;y&lt;/span&gt;              &lt;span class="c1"&gt;// =&amp;gt; false: They are not the same&lt;/span&gt;
&lt;span class="nx"&gt;x&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;             &lt;span class="c1"&gt;// =&amp;gt; false: .3 - .2 !== .1&lt;/span&gt;
&lt;span class="nx"&gt;y&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="mi"&gt;1&lt;/span&gt;             &lt;span class="c1"&gt;// =&amp;gt; true: .2 - .1 === .1&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Because of rounding errors the approximations of &lt;code&gt;x&lt;/code&gt; is not exactly the same as the approximations of &lt;code&gt;y&lt;/code&gt; . They are very very close to each other, but not the same!&lt;br&gt;
Also it's important to note that this problem is not specific to JavaScript, it affects all of the languages that use binary floating-point numbers.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>javascript</category>
      <category>learning</category>
      <category>node</category>
    </item>
    <item>
      <title>Mindset of a web developer</title>
      <dc:creator>KCoder</dc:creator>
      <pubDate>Sat, 15 Apr 2023 05:43:20 +0000</pubDate>
      <link>https://dev.to/kristof1345/mindset-of-a-web-developer-3o0p</link>
      <guid>https://dev.to/kristof1345/mindset-of-a-web-developer-3o0p</guid>
      <description>&lt;p&gt;There is one thing that all good programmers have in common and that is that they have a good mindset. They built their mindset throughout trials and tribulations that they went through while they learned to code and even after that. Of course not all developers or programmers have the same mindset, but there are some basic elements of these mindset that all developers have, or should have.&lt;/p&gt;

&lt;p&gt;So what are these basic mindset shifts or perceptions that every developer should master?&lt;/p&gt;

&lt;p&gt;Well, here they are:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Remember your goal&lt;/li&gt;
&lt;li&gt;Put your ego to the side&lt;/li&gt;
&lt;li&gt;Look at your code from a different angle&lt;/li&gt;
&lt;li&gt;Learn when you need to take a break&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  1. Remember your goal
&lt;/h2&gt;

&lt;p&gt;This is especially important when you get stuck with one of your projects or just simply go through a hard time developing something.&lt;br&gt;
In these times it is really important to remember why you are doing what you are doing, and what are your goals because that's the only way you can push through these hard times.&lt;/p&gt;

&lt;p&gt;But please be aware that simply keeping your goals in mind won't make you succeed in life. To succeed you need to be consistent on your journey. If you are interested on this topic, I highly recommend you checking out a book named &lt;a href="https://jamesclear.com/atomic-habits"&gt;Atomic Habits&lt;/a&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Put your ego to the side
&lt;/h2&gt;

&lt;p&gt;Putting your ego to the side is especially important when you have to ask someone for advice or when you have to google something because you forgot it, and these times your ego can be a barrier telling you that you don't need help, because you know the answer to that problem, but in reality we all know that that is not true all the time. There are times when you simply need to ask someone, or you need to google something, and for that you need to let go of your ego.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. Looking at your code from a different angle
&lt;/h2&gt;

&lt;p&gt;When you are seemingly unable to solve a problem in your code with a specific approach, maybe what you should try is take a step back and look at the problem again and try to solve it from a different angle or with a different approach.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Learn when you need to take a break
&lt;/h2&gt;

&lt;p&gt;You need to learn when to take a break. Why? Because when you are stuck on a problem you can get overwhelmed or frustrated, and when you are frustrated it's going to be very hard to solve that problem, because you won't be able to think with pure logic.&lt;/p&gt;

&lt;p&gt;It is very important to learn to take breaks, so you can calm your mind, regroup your thoughts and solve that problem.&lt;/p&gt;

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