<?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: zunami</title>
    <description>The latest articles on DEV Community by zunami (@zunamidev).</description>
    <link>https://dev.to/zunamidev</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%2F426171%2Fef29326a-cc2e-43e8-9ffb-ae6ac4f5e619.jpeg</url>
      <title>DEV Community: zunami</title>
      <link>https://dev.to/zunamidev</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/zunamidev"/>
    <language>en</language>
    <item>
      <title>Day 1 of 7 days of VIM challenge</title>
      <dc:creator>zunami</dc:creator>
      <pubDate>Tue, 29 Dec 2020 20:12:38 +0000</pubDate>
      <link>https://dev.to/zunamidev/day-1-of-7-days-of-vim-challenge-3c53</link>
      <guid>https://dev.to/zunamidev/day-1-of-7-days-of-vim-challenge-3c53</guid>
      <description>&lt;p&gt;Heyy,&lt;/p&gt;

&lt;p&gt;I started today(29.12.2020) the 7 days of VIM challenge where I'm only allowed to use VIM as my text editor. &lt;/p&gt;

&lt;p&gt;Why am I doing this? Because I wanted to learn VIM and I want to feel like a pro programmer. Now I will talk a little bit about that project and what I have done today with VIM.&lt;/p&gt;

&lt;p&gt;Today I mostly edited my config so I can work perfectly with VIM also I learned some important hotkeys. Most of the time I'm editing Typescript and Javascript code. It was quite tricky to not close my Terminal I'm working on. Mac OS has a Keyboard shortcut that closes the current Windows you are focusing on, the shortcut is Command + w. After I closed my Terminal three times in 5 minutes I was quite annoyed so I started to click key by key and not so fast, after a while I started to feel confident with the shortcuts so I started to type faster again. At this time I haven't installed any plugin manager or a autocomplete plugin so after searching for a plugin manager I installed plug. Why did I install Plug? I don't know it was easy to use and all videos I watched used it. After 2 hours my VIM started to lag a little bit and stopped working when I'm typing a round bracket so I was looking for a solution but didn't found one, so if you know you please let me know :D.&lt;/p&gt;

&lt;p&gt;So this was mostly the first day of the challenge and I started to like VIM. Here you can find my current &lt;a href="https://gist.github.com/zunamidev/78b1b505d8a4aa1045748b8e04623b0e"&gt;.vimrc&lt;/a&gt; If you want to join this challenge use the hashtag #7daysOfVim&lt;/p&gt;

&lt;p&gt;Thanks for reading stay tuned for the second day :)&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Today I learned a small trick on how to count in Binary</title>
      <dc:creator>zunami</dc:creator>
      <pubDate>Tue, 01 Dec 2020 20:11:52 +0000</pubDate>
      <link>https://dev.to/zunamidev/today-i-learned-to-count-in-binary-3ho9</link>
      <guid>https://dev.to/zunamidev/today-i-learned-to-count-in-binary-3ho9</guid>
      <description>&lt;p&gt;Hey welcome back,&lt;/p&gt;

&lt;p&gt;Today I learned a small trick on how to count in binary. It is really simple.&lt;/p&gt;

