<?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: Ranuj Mahajan</title>
    <description>The latest articles on DEV Community by Ranuj Mahajan (@ranujmahajan).</description>
    <link>https://dev.to/ranujmahajan</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%2F639244%2F67c9faf0-7366-4f1e-afb4-327b7d250bc4.jpeg</url>
      <title>DEV Community: Ranuj Mahajan</title>
      <link>https://dev.to/ranujmahajan</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ranujmahajan"/>
    <language>en</language>
    <item>
      <title>How AI Learns: Forward Pass and Loss Explained with 2 + 1</title>
      <dc:creator>Ranuj Mahajan</dc:creator>
      <pubDate>Sat, 03 Oct 2026 09:14:52 +0000</pubDate>
      <link>https://dev.to/ranujmahajan/how-ai-learns-forward-pass-and-loss-explained-with-2-1-3hcn</link>
      <guid>https://dev.to/ranujmahajan/how-ai-learns-forward-pass-and-loss-explained-with-2-1-3hcn</guid>
      <description>&lt;p&gt;Our inputs are 2 and 1, and the correct answer is 3. But the network initially predicts 0.7.&lt;/p&gt;

&lt;p&gt;Why? A neural network doesn’t automatically know the rules of addition. Its prediction depends on its current weights and biases.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The forward pass&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A forward pass means sending inputs through the network to produce a prediction.&lt;/p&gt;

&lt;p&gt;Each neuron multiplies its inputs by weights, adds a bias, and applies an activation function.&lt;/p&gt;

&lt;p&gt;For example, a hidden neuron might calculate:&lt;/p&gt;

&lt;p&gt;(2 × 0.5) + (1 × -1) + 0.5 = 0.5&lt;/p&gt;

&lt;p&gt;If we use ReLU as the activation function, positive values stay unchanged and negative values become zero.&lt;/p&gt;

&lt;p&gt;In our example, two hidden neurons each produce 0.5. The output neuron combines them:&lt;/p&gt;

&lt;p&gt;Prediction = (0.5 × 0.8) + (0.5 × 0.4) + 0.1&lt;br&gt;
           = 0.7&lt;/p&gt;

&lt;p&gt;The forward pass gives us a prediction. It does not update the weights.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Calculating the loss&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Now we compare the prediction with the correct answer:&lt;/p&gt;

&lt;p&gt;Correct answer = 3&lt;br&gt;
Prediction     = 0.7&lt;br&gt;
Error          = 0.7 − 3 = -2.3&lt;/p&gt;

&lt;p&gt;Using squared-error loss:&lt;/p&gt;

&lt;p&gt;Loss = (Prediction − Correct answer)²&lt;br&gt;
     = (0.7 − 3)²&lt;br&gt;
     = 5.29&lt;/p&gt;

&lt;p&gt;Loss is a number that measures how wrong the prediction is. For this loss function, a smaller value means a closer prediction.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Learning from the mistake&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Calculating loss alone doesn’t teach the network.&lt;/p&gt;

&lt;p&gt;Next, backpropagation calculates gradients: how changes to each weight and bias would affect the loss. An optimizer uses those gradients to update the parameters.&lt;/p&gt;

&lt;p&gt;Training repeats this process across many examples:&lt;/p&gt;

&lt;p&gt;Make a prediction&lt;br&gt;
Calculate the loss&lt;br&gt;
Calculate gradients&lt;br&gt;
Update weights and biases&lt;br&gt;
Repeat&lt;/p&gt;

&lt;p&gt;One example isn’t enough to show that the network has learned addition. We also need to test it on input pairs it hasn’t trained on.&lt;/p&gt;

&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/Q9GyPB1I4E0" width="710" height="399"&gt;
  &lt;/iframe&gt;
 &lt;/p&gt;

&lt;p&gt;The key distinction&lt;/p&gt;

&lt;p&gt;Forward pass: What does the network predict?&lt;/p&gt;

&lt;p&gt;Loss calculation: How wrong is that prediction?&lt;/p&gt;

&lt;p&gt;Training: How should its weights and biases change?&lt;/p&gt;

&lt;p&gt;That’s the foundation of neural network training.&lt;/p&gt;

&lt;p&gt;For more such posts, visit EngineeringDepth.com.&lt;/p&gt;

&lt;p&gt;Follow Planet AI &amp;amp; Tech for simple explanations of AI and technology.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>machinelearning</category>
      <category>deeplearning</category>
      <category>beginners</category>
    </item>
    <item>
      <title>Neural networks don’t understand words, sentences, or punctuation. They only understand numbers.</title>
      <dc:creator>Ranuj Mahajan</dc:creator>
      <pubDate>Sun, 13 Sep 2026 09:00:58 +0000</pubDate>
      <link>https://dev.to/ranujmahajan/neural-networks-dont-understand-words-sentences-or-punctuation-they-only-understand-numbers-501l</link>
      <guid>https://dev.to/ranujmahajan/neural-networks-dont-understand-words-sentences-or-punctuation-they-only-understand-numbers-501l</guid>
      <description>&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/s_JCklD2fIU" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

&lt;p&gt;Core Definition: Tokenization is the process of breaking raw text into smaller discrete units—called tokens—which can be words, subwords, characters, or symbols that a computer model can process.&lt;/p&gt;

&lt;p&gt;Numerical Mapping: Once split, each unique token is assigned a numerical identifier (Token ID) using a predefined vocabulary, allowing neural networks to perform mathematical operations on text.&lt;/p&gt;

&lt;p&gt;Modern Standard (Subword Tokenization): Most large language models use subword algorithms (such as Byte-Pair Encoding or WordPiece) to balance vocabulary size, efficiently handle compound words, and avoid "out-of-vocabulary" errors for rare or unseen terms.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>mcp</category>
    </item>
    <item>
      <title>Neural networks don’t understand words, sentences, or punctuation. They only understand numbers and vector spaces.</title>
      <dc:creator>Ranuj Mahajan</dc:creator>
      <pubDate>Sun, 13 Sep 2026 08:56:19 +0000</pubDate>
      <link>https://dev.to/ranujmahajan/neural-networks-dont-understand-words-sentences-or-punctuation-they-only-understand-numbers-and-1m7d</link>
      <guid>https://dev.to/ranujmahajan/neural-networks-dont-understand-words-sentences-or-punctuation-they-only-understand-numbers-and-1m7d</guid>
      <description>&lt;p&gt;&lt;a href="https://www.youtube.com/watch?v=s_JCklD2fIU" rel="noopener noreferrer"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>programming</category>
      <category>tokenization</category>
      <category>llm</category>
    </item>
    <item>
      <title>Visual breakdown: How raw text moves through the LLM ingestion pipeline (Tokenize Embed Position Attend)</title>
      <dc:creator>Ranuj Mahajan</dc:creator>
      <pubDate>Sun, 13 Sep 2026 08:45:05 +0000</pubDate>
      <link>https://dev.to/ranujmahajan/visual-breakdown-how-raw-text-moves-through-the-llm-ingestion-pipeline-tokenize-embed--fe9</link>
      <guid>https://dev.to/ranujmahajan/visual-breakdown-how-raw-text-moves-through-the-llm-ingestion-pipeline-tokenize-embed--fe9</guid>
      <description>&lt;p&gt;Liquid syntax error: Tag '{%   %}' was not properly terminated with regexp: /\%\}/&lt;/p&gt;
</description>
      <category>ai</category>
      <category>llm</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>How Embeddings are generated in AI</title>
      <dc:creator>Ranuj Mahajan</dc:creator>
      <pubDate>Sat, 12 Sep 2026 13:00:51 +0000</pubDate>
      <link>https://dev.to/ranujmahajan/how-embeddings-are-generated-in-ai-1cm3</link>
      <guid>https://dev.to/ranujmahajan/how-embeddings-are-generated-in-ai-1cm3</guid>
      <description>&lt;p&gt;  &lt;iframe src="https://www.youtube.com/embed/5DBCo1rrySE" width="710" height="399"&gt;
  &lt;/iframe&gt;
&lt;/p&gt;

</description>
      <category>ai</category>
      <category>vectordatabase</category>
      <category>programming</category>
      <category>productivity</category>
    </item>
    <item>
      <title>Why Most Engineers Struggle with System Design (And How Visuals Fix It)</title>
      <dc:creator>Ranuj Mahajan</dc:creator>
      <pubDate>Fri, 11 Sep 2026 10:57:02 +0000</pubDate>
      <link>https://dev.to/ranujmahajan/why-most-engineers-struggle-with-system-design-and-how-visuals-fix-it-54n0</link>
      <guid>https://dev.to/ranujmahajan/why-most-engineers-struggle-with-system-design-and-how-visuals-fix-it-54n0</guid>
      <description>&lt;p&gt;Most engineers prepare for system design interviews by reading 600-page textbooks or memorizing generic bullet-point summaries.&lt;/p&gt;

&lt;p&gt;Then, they get hit with an open-ended interview question like:&lt;/p&gt;

&lt;p&gt;"Design a globally distributed URL shortener handling 50k writes per second."&lt;/p&gt;

&lt;p&gt;Suddenly, the disconnected facts freeze up. You know what a load balancer is. You know what Redis does. But visualizing how data moves end-to-end under load is an entirely different skill.&lt;/p&gt;

&lt;p&gt;The Flaw with Text-Heavy System Design&lt;br&gt;
Text explains definitions, but distributed architecture is all about flow and trade-offs:&lt;/p&gt;

&lt;p&gt;How request routing navigates an API Gateway and Load Balancer before touching application instances.&lt;/p&gt;

&lt;p&gt;Where decoupled workers write back output after an asynchronous queue is triggered.&lt;/p&gt;

&lt;p&gt;How cache invalidation propagates when a write hits the primary database.&lt;/p&gt;

&lt;p&gt;When you only memorize terms, you miss the mental map of where bottlenecks emerge.&lt;/p&gt;

&lt;p&gt;System Design You Can See&lt;br&gt;
To design resilient architectures, you need to build intuition visually:&lt;/p&gt;

&lt;p&gt;End-to-End Tracing: Follow a packet from client to CDN, load balancers, caches, and sharded storage tiers.&lt;/p&gt;

&lt;p&gt;Visualizing Trade-offs: See the direct cost of consistency vs. availability, or horizontal scaling vs. vertical read replicas.&lt;/p&gt;

&lt;p&gt;Reusable Blueprints: Move beyond ad-hoc diagrams to structured visual mental models that apply to real-world architectures (like Netflix, Uber, or WhatsApp).&lt;/p&gt;

&lt;p&gt;Level Up Your Architecture Intuition&lt;br&gt;
If you want to stop getting lost in abstract jargon and start designing systems with confidence, check out EngineeringDepth.&lt;/p&gt;

&lt;p&gt;We teach system design visually—giving you clear, practical diagrams, lessons, and deep-dive architectural breakdowns designed for modern engineers and tech interviews.&lt;/p&gt;

&lt;p&gt;👉 Explore the visual course at &lt;a href="https://dev.tourl"&gt;engineeringdepth.com&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;What’s the hardest concept in distributed systems for you to visualize? Let’s discuss in the comments below!&lt;/p&gt;

</description>
      <category>systemdesign</category>
      <category>architecture</category>
      <category>webdev</category>
      <category>learning</category>
    </item>
    <item>
      <title>Basics of the RAG</title>
      <dc:creator>Ranuj Mahajan</dc:creator>
      <pubDate>Mon, 03 Aug 2026 11:20:10 +0000</pubDate>
      <link>https://dev.to/ranujmahajan/basics-of-the-rag-8ap</link>
      <guid>https://dev.to/ranujmahajan/basics-of-the-rag-8ap</guid>
      <description>&lt;p&gt;&lt;a href="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8nlkv3sf2n53w2uk9yes.gif" class="article-body-image-wrapper"&gt;&lt;img src="https://media2.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto/https%3A%2F%2Fdev-to-uploads.s3.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F8nlkv3sf2n53w2uk9yes.gif" alt=" " width="560" height="336"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>rag</category>
    </item>
    <item>
      <title>Artificial Intelligence becomes much easier to understand when you see the flow visually.</title>
      <dc:creator>Ranuj Mahajan</dc:creator>
      <pubDate>Wed, 29 Jul 2026 14:00:54 +0000</pubDate>
      <link>https://dev.to/ranujmahajan/artificial-intelligence-becomes-much-easier-to-understand-when-you-see-the-flow-visually-3804</link>
      <guid>https://dev.to/ranujmahajan/artificial-intelligence-becomes-much-easier-to-understand-when-you-see-the-flow-visually-3804</guid>
      <description></description>
      <category>backend</category>
      <category>systemdesign</category>
      <category>ai</category>
      <category>webdev</category>
    </item>
    <item>
      <title>How does global Load balancer works</title>
      <dc:creator>Ranuj Mahajan</dc:creator>
      <pubDate>Tue, 07 Oct 2025 14:58:42 +0000</pubDate>
      <link>https://dev.to/ranujmahajan/how-does-global-load-balancer-works-4o3b</link>
      <guid>https://dev.to/ranujmahajan/how-does-global-load-balancer-works-4o3b</guid>
      <description>&lt;p&gt;How does Load Balancer works? &lt;/p&gt;

&lt;p&gt;Load balancer uses an algorithm to forward the request to the different based on some filters. &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;CPU based algorithm &lt;/li&gt;
&lt;li&gt;round robin technique&lt;/li&gt;
&lt;li&gt;Load balancer also keeps the  heart beat to check if services connected to it are working fine.&lt;/li&gt;
&lt;li&gt;global load balancers distributes the request based on IP and geographical locations. &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;![ ](&lt;a href="https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t9r3klrv9627ue7yqdyn.png" rel="noopener noreferrer"&gt;https://dev-to-uploads.s3.amazonaws.com/uploads/articles/t9r3klrv9627ue7yqdyn.png&lt;/a&gt;&lt;/p&gt;

</description>
      <category>loadbalancer</category>
      <category>systemdesign</category>
      <category>datacentre</category>
    </item>
    <item>
      <title>Mardown to the PDF converter.</title>
      <dc:creator>Ranuj Mahajan</dc:creator>
      <pubDate>Mon, 15 Sep 2025 15:41:27 +0000</pubDate>
      <link>https://dev.to/ranujmahajan/mardown-to-the-pdf-converter-n8e</link>
      <guid>https://dev.to/ranujmahajan/mardown-to-the-pdf-converter-n8e</guid>
      <description>&lt;p&gt;&lt;a href="https://pdffrommarkdown.com" rel="noopener noreferrer"&gt;https://pdffrommarkdown.com&lt;/a&gt; is the place where you can convert your markdown files to pdf . &lt;br&gt;
you can give your custom names to the pdf and you can encrypt them with password as well. &lt;/p&gt;

</description>
      <category>markdown</category>
      <category>pdf</category>
      <category>markdownconverter</category>
      <category>chatgpt</category>
    </item>
    <item>
      <title>Improve your understanding of SOLID principles in OOPS.</title>
      <dc:creator>Ranuj Mahajan</dc:creator>
      <pubDate>Mon, 26 Aug 2024 07:38:02 +0000</pubDate>
      <link>https://dev.to/ranujmahajan/improve-your-understanding-of-solid-principles-in-oops-29cf</link>
      <guid>https://dev.to/ranujmahajan/improve-your-understanding-of-solid-principles-in-oops-29cf</guid>
      <description>&lt;p&gt;What Does Solid principles mean ?  &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;
&lt;strong&gt;S-&amp;gt; Single responsibility principle&lt;/strong&gt; 
: it states that a class or an object in the OOPS programming realm should carry only one responsibility. if there are actions that are taken by student&lt;/li&gt;
&lt;li&gt;pay for the fees&lt;/li&gt;
&lt;li&gt;enrolment to new course&lt;/li&gt;
&lt;li&gt;subjects studying&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Assume we can create a class with all the responsibility encapsulated in student class, but that would make our code complex and difficult to maintain. &lt;/p&gt;

&lt;p&gt;we have to separate the concerns and make sure that each class is only responsible for one task . this way each class will perform task.  &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%2Fhtwlzpvmprneagsgt92p.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%2Fhtwlzpvmprneagsgt92p.png" alt="Single responsibility principle" width="800" height="318"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;O-&amp;gt; &lt;strong&gt;Open and closed principle&lt;/strong&gt; : &lt;br&gt;
This principle states that we should not change existing functionality or program in the class. we can extend our functionality of the class, but we shouldn't be able to modify it. &lt;/p&gt;

&lt;p&gt;this looks really easy while we write it in theory, but we have to think of creating interface and make sure that we  even if new classes are added, they implement from the interface and are able to execute the existing core logic.&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%2Faxp3fuimoy9lz5if8r46.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%2Faxp3fuimoy9lz5if8r46.png" alt="open/ closed principle " width="800" height="479"&gt;&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Why do we need a NoSQL Databases</title>
      <dc:creator>Ranuj Mahajan</dc:creator>
      <pubDate>Tue, 23 Jul 2024 13:16:57 +0000</pubDate>
      <link>https://dev.to/ranujmahajan/why-do-we-need-a-nosql-databases-2eef</link>
      <guid>https://dev.to/ranujmahajan/why-do-we-need-a-nosql-databases-2eef</guid>
      <description>&lt;p&gt;In this post, I would explain why do we need NoSQL databases from a developer perspective. &lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Developer Friendly&lt;/strong&gt; : NoSql databases are developer friendly, we can store JSON that is generated from the UI to the database, there is no transformation required at the application server end. this data can be read through a key from the database. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;Data schema&lt;/strong&gt;: we can store Json documents of different format in the collection. we dont have to comply to the any data schema. data of different schema's can be stored in the collection. this ensures that a very less transformation or no transformation is required for the data retrieval and data storage. &lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;&lt;strong&gt;NoSql horizontal scaling&lt;/strong&gt; : it can store huge amount of data. Nosql data can be scaled out easily. as data grows, we can add more and more servers to the Nosql databases. &lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>nosql</category>
      <category>database</category>
      <category>mongodb</category>
    </item>
  </channel>
</rss>
