<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Zen's Blog]]></title><description><![CDATA[Zen's Blog]]></description><link>https://blog.shivammittal.in</link><generator>RSS for Node</generator><lastBuildDate>Tue, 14 Apr 2026 03:49:55 GMT</lastBuildDate><atom:link href="https://blog.shivammittal.in/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[Instagram's Disturbing Content Surge: What You Need to Know]]></title><description><![CDATA[In the past few days, Instagram users worldwide have reported an alarming increase in graphic and sensitive content appearing in their feeds and Reels. From explicit pornographic material to recordings of violence and even disturbing footage of physi...]]></description><link>https://blog.shivammittal.in/instagrams-sensitive-and-disturbing-content-surge</link><guid isPermaLink="true">https://blog.shivammittal.in/instagrams-sensitive-and-disturbing-content-surge</guid><category><![CDATA[#instagram-sensitive-content]]></category><category><![CDATA[instagram]]></category><category><![CDATA[parental control ]]></category><category><![CDATA[awareness]]></category><dc:creator><![CDATA[Shivam Mittal]]></dc:creator><pubDate>Thu, 27 Feb 2025 05:41:10 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1740634729457/3acb01e7-dead-467b-b70f-5f1173af7970.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>In the past few days, Instagram users worldwide have reported an alarming increase in graphic and sensitive content appearing in their feeds and Reels. From explicit pornographic material to recordings of violence and even disturbing footage of physical altercations, the platform appears to be experiencing a significant moderation issue that's affecting users of all ages.</p>
<h1 id="heading-whats-happening">What's Happening?</h1>
<p>Since approximately February 23-24, 2025, there has been a noticeable spike in content that would typically be filtered or removed by Instagram's moderation systems. While some posts carry a "sensitive content" warning, many users report that:</p>
<ol>
<li><p>The warnings appear after content has already been partially viewed</p>
</li>
<li><p>The sheer volume of sensitive material has increased dramatically</p>
</li>
<li><p>The nature of the content is particularly graphic and disturbing</p>
</li>
</ol>
<p>According to Business Connect India, "Instagram users across the country have reported a disturbing trend of graphic content appearing in their feeds without adequate warning or filtering" (<a target="_blank" href="https://businessconnectindia.in/instagram-users-shocked-by-graphic-content/">source</a>).</p>
<h1 id="heading-possible-causes">Possible Causes</h1>
<p>The timing of this content surge appears to coincide with recent changes to Instagram's content policies. Online You Grow reports that Instagram has recently updated its algorithm and moderation policies, "allowing content to be posted with lesser restrictions" (<a target="_blank" href="https://onlineyougrow.com/blogs/news/instagram-algorithm-update">source</a>).</p>
<p>While Meta (Instagram's parent company) typically announces major policy changes, this shift seems to have been implemented with minimal communication to users, leaving many shocked and unprepared for the resulting content flood.</p>
<h1 id="heading-protecting-yourself-and-younger-users">Protecting Yourself and Younger Users</h1>
<p>If you're concerned about exposure to this content—particularly for children and teenagers—here are some steps you can take:</p>
<h3 id="heading-immediate-actions">Immediate Actions:</h3>
<ul>
<li><p><strong>Consider a temporary break from Instagram</strong> until Meta addresses these issues</p>
</li>
<li><p><strong>Increase privacy settings</strong> by setting your account to private</p>
</li>
<li><p><strong>Disable Reels completely</strong> as this appears to be where much of the content is appearing</p>
</li>
<li><p><strong>Report inappropriate content</strong> immediately using Instagram's reporting tools</p>
</li>
<li><p><strong>Avoid the Explore page</strong> which may contain unfiltered content from accounts you don't follow</p>
</li>
</ul>
<h3 id="heading-for-parents">For Parents:</h3>
<ul>
<li><p><strong>Have an open conversation</strong> with children about what they might encounter</p>
</li>
<li><p><strong>Consider using parental controls</strong> or temporarily removing the app</p>
</li>
<li><p><strong>Monitor screen time</strong> more closely during this period</p>
</li>
<li><p><strong>Check in regularly</strong> about what content they're seeing</p>
</li>
</ul>
<h1 id="heading-looking-forward">Looking Forward</h1>
<p>While social media platforms occasionally experience moderation issues, this particular surge appears unusually severe. Meta will likely address these problems in the coming days, but until then, protecting your digital well-being may require taking a step back from the platform.</p>
<p>I'll continue monitoring this situation and provide updates as more information becomes available. In the meantime, prioritize your mental health and that of younger users by limiting exposure to potentially harmful content.</p>
<hr />
<p><em>Disclaimer: This article cites external sources and firsthand user reports. The exact cause of the content moderation issues has not been officially confirmed by Meta as of publication.</em></p>
<h2 id="heading-join-the-conversation">Join the Conversation</h2>
<p>Have you noticed an increase in sensitive content on Instagram recently? Your experiences and additional protective measures could help others navigate this challenging situation. Please share your thoughts in the comments below and consider sharing this post with friends and family—especially those with younger Instagram users in their households. By spreading awareness, we can help protect our community while Instagram works to resolve these issues.</p>
]]></content:encoded></item><item><title><![CDATA[I made my own Redis]]></title><description><![CDATA[Motivation
My primary goals for this project were:

To gain a deeper understanding of TCP/IP networking

To learn more about how protocols work, especially in the context of databases

To implement core data structures like hash tables

To challenge ...]]></description><link>https://blog.shivammittal.in/i-made-my-own-redis</link><guid isPermaLink="true">https://blog.shivammittal.in/i-made-my-own-redis</guid><dc:creator><![CDATA[Shivam Mittal]]></dc:creator><pubDate>Sun, 13 Oct 2024 14:40:39 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1738856696802/ab6424f3-c355-4cd5-8159-af20cacfb24c.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<h3 id="heading-motivation">Motivation</h3>
<p>My primary goals for this project were:</p>
<ol>
<li><p>To gain a deeper understanding of TCP/IP networking</p>
</li>
<li><p>To learn more about how protocols work, especially in the context of databases</p>
</li>
<li><p>To implement core data structures like hash tables</p>
</li>
<li><p>To challenge myself with a non-trivial systems programming task</p>
</li>
</ol>
<h3 id="heading-in-memory-databases-a-brief-overview">In-Memory Databases: A Brief Overview</h3>
<p>Before diving into the implementation details, let's briefly discuss what in-memory databases are and why they're useful.</p>
<p>In-memory databases, as the name suggests, store data primarily in RAM rather than on disk. This approach offers several advantages:</p>
<ol>
<li><p><strong>Speed</strong>: Access to RAM is much faster than disk I/O, resulting in extremely low latency for read and write operations.</p>
</li>
<li><p><strong>Simplicity</strong>: Without the need for complex disk I/O optimizations, the overall architecture can be simpler.</p>
</li>
<li><p><strong>Real-time processing</strong>: The speed of in-memory databases makes them ideal for real-time data processing and analytics.</p>
</li>
</ol>
<p>Redis, one of the most popular in-memory databases, is often used as a cache, message broker, and for real-time analytics. Its versatility and performance have made it a staple in many modern architectures.</p>
<h3 id="heading-hash-tables-and-chaining">Hash Tables and Chaining</h3>
<p>At the core of my Redis clone is a hash table implementation. Hash tables are fundamental data structures that allow for efficient key-value storage and retrieval.</p>
<p>The basic idea of a hash table is to use a hash function to map keys to indices in an array. However, collisions can occur when two different keys hash to the same index. To handle this, I implemented a technique called chaining.</p>
<p>Chaining works as follows:</p>
<ol>
<li><p>Each slot in the hash table array contains a linked list (or chain) of key-value pairs.</p>
</li>
<li><p>When a collision occurs, the new key-value pair is simply added to the end of the linked list at that index.</p>
</li>
<li><p>To retrieve a value, we hash the key, go to the corresponding index, and then search the linked list for the matching key.</p>
</li>
</ol>
<p>Here's a simplified version of my hash table structure:</p>
<pre><code class="lang-go"><span class="hljs-keyword">type</span> node <span class="hljs-keyword">struct</span> {
    key   <span class="hljs-keyword">string</span>
    value <span class="hljs-keyword">interface</span>{}
    next  *node
}

