<?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: Mostafijur Rahman</title>
    <description>The latest articles on Forem by Mostafijur Rahman (@mostafij).</description>
    <link>https://forem.com/mostafij</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%2F640934%2Ff155e6a1-8374-4a04-8177-45c072ac7a62.jpeg</url>
      <title>Forem: Mostafijur Rahman</title>
      <link>https://forem.com/mostafij</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://forem.com/feed/mostafij"/>
    <language>en</language>
    <item>
      <title>AI Will Replace Backend Developers? A Python Engineer's Honest Take</title>
      <dc:creator>Mostafijur Rahman</dc:creator>
      <pubDate>Thu, 07 May 2026 16:29:47 +0000</pubDate>
      <link>https://forem.com/mostafij/ai-will-replace-backend-developers-a-python-engineers-honest-take-551p</link>
      <guid>https://forem.com/mostafij/ai-will-replace-backend-developers-a-python-engineers-honest-take-551p</guid>
      <description>&lt;p&gt;Everyone is talking about AI replacing developers.&lt;/p&gt;

&lt;p&gt;Some people are scared. Some people laugh it off. Most people just don't know what to believe.&lt;/p&gt;

&lt;p&gt;I've been a backend engineer for 6 years. I write Python every day. I build APIs, real-time systems, and production backends. And honestly? I was worried too — until I actually started paying attention to what's happening on the ground.&lt;/p&gt;

&lt;p&gt;Let me share what I've seen. No hype. No fear. Just real experience.&lt;/p&gt;




&lt;h2&gt;
  
  
  Yes, I Use AI Tools Every Day
&lt;/h2&gt;

&lt;p&gt;I'm not going to pretend I don't use AI. I use GitHub Copilot and Claude Code daily.&lt;/p&gt;

&lt;p&gt;They help me move faster. Repetitive tasks that used to take 30 minutes now take 5. Boilerplate code, basic CRUD, writing tests — AI handles these really well.&lt;/p&gt;

&lt;p&gt;But here's the thing I noticed early on:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;I never just trust what AI gives me.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Every single time, I review it. I test it. I make sure it actually fits the system I'm building — not just some generic example from the internet. Because AI doesn't know &lt;em&gt;my&lt;/em&gt; system. Only I do.&lt;/p&gt;

&lt;p&gt;That one habit — reviewing AI output instead of blindly copying it — is what separates engineers who grow with AI from those who get burned by it.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Night My Production API Crashed
&lt;/h2&gt;

&lt;p&gt;Let me tell you about a night I'll never forget.&lt;/p&gt;

&lt;p&gt;It was around 2 AM. My client messaged me — the server was down. Production. Real users. Real impact.&lt;/p&gt;

&lt;p&gt;I jumped on my laptop immediately.&lt;/p&gt;

&lt;p&gt;I checked the logs. Dug through the errors. And there it was — a concurrency bug. Multiple requests were hitting the same database row at the same time, causing a race condition that Django wasn't handling cleanly.&lt;/p&gt;

&lt;p&gt;I fixed it using &lt;code&gt;select_for_update()&lt;/code&gt; — a database-level lock that made sure only one request could modify that row at a time. Crisis over.&lt;/p&gt;

&lt;p&gt;Now here's my question:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Could AI have fixed that at 2 AM?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Maybe AI could have suggested &lt;code&gt;select_for_update()&lt;/code&gt; if I described the problem perfectly. But finding the problem in the first place? Understanding &lt;em&gt;why&lt;/em&gt; that specific bug was happening in &lt;em&gt;that&lt;/em&gt; specific system under &lt;em&gt;that&lt;/em&gt; specific load? That took 6 years of experience. That took knowing the codebase. That took staying calm under pressure and thinking clearly when everything is on fire.&lt;/p&gt;

&lt;p&gt;No AI tool was going to wake up and fix that for my client. I was.&lt;/p&gt;




&lt;h2&gt;
  
  
  What AI Actually Cannot Do
&lt;/h2&gt;

&lt;p&gt;After 6 years of real production work, here is what I have learned AI genuinely struggles with:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Understanding your business context&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When I build a system, I need to understand &lt;em&gt;why&lt;/em&gt; it needs to work a certain way — not just &lt;em&gt;how&lt;/em&gt;. AI doesn't sit in client meetings. It doesn't ask the right questions. It doesn't know that your client's team works across time zones and needs very specific workflows.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Making architecture decisions&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;PostgreSQL or DynamoDB? Microservice or monolith? WebSocket or polling? These decisions have consequences that last years. They depend on team size, budget, and where the product is going. AI can give you options — but it cannot make the right call for your specific situation.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Debugging complex production issues&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Race conditions. Memory leaks. Concurrency bugs at 2 AM. These are not problems you solve by copy-pasting into ChatGPT. They need deep system knowledge, real experience, and sometimes — a lot of patience when everything is breaking at once.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Taking responsibility&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;When production breaks, someone has to own it. Lead the fix. Talk to the client. Make sure it never happens again. AI tools have zero accountability. They cannot be on-call. They cannot look a client in the eye and say "I've got this."&lt;/p&gt;




&lt;h2&gt;
  
  
  So What Is Really Happening?
&lt;/h2&gt;

&lt;p&gt;Here is my honest take:&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;AI is not replacing backend developers. It is replacing developers who refuse to grow.&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Developers who only write basic APIs with no systems thinking? They will struggle.&lt;/p&gt;

&lt;p&gt;Developers who understand distributed systems, concurrency, data modeling, and business logic — and also know how to use AI tools effectively? They are becoming more valuable than ever.&lt;/p&gt;

&lt;p&gt;The data backs this up. Software engineering job postings in 2026 are at a 3-year high. Companies are not hiring fewer engineers — they are hiring &lt;em&gt;better&lt;/em&gt; ones.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Real Danger Is Not AI
&lt;/h2&gt;

&lt;p&gt;The real danger is staying the same while everything around you changes.&lt;/p&gt;

&lt;p&gt;If you are still writing the same code the same way you did 3 years ago — that is the actual threat to your career.&lt;/p&gt;

&lt;p&gt;The engineers winning right now are the ones who:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Use AI to move faster — not as a replacement for thinking&lt;/li&gt;
&lt;li&gt;Build deep expertise in systems design and architecture&lt;/li&gt;
&lt;li&gt;Understand the business, not just the code&lt;/li&gt;
&lt;li&gt;Communicate clearly when things go wrong&lt;/li&gt;
&lt;li&gt;Never stop learning&lt;/li&gt;
&lt;/ol&gt;




&lt;h2&gt;
  
  
  My Honest Advice
&lt;/h2&gt;

&lt;p&gt;Use AI tools. Use them every day. But never stop building your own depth.&lt;/p&gt;

&lt;p&gt;Because the day a really hard bug hits production at 2 AM — your client is not going to call ChatGPT.&lt;/p&gt;

&lt;p&gt;They are going to call you.&lt;/p&gt;

&lt;p&gt;Make sure you are ready to answer.&lt;/p&gt;




&lt;p&gt;&lt;em&gt;By Mostafijur Rahman — Backend Engineer&lt;/em&gt;&lt;br&gt;&lt;br&gt;
&lt;em&gt;Originally published at &lt;a href="https://mrsajib.com/articles/ai-replace-backend-developers" rel="noopener noreferrer"&gt;mrsajib.com&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>python</category>
      <category>ai</category>
      <category>career</category>
      <category>webdev</category>
    </item>
    <item>
      <title>Securing Your Django Application: Best Practices for Preventing XSS, CSRF, and More</title>
      <dc:creator>Mostafijur Rahman</dc:creator>
      <pubDate>Wed, 25 Sep 2024 16:20:18 +0000</pubDate>
      <link>https://forem.com/mostafij/securing-your-django-application-best-practices-for-preventing-xss-csrf-and-more-27me</link>
      <guid>https://forem.com/mostafij/securing-your-django-application-best-practices-for-preventing-xss-csrf-and-more-27me</guid>
      <description>&lt;p&gt;Security should always be at the forefront of any web development project. With Django, you get a framework that provides a lot of built-in security features, but there are still steps you must take to ensure your application is secure. In this post, we'll explore some best practices for preventing common web vulnerabilities such as Cross-Site Scripting (XSS), SQL Injection, Cross-Site Request Forgery (CSRF), and more.&lt;/p&gt;

&lt;h2&gt;
  
  
  1. XSS Injection and HTML Injection Prevention
&lt;/h2&gt;

&lt;p&gt;Cross-site scripting (XSS) attacks occur when malicious scripts are injected into websites, typically via user input fields. To prevent XSS, you must sanitize all user input by removing dangerous tags, attributes, and scripts. The &lt;code&gt;bleach&lt;/code&gt; library was traditionally used for sanitizing input, but it has been deprecated since 2023. A great alternative is html-sanitizer, which can effectively sanitize user input.&lt;/p&gt;

&lt;p&gt;In addition to sanitizing input, you should leverage Django's built-in &lt;code&gt;escape&lt;/code&gt; filters within templates. These filters ensure that user-generated content is safely escaped, preventing dangerous HTML from rendering.&lt;/p&gt;

&lt;p&gt;Be cautious when using Django template tags like &lt;code&gt;is_safe&lt;/code&gt;, &lt;code&gt;safe&lt;/code&gt;, &lt;code&gt;mark_safe&lt;/code&gt;, and especially when auto &lt;code&gt;escaping&lt;/code&gt; is turned off. These tools bypass the default escaping mechanisms and should only be used when absolutely necessary.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Implement a Content Security Policy (CSP)&lt;/strong&gt;&lt;br&gt;
Another layer of protection is to add a Content Security Policy (CSP) to your HTTP headers. A CSP limits which sources are allowed to load content on your site, reducing the risk of XSS attacks. You can implement CSP in Django using middleware like django-csp.&lt;/p&gt;
&lt;h2&gt;
  
  
  2. Cross-Site Request Forgery (CSRF) Protection
&lt;/h2&gt;

&lt;p&gt;Django provides built-in protection against Cross-Site Request Forgery (CSRF) attacks. This is achieved by ensuring that any form submissions include a secret, user-specific token. When using HTTPS, this protection is further enhanced by verifying the Referer header for same-origin requests.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Avoid Disabling CSRF&lt;/strong&gt;&lt;br&gt;
While Django allows you to disable CSRF protection for specific views using the &lt;code&gt;@csrf_exempt&lt;/code&gt; decorator, be very cautious when doing so. Disabling CSRF protection exposes your application to significant risks. Always prioritize the use of HTTPS and consider enforcing HTTP Strict Transport Security (HSTS) for an additional layer of protection.&lt;/p&gt;
&lt;h2&gt;
  
  
  3. SQL Injection Protection
&lt;/h2&gt;

&lt;p&gt;Django is well-equipped to handle SQL injection attacks by using parameterized queries. When you work with Django's ORM, user input is automatically escaped, preventing SQL injection vulnerabilities.&lt;/p&gt;

&lt;p&gt;However, when you manually execute raw SQL queries using methods like &lt;code&gt;RawSQL&lt;/code&gt; or &lt;code&gt;extra()&lt;/code&gt;, you must ensure that user-controlled inputs are properly sanitized and escaped. If you are ever in doubt, it's safer to use Django's ORM methods.&lt;/p&gt;
&lt;h2&gt;
  
  
  4. Clickjacking Protection
&lt;/h2&gt;

&lt;p&gt;Clickjacking is a sneaky attack where a malicious actor hijacks legitimate clicks and routes them to hidden, malicious pages. For instance, a user might think they're clicking a button on a legitimate site, but their clicks are being intercepted by an invisible iframe.&lt;/p&gt;

&lt;p&gt;Django provides &lt;strong&gt;X-Frame-Options&lt;/strong&gt; middleware to prevent your site from being embedded within an iframe. This middleware ensures that your site cannot be framed, offering effective protection against clickjacking attacks.&lt;/p&gt;
&lt;h2&gt;
  
  
  5. Securing Django Sessions
&lt;/h2&gt;

&lt;p&gt;Django sessions are a way to store user-specific data, such as login status. Misconfigured session settings can lead to session hijacking or session fixation attacks. Here are a few key configurations to secure your sessions:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Secure Session Cookies:&lt;/strong&gt; Ensure session cookies are only transmitted over HTTPS.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;SESSION_COOKIE_SECURE &lt;span class="o"&gt;=&lt;/span&gt; True
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;HTTPOnly:&lt;/strong&gt; Prevent JavaScript from accessing session cookies by setting the &lt;code&gt;HttpOnly&lt;/code&gt; flag.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;SESSION_COOKIE_HTTPONLY &lt;span class="o"&gt;=&lt;/span&gt; True
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;


&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;Session Expiry:&lt;/strong&gt; Set a session expiry time to minimize risk.
&lt;/li&gt;
&lt;/ul&gt;
&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;SESSION_COOKIE_AGE &lt;span class="o"&gt;=&lt;/span&gt; 1209600  &lt;span class="c"&gt;# Two weeks in seconds&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

&lt;h2&gt;
  
  
  6. Man-in-the-Middle Attacks (SSL/TLS)
&lt;/h2&gt;

&lt;p&gt;To protect your users' data from Man-in-the-Middle (MITM) attacks, it's crucial to use encryption via HTTPS. Django can be configured to automatically redirect all HTTP traffic to HTTPS:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;SECURE_SSL_REDIRECT &lt;span class="o"&gt;=&lt;/span&gt; True
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;You should also enable HTTP Strict Transport Security (HSTS), which ensures that browsers only communicate with your site over HTTPS in the future:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;SECURE_HSTS_SECONDS &lt;span class="o"&gt;=&lt;/span&gt; 31536000  &lt;span class="c"&gt;# 1 year&lt;/span&gt;
SECURE_HSTS_INCLUDE_SUBDOMAINS &lt;span class="o"&gt;=&lt;/span&gt; True
SECURE_HSTS_PRELOAD &lt;span class="o"&gt;=&lt;/span&gt; True
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h2&gt;
  
  
  7. Leverage Django's Built-in Security Checklist
&lt;/h2&gt;

&lt;p&gt;Django provides a built-in security checklist that you can run to ensure your project meets security guidelines. This command will scan your settings.py file and provide warnings if you have any misconfigurations that could expose your application to security risks:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight python"&gt;&lt;code&gt;&lt;span class="n"&gt;python&lt;/span&gt; &lt;span class="n"&gt;manage&lt;/span&gt;&lt;span class="p"&gt;.&lt;/span&gt;&lt;span class="n"&gt;py&lt;/span&gt; &lt;span class="n"&gt;check&lt;/span&gt; &lt;span class="o"&gt;--&lt;/span&gt;&lt;span class="n"&gt;deploy&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Make sure to review any warnings or errors and adjust your settings accordingly.&lt;/p&gt;

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

&lt;p&gt;Django offers a robust set of tools and best practices for securing your application. By following the guidelines outlined above, you can significantly reduce the risk of attacks such as XSS, CSRF, SQL injection, and more. Remember, security is not a one-time task—it's an ongoing process of monitoring, patching, and improving.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>django</category>
      <category>security</category>
      <category>csrf</category>
    </item>
  </channel>
</rss>
