<?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: Nafas Ebrahimi</title>
    <description>The latest articles on DEV Community by Nafas Ebrahimi (@nafasebra).</description>
    <link>https://dev.to/nafasebra</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F824905%2F11955ea2-5553-4e3f-b774-383ffe4d8f0d.jpg</url>
      <title>DEV Community: Nafas Ebrahimi</title>
      <link>https://dev.to/nafasebra</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/nafasebra"/>
    <language>en</language>
    <item>
      <title>About : The 4 Pillars of Database Reliability</title>
      <dc:creator>Nafas Ebrahimi</dc:creator>
      <pubDate>Mon, 01 Jun 2026 12:39:17 +0000</pubDate>
      <link>https://dev.to/nafasebra/about-the-4-pillars-of-database-reliability-3f4e</link>
      <guid>https://dev.to/nafasebra/about-the-4-pillars-of-database-reliability-3f4e</guid>
      <description>&lt;p&gt;Have you ever wondered what happens behind the scenes when you transfer money online, book a flight, or buy a movie ticket? How do databases ensure that your money doesn’t just “disappear” mid-transfer if the internet cuts out?&lt;/p&gt;

&lt;p&gt;The secret weapon behind this reliability is a concept called ACID.&lt;/p&gt;

&lt;p&gt;In this quick guide, we’ll break down what ACID means in plain English, using simple real-world examples. Let’s dive in!&lt;/p&gt;




&lt;h2&gt;
  
  
  What is ACID?
&lt;/h2&gt;

&lt;p&gt;ACID is not a database architecture, but rather a set of four fundamental properties that guarantee database transactions are processed reliably. If a database follows these rules, we call it ACID-compliant (like PostgreSQL, MySQL, or SQL Server).&lt;/p&gt;

&lt;p&gt;A “transaction” is simply a sequence of operations treated as a single unit of work. ACID ensures these transactions never mess up your data.&lt;/p&gt;

&lt;p&gt;Here is what the acronym stands for:&lt;/p&gt;

&lt;p&gt;1- A - Atomicity (All or Nothing)&lt;br&gt;
2- C - Consistency (Rules are Rules)&lt;br&gt;
3- I - Isolation (No Interferences)&lt;br&gt;
4- D - Durability (Built to Last)&lt;/p&gt;

&lt;p&gt;Let's get into these! &lt;/p&gt;




&lt;h3&gt;
  
  
  1. Atomicity: The “All-or-Nothing” Rule
&lt;/h3&gt;

&lt;p&gt;Imagine you are transferring 100 dollar bills to your friend. This requires two steps:&lt;/p&gt;

&lt;p&gt;Deducting $100 from your account.&lt;br&gt;
Adding $100 to your friend’s account.&lt;br&gt;
What if the database crashes right after step 1? Your money would vanish!&lt;/p&gt;

&lt;p&gt;Atomicity prevents this. It treats the transaction as a single “atom” that cannot be split. Either both steps succeed, or none of them do. If a failure occurs mid-way, the database performs a rollback, putting everything back to exactly how it was.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Consistency: Keeping the Rules Sacred
&lt;/h3&gt;

&lt;p&gt;Every database has pre-defined rules, constraints, and triggers. Consistency ensures that a transaction can only bring the database from one valid state to another.&lt;/p&gt;

&lt;p&gt;For example, if your bank database has a rule that account balances can never go below zero Consistency will instantly block any transaction that attempts to withdraw more money than you actually have. The database remains healthy and error-free.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Isolation: Mind Your Own Business
&lt;/h3&gt;

&lt;p&gt;In the real world, thousands of users are interacting with a database at the exact same millisecond. Isolation ensures that concurrent transactions don’t trip over each other.&lt;/p&gt;

&lt;p&gt;Imagine there is only one seat left for a blockbuster movie, and two users click “Buy” at the exact same second. Isolation forces the database to process them sequentially. User A completes their purchase securely, and User B is politely informed that the seat is gone—preventing the nightmare of double-booking.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Durability: Written in Stone
&lt;/h3&gt;