<span class="hljs-keyword">type</span> HashTable <span class="hljs-keyword">struct</span> {
    buckets []*node
    size    <span class="hljs-keyword">int</span>
    mu      sync.RWMutex
}
</code></pre>
<h3 id="heading-server-implementation">Server Implementation</h3>
<p>The server implementation is where the networking magic happens. Here's an overview of how it works:</p>
<ol>
<li><p>The server listens for TCP connections on a specified port (6379, the same as Redis).</p>
</li>
<li><p>For each incoming connection, a new goroutine is spawned to handle it, allowing for concurrent clients.</p>
</li>
<li><p>The server reads requests from the client, processes them, and sends back responses.</p>
</li>
</ol>
<p>Here's a snippet of the main server loop:</p>
<pre><code class="lang-go"><span class="hljs-function"><span class="hljs-keyword">func</span> <span class="hljs-title">StartServer</span><span class="hljs-params">()</span></span> {
    db = hashtable.New()
    listener, err := net.Listen(<span class="hljs-string">"tcp"</span>, <span class="hljs-string">":6379"</span>)
    <span class="hljs-keyword">if</span> err != <span class="hljs-literal">nil</span> {
        fmt.Println(<span class="hljs-string">"Error listening:"</span>, err)
        <span class="hljs-keyword">return</span>
    }
    <span class="hljs-keyword">defer</span> listener.Close()
    fmt.Println(<span class="hljs-string">"Server listening on :6379"</span>)

    <span class="hljs-keyword">for</span> {
        conn, err := listener.Accept()
        <span class="hljs-keyword">if</span> err != <span class="hljs-literal">nil</span> {
            fmt.Println(<span class="hljs-string">"Error accepting connection:"</span>, err)
            <span class="hljs-keyword">continue</span>
        }
        <span class="hljs-keyword">go</span> handleConnection(conn)
    }
}
</code></pre>
<h3 id="heading-protocol-design">Protocol Design</h3>
<p>One of the most interesting parts of this project was designing and implementing a simple protocol for communication between the client and server. I opted for a binary protocol with the following structure:</p>
<ol>
<li><p>Each message starts with a 4-byte length prefix, indicating the length of the rest of the message.</p>
</li>
<li><p>The message content follows, which includes:</p>
<ul>
<li><p>A 1-byte field indicating the number of strings in the command</p>
</li>
<li><p>For each string:</p>
<ul>
<li><p>A 4-byte length prefix</p>
</li>
<li><p>The string content</p>
</li>
</ul>
</li>
</ul>
</li>
</ol>
<p>For responses, I implemented a simple type system:</p>
<ul>
<li><p><code>SER_NIL</code> (0): Represents a nil value</p>
</li>
<li><p><code>SER_ERR</code> (1): Represents an error</p>
</li>
<li><p><code>SER_STR</code> (2): Represents a string</p>
</li>
<li><p><code>SER_INT</code> (3): Represents an integer</p>
</li>
<li><p><code>SER_ARR</code> (4): Represents an array of strings</p>
</li>
</ul>
<p>This protocol allows for efficient parsing and serialization of commands and responses.</p>
<h3 id="heading-conclusion">Conclusion</h3>
<p>Building my own Redis clone was an incredibly rewarding experience. It deepened my understanding of:</p>
<ol>
<li><p>TCP/IP networking and how to implement a server that can handle multiple concurrent connections</p>
</li>
<li><p>Protocol design and the importance of efficient serialization and deserialization</p>
</li>
<li><p>Hash table implementation and collision resolution techniques</p>
</li>
<li><p>The challenges of building a concurrent, in-memory database</p>
</li>
</ol>
<p>While my implementation is far from being production-ready and lacks many of Redis's advanced features, it served its purpose as a learning project. It gave me a newfound appreciation for the engineering that goes into building robust, high-performance databases like Redis.</p>
<p>If you're a software engineer looking to deepen your understanding of databases, networking, or systems programming, I highly recommend taking on a similar project. The insights you gain from building something from scratch are invaluable and will make you a better engineer, regardless of whether you ever need to build a database in your day job.</p>
<p>Remember, the goal isn't to replace existing tools, but to learn by doing. Happy coding!</p>
]]></content:encoded></item><item><title><![CDATA[I made my own DNS server]]></title><description><![CDATA[As a developer, I've always been fascinated by the intricate workings of the web. While we often take for granted the seamless experience of typing a URL into our browsers and instantly accessing websites, there's a complex system operating behind th...]]></description><link>https://blog.shivammittal.in/i-made-my-own-dns-server</link><guid isPermaLink="true">https://blog.shivammittal.in/i-made-my-own-dns-server</guid><dc:creator><![CDATA[Shivam Mittal]]></dc:creator><pubDate>Sat, 12 Oct 2024 10:43:13 GMT</pubDate><enclosure url="https://cdn.hashnode.com/res/hashnode/image/upload/v1738856662820/a015ee5d-8270-40d4-ab0f-dc19c6131bca.jpeg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p>As a developer, I've always been fascinated by the intricate workings of the web. While we often take for granted the seamless experience of typing a URL into our browsers and instantly accessing websites, there's a complex system operating behind the scenes. To deepen my understanding of this fundamental web technology, I decided to embark on a project to create my own DNS server.</p>
<h3 id="heading-understanding-dns-and-nameservers">Understanding DNS and Nameservers</h3>
<p>Before diving into the implementation, it's crucial to understand what DNS (Domain Name System) is and how it works. DNS is essentially the phonebook of the internet. It translates human-readable domain names (like <a target="_blank" href="http://www.example.com">www.example.com</a>) <a target="_blank" href="http://www.example.com">into IP addres</a>ses (like 192.0.2.1) that computers use to identify each other on the network.</p>
<p>Nameservers play a vital role in this system. They are servers dedicated to handling queries about the location of domain names' services. When you type a URL into your browser, your computer first contacts a DNS resolver, which th<a target="_blank" href="http://www.example.com">en queries vari</a>ous nameservers to find the IP address associated with that domain name.</p>
<h3 id="heading-tcpudp-and-dns-server-communication">TCP/UDP and DNS Server Communication</h3>
<p>DNS servers primarily use UDP (User Datagram Protocol) for communication due to its speed and efficiency. UDP is connectionless, meaning it doesn't require a continuous connection between the client and server, making it ideal for quick DNS lookups.</p>
<p>Here's a simplified explanation of how a DNS query works:</p>
<ol>
<li><p>Your computer sends a UDP packet containing the DNS query to a DNS resolver.</p>
</li>
<li><p>The resolver sends queries to various nameservers, starting with the root servers.</p>
</li>
<li><p>The nameservers respond with either an answer or a referral to another nameserver.</p>
</li>
<li><p>Once the resolver gets the final answer, it sends it back to your computer.</p>
</li>
</ol>
<p>While UDP is the primary protocol, DNS can fall back to TCP for larger responses or when UDP packets are lost.</p>
<h3 id="heading-implementing-the-dns-server-code-snippets">Implementing the DNS Server: Code Snippets</h3>
<p>Let's look at some basic code snippets to understand how a DNS server listens for and responds to requests. Here's a simplified version of the core functionality:</p>
<pre><code class="lang-javascript"><span class="hljs-keyword">const</span> dgram = <span class="hljs-built_in">require</span>(<span class="hljs-string">'dgram'</span>);
<span class="hljs-keyword">const</span> server = dgram.createSocket(<span class="hljs-string">'udp4'</span>);

server.on(<span class="hljs-string">'message'</span>, <span class="hljs-function">(<span class="hljs-params">msg, rinfo</span>) =&gt;</span> {
  <span class="hljs-comment">// Decode the DNS query</span>
  <span class="hljs-keyword">const</span> query = dnsPacket.decode(msg);

  <span class="hljs-comment">// Process the query and generate a response</span>
  <span class="hljs-keyword">const</span> response = processQuery(query);

  <span class="hljs-comment">// Encode and send the response</span>
  <span class="hljs-keyword">const</span> responseBuffer = dnsPacket.encode(response);
  server.send(responseBuffer, rinfo.port, rinfo.address);
});

server.bind(<span class="hljs-number">53</span>);
</code></pre>
<p>This code sets up a UDP server that listens on port 53 (the standard DNS port) and processes incoming messages.</p>
<h3 id="heading-packaging-with-docker">Packaging with Docker</h3>
<p>To make the DNS server and its dependencies easily deployable, I used Docker. Here's a snippet from my Docker Compose file:</p>
<pre><code class="lang-yaml"><span class="hljs-attr">version:</span> <span class="hljs-string">"3.8"</span>
<span class="hljs-attr">services:</span>
  <span class="hljs-attr">dns-backend:</span>
    <span class="hljs-attr">build:</span>
      <span class="hljs-attr">context:</span> <span class="hljs-string">.</span>
      <span class="hljs-attr">dockerfile:</span> <span class="hljs-string">Dockerfile</span>
    <span class="hljs-attr">ports:</span>
      <span class="hljs-bullet">-</span> <span class="hljs-string">"53:53/udp"</span>
      <span class="hljs-bullet">-</span> <span class="hljs-string">"3000:3000"</span>
    <span class="hljs-attr">depends_on:</span>
      <span class="hljs-bullet">-</span> <span class="hljs-string">redis</span>
    <span class="hljs-attr">environment:</span>
      <span class="hljs-bullet">-</span> <span class="hljs-string">REDIS_HOST=redis</span>
      <span class="hljs-bullet">-</span> <span class="hljs-string">REDIS_PORT=6379</span>
    <span class="hljs-attr">networks:</span>
      <span class="hljs-bullet">-</span> <span class="hljs-string">dns-network</span>
  <span class="hljs-attr">redis:</span>
    <span class="hljs-attr">image:</span> <span class="hljs-string">redis:alpine</span>
    <span class="hljs-attr">ports:</span>
      <span class="hljs-bullet">-</span> <span class="hljs-string">"6379:6379"</span>
    <span class="hljs-attr">volumes:</span>
      <span class="hljs-bullet">-</span> <span class="hljs-string">./redis-data:/data</span>
    <span class="hljs-attr">command:</span> <span class="hljs-string">redis-server</span> <span class="hljs-string">--appendonly</span> <span class="hljs-literal">yes</span>
    <span class="hljs-attr">networks:</span>
      <span class="hljs-bullet">-</span> <span class="hljs-string">dns-network</span>
</code></pre>
<p>This configuration sets up two services: the DNS server backend and a Redis instance for storing DNS records. It also defines the necessary network and volume configurations.</p>
<h3 id="heading-conclusion">Conclusion</h3>
<p>Building my own DNS server was an enlightening experience that deepened my understanding of how the web works at a fundamental level. It gave me hands-on experience with network protocols, distributed systems, and containerization.</p>
<p>While this implementation is not meant for production use, it serves as a great learning tool and a starting point for further exploration into internet infrastructure.</p>
<p>If you're interested in exploring the code or trying it out yourself, you can find the complete project on my GitHub repository: <a target="_blank" href="https://github.com/CodeGeek04/Personal-DNS">https://github.com/CodeGeek04/Personal-DNS</a></p>
<p>Happy coding and exploring!</p>
]]></content:encoded></item></channel></rss>