<?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: WiWo</title>
    <description>The latest articles on DEV Community by WiWo (@vulfh).</description>
    <link>https://dev.to/vulfh</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%2F1450383%2F9115ff9d-f374-4f06-9cf8-abbf34c420f0.jpg</url>
      <title>DEV Community: WiWo</title>
      <link>https://dev.to/vulfh</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/vulfh"/>
    <language>en</language>
    <item>
      <title>How to Build Fault-Tolerant Systems: 5 Engineering Lessons for Resilient Software</title>
      <dc:creator>WiWo</dc:creator>
      <pubDate>Tue, 12 Aug 2025 03:04:32 +0000</pubDate>
      <link>https://dev.to/vulfh/building-fault-tolerant-systems-lessons-and-strategies-1p7k</link>
      <guid>https://dev.to/vulfh/building-fault-tolerant-systems-lessons-and-strategies-1p7k</guid>
      <description>&lt;p&gt;My father, a turner by profession, pursued excellence and quality throughout his career. His motto, "No errors, no defects in the product," inspired me to adopt the same standard in software development. However, as much as I strived for perfection, bugs and issues persisted, unearthed by QA engineers or end-users. Each failure felt personal, challenging my commitment to excellence. Over time, as systems grew more complex, I realized the inevitability of errors. This revelation, reinforced by lessons from the aviation industry, transformed my approach to system design.&lt;br&gt;
In the 1960s and early 1970s, aircraft design focused on creating fail-free systems. However, as systems became increasingly complex, this approach introduced new points of failure, making maintenance more challenging. Following high-profile incidents, such as the Turkish Airlines Flight 981 crash in 1974, the industry shifted its focus to fault tolerance. Instead of striving for perfection, engineers have come to embrace the reality of failure and prioritize resilience.&lt;br&gt;
This paradigm shift was eye-opening. If the aircraft industry could accept failure as inevitable, why couldn't we in software development? Here, I share some of my key principles for building robust, fault-tolerant systems that can continue functioning in the face of failures.&lt;/p&gt;

&lt;h2&gt;
  
  
  Key Principles for Fault-Tolerant Software Design
&lt;/h2&gt;

&lt;h2&gt;
  
  
  1. Quality
&lt;/h2&gt;

&lt;p&gt;Nothing improves software quality more than rigorous testing. Testing must be done correctly, and adopting the &lt;strong&gt;Test-Driven Development&lt;/strong&gt; (TDD) approach is vital. By writing tests before implementation, we ensure they align with requirements rather than the code itself.&lt;/p&gt;

&lt;h2&gt;
  
  
  2. Fault Tolerance
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;Retry Patterns with Exponential Backoff: For transient failures, such as temporary network outages, retrying with increasing delays prevents overwhelming the system. For example, an API call might retry after 2 seconds, then 4 seconds, and so on. However, an idempotent design is crucial to prevent unintended consequences, such as duplicate transactions in payment systems.&lt;/li&gt;
&lt;li&gt;Circuit Breakers: When a service consistently fails, a circuit breaker halts and retries until the service is restored. This prevents cascading failures. A common example is a load balancer that monitors server health checks and reroutes traffic to healthy nodes when a server is down.&lt;/li&gt;
&lt;li&gt;Container Orchestrators: Tools like Kubernetes can automatically restart failed services, maintaining availability and reducing downtime.&lt;/li&gt;
&lt;li&gt;Disaster Recovery: Backup solutions and database replication are critical for recovering from catastrophic failures. For instance, maintaining a geographically distributed backup site can minimize downtime during a regional outage&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  3. Monitoring and Logging
&lt;/h2&gt;