&lt;p&gt;Once a transaction is successfully completed (committed), it must persist—even if the database server suddenly loses power, catches fire, or crashes a second later.&lt;/p&gt;

&lt;p&gt;Durability guarantees that completed changes are permanently recorded in non-volatile memory (like your hard drive or SSD) and transaction logs, making them safe from any system failure.&lt;/p&gt;

</description>
      <category>programming</category>
    </item>
    <item>
      <title>When I Learned Python, I Made a CLI Tool</title>
      <dc:creator>Nafas Ebrahimi</dc:creator>
      <pubDate>Thu, 28 May 2026 10:05:48 +0000</pubDate>
      <link>https://dev.to/nafasebra/when-i-learned-python-i-made-a-cli-tool-266g</link>
      <guid>https://dev.to/nafasebra/when-i-learned-python-i-made-a-cli-tool-266g</guid>
      <description>&lt;p&gt;Three months ago, I decided to learn Python. &lt;/p&gt;

&lt;p&gt;why?&lt;/p&gt;

&lt;p&gt;Python gives me power to make everything. most of the developers know it and it has a rich community.&lt;/p&gt;

&lt;p&gt;And I did it.&lt;/p&gt;

&lt;p&gt;As a programmer who learned Rust language (I will tell you how to learn this and what I did), Python is very easy to learn for me and I learned in 1 week with internet problems. &lt;/p&gt;

&lt;p&gt;I was working on a website project and needed to compress some asset images because they are huge. unfortunately, I couldn't access image compressor websites (As Iranian we are in blackout). so, I'd decided to make a CLI tool to compress images. (It doesn't convert images to thumbnail)&lt;/p&gt;

&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%2F4lwmv1a6wjdzuaiyy8ih.png" 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%2F4lwmv1a6wjdzuaiyy8ih.png" alt="Tinypixels output" width="800" height="388"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;And after that I made this tool with Python.&lt;/p&gt;

&lt;p&gt;This is my first project with Python. Tinypixels: &lt;a href="https://github.com/nafasebra/tinypixels" rel="noopener noreferrer"&gt;This is Tinypixels repo&lt;/a&gt;&lt;/p&gt;

</description>
      <category>cli</category>
      <category>learning</category>
      <category>python</category>
      <category>showdev</category>
    </item>
    <item>
      <title>This is one thing to learn everything</title>
      <dc:creator>Nafas Ebrahimi</dc:creator>
      <pubDate>Thu, 21 May 2026 10:01:59 +0000</pubDate>
      <link>https://dev.to/nafasebra/this-is-one-thing-to-learn-everything-2d78</link>
      <guid>https://dev.to/nafasebra/this-is-one-thing-to-learn-everything-2d78</guid>
      <description>&lt;p&gt;This is my article here, and maybe later I will share something.&lt;/p&gt;

&lt;p&gt;I read the Smarter Faster Better book by Charles Duhigg. This book is very great for improving your productivity. The book has interesting things to learn.&lt;/p&gt;

&lt;p&gt;The one thing that caught my attention is working with data. I'm not talking about technical things.&lt;/p&gt;

&lt;p&gt;Data can be anything. From the time you go to sleep, to how you deal with stuff, even knowledge.&lt;/p&gt;

&lt;p&gt;As a programmer, we have a lot of things to learn, and we don't have enough time to learn all of them unfortunately.&lt;/p&gt;

&lt;p&gt;Usually on weekends, as we have free time, we spend the whole day learning.&lt;/p&gt;

&lt;p&gt;The frustrating thing is we forget most of them. So what should we do?&lt;/p&gt;

&lt;p&gt;The book says we should work with the data, analyze it, discuss it with someone (it can be your colleague), do tests, and review it over and over.&lt;/p&gt;

&lt;p&gt;For example, last weekend I learned a new Python function. Instead of just reading it, I wrote a small test for it, explained it to a coworker on Monday, and reviewed it again on Tuesday. Now I still remember it clearly.&lt;/p&gt;




&lt;p&gt;Next time you learn something new, try testing it, talking about it, and reviewing it. You might be surprised how much more you remember.&lt;/p&gt;

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