<?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: The Monkey Dev</title>
    <description>The latest articles on DEV Community by The Monkey Dev (@jukilo_lokiju).</description>
    <link>https://dev.to/jukilo_lokiju</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%2F1032387%2F76309605-26ca-4e1d-b74c-ee1e4a4bf620.jpg</url>
      <title>DEV Community: The Monkey Dev</title>
      <link>https://dev.to/jukilo_lokiju</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jukilo_lokiju"/>
    <language>en</language>
    <item>
      <title>3 resources from Beginner to PRO to learn Ruby on Rails</title>
      <dc:creator>The Monkey Dev</dc:creator>
      <pubDate>Thu, 25 Apr 2024 10:01:05 +0000</pubDate>
      <link>https://dev.to/jukilo_lokiju/3-resources-from-beginner-to-pro-to-learn-ruby-on-rails-3pke</link>
      <guid>https://dev.to/jukilo_lokiju/3-resources-from-beginner-to-pro-to-learn-ruby-on-rails-3pke</guid>
      <description>&lt;h2&gt;
  
  
  TL;DR
&lt;/h2&gt;

&lt;h3&gt;
  
  
  Rails Guides: Your Go-To for Beginners (FREE)
&lt;/h3&gt;

&lt;p&gt;🔗 &lt;a href="https://guides.rubyonrails.org/"&gt;Rails Guides&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  GoRails: Gems and tools ($190/year)
&lt;/h3&gt;

&lt;p&gt;🔗 &lt;a href="https://gorails.com/"&gt;GoRails&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  RubyCademy: Pro Tips and Advanced Patterns ($80/year)
&lt;/h3&gt;

&lt;p&gt;🔗 &lt;a href="https://www.rubycademy.com"&gt;RubyCademy&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Enjoy!&lt;/p&gt;

&lt;h2&gt;
  
  
  Rails Guides: Your Go-To for Beginners
&lt;/h2&gt;

&lt;p&gt;Picture this: you're a Rails newbie, staring blankly at your screen, wondering where to start.&lt;/p&gt;

&lt;p&gt;Rails Guides is here to rescue you from the depths of confusion!&lt;/p&gt;

&lt;p&gt;It's like having a wise old guru guiding you through the mystical forest of Rails, one step at a time.&lt;/p&gt;

&lt;p&gt;From setting up your environment to mastering MVC, and core concepts, consider this your beginner's handbook.&lt;/p&gt;

&lt;h2&gt;
  
  
  GoRails: Gems and Tools
&lt;/h2&gt;

&lt;p&gt;Alright, champ, you've mastered the basics, but now it's time to learn more about what the Rails community has to offer: Gems and tools! GoRails is the perfect place for this. You'll learn how to use the Bunny API, create Rails generators, install and configure Whisper, etc...&lt;/p&gt;

&lt;h2&gt;
  
  
  RubyCademy: PRO Tips and Advanced Techniques and Patterns
&lt;/h2&gt;

&lt;p&gt;if you want to master Rails, RubyCademy is probably your best ally.&lt;/p&gt;

&lt;p&gt;It's the best resource to learn how to combine advanced Ruby concepts, design patterns, SOLID principles, and Ruby/Rails tools to create flexible, decoupled solutions. It only focuses on real-world examples.&lt;/p&gt;

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

&lt;p&gt;So there you have it, folks! With &lt;a href="https://guides.rubyonrails.org/"&gt;Rails Guides&lt;/a&gt;, &lt;a href="https://gorails.com/"&gt;GoRails&lt;/a&gt;, and &lt;a href="https://www.rubycademy.com"&gt;RubyCademy&lt;/a&gt; by your side, you'll be slinging code like a seasoned pro in no time.&lt;/p&gt;

</description>
      <category>rails</category>
      <category>ruby</category>
      <category>hotwire</category>
      <category>programming</category>
    </item>
    <item>
      <title>The evolution of Javascript Strings over the years</title>
      <dc:creator>The Monkey Dev</dc:creator>
      <pubDate>Sat, 25 Feb 2023 16:53:36 +0000</pubDate>
      <link>https://dev.to/jukilo_lokiju/the-evolution-of-javascript-strings-over-the-years-f5f</link>
      <guid>https://dev.to/jukilo_lokiju/the-evolution-of-javascript-strings-over-the-years-f5f</guid>
      <description>&lt;p&gt;In Javascript, the String object is used to represent and manipulate a sequence of characters. Strings are useful for holding data that can be represented in text form.&lt;/p&gt;

&lt;p&gt;Javascript Strings implementation has evolved through time.&lt;/p&gt;

&lt;p&gt;So, in this article, we are going to cover the 6 major changes that occurred for Javascript strings.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. Unicode support
&lt;/h2&gt;

&lt;p&gt;Prior to ES6 (ECMAScript 2015), JavaScript had limited support for Unicode characters.&lt;/p&gt;

&lt;p&gt;So, one of the most significant additions to Unicode support in ES6 was the introduction of Unicode code point escapes. &lt;/p&gt;

&lt;p&gt;This feature allows developers to represent Unicode characters using their code point values, rather than relying on character literals.&lt;/p&gt;

&lt;p&gt;For example, prior to ES6, if you wanted to represent the character "💩" (a popular Unicode emoji), you would need to use a UTF-16 surrogate pair like this: &lt;code&gt;"\uD83D\uDCA9"&lt;/code&gt;. With code point escapes in ES6, you can represent the same character using its code point value, like this: &lt;code&gt;"\u{1F4A9}"&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Here's an example of how code point escapes can be used in practice:&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="c1"&gt;// Using UTF-16 surrogate pairs:&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;poop1&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;&lt;span class="s2"&gt;uD83D&lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;&lt;span class="s2"&gt;uDCA9&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;

&lt;span class="c1"&gt;// Using Unicode code point escapes:&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;poop2&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;&lt;span class="s2"&gt;u{1F4A9}&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;poop1&lt;/span&gt; &lt;span class="o"&gt;===&lt;/span&gt; &lt;span class="nx"&gt;poop2&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// true&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This code creates two string variables, &lt;code&gt;poop1&lt;/code&gt; and &lt;code&gt;poop2&lt;/code&gt;, that both represent the "💩" character.&lt;/p&gt;

&lt;p&gt;The first variable uses UTF-16 surrogate pairs to encode the character, while the second variable uses a code point escape. &lt;/p&gt;

&lt;p&gt;The &lt;code&gt;console.log()&lt;/code&gt; statement then compares the two variables, which returns true because they both represent the same character.&lt;/p&gt;

&lt;p&gt;Using code point escapes allows developers to work with a wider range of Unicode characters, including those that cannot be represented using UTF-16 surrogate pairs. This makes it easier to work with text in different languages and writing systems, and can improve the accuracy and reliability of string processing.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Template literals
&lt;/h2&gt;

&lt;p&gt;Template literals were introduced in ES6 as a new way to create strings in JavaScript. They allow developers to embed expressions and variables directly into string literals using interpolation, instead of using concatenation or string manipulation methods.&lt;/p&gt;

&lt;p&gt;Here's an example of how template literals can be used in practice:&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;name&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Alice&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;age&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;27&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;message&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`Hello, my name is &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;name&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; and I am &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;age&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; years old.`&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;message&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this code, we define two variables name and age that contain a person's &lt;code&gt;name&lt;/code&gt; and &lt;code&gt;age&lt;/code&gt;. We then create a &lt;code&gt;message&lt;/code&gt; variable using a template literal that includes the &lt;code&gt;name&lt;/code&gt; and &lt;code&gt;age&lt;/code&gt; variables using interpolation. The resulting string is &lt;code&gt;"Hello, my name is Alice and I am 27 years old."&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Template literals can also be used to create multi-line strings, which is much simpler than using escape characters or concatenation with regular string literals. Here's an 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;const&lt;/span&gt; &lt;span class="nx"&gt;poem&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`
  I wandered lonely as a cloud
  That floats on high o'er vales and hills,
  When all at once I saw a crowd,
  A host, of golden daffodils;
  Beside the lake, beneath the trees,
  Fluttering and dancing in the breeze.
