<?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>Forem: David</title>
    <description>The latest articles on Forem by David (@davidgomesr).</description>
    <link>https://forem.com/davidgomesr</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%2F2911536%2F9af84da0-0438-4929-854e-4300e8930590.jpg</url>
      <title>Forem: David</title>
      <link>https://forem.com/davidgomesr</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/davidgomesr"/>
    <language>en</language>
    <item>
      <title>[Boost]</title>
      <dc:creator>David</dc:creator>
      <pubDate>Fri, 18 Jul 2025 14:10:30 +0000</pubDate>
      <link>https://forem.com/davidgomesr/-2f7k</link>
      <guid>https://forem.com/davidgomesr/-2f7k</guid>
      <description>&lt;div class="ltag__link"&gt;
  &lt;a href="/davidgomesr" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__pic"&gt;
      &lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2911536%2F9af84da0-0438-4929-854e-4300e8930590.jpg" alt="davidgomesr"&gt;
    &lt;/div&gt;
  &lt;/a&gt;
  &lt;a href="https://dev.to/davidgomesr/how-a-mandatory-accounting-software-became-the-gateway-to-ukraines-notpetya-cyberattack-4bm0" class="ltag__link__link"&gt;
    &lt;div class="ltag__link__content"&gt;
      &lt;h2&gt;How a Mandatory Accounting Software Became the Gateway to Ukraine’s NotPetya Cyberattack&lt;/h2&gt;
      &lt;h3&gt;David ・ Jul 18&lt;/h3&gt;
      &lt;div class="ltag__link__taglist"&gt;
        &lt;span class="ltag__link__tag"&gt;#security&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#cybersecurity&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#malware&lt;/span&gt;
        &lt;span class="ltag__link__tag"&gt;#data&lt;/span&gt;
      &lt;/div&gt;
    &lt;/div&gt;
  &lt;/a&gt;
&lt;/div&gt;


</description>
      <category>security</category>
      <category>cybersecurity</category>
      <category>malware</category>
      <category>data</category>
    </item>
    <item>
      <title>How a Mandatory Accounting Software Became the Gateway to Ukraine’s NotPetya Cyberattack</title>
      <dc:creator>David</dc:creator>
      <pubDate>Fri, 18 Jul 2025 14:05:26 +0000</pubDate>
      <link>https://forem.com/davidgomesr/how-a-mandatory-accounting-software-became-the-gateway-to-ukraines-notpetya-cyberattack-4bm0</link>
      <guid>https://forem.com/davidgomesr/how-a-mandatory-accounting-software-became-the-gateway-to-ukraines-notpetya-cyberattack-4bm0</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe0gqn23hb8rovtyvtun7.webp" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Farticles%2Fe0gqn23hb8rovtyvtun7.webp" alt="The Warning Message" width="660" height="385"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In 2017, the world witnessed one of the most devastating cyberattacks in recent history: the NotPetya attack. Unlike most malware, NotPetya wasn’t designed for profit, but for destruction. Its primary goal was to cause as much damage as possible, with Ukraine at the epicenter of this digital disaster.&lt;/p&gt;

&lt;h2&gt;
  
  
  What was NotPetya?
&lt;/h2&gt;

&lt;p&gt;NotPetya is a wiper-type malware, meaning its main intent is to erase and render data unusable, rather than simply holding it for ransom like traditional ransomware. The attack quickly spread throughout Ukraine and beyond, impacting global companies like Maersk, Merck, and several others.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Role of MeDoc
&lt;/h2&gt;

&lt;p&gt;The entry point for the attack was MeDoc, a popular accounting software in Ukraine. The Ukrainian government required companies paying taxes in the country to use MeDoc in their systems. This meant that virtually every significant business had the software installed.&lt;/p&gt;

&lt;p&gt;The hacker group, linked to the GRC, compromised MeDoc’s update infrastructure, injecting NotPetya into a legitimate software update. When companies updated MeDoc, they unknowingly opened the door to the attack.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Impact
&lt;/h2&gt;

&lt;p&gt;The results were catastrophic: approximately 1 in every 10 computers in Ukraine was affected. The attack crippled banks, airports, hospitals, and private companies, causing billions in damages. Since NotPetya spread rapidly across internal and external networks, organizations outside Ukraine were soon affected as well, showing how a targeted attack can have global consequences.&lt;/p&gt;

&lt;h2&gt;
  
  
  Lessons for Developers and Companies
&lt;/h2&gt;

&lt;p&gt;The NotPetya case leaves valuable lessons:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Critical dependencies:&lt;/strong&gt; When mandatory software is compromised, it becomes a powerful vector for mass attacks.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Secure updates:&lt;/strong&gt; Ensuring the security of software update supply chains is crucial.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;System isolation:&lt;/strong&gt; Critical systems should be isolated to minimize attack impact.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Resilience and backups:&lt;/strong&gt; Offline backups and robust incident response plans are essential for business continuity.&lt;/li&gt;
&lt;li&gt;
&lt;strong&gt;Continuous vigilance:&lt;/strong&gt; Geopolitical context can influence a company’s cyber risk profile.&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;NotPetya was more than just another malware attack; it was a global wake-up call about the dangers of compromised software supply chains and how technical and political decisions can increase attack surfaces. The key takeaway: security is a shared responsibility and must be present at every stage of system development and operation.&lt;/p&gt;

</description>
      <category>security</category>
      <category>cybersecurity</category>
      <category>malware</category>
      <category>data</category>
    </item>
    <item>
      <title>How is the importance of clean code?</title>
      <dc:creator>David</dc:creator>
      <pubDate>Thu, 06 Mar 2025 16:29:44 +0000</pubDate>
      <link>https://forem.com/davidgomesr/how-is-the-importance-of-clean-code-4ej0</link>
      <guid>https://forem.com/davidgomesr/how-is-the-importance-of-clean-code-4ej0</guid>
      <description>&lt;p&gt;Hello, developers out there. I imagine you've heard of the famous book Clean Code by Robert Cecil Martin. Basically, this concept called "Clean Code" aims to make code easy to read, understand and maintain. Understanding how to write clean code is highly valuable in the market.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;But how do I achieve this clean code?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;First: &lt;strong&gt;Keep Calm&lt;/strong&gt;, not is necessary your code be clean&lt;br&gt;
But is recommended&lt;/p&gt;

&lt;p&gt;First, see the benefits:&lt;br&gt;
If you are into a company, anothers devs can understand your code and do&lt;br&gt;
updates&lt;br&gt;
I'll help you finish this blog post:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;But how do I achieve this clean code?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;First: &lt;strong&gt;Keep Calm&lt;/strong&gt;, not is necessary your code be clean&lt;br&gt;
But is recommended&lt;br&gt;
First, see the benefits:&lt;/p&gt;

&lt;p&gt;If you are into a company, anothers devs can understand your code and do updates. This improves team efficiency and reduces onboarding time for new developers.&lt;/p&gt;

&lt;p&gt;Second, clean code makes maintenance easier. When you return to your code after months or even years, you'll thank yourself for writing readable, self-explanatory code.&lt;/p&gt;

&lt;p&gt;Third, it reduces bugs. Clear code allows you to spot problems more easily and prevents many common errors from occurring in the first place.&lt;/p&gt;

&lt;p&gt;So how do we actually write clean code? Here are some core principles:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Meaningful names&lt;/strong&gt;: Variables, functions, and classes should have descriptive names that reveal their purpose. Avoid abbreviations and single-letter variables (except in specific contexts like loops).&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Functions should do one thing&lt;/strong&gt;: Keep functions small and focused on a single task. This makes them easier to understand, test, and reuse.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Comments are a last resort&lt;/strong&gt;: Good code should be self-documenting. If you need a comment to explain what your code does, consider rewriting the code to make it clearer.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Consistent formatting&lt;/strong&gt;: Follow a style guide and be consistent with indentation, spacing, and braces. Many teams use automatic formatters like Prettier or Black.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Error handling&lt;/strong&gt;: Deal with exceptions properly and don't swallow errors. Make sure error messages are informative.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Unit tests&lt;/strong&gt;: Clean code is testable code. Writing tests forces you to create modular, well-structured code.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Avoid duplication&lt;/strong&gt;: Follow the DRY principle (Don't Repeat Yourself). Extract repeated code into reusable functions.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Let me share a quick example of transforming messy code to clean code:&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;// Before&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;x&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;c&lt;/span&gt;&lt;span class="p"&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;res&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&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;i&lt;/span&gt; &lt;span class="o"&gt;=&lt;/span&gt; &lt;span class="mi"&gt;0&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt; &lt;span class="nx"&gt;i&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;a&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="nx"&gt;i&lt;/span&gt;&lt;span class="o"&gt;++&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
    &lt;span class="k"&gt;if&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;b&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;i&lt;/span&gt;&lt;span class="p"&gt;]&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;c&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="p"&gt;{&lt;/span&gt;
      &lt;span class="nx"&gt;res&lt;/span&gt; &lt;span class="o"&gt;+=&lt;/span&gt; &lt;span class="nx"&gt;a&lt;/span&gt;&lt;span class="p"&gt;[&lt;/span&gt;&lt;span class="nx"&gt;i&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="k"&gt;return&lt;/span&gt; &lt;span class="nx"&gt;res&lt;/span&gt;&lt;span class="p"&gt;;&lt;/span&gt;
&lt;span class="p"&gt;}&lt;/span&gt;

&lt;span class="c1"&gt;// After&lt;/span&gt;
&lt;span class="kd"&gt;function&lt;/span&gt; &lt;span class="nf"&gt;sumNumbersInRange&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;numbers&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;lowerBound&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;upperBound&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="nx"&gt;numbers&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;filter&lt;/span&gt;&lt;span class="p"&gt;(&lt;/span&gt;&lt;span class="nx"&gt;number&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;number&lt;/span&gt; &lt;span class="o"&gt;&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;lowerBound&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nx"&gt;number&lt;/span&gt; &lt;span class="o"&gt;&amp;lt;&lt;/span&gt; &lt;span class="nx"&gt;upperBound&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt;
    &lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="nf"&gt;reduce&lt;/span&gt;&lt;span class="p"&gt;((&lt;/span&gt;&lt;span class="nx"&gt;sum&lt;/span&gt;&lt;span class="p"&gt;,&lt;/span&gt; &lt;span class="nx"&gt;number&lt;/span&gt;&lt;span class="p"&gt;)&lt;/span&gt; &lt;span class="o"&gt;=&amp;gt;&lt;/span&gt; &lt;span class="nx"&gt;sum&lt;/span&gt; &lt;span class="o"&gt;+&lt;/span&gt; &lt;span class="nx"&gt;number&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="p"&gt;}&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Remember, clean code is a journey, not a destination. You won't master it overnight, but with practice and awareness, your code will gradually improve.&lt;/p&gt;

&lt;p&gt;Start small—refactor one function at a time. Review your pull requests before submitting them. Read other developers' code and learn from it.&lt;/p&gt;

&lt;p&gt;The most important thing is to care about your craft. As Martin says, "Clean code always looks like it was written by someone who cares."&lt;/p&gt;

&lt;p&gt;What's your experience with clean code? Share in the comments below!&lt;/p&gt;

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