<?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: Artiom</title>
    <description>The latest articles on DEV Community by Artiom (@artiom65536098).</description>
    <link>https://dev.to/artiom65536098</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%2F1190047%2F4e235187-acdc-4244-8205-26c7c8be79b2.jpg</url>
      <title>DEV Community: Artiom</title>
      <link>https://dev.to/artiom65536098</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/artiom65536098"/>
    <language>en</language>
    <item>
      <title>Made CPS test just for fun</title>
      <dc:creator>Artiom</dc:creator>
      <pubDate>Sun, 14 Jul 2024 15:55:52 +0000</pubDate>
      <link>https://dev.to/artiom65536098/made-cps-test-just-for-fun-ena</link>
      <guid>https://dev.to/artiom65536098/made-cps-test-just-for-fun-ena</guid>
      <description>&lt;p&gt;You can check it here and give your feedback and ideas to improve :)&lt;br&gt;
&lt;a href="https://cps-tests.com" rel="noopener noreferrer"&gt;https://cps-tests.com&lt;/a&gt;&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>discuss</category>
    </item>
    <item>
      <title>I made simple binary translator support binary, text, hex, octal, decimal</title>
      <dc:creator>Artiom</dc:creator>
      <pubDate>Wed, 10 Jul 2024 09:30:30 +0000</pubDate>
      <link>https://dev.to/artiom65536098/i-made-simple-binary-translator-support-binary-text-hex-octal-decimal-28ba</link>
      <guid>https://dev.to/artiom65536098/i-made-simple-binary-translator-support-binary-text-hex-octal-decimal-28ba</guid>
      <description>&lt;p&gt;Would like to hear your feedback: &lt;a href="https://binarytranslate.com" rel="noopener noreferrer"&gt;https://binarytranslate.com&lt;/a&gt;&lt;/p&gt;

</description>
      <category>discuss</category>
      <category>webdev</category>
      <category>datascience</category>
    </item>
    <item>
      <title>How to Build a Morse Code Translator with Player in Python</title>
      <dc:creator>Artiom</dc:creator>
      <pubDate>Tue, 30 Jan 2024 09:29:00 +0000</pubDate>
      <link>https://dev.to/artiom65536098/how-to-build-a-morse-code-translator-with-player-in-python-1643</link>
      <guid>https://dev.to/artiom65536098/how-to-build-a-morse-code-translator-with-player-in-python-1643</guid>
      <description>&lt;p&gt;Morse code, a classic method of encoding text into sequences of dots and dashes, has been a cornerstone in the world of communication. While it's less common today, learning Morse code can be an exciting challenge, especially if you're interested in amateur radio or historical communication methods. To get a hands-on feel for Morse code, check out an online Morse code tool like &lt;a href="https://convertmorse.com"&gt;convertmorse.com&lt;/a&gt;.&lt;/p&gt;

&lt;p&gt;In this beginner-friendly tutorial, we'll walk through creating a Morse Code Translator and Player in Python. Let's dive in!&lt;/p&gt;

&lt;h2&gt;
  
  
  Step 1: Setting Up the Morse Code Dictionary
&lt;/h2&gt;

&lt;p&gt;Our first task is to map each alphabet letter and number to its corresponding Morse code sequence. We use a Python dictionary to do this:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;morse_code_dict = {
    "A": ".-", "B": "-...", "C": "-.-.",
    "D": "-..", "E": ".", "F": "..-.",
    "G": "--.", "H": "....", "I": "..",
    "J": ".---", "K": "-.-", "L": ".-..",
    "M": "--", "N": "-.", "O": "---",
    "P": ".--.", "Q": "--.-", "R": ".-.",
    "S": "...", "T": "-", "U": "..-",
    "V": "...-", "W": ".--", "X": "-..-",
    "Y": "-.--", "Z": "--..", " ": "/"
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 2: Input the Message
&lt;/h2&gt;

&lt;p&gt;Now, let's get the message from the user:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;message = input("Type a message to translate into Morse code: ")
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 3: Translating to Morse Code
&lt;/h2&gt;

&lt;p&gt;The next step is translating each character of the message into Morse code. We'll iterate through the message and convert each character:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;morse_message = " ".join(morse_code_dict[char] for char in message.upper())
print("Morse Code:", morse_message)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Step 4: Play the Morse Code
&lt;/h2&gt;

&lt;p&gt;To make our translator more interactive, we'll add functionality to play the Morse code using sound. We use the winsound module for Windows users. For each dot, we play a short beep, and for each dash, a longer beep:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;import winsound
import time

for char in morse_message:
    if char == ".":
        winsound.Beep(1000, 200)  # frequency, duration in ms
    elif char == "-":
        winsound.Beep(1000, 600)
    elif char == " ":
        time.sleep(0.5)  # pause for space
    time.sleep(0.2)  # short pause between each signal
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  Complete Program
&lt;/h2&gt;

&lt;p&gt;Putting all these steps together, you have a simple Morse code translator and player in Python:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;# Complete program here combining all the above steps
import time
import winsound

# Morse Code Dictionary
morse_code_dict = {
    "A": ".-", "B": "-...", "C": "-.-.",
    "D": "-..", "E": ".", "F": "..-.",
    "G": "--.", "H": "....", "I": "..",
    "J": ".---", "K": "-.-", "L": ".-..",
    "M": "--", "N": "-.", "O": "---",
    "P": ".--.", "Q": "--.-", "R": ".-.",
    "S": "...", "T": "-", "U": "..-",
    "V": "...-", "W": ".--", "X": "-..-",
    "Y": "-.--", "Z": "--..", " ": "/"
}

# Input Message
message = input("Type a message to translate into Morse code: ")

# Translate to Morse Code
morse_message = " ".join(morse_code_dict[char] for char in message.upper())
print("Morse Code:", morse_message)

# Play Morse Code
for char in morse_message:
    if char == ".":
        winsound.Beep(1000, 200)  # frequency, duration in ms for a dot
    elif char == "-":
        winsound.Beep(1000, 600)  # frequency, duration in ms for a dash
    elif char == " ":
        time.sleep(0.5)  # pause for space
    time.sleep(0.2)  # short pause between each signal

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



</description>
      <category>programming</category>
      <category>tutorial</category>
      <category>python</category>
      <category>development</category>
    </item>
    <item>
      <title>The Beginner’s Handbook to Enhancing Web Speed: A Focus on Image Optimization</title>
      <dc:creator>Artiom</dc:creator>
      <pubDate>Fri, 20 Oct 2023 13:22:37 +0000</pubDate>
      <link>https://dev.to/artiom65536098/the-beginners-handbook-to-enhancing-web-speed-a-focus-on-image-optimization-1fpi</link>
      <guid>https://dev.to/artiom65536098/the-beginners-handbook-to-enhancing-web-speed-a-focus-on-image-optimization-1fpi</guid>
      <description>&lt;h3&gt;
  
  
  Table of Contents
&lt;/h3&gt;

&lt;ul&gt;
&lt;li&gt;Introduction&lt;/li&gt;
&lt;li&gt;Past Strategies for Site Speed&lt;/li&gt;
&lt;li&gt;
Image Optimization Techniques

&lt;ul&gt;
&lt;li&gt;Scale Down and Compress&lt;/li&gt;
&lt;li&gt;Implement Lazy-Loading&lt;/li&gt;
&lt;li&gt;Specify Dimensions&lt;/li&gt;
&lt;li&gt;Utilize the &lt;code&gt;&amp;lt;picture&amp;gt;&lt;/code&gt; Tag&lt;/li&gt;
&lt;/ul&gt;


&lt;/li&gt;
&lt;li&gt;Conclusion&lt;/li&gt;
&lt;/ul&gt;




&lt;h3&gt;
  
  
  Introduction
&lt;/h3&gt;

&lt;p&gt;In the last twelve months, I've delved deep into the subject of web performance, particularly focusing on site speed. Guided by tools like Google Page Speed Insights and the newly-released Core Web Vitals, my quest was to not just improve search ranking but also to enhance the user experience by cutting down data load.&lt;/p&gt;

&lt;p&gt;For newcomers to this field, the Web Performance course by Scott Jehl is an invaluable resource. It gives you a complete overview, from understanding metrics to practical tips on how to boost your site's performance.&lt;/p&gt;




&lt;h3&gt;
  
  
  Past Strategies for Site Speed
&lt;/h3&gt;

&lt;p&gt;Previously, the emphasis was on reducing the total webpage size to improve speed, but this metric is increasingly seen as outdated. It doesn't truly capture the user's experience while browsing. The modern approach is to load elements only as they are needed, moving away from the older mindset of minimizing the overall elements loaded on a webpage.&lt;/p&gt;




&lt;h3&gt;
  
  
  Image Optimization Techniques
&lt;/h3&gt;

&lt;p&gt;Below is a rundown of methods I've employed for optimizing images on websites. These techniques are drawn from both expert advice and my own hands-on experience. They are not only easy to apply but also serve as a solid foundation for overall site optimization.&lt;/p&gt;

&lt;h4&gt;
  
  
  Scale Down and Compress
&lt;/h4&gt;

&lt;p&gt;It’s been a long-standing best practice to not upload oversized images, especially when they will be displayed as small thumbnails. It's a common mistake that I often encounter, where a small image takes an unusually long time to load because it's actually a larger file being scaled down. This wastes bandwidth and harms the user experience. To tackle this, I usually rely on two free tools for bulk image editing:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Bulk Resize Photos&lt;/strong&gt;: Useful for resizing multiple images at once.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Image Optim&lt;/strong&gt;: A Mac-only tool that offers more extensive compression options.&lt;/li&gt;
&lt;/ul&gt;

&lt;h4&gt;
  
  
  Implement Lazy-Loading
&lt;/h4&gt;

&lt;p&gt;Lazy-loading is a feature that I've been eagerly waiting for. It allows the browser to postpone the loading of images until they actually come into the user's view. This is particularly useful for galleries located well below the viewport, as it prevents these images from negatively impacting metrics like LCP (Largest Contentful Paint).&lt;/p&gt;

&lt;h4&gt;
  
  
  Specify Dimensions
&lt;/h4&gt;

&lt;p&gt;In the past, setting width and height attributes on images was the norm. This practice later fell out of favor but has recently made a comeback. It's now recommended to specify these dimensions to prevent CLS (Cumulative Layout Shift), as it gives the browser an idea of the image's size before it fully loads.&lt;/p&gt;

&lt;h4&gt;
  
  
  Utilize the &lt;code&gt;&amp;lt;picture&amp;gt;&lt;/code&gt; Tag
&lt;/h4&gt;

&lt;p&gt;The &lt;code&gt;&amp;lt;picture&amp;gt;&lt;/code&gt; element allows you to use modern formats like WEBP, which are generally smaller in size compared to traditional JPGs or PNGs. This ensures that users get the best quality images with the least amount of data.&lt;/p&gt;




&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;Improving web performance and site speed through image optimization can be challenging, especially when dealing with dynamic content and varying art directions. However, the methods outlined above offer a solid starting point. By implementing these techniques, you can take significant steps toward making your website more efficient and user-friendly.&lt;/p&gt;

&lt;p&gt;For those interested in more advanced techniques, you can also visit &lt;a href="https://thecharcounter.com"&gt;thecharcounter.com&lt;/a&gt; for character counting tools that can help you further optimize your site's text content.&lt;/p&gt;

</description>
      <category>webperformace</category>
      <category>performance</category>
      <category>sitespeed</category>
      <category>text</category>
    </item>
  </channel>
</rss>