&lt;ul&gt;
&lt;li&gt;A system is only as good as its observability. Logs and monitoring tools provide critical insights into system activity.&lt;/li&gt;
&lt;li&gt;Logs: Writing clear, concise, and structured logs is essential. For example, correlation IDs allow tracing a single user transaction across multiple services, enabling developers to identify the root cause of failures. Tools like ElasticSearch and Kibana, Splunk make it easier to analyze logs and spot anomalies, such as unexpected spikes in error rates.&lt;/li&gt;
&lt;li&gt;Real-Time Monitoring: Platforms like AWS CloudWatch or Google Cloud Observability can monitor system metrics, such as CPU usage and queue lengths, to detect and respond to potential issues in real-time. Auto-scaling mechanisms, such as AWS Auto Scaling Groups, allow systems to adjust resources based on demand dynamically&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  4. Fail Fast
&lt;/h2&gt;

&lt;p&gt;Imagine heading out to buy lunch, only to discover that you forgot your wallet at the restaurant. The task was destined to fail from the start. Similarly, in software, inputs and preconditions must be validated early to avoid unnecessary resource usage.&lt;br&gt;
For example, an order processing system should validate inventory availability before payment. Failing fast saves time and helps developers quickly pinpoint issues&lt;/p&gt;

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

&lt;p&gt;Building fault-tolerant systems requires striking a balance between robust design, proactive error handling, and continuous monitoring. By embracing failure as inevitable and focusing on resilience, we can create software that not only survives but thrives in the face of adversity. Principles such as &lt;strong&gt;" fail fast," retry patterns&lt;/strong&gt;, and &lt;strong&gt;real-time monitoring&lt;/strong&gt; ensure systems remain reliable, even under pressure.&lt;br&gt;
Let's strive for excellence not by avoiding failure altogether but by building systems prepared to recover gracefully when failure inevitably occurs&lt;/p&gt;

</description>
    </item>
    <item>
      <title>HTML popover</title>
      <dc:creator>WiWo</dc:creator>
      <pubDate>Fri, 03 May 2024 04:16:51 +0000</pubDate>
      <link>https://dev.to/vulfh/html-popover-57a0</link>
      <guid>https://dev.to/vulfh/html-popover-57a0</guid>
      <description>&lt;h2&gt;
  
  
  Introduction
&lt;/h2&gt;

&lt;p&gt;You know what popover (popup) is, so feel free to skip this section. A popover or popup is a usually small window, which can appear in any place on the page, to provide the user with some information. Unlike the dialog, popover cannot be modal, it is always modeless, so usually the information, provided by the popup is less critical, than the one supplied by the dialog, and does not require user interaction. &lt;br&gt;
There are two ways to display popover(popup) using native HTML: declarative and JavaScript.&lt;/p&gt;


&lt;h2&gt;
  
  
  Declarative
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Step 1&lt;/strong&gt; &lt;br&gt;
Declare a popover markup(please pay attention to the ID of the "div", "my_popover"):&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; &amp;lt;div id="my_popover" popover&amp;gt;
    &amp;lt;h2&amp;gt;An HTML PopOver&amp;lt;/h2&amp;gt;
    &amp;lt;button popovertargetaction="hide"&amp;gt;Close&amp;lt;/button&amp;gt;
 &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 2&lt;/strong&gt; &lt;br&gt;
Add a button with the attribute "popovertarget", as the value we will provide an ID of the "div" element with the "popover" attribute:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;button popovertarget="my_popover" popovertargetaction="show"&amp;gt;
  Show popup
&amp;lt;/button&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;The "popovertarget", "popovertargetaction" and "popover"&lt;/strong&gt;&lt;br&gt;
The "popovertarget" binds between the button, which applies actions on the popover (like showing, hiding, etc.), and the "div", which will be used as a popover. &lt;br&gt;
The "popovertargetaction" declares the action should be applied on the popover as an "onclick" event of the button. The "popovertargetaction" may have the following values:&lt;br&gt;
"show" - will show the popover&lt;br&gt;
"hide" - will hide the popover&lt;br&gt;
"toggle" - will toggle between the states "shown" and "hidden"&lt;/p&gt;

&lt;p&gt;The "popover" attribute defines the behavior mode of the popover. There are two modes :&lt;br&gt;
"auto" - the default value of the "popover" (when no value was provided) attribute and instructs the browser to hide the popup once a "click" event occurs outside of the popup ("popover")&lt;br&gt;
"manual" - instructs the browser to hide the popup only if the dedicated action closes the popover ("hide" or "toggle"). Important: the popover, which has a "manual" behavior can coexist on the screen with other popovers, meaning it will not be closed automatically, by showing another popover.&lt;/p&gt;


&lt;h2&gt;
  
  
  Showing and closing popover using JavaScript
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Step 1&lt;/strong&gt;&lt;br&gt;
Let's declare three functions: "show" - to show the popover, "close" - to hide the popover, and "toggle" - toggle the popover. As a parameter, all the functions will accept the id of the popover:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;const show = (id) =&amp;gt; {
     const popover = document.getElementById(id);
     popover.showPopover &amp;amp;&amp;amp; popover.showPopover();
}

const close = (id) =&amp;gt; {
     const popover = document.getElementById(id);
     popover.hidePopover &amp;amp;&amp;amp; popover.hidePopover();
}

const toggle = (id) =&amp;gt;{
     const popover = document.getElementById(id);
     const popoverOpen = popover.togglePopover &amp;amp;&amp;amp; popover.togglePopover();
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 2&lt;/strong&gt;&lt;br&gt;
Let's add the popover div with the id "my_popover". The popover behavior will be declared as manual to demonstrate the toggling, otherwise, the popover will be hidden automatically once there is a click event anywhere outside the popover area&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;&amp;lt;div id="my_popover" popover="manual"&amp;gt;
       &amp;lt;h2&amp;gt;An HTML PopOver 1&amp;lt;/h2&amp;gt;
       &amp;lt;button autofocus&amp;gt;Send&amp;lt;/button&amp;gt;
       &amp;lt;button  onclick="close('my_popover')"&amp;gt;Close&amp;lt;/button&amp;gt; 
 &amp;lt;/div&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;Step 3&lt;/strong&gt;&lt;br&gt;
Let's add two buttons: to show and toggle the popover. The close button appears in the popover itself&lt;br&gt;
 Show&lt;br&gt;
 Toggle&lt;/p&gt;
&lt;h2&gt;
  
  
  Styling
&lt;/h2&gt;

&lt;p&gt;&lt;strong&gt;Positioning&lt;/strong&gt;&lt;br&gt;
Popover can be shown at every location on the screen. The "popover-open" pseudo-class can be used to specify the popover position and size. The next CSS snapshot assumes the popover has id "my_popover" from the examples above&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt; #my_popover:popover-open {
        width: 300px;
        height: 150px;
        position: absolute;
        bottom: 5px;
        right: 5px;
        margin: 0;
 }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;The popover will be shown with a height of 150px and a width of 300px will be displayed in the bottom right corner of the browser&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Backdrop&lt;/strong&gt;&lt;br&gt;
The "::backdrop" pseudo-element, as in the case of the "dialog" element, is a full-screen element placed behind the popover. In the following example, we will define a "::backdrop" element that will color the content behind the popover in an ugly purple color. Just as in the example above, we will assume, that the popover has the id "my_popover"&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;#my_popover::backdrop {
         background-color: #673ab752;
 }
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;






&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;Popover has been supported in all browsers since April 2024. It can be used in a declarative way and/or using JavaScript. Adding the "popover" attribute to the "div" element converts it to popover/popup. There are two modes popover can appear: "auto" - when it disappears once a click happens anywhere outside the popover, and "manual" - when the popover should be closed explicitly. The popover exposes an interface with three methods: "showPopover", "hidePopover" and "togglePopover"&lt;/p&gt;

</description>
      <category>popup</category>
      <category>html</category>
      <category>javascript</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