`&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;poem&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this code, we define a &lt;code&gt;poem&lt;/code&gt; variable using a multi-line template literal. The resulting string includes line breaks and whitespace that are preserved in the output. The &lt;code&gt;console.log()&lt;/code&gt; statement then displays the poem as formatted text.&lt;/p&gt;

&lt;p&gt;Overall, template literals make it easier to create and manipulate strings in JavaScript, especially when working with dynamic content and multi-line text. They offer a more concise and readable syntax compared to traditional string manipulation methods.&lt;/p&gt;

&lt;h2&gt;
  
  
  3. String methods
&lt;/h2&gt;

&lt;p&gt;JavaScript has always had a rich set of string manipulation methods, but new methods have been added in recent versions of the language.&lt;/p&gt;

&lt;p&gt;For example, ES2019 added two new methods to the String.prototype object: trimStart() and trimEnd(). These methods are similar to the existing trim() method, but they only remove whitespace characters from the beginning or end of a string, respectively.&lt;/p&gt;

&lt;p&gt;Here's an example of how these methods can be used in practice:&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;greeting&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="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;greeting&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;trim&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;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;greeting&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;trimStart&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;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;greeting&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;trimEnd&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt; &lt;span class="c1"&gt;// "   Hello, world!"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this code, we define a &lt;code&gt;greeting&lt;/code&gt; variable that contains a string with leading and trailing whitespace. We then call the &lt;code&gt;trim()&lt;/code&gt;, &lt;code&gt;trimStart()&lt;/code&gt;, and &lt;code&gt;trimEnd()&lt;/code&gt; methods on the &lt;code&gt;greeting&lt;/code&gt; variable, respectively.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;trim()&lt;/code&gt; method removes all leading and trailing whitespace characters from the string, resulting in the trimmed string &lt;code&gt;"Hello, world!"&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;trimStart()&lt;/code&gt; method removes only the leading whitespace characters from the string, resulting in the trimmed string &lt;code&gt;"Hello, world!   "&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;trimEnd()&lt;/code&gt; method removes only the trailing whitespace characters from the string, resulting in the trimmed string &lt;code&gt;"   Hello, world!"&lt;/code&gt;.&lt;/p&gt;

&lt;h2&gt;
  
  
  4. Unicode normalization
&lt;/h2&gt;

&lt;p&gt;ES6 also introduced the &lt;code&gt;String.prototype.normalize()&lt;/code&gt; method, which allows developers to normalize Unicode strings, reducing the risk of errors due to different Unicode character encodings.&lt;/p&gt;

&lt;p&gt;The two main normalization forms are NFC (Normalization Form Canonical Composition) and NFD (Normalization Form Canonical Decomposition), which are defined by the Unicode standard.&lt;/p&gt;

&lt;p&gt;Here's an example of how to use the &lt;code&gt;normalize()&lt;/code&gt; method in ES6 to normalize a string to its NFC form:&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;str&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;&lt;span class="s2"&gt;u1E9B&lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;&lt;span class="s2"&gt;u0323&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// A Latin small letter sharp s with dot below&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="c1"&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;normalize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;NFC&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this code, we define a &lt;code&gt;str&lt;/code&gt; variable that contains a string with a Latin small letter sharp s with dot below, which can be represented in two different ways in Unicode. We then call the &lt;code&gt;normalize()&lt;/code&gt; method on the str variable with the argument &lt;code&gt;"NFC"&lt;/code&gt; to normalize the string to its NFC form. The resulting normalized string is &lt;code&gt;"ṩ"&lt;/code&gt;, which is the canonical form of the character according to the Unicode standard.&lt;/p&gt;

&lt;p&gt;Similarly, we can use the &lt;code&gt;normalize()&lt;/code&gt; method with the argument &lt;code&gt;"NFD"&lt;/code&gt; to normalize a string to its NFD form:&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;str&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;&lt;span class="s2"&gt;u1E9B&lt;/span&gt;&lt;span class="se"&gt;\&lt;/span&gt;&lt;span class="s2"&gt;u0323&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// A Latin small letter sharp s with dot below&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="c1"&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;normalize&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;NFD&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;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, the &lt;code&gt;normalize()&lt;/code&gt; method is called with the argument &lt;code&gt;"NFD"&lt;/code&gt;, resulting in a normalized string of &lt;code&gt;"ṩ"&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;Unicode normalization can be important for accurate text processing, sorting, and searching, especially when working with multilingual text or text that contains combining characters or other diacritics.&lt;/p&gt;

&lt;h2&gt;
  
  
  5. Raw strings
&lt;/h2&gt;

&lt;p&gt;In ES6, the language also added the ability to create raw strings using template literals.&lt;/p&gt;

&lt;p&gt;A raw string is a string literal that allows backslashes to be interpreted as literal backslashes, instead of escape characters. To create a raw string, we can use the &lt;code&gt;String.raw()&lt;/code&gt; method with a template literal.&lt;/p&gt;

&lt;p&gt;Here's an example of how to use the &lt;code&gt;String.raw()&lt;/code&gt; method to create a raw 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="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;path&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nb"&gt;String&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;raw&lt;/span&gt;&lt;span class="s2"&gt;`C:\Users\Username\Documents\file.txt`&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;path&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// "C:\\Users\\Username\\Documents\\file.txt"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this code, we define a &lt;code&gt;path&lt;/code&gt; variable that contains a Windows file path as a raw string using the &lt;code&gt;String.raw()&lt;/code&gt; method.&lt;br&gt;
The resulting string is &lt;code&gt;"C:\\Users\\Username\\Documents\\file.txt"&lt;/code&gt;, which contains literal backslashes instead of escape characters.&lt;/p&gt;

&lt;p&gt;Raw strings can be particularly useful when working with regular expressions, where backslashes are commonly used as escape characters. They can also be useful when working with file paths or other strings that contain a large number of backslashes.&lt;/p&gt;
&lt;h2&gt;
  
  
  6. Performance improvements
&lt;/h2&gt;

&lt;p&gt;Finally, the latest versions of JavaScript have seen significant performance improvements, including faster string operations.&lt;/p&gt;

&lt;p&gt;Indeed, JavaScript engine developers are constantly improving the performance of JavaScript strings with each new release of the language.&lt;/p&gt;

&lt;p&gt;Here are a few examples of performance improvements that have been made to JavaScript strings in recent versions:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Faster String concatenation: In versions prior to ES2015, concatenating strings using the &lt;code&gt;+&lt;/code&gt; operator was inefficient due to the creation of temporary string objects.&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;However, in later versions of JavaScript, including ES2015 and later, concatenating strings using template literals or the &lt;code&gt;String.prototype.concat()&lt;/code&gt; method is much faster and more efficient.&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;firstName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;John&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;lastName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;Doe&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;fullName&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;firstName&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt; &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="nx"&gt;lastName&lt;/span&gt;&lt;span class="p"&gt;}&lt;/span&gt;&lt;span class="s2"&gt;`&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="c1"&gt;// Using template literals is faster than using the '+' operator&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;fullName&lt;/span&gt;&lt;span class="p"&gt;);&lt;/span&gt; &lt;span class="c1"&gt;// "John Doe"&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Faster String indexing: In earlier versions of JavaScript, accessing individual characters in a string using bracket notation (&lt;code&gt;str[index]&lt;/code&gt;) was relatively slow. However, in recent versions of JavaScript, including ES2015 and later, indexing into strings has been optimized to be much faster, making it a viable option for high-performance string processing.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Improved String matching: In older versions of JavaScript, regular expressions used for string matching could be slow and inefficient. However, in later versions of JavaScript, including ES2015 and later, regular expressions have been optimized to be much faster, making string matching a faster and more efficient operation.&lt;br&gt;
&lt;/p&gt;&lt;/li&gt;
&lt;/ol&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;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;The quick brown fox jumps over the lazy dog&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;regex&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="sr"&gt;/quick/&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;regex&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;test&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="c1"&gt;// Regular expression matching is faster in the latest versions of JavaScript&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;These are just a few examples of the performance improvements made to JavaScript strings in recent versions of the language. As JavaScript continues to evolve, developers can expect even more optimizations and improvements to string processing performance.&lt;/p&gt;

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

&lt;p&gt;Overall, the evolution of JavaScript's string handling capabilities has made it easier for developers to work with strings in a wide range of contexts, including Unicode support, interpolation, and manipulation. The addition of raw strings and performance improvements have also made JavaScript code more robust and efficient.&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>typescript</category>
      <category>programming</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Say Goodbye to Slow Load Times with this HTTP/3 protocol!</title>
      <dc:creator>The Monkey Dev</dc:creator>
      <pubDate>Fri, 24 Feb 2023 12:57:56 +0000</pubDate>
      <link>https://dev.to/jukilo_lokiju/say-goodbye-to-slow-load-times-with-this-http3-protocol-58jh</link>
      <guid>https://dev.to/jukilo_lokiju/say-goodbye-to-slow-load-times-with-this-http3-protocol-58jh</guid>
      <description>&lt;p&gt;&lt;a href="https://medium.com/@lokiju_jukilo/say-goodbye-to-slow-load-times-with-this-http-3-protocol-b308d0eddb3a" rel="noopener noreferrer"&gt;https://medium.com/@lokiju_jukilo/say-goodbye-to-slow-load-times-with-this-http-3-protocol-b308d0eddb3a&lt;/a&gt;&lt;/p&gt;

</description>
      <category>gratitude</category>
    </item>
    <item>
      <title>The bridge design pattern in Javascript</title>
      <dc:creator>The Monkey Dev</dc:creator>
      <pubDate>Thu, 23 Feb 2023 12:13:12 +0000</pubDate>
      <link>https://dev.to/jukilo_lokiju/the-bridge-design-pattern-in-javascript-59io</link>
      <guid>https://dev.to/jukilo_lokiju/the-bridge-design-pattern-in-javascript-59io</guid>
      <description>&lt;h2&gt;
  
  
  What is the Bridge Design Pattern?
&lt;/h2&gt;

&lt;p&gt;The Bridge design pattern is a structural design pattern that separates the abstraction of an object from its implementation so that they can be developed independently.&lt;/p&gt;

&lt;p&gt;It does this by creating a bridge between the abstraction and the implementation, allowing them to vary independently of each other.&lt;/p&gt;

&lt;p&gt;The Bridge pattern consists of two main components:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Abstraction: This defines the high-level interface of an object, and delegates the implementation details to an Implementor object.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Implementor: This defines the interface for concrete implementations, which are then used by the Abstraction object.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;By separating the Abstraction from the Implementor, the Bridge pattern provides greater flexibility and extensibility to the system. It also allows the Abstraction and the Implementor to vary independently, which can lead to more reusable code.&lt;/p&gt;

&lt;p&gt;Overall, the Bridge pattern is useful in situations where there are multiple implementations of an abstraction, and where changes to the implementation should not affect the Abstraction interface.&lt;/p&gt;

&lt;p&gt;This pattern is commonly used in GUI toolkits, where the abstraction is the widget, and the implementor is the toolkit-specific code that renders the widget.&lt;/p&gt;

&lt;h2&gt;
  
  
  Implementation
&lt;/h2&gt;

&lt;p&gt;Here's an example of how the Bridge design pattern can be implemented in JavaScript:&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="c1"&gt;// Implementation interface&lt;/span&gt;
&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nx"&gt;Implementor&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;operation&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;// Concrete implementation classes&lt;/span&gt;
&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nx"&gt;ConcreteImplementorA&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nx"&gt;Implementor&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;operation&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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ConcreteImplementorA&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="p"&gt;}&lt;/span&gt;

&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nx"&gt;ConcreteImplementorB&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nx"&gt;Implementor&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;operation&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="dl"&gt;"&lt;/span&gt;&lt;span class="s2"&gt;ConcreteImplementorB&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="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// Abstraction interface&lt;/span&gt;
&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nx"&gt;Abstraction&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="kd"&gt;constructor&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;implementor&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;implementor&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="nx"&gt;implementor&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
  &lt;span class="p"&gt;}&lt;/span&gt;

  &lt;span class="nx"&gt;operation&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;// Refined abstraction classes&lt;/span&gt;
&lt;span class="kd"&gt;class&lt;/span&gt; &lt;span class="nx"&gt;RefinedAbstraction&lt;/span&gt; &lt;span class="kd"&gt;extends&lt;/span&gt; &lt;span class="nx"&gt;Abstraction&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
  &lt;span class="nx"&gt;operation&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="s2"&gt;`RefinedAbstraction with &lt;/span&gt;&lt;span class="p"&gt;${&lt;/span&gt;&lt;span class="k"&gt;this&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;implementor&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;operation&lt;/span&gt;&lt;span class="p"&gt;()}&lt;/span&gt;&lt;span class="s2"&gt;`&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;// Usage&lt;/span&gt;
&lt;span class="kd"&gt;const&lt;/span&gt; &lt;span class="nx"&gt;implementorA&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;ConcreteImplementorA&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;implementorB&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;ConcreteImplementorB&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;abstraction1&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;RefinedAbstraction&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;implementorA&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;abstraction2&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;RefinedAbstraction&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;implementorB&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;abstraction1&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;operation&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt; &lt;span class="c1"&gt;// Output: RefinedAbstraction with ConcreteImplementorA&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;abstraction2&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nx"&gt;operation&lt;/span&gt;&lt;span class="p"&gt;());&lt;/span&gt; &lt;span class="c1"&gt;// Output: RefinedAbstraction with ConcreteImplementorB&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;In this example, the &lt;code&gt;Implementor&lt;/code&gt; interface defines the operations that concrete implementors must implement. The &lt;code&gt;ConcreteImplementorA&lt;/code&gt; and &lt;code&gt;ConcreteImplementorB&lt;/code&gt; classes are two examples of concrete implementors that implement the &lt;code&gt;operation&lt;/code&gt; method in their own way.&lt;/p&gt;

&lt;p&gt;The &lt;code&gt;Abstraction&lt;/code&gt; interface defines the methods that abstractions must implement. In this case, we only have one method, &lt;code&gt;operation&lt;/code&gt;, which is delegated to the &lt;code&gt;implementor&lt;/code&gt; object. The &lt;code&gt;RefinedAbstraction&lt;/code&gt; class is a concrete implementation of &lt;code&gt;Abstraction&lt;/code&gt; that uses a specific &lt;code&gt;Implementor&lt;/code&gt; object to perform its operation.&lt;/p&gt;

&lt;p&gt;Finally, we create two instances of &lt;code&gt;RefinedAbstraction&lt;/code&gt;, each with a different &lt;code&gt;Implementor&lt;/code&gt; object. We call the &lt;code&gt;operation&lt;/code&gt; method on each instance to see the output, which demonstrates how the Bridge pattern allows us to separate the abstraction from its implementation.&lt;/p&gt;

&lt;p&gt;Thank you for taking the time to read this article! 😄&lt;/p&gt;

</description>
      <category>javascript</category>
      <category>programming</category>
      <category>typescript</category>
      <category>designpatterns</category>
    </item>
  </channel>
</rss>