&lt;p&gt;How to do it? You need to divide it by two until you reach the number 1, but you need to ignore the numbers after the comma, and important is that you don't round the number you get after you divide it by 2. We will try now to get the binary number of the number 45.&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;45/2&lt;/th&gt;
&lt;th&gt;22/2&lt;/th&gt;
&lt;th&gt;11/2&lt;/th&gt;
&lt;th&gt;5/2&lt;/th&gt;
&lt;th&gt;2/2&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;45&lt;/td&gt;
&lt;td&gt;22&lt;/td&gt;
&lt;td&gt;11&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Now we have divided everything by two and got the last number the last part is to add under every even number a 0 and under every odd number a 1 then our table will look like this:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;45/2&lt;/th&gt;
&lt;th&gt;22/2&lt;/th&gt;
&lt;th&gt;11/2&lt;/th&gt;
&lt;th&gt;5/2&lt;/th&gt;
&lt;th&gt;2/2&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;45&lt;/td&gt;
&lt;td&gt;22&lt;/td&gt;
&lt;td&gt;11&lt;/td&gt;
&lt;td&gt;5&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Now it looks like this and we got the binary number &lt;em&gt;101101&lt;/em&gt; in this example it is not necessary to flip the binary number (&lt;em&gt;101101&lt;/em&gt;) but I had to flip the binary number because sometimes I got another number then I needed. Here is another example for the number 34 where you need to flip the binary number at the end:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;&lt;/th&gt;
&lt;th&gt;34/2&lt;/th&gt;
&lt;th&gt;17/2&lt;/th&gt;
&lt;th&gt;8/2&lt;/th&gt;
&lt;th&gt;4/2&lt;/th&gt;
&lt;th&gt;2/2&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;34&lt;/td&gt;
&lt;td&gt;17&lt;/td&gt;
&lt;td&gt;8&lt;/td&gt;
&lt;td&gt;4&lt;/td&gt;
&lt;td&gt;2&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;0&lt;/td&gt;
&lt;td&gt;1&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;Then we get the binary number &lt;em&gt;010001&lt;/em&gt; but this number is the wrong number we need to flip it then our binary number looks like this: &lt;em&gt;100010&lt;/em&gt; now if we check it with a Decimal to Binary online converter we can see that we are right here is the prove:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--hsNsUi2S--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/xikg2co7ys6zvd7png08.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--hsNsUi2S--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/xikg2co7ys6zvd7png08.png" alt="Here is the prove"&gt;&lt;/a&gt; &lt;/p&gt;

&lt;p&gt;To the &lt;a href="https://www.rapidtables.com/convert/number/decimal-to-binary.html"&gt;Converter&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;I hope you enjoyed this blog post. If you have any idea or recommendation feel free to write a comment :)&lt;/p&gt;

</description>
      <category>beginners</category>
      <category>computerscience</category>
      <category>codenewbie</category>
    </item>
    <item>
      <title>Today I answered a question which has been bothering me for a long time.</title>
      <dc:creator>zunami</dc:creator>
      <pubDate>Mon, 20 Jul 2020 17:45:28 +0000</pubDate>
      <link>https://dev.to/zunamidev/today-i-answered-a-question-which-has-been-bothering-me-for-a-long-time-45e8</link>
      <guid>https://dev.to/zunamidev/today-i-answered-a-question-which-has-been-bothering-me-for-a-long-time-45e8</guid>
      <description>&lt;h3&gt;
  
  
  Hey!,
&lt;/h3&gt;

&lt;p&gt;today I started a little bit with the semantics of Javascript and answered me on of the questions I have since I started with this language. This made the language for me a little bit illogical. But which question? Its the question why&lt;br&gt;
if I do a addition with a string and a int it the string joins with the string,&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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;11&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;111&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;and if I do a subtraction the string becomes subtracted like int minus int.&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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;11&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt; &lt;span class="o"&gt;-&lt;/span&gt; &lt;span class="mi"&gt;1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;10&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;That was the question which bothered me a long time. Today I found the answer in the ECMAScript semantics.&lt;/p&gt;

&lt;p&gt;On page 294 is the semantic for the addition operator (+) which is not only used to add two numbers or more, no its also used to join strings and if one of the given values is a string it converts both values (if the string contains a number not something like "eleven" it must be "11") to a string and return it as a joined string. &lt;br&gt;
&lt;a href="https://res.cloudinary.com/practicaldev/image/fetch/s--tFMGR7gl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/kd1ou8yf1gzpoit71mzz.png" class="article-body-image-wrapper"&gt;&lt;img src="https://res.cloudinary.com/practicaldev/image/fetch/s--tFMGR7gl--/c_limit%2Cf_auto%2Cfl_progressive%2Cq_auto%2Cw_880/https://dev-to-uploads.s3.amazonaws.com/i/kd1ou8yf1gzpoit71mzz.png" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And the Subtraction Operator (-) converts both values to a number (if possible) and then it subtracts them.&lt;/p&gt;

&lt;p&gt;And it makes the language now a bit more logical for me I hope for you too. I'm sorry for my English btw I'm learning it currently.&lt;/p&gt;

&lt;p&gt;Its my first blog post if you have feedback please leave a comment.&lt;/p&gt;

&lt;p&gt;Sources: &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;a href="https://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262.pdf"&gt;https://www.ecma-international.org/publications/files/ECMA-ST/ECMA-262.pdf&lt;/a&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>javascript</category>
    </item>
  </channel>
</rss>
