<?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: Ganesh Kumar</title>
    <description>The latest articles on DEV Community by Ganesh Kumar (@ganesh-kumar).</description>
    <link>https://dev.to/ganesh-kumar</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%2F1403545%2F61f1e35c-72dd-4187-a25d-85ee2db0141c.jpeg</url>
      <title>DEV Community: Ganesh Kumar</title>
      <link>https://dev.to/ganesh-kumar</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/ganesh-kumar"/>
    <language>en</language>
    <item>
      <title>The Beautiful Cube Series Identity That Looks Like Coincidence</title>
      <dc:creator>Ganesh Kumar</dc:creator>
      <pubDate>Fri, 29 May 2026 18:37:55 +0000</pubDate>
      <link>https://dev.to/ganesh-kumar/the-beautiful-cube-series-identity-that-looks-like-coincidence-1cja</link>
      <guid>https://dev.to/ganesh-kumar/the-beautiful-cube-series-identity-that-looks-like-coincidence-1cja</guid>
      <description>&lt;p&gt;Hello, I'm Ganesh. I'm building &lt;em&gt;git-lrc&lt;/em&gt;, an AI code reviewer that runs on every commit. It is free, unlimited, and source-available on Github. &lt;a href="https://github.com/HexmosTech/git-lrc?utm_source=chatgpt.com" rel="noopener noreferrer"&gt;Star git-lrc on GitHub&lt;/a&gt; to help more developers discover the project. Do give it a try and share your feedback for improving the product.&lt;/p&gt;

&lt;h2&gt;
  
  
  A Math Identity That Feels Wrong
&lt;/h2&gt;

&lt;p&gt;While playing with number series, I came across something that looked like a coincidence.&lt;br&gt;
Let's start with:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;√(1³ + 2³)
= √(1 + 8)
= √9
= 3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Nothing special yet.&lt;/p&gt;

&lt;p&gt;But notice:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;3 = 1 + 2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Interesting.&lt;/p&gt;

&lt;p&gt;Let's add another cube.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;√(1³ + 2³ + 3³)
= √(1 + 8 + 27)
= √36
= 6
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;6 = 1 + 2 + 3
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Now it starts looking suspicious.&lt;/p&gt;

&lt;p&gt;Let's continue.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;√(1³ + 2³ + 3³ + 4³)
= √100
= 10
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;And:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;10 = 1 + 2 + 3 + 4
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;One more:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;√(1³ + 2³ + 3³ + 4³ + 5³)
= √225
= 15
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Which is exactly:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;15 = 1 + 2 + 3 + 4 + 5
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;At this point most people assume it only works for small numbers.&lt;/p&gt;

&lt;p&gt;Surprisingly, it works for every positive integer.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Identity
&lt;/h2&gt;

&lt;p&gt;The pattern can be written as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;√(1³ + 2³ + 3³ + ... + n³)
= 1 + 2 + 3 + ... + n
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Or equivalently:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1³ + 2³ + 3³ + ... + n³
=
(1 + 2 + 3 + ... + n)²
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This means the sum of the first n cubes is exactly equal to the square of the sum of the first n natural numbers.&lt;/p&gt;

&lt;p&gt;Many people see this formula for the first time and immediately think:&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;There is no way that should be true.&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;Yet it is.&lt;/p&gt;

&lt;h2&gt;
  
  
  Testing With n = 10
&lt;/h2&gt;

&lt;p&gt;Let's verify it.&lt;/p&gt;

&lt;p&gt;Left side:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1³ + 2³ + 3³ + ... + 10³
= 3025
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Right side:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;(1 + 2 + 3 + ... + 10)²

= 55²

= 3025
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Perfect match.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Mathematicians Love It
&lt;/h2&gt;

&lt;p&gt;Most formulas involving powers become increasingly complicated.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1² + 2² + ... + n²
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;requires a special formula.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1⁴ + 2⁴ + ... + n⁴
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;requires an even more complicated formula.&lt;/p&gt;

&lt;p&gt;But cubes are special.&lt;/p&gt;

&lt;p&gt;They collapse into a perfect square:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1³ + 2³ + ... + n³
=
(1 + 2 + ... + n)²
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;It is one of the most elegant identities in elementary mathematics.&lt;/p&gt;




&lt;h2&gt;
  
  
  The Closed Form
&lt;/h2&gt;

&lt;p&gt;Since:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1 + 2 + 3 + ... + n
=
n(n + 1)/2
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;we can rewrite the cube identity as:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;1³ + 2³ + 3³ + ... + n³
=
[n(n + 1)/2]²
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;This is commonly known as the &lt;strong&gt;Sum of Cubes Formula&lt;/strong&gt;.&lt;/p&gt;

&lt;p&gt;It is also associated with &lt;strong&gt;Nicomachus's Theorem&lt;/strong&gt;, a result known for nearly two thousand years.&lt;/p&gt;

&lt;h2&gt;
  
  
  Final Thoughts
&lt;/h2&gt;

&lt;p&gt;Mathematics is full of formulas, but only a few make you stop and check your calculator twice.&lt;/p&gt;

&lt;p&gt;The cube series identity is one of them:&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&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%2Fabn6nl3iehrohehnxgje.png" alt="git-lrc" width="800" height="373"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Any feedback or contributors are welcome! It’s online, source-available, and ready for anyone to use.&lt;/p&gt;

&lt;p&gt;⭐ &lt;a href="https://github.com/HexmosTech/git-lrc?utm_source=chatgpt.com" rel="noopener noreferrer"&gt;Star git-lrc on GitHub&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Slope Intercept Form with Gradient Descent</title>
      <dc:creator>Ganesh Kumar</dc:creator>
      <pubDate>Sun, 24 May 2026 18:46:14 +0000</pubDate>
      <link>https://dev.to/ganesh-kumar/slope-intercept-form-with-gradient-descent-2mdh</link>
      <guid>https://dev.to/ganesh-kumar/slope-intercept-form-with-gradient-descent-2mdh</guid>
      <description>&lt;p&gt;Hello, I'm Ganesh. I'm building &lt;em&gt;git-lrc&lt;/em&gt;, an AI code reviewer that runs on every commit. It is free, unlimited, and source-available on Github. &lt;a href="https://github.com/HexmosTech/git-lrc?utm_source=chatgpt.com" rel="noopener noreferrer"&gt;Star git-lrc on GitHub&lt;/a&gt; to help more developers discover the project. Do give it a try and share your feedback for improving the product.&lt;/p&gt;

&lt;h2&gt;
  
  
  Slope-Intercept Form equation
&lt;/h2&gt;

&lt;p&gt;A residual is the difference between the actual y value and the predicted y value.&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%2Fc08uhsnswashf8anx9o0.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%2Fc08uhsnswashf8anx9o0.png" alt=" " width="646" height="619"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Residule = (Actual Y - Predicted Y)&lt;/p&gt;

&lt;p&gt;Finally, the residual is squared, and the sum of all the residuals is calculated, which is called the Mean Squared Error (MSE).&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%2F7yuqgxud1bbfssmcsppb.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%2F7yuqgxud1bbfssmcsppb.png" alt=" " width="766" height="619"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;(Residual)^2 is nothing but the vertical distance between the predicted line and the actual data points, squared.&lt;/p&gt;

&lt;p&gt;The lesser the value, the greater the accuracy.&lt;/p&gt;

&lt;p&gt;Using this Mean Squared Error (MSE), we can adjust the slope and y-intercept to minimize the error.&lt;/p&gt;

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

&lt;p&gt;Will discuss Gradient Descent in the next part.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&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%2Fabn6nl3iehrohehnxgje.png" alt="git-lrc" width="800" height="373"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Any feedback or contributors are welcome! It’s online, source-available, and ready for anyone to use.&lt;/p&gt;

&lt;p&gt;⭐ &lt;a href="https://github.com/HexmosTech/git-lrc?utm_source=chatgpt.com" rel="noopener noreferrer"&gt;Star git-lrc on GitHub&lt;/a&gt;&lt;br&gt;
Slope Intercept Form with Gradient Descent&lt;/p&gt;

</description>
      <category>ai</category>
    </item>
    <item>
      <title>Slope-Intercept Form equation</title>
      <dc:creator>Ganesh Kumar</dc:creator>
      <pubDate>Fri, 22 May 2026 13:00:13 +0000</pubDate>
      <link>https://dev.to/ganesh-kumar/slope-intercept-form-equation-2ng</link>
      <guid>https://dev.to/ganesh-kumar/slope-intercept-form-equation-2ng</guid>
      <description>&lt;p&gt;Hello, I'm Ganesh. I'm building &lt;em&gt;git-lrc&lt;/em&gt;, an AI code reviewer that runs on every commit. It is free, unlimited, and source-available on Github. &lt;a href="https://github.com/HexmosTech/git-lrc?utm_source=chatgpt.com" rel="noopener noreferrer"&gt;Star git-lrc on GitHub&lt;/a&gt; to help more developers discover the project. Do give it a try and share your feedback for improving the product.&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%2F1apx67p1kpxxkwezouy9.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%2F1apx67p1kpxxkwezouy9.png" alt=" " width="800" height="558"&gt;&lt;/a&gt;&lt;br&gt;
In above image we got Y = Intercept + (Slope x X)&lt;/p&gt;

&lt;p&gt;Also writen as&lt;br&gt;
y = mx + b&lt;/p&gt;

&lt;p&gt;where&lt;br&gt;
y = Intercept + (Slop x X)&lt;br&gt;
y = output / dependent variable&lt;br&gt;
x = input / independent variable&lt;br&gt;
m = slope (rate of change)&lt;br&gt;
b = y-intercept (starting value)&lt;/p&gt;

&lt;p&gt;Why is this formula used?&lt;/p&gt;

&lt;p&gt;This formula is used to represent a linear relationship, meaning something changes at a constant rate.&lt;/p&gt;

&lt;p&gt;It helps answer.&lt;/p&gt;

&lt;p&gt;Where does the line start?&lt;br&gt;
How fast does it increase or decrease?&lt;/p&gt;

&lt;p&gt;Basically making it more like how the graph is drawn in math.&lt;/p&gt;

&lt;p&gt;Using this equation, we can get the y value for a given x value.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;How It is used in Neural Networks&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;The above linear equation is the Core building block of a neuron but with many inputs.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&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%2Fabn6nl3iehrohehnxgje.png" alt="git-lrc" width="800" height="373"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Any feedback or contributors are welcome! It’s online, source-available, and ready for anyone to use.&lt;/p&gt;

&lt;p&gt;⭐ &lt;a href="https://github.com/HexmosTech/git-lrc?utm_source=chatgpt.com" rel="noopener noreferrer"&gt;Star git-lrc on GitHub&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Understanding Chain Rule</title>
      <dc:creator>Ganesh Kumar</dc:creator>
      <pubDate>Tue, 19 May 2026 03:40:23 +0000</pubDate>
      <link>https://dev.to/ganesh-kumar/understanding-chain-rule-416m</link>
      <guid>https://dev.to/ganesh-kumar/understanding-chain-rule-416m</guid>
      <description>&lt;p&gt;Hello, I'm Ganesh. I'm building &lt;em&gt;git-lrc&lt;/em&gt;, an AI code reviewer that runs on every commit. It is free, unlimited, and source-available on Github. &lt;a href="https://github.com/HexmosTech/git-lrc?utm_source=chatgpt.com" rel="noopener noreferrer"&gt;Star git-lrc on GitHub&lt;/a&gt; to help more developers discover the project. Do give it a try and share your feedback for improving the product.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is Chain Rule?
&lt;/h2&gt;

&lt;p&gt;The chain rules nothing but a differntiation of a function with another function.&lt;/p&gt;

&lt;p&gt;For example:&lt;br&gt;
Taking displacement, velocity, acceleration as an example&lt;/p&gt;

&lt;p&gt;s(t)→v(t)→a(t)&lt;/p&gt;

&lt;p&gt;Where:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;displacement depends on time&lt;/li&gt;
&lt;li&gt;velocity depends on displacement changing over time&lt;/li&gt;
&lt;li&gt;acceleration depends on velocity changing over time
### Displacement&lt;/li&gt;
&lt;/ul&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%2Fq3zckdg1z49cl1f4ioy3.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%2Fq3zckdg1z49cl1f4ioy3.png" alt=" " width="179" height="80"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  Velocity
&lt;/h3&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%2F2crtg6kycz956uwbfhxg.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%2F2crtg6kycz956uwbfhxg.png" alt=" " width="142" height="68"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Acceleration
&lt;/h2&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%2Fjw391x7s4qymlv163wt8.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%2Fjw391x7s4qymlv163wt8.png" alt=" " width="185" height="74"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Each graph is the derivative of the previous one.&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%2Fqv11i94hrzocavf9gby7.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%2Fqv11i94hrzocavf9gby7.png" alt=" " width="800" height="960"&gt;&lt;/a&gt;&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%2Fp4ndow9i51dhl90cjv9q.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%2Fp4ndow9i51dhl90cjv9q.png" alt=" " width="800" height="727"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Why chain rule is used?
&lt;/h2&gt;

&lt;p&gt;The chain rule is used in &lt;strong&gt;Machine Learning&lt;/strong&gt; during &lt;strong&gt;Backpropagation&lt;/strong&gt;, which is the process of training the network by adjusting its weights and biases to minimize errors.&lt;/p&gt;

&lt;p&gt;If you have two functions, &lt;code&gt;f(x)&lt;/code&gt; and &lt;code&gt;g(x)&lt;/code&gt;, and you want to find the derivative of their composition &lt;code&gt;f(g(x))&lt;/code&gt;, the chain rule states:&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%2Fe3phf6mgdd3mfx734nf7.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%2Fe3phf6mgdd3mfx734nf7.png" alt=" " width="253" height="68"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&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%2Fabn6nl3iehrohehnxgje.png" alt="git-lrc" width="800" height="373"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Any feedback or contributors are welcome! It’s online, source-available, and ready for anyone to use.&lt;/p&gt;

&lt;p&gt;⭐ &lt;a href="https://github.com/HexmosTech/git-lrc?utm_source=chatgpt.com" rel="noopener noreferrer"&gt;Star git-lrc on GitHub&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Understanding Importance Derivation</title>
      <dc:creator>Ganesh Kumar</dc:creator>
      <pubDate>Sat, 16 May 2026 19:21:48 +0000</pubDate>
      <link>https://dev.to/ganesh-kumar/understanding-importance-derivation-bpe</link>
      <guid>https://dev.to/ganesh-kumar/understanding-importance-derivation-bpe</guid>
      <description>&lt;p&gt;Hello, I'm Ganesh. I'm building &lt;em&gt;git-lrc&lt;/em&gt;, an AI code reviewer that runs on every commit. It is free, unlimited, and source-available on GitHub. &lt;a href="https://github.com/HexmosTech/git-lrc?utm_source=chatgpt.com" rel="noopener noreferrer"&gt;Star git-lrc on GitHub&lt;/a&gt; to help more developers discover the project. Do give it a try and share your feedback for improving the product.&lt;/p&gt;

&lt;p&gt;If you have learned differentiation in your school/college days, then most of us have learnt differentiation formula &lt;br&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%2F121soabd6e12k3he0nsy.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%2F121soabd6e12k3he0nsy.png" alt=" " width="163" height="61"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But we couldn't just understand how this was actually defined. Let's just plot on a graph and see.&lt;/p&gt;

&lt;h2&gt;
  
  
  Practicality of Differentiation
&lt;/h2&gt;

&lt;p&gt;Let's take an example of velocity and acceleration.&lt;/p&gt;

&lt;p&gt;Whenever a ball is thrown in the air, it will travel in a curved path, which is also called parabolic motion.&lt;/p&gt;

&lt;p&gt;Initially, based on acceleration, the velocity will be a peak, and at the highest point it will be zero, and again it increases while coming down.&lt;/p&gt;

&lt;p&gt;This is how it looks:&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%2Fjiygbt4xmy4f8b98prwk.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%2Fjiygbt4xmy4f8b98prwk.png" alt=" " width="800" height="600"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Similarly, we can plot it as this.&lt;/p&gt;

&lt;p&gt;If we differentiate it, we would get a straight line in the graph, also known as a slope.&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%2F1hqbolk5056yf52han8z.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%2F1hqbolk5056yf52han8z.png" alt=" " width="800" height="333"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;So basically from this graph we can get the exact velocity value at this specific point of acceleration.&lt;/p&gt;

&lt;p&gt;This is mainly used in physics and mechanical engineering, where we need the exact value of slope at a specific point.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why it matters in neural networks?
&lt;/h2&gt;

&lt;p&gt;In a neural network, we use the chain rule to derive the weights and bias.&lt;/p&gt;

&lt;p&gt;Will talk about this in detail with proper examples.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&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%2Fabn6nl3iehrohehnxgje.png" alt="git-lrc" width="800" height="373"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Any feedback or contributors are welcome! It’s online, source-available, and ready for anyone to use.&lt;/p&gt;

&lt;p&gt;⭐ &lt;a href="https://github.com/HexmosTech/git-lrc?utm_source=chatgpt.com" rel="noopener noreferrer"&gt;Star git-lrc on GitHub&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>learning</category>
      <category>science</category>
      <category>showdev</category>
    </item>
    <item>
      <title>How Calculations Happen in a Neural Network</title>
      <dc:creator>Ganesh Kumar</dc:creator>
      <pubDate>Wed, 13 May 2026 19:40:31 +0000</pubDate>
      <link>https://dev.to/ganesh-kumar/how-calculations-happen-in-a-neural-network-56ph</link>
      <guid>https://dev.to/ganesh-kumar/how-calculations-happen-in-a-neural-network-56ph</guid>
      <description>&lt;p&gt;Hello, I'm Ganesh. I'm building &lt;em&gt;git-lrc&lt;/em&gt;, an AI code reviewer that runs on every commit. It is free, unlimited, and source-available on GitHub. &lt;a href="https://github.com/HexmosTech/git-lrc?utm_source=chatgpt.com" rel="noopener noreferrer"&gt;Star git-lrc on GitHub&lt;/a&gt; to help more developers discover the project. Do give it a try and share your feedback for improving the product.&lt;/p&gt;

&lt;p&gt;In the previous article, we discussed how action potentials are defined.&lt;/p&gt;

&lt;p&gt;Let's take a simple example and plot a graph.&lt;/p&gt;

&lt;h2&gt;
  
  
  Using Softplus as the Activation Function
&lt;/h2&gt;

&lt;p&gt;For our initial example of dosage, we can take Softplus as an activation function.&lt;/p&gt;

&lt;p&gt;Now let's find the dosage and y values based on the formula:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;( Dosage x -34.4 ) + 2.14&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;For dosage : 0&lt;br&gt;
&lt;code&gt;( 0 x -34.4 ) + 2.14&lt;/code&gt; = &lt;code&gt;2.14&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;For dosage : 0.1&lt;br&gt;
&lt;code&gt;( 0.1 x -34.4 ) + 2.14&lt;/code&gt; = &lt;code&gt;-3.44 + 2.14&lt;/code&gt; = &lt;code&gt;-1.3&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now let's multiply all the values calculated in the top-most hidden layer with &lt;code&gt;-1.3&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;For dosage : 0&lt;br&gt;
&lt;code&gt;2.14 x -1.3&lt;/code&gt; = &lt;code&gt;-2.782&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;For dosage : 0.1&lt;br&gt;
&lt;code&gt;-1.3 x -1.3&lt;/code&gt; = &lt;code&gt;1.69&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Similar calculations can be done for the top-most node values.&lt;/p&gt;

&lt;h2&gt;
  
  
  Calculating the Bottom Node
&lt;/h2&gt;

&lt;p&gt;Now for the bottom-most node:&lt;/p&gt;

&lt;p&gt;&lt;code&gt;( Dosage x -2.52 ) + 1.29&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;For dosage : 0&lt;br&gt;
&lt;code&gt;( 0 x -2.52 ) + 1.29&lt;/code&gt; = &lt;code&gt;1.29&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;For dosage : 0.1&lt;br&gt;
&lt;code&gt;( 0.1 x -2.52 ) + 1.29&lt;/code&gt; = &lt;code&gt;-0.252 + 1.29&lt;/code&gt; = &lt;code&gt;1.038&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;Now multiply all the values calculated in the bottom-most hidden layer with &lt;code&gt;2.28&lt;/code&gt;.&lt;/p&gt;

&lt;p&gt;For dosage : 0&lt;br&gt;
&lt;code&gt;1.29 x 2.28&lt;/code&gt; = &lt;code&gt;2.94&lt;/code&gt;&lt;/p&gt;

&lt;p&gt;For dosage : 0.1&lt;br&gt;
&lt;code&gt;1.038 x 2.28&lt;/code&gt; = &lt;code&gt;2.366&lt;/code&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Combining Both Node Results
&lt;/h2&gt;

&lt;p&gt;From both the top and bottom node results, we add them together.&lt;/p&gt;

&lt;p&gt;Finally, we subtract &lt;code&gt;0.5690&lt;/code&gt; from the final value.&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%2Fscy41k0onu2lwnwxyn08.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%2Fscy41k0onu2lwnwxyn08.png" alt=" " width="800" height="1333"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Here is the final prediction made by the neural network.&lt;/p&gt;

&lt;h2&gt;
  
  
  Weights Used in the Neural Network
&lt;/h2&gt;

&lt;p&gt;These are the weights:&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%2Fsgq008jnbbl17jaxt1i6.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%2Fsgq008jnbbl17jaxt1i6.png" alt=" " width="800" height="475"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Bias Values Used in the Neural Network
&lt;/h2&gt;

&lt;p&gt;These are the bias values:&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%2F9mlojxnkf9tb5wf163fb.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%2F9mlojxnkf9tb5wf163fb.png" alt=" " width="800" height="471"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Support git-lrc
&lt;/h2&gt;

&lt;p&gt;&lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&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%2Fabn6nl3iehrohehnxgje.png" alt="git-lrc" width="800" height="373"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Any feedback or contributors are welcome! It’s online, source-available, and ready for anyone to use.&lt;/p&gt;

&lt;p&gt;⭐ &lt;a href="https://github.com/HexmosTech/git-lrc?utm_source=chatgpt.com" rel="noopener noreferrer"&gt;Star git-lrc on GitHub&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Action Potentials in Neurons</title>
      <dc:creator>Ganesh Kumar</dc:creator>
      <pubDate>Mon, 11 May 2026 05:47:43 +0000</pubDate>
      <link>https://dev.to/ganesh-kumar/action-potentials-in-neurons-di8</link>
      <guid>https://dev.to/ganesh-kumar/action-potentials-in-neurons-di8</guid>
      <description>&lt;p&gt;Hello, I'm Ganesh. I'm building &lt;em&gt;git-lrc&lt;/em&gt;, an AI code reviewer that runs on every commit. It is free, unlimited, and source-available on Github. &lt;a href="https://github.com/HexmosTech/git-lrc?utm_source=chatgpt.com" rel="noopener noreferrer"&gt;Star git-lrc on GitHub&lt;/a&gt; to help more developers discover the project. Do give it a try and share your feedback for improving the product.&lt;/p&gt;

&lt;p&gt;In the previous article, we discussed what is a neural network and how it works.&lt;/p&gt;

&lt;p&gt;Now let's take simple example on how action potentials are defined.&lt;/p&gt;

&lt;h2&gt;
  
  
  Action Potential
&lt;/h2&gt;

&lt;p&gt;There are many common activation functions used in neural networks.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Softplus
&lt;/h3&gt;

&lt;p&gt;This is defined by formula : &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%2Fnnl22l6ml881mcypb8ft.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%2Fnnl22l6ml881mcypb8ft.png" alt=" " width="173" height="52"&gt;&lt;/a&gt;&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%2Fmc4i90cwmat9n3zu23nh.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%2Fmc4i90cwmat9n3zu23nh.png" alt=" " width="800" height="821"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  2. ReLU
&lt;/h3&gt;

&lt;p&gt;This is defined by formula :&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%2Fz3tddeinta6auhf9lfh7.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%2Fz3tddeinta6auhf9lfh7.png" alt=" " width="150" height="51"&gt;&lt;/a&gt;&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%2Fto7ih7e3nrbo8esai948.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%2Fto7ih7e3nrbo8esai948.png" alt=" " width="800" height="821"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Sigmoid
&lt;/h3&gt;

&lt;p&gt;This is defined by formula :&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%2Fa8d25e0cls5ngifvx4mz.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%2Fa8d25e0cls5ngifvx4mz.png" alt=" " width="142" height="62"&gt;&lt;/a&gt;&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%2Fwb9u3owuczu3a7j4cz2h.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%2Fwb9u3owuczu3a7j4cz2h.png" alt=" " width="800" height="821"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;These curved functions are called activation functions.&lt;/p&gt;

&lt;p&gt;By these function we can define how to interpret the inputs given to a neuron.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&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%2Fabn6nl3iehrohehnxgje.png" alt="git-lrc" width="800" height="373"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Any feedback or contributors are welcome! It’s online, source-available, and ready for anyone to use.&lt;/p&gt;

&lt;p&gt;⭐ &lt;a href="https://github.com/HexmosTech/git-lrc?utm_source=chatgpt.com" rel="noopener noreferrer"&gt;Star git-lrc on GitHub&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Internal Architecture of Neural Networks</title>
      <dc:creator>Ganesh Kumar</dc:creator>
      <pubDate>Fri, 08 May 2026 19:39:10 +0000</pubDate>
      <link>https://dev.to/ganesh-kumar/internal-architecture-of-neural-networks-4kkn</link>
      <guid>https://dev.to/ganesh-kumar/internal-architecture-of-neural-networks-4kkn</guid>
      <description>&lt;p&gt;Hello, I'm Ganesh. I'm building &lt;em&gt;git-lrc&lt;/em&gt;, an AI code reviewer that runs on every commit. It is free, unlimited, and source-available on Github. &lt;a href="https://github.com/HexmosTech/git-lrc?utm_source=chatgpt.com" rel="noopener noreferrer"&gt;Star git-lrc on GitHub&lt;/a&gt; to help more developers discover the project. Do give it a try and share your feedback for improving the product.&lt;/p&gt;

&lt;p&gt;In the previous article, we discussed neural networks and how they work.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a Neural Network
&lt;/h2&gt;

&lt;p&gt;A neural network consists of nodes and connections between those nodes.&lt;/p&gt;

&lt;p&gt;The connections between nodes are called parameters or weights. These values are estimated and updated during training so the model can make better predictions.&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%2Fzxkzcab09plbhm17rbo2.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%2Fzxkzcab09plbhm17rbo2.png" alt=" " width="800" height="666"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;In the image above, we can see how curved lines are created to fit the data points.&lt;/p&gt;

&lt;p&gt;Neural networks start with unknown parameter values.&lt;/p&gt;

&lt;p&gt;The model then tries to fit the data points using those parameters and make predictions.&lt;/p&gt;

&lt;p&gt;If the prediction is not accurate, the model updates the parameters and tries again.&lt;/p&gt;

&lt;p&gt;This process is done using the backpropagation algorithm, which we will discuss in a later article.&lt;/p&gt;

&lt;h2&gt;
  
  
  Building Blocks of Neural Networks
&lt;/h2&gt;

&lt;p&gt;The curved lines created to fit the data points are represented using mathematical functions.&lt;/p&gt;

&lt;p&gt;We can reshape these functions to better fit the data points.&lt;/p&gt;

&lt;p&gt;There are many common activation functions used in neural networks.&lt;/p&gt;

&lt;h3&gt;
  
  
  1. Softplus
&lt;/h3&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%2Fmc4i90cwmat9n3zu23nh.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%2Fmc4i90cwmat9n3zu23nh.png" alt=" " width="800" height="821"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  2. ReLU
&lt;/h3&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%2Fto7ih7e3nrbo8esai948.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%2Fto7ih7e3nrbo8esai948.png" alt=" " width="800" height="821"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Sigmoid
&lt;/h3&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%2Fwb9u3owuczu3a7j4cz2h.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%2Fwb9u3owuczu3a7j4cz2h.png" alt=" " width="800" height="821"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;These curved functions are called activation functions.&lt;/p&gt;

&lt;p&gt;Basically, we choose different activation functions depending on how we want the neural network to learn and fit the data.&lt;/p&gt;

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

&lt;p&gt;We now have a basic understanding of how neural networks work and how activation functions help fit data points.&lt;/p&gt;

&lt;p&gt;As we continue, we will explore concepts like backpropagation, weights, biases, and training neural networks in more detail.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&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%2Fabn6nl3iehrohehnxgje.png" alt="git-lrc" width="800" height="373"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Any feedback or contributors are welcome! It’s online, source-available, and ready for anyone to use.&lt;/p&gt;

&lt;p&gt;⭐ &lt;a href="https://github.com/HexmosTech/git-lrc?utm_source=chatgpt.com" rel="noopener noreferrer"&gt;Star git-lrc on GitHub&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>architecture</category>
      <category>deeplearning</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>Introduction to Neural Networks</title>
      <dc:creator>Ganesh Kumar</dc:creator>
      <pubDate>Thu, 07 May 2026 19:46:13 +0000</pubDate>
      <link>https://dev.to/ganesh-kumar/introduction-to-neural-networks-3bfj</link>
      <guid>https://dev.to/ganesh-kumar/introduction-to-neural-networks-3bfj</guid>
      <description>&lt;p&gt;Hello, I'm Ganesh. I'm building &lt;em&gt;git-lrc&lt;/em&gt;, a free, micro AI code review that runs on commit. It is free, and source-available on GitHub. &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;Star Us&lt;/a&gt; to help devs discover the project. Do give it a try and share your feedback for improving the product.&lt;/p&gt;

&lt;p&gt;In this series of articles, we will explore the world of neural networks and how they work.&lt;/p&gt;

&lt;p&gt;In this article, we will discuss the fundamental idea of neural networks.&lt;/p&gt;

&lt;h2&gt;
  
  
  What is a Neural Network?
&lt;/h2&gt;

&lt;p&gt;A neural network is a computational model that is inspired by the structure and function of the human brain.&lt;/p&gt;

&lt;p&gt;It is widely used in many fields like image recognition, natural language processing, etc.&lt;br&gt;
It is most popular machine learning algorithm.&lt;/p&gt;

&lt;p&gt;Simplest image of a Neural Network is : &lt;br&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%2Fhaprkizrj1f1xwo02kkj.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%2Fhaprkizrj1f1xwo02kkj.png" alt=" " width="330" height="397"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What Neural Networks Manily Do?
&lt;/h2&gt;

&lt;p&gt;It tries to approximate the function of the given input and map it to the output.&lt;/p&gt;

&lt;p&gt;In simple terms, it tries to learn the relationship between the input and output. It approximates the output based on the input data.&lt;/p&gt;

&lt;p&gt;This will be be done with basic mathematical functions which totaly changes based on the data we provided.&lt;/p&gt;

&lt;p&gt;For example:&lt;/p&gt;

&lt;p&gt;Let's take example of Drug which can cure illness.&lt;/p&gt;

&lt;p&gt;Now let's split the gruop of people based on dosage of drug they consume.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Low dosage: Group A&lt;/li&gt;
&lt;li&gt;Medium dosage: Group B&lt;/li&gt;
&lt;li&gt;High dosage: Group C&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Most Commonly Gruop results may be ploted as this in the graph.&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%2Ftg23g1z0ntul0hi07cs1.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%2Ftg23g1z0ntul0hi07cs1.png" alt=" " width="800" height="667"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;To predict the efficacy of the dosage of drug we can't simply use simple straight line or normal distribution.&lt;/p&gt;

&lt;p&gt;As for example I ploted this graph for understaning on how it is done.&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%2F5olh58w96ga2ebnxc943.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%2F5olh58w96ga2ebnxc943.png" alt=" " width="800" height="667"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is where nerual network will help.&lt;/p&gt;

&lt;p&gt;If we have data points in different location it will find and draw a line to predict the values between the points.&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%2Fgjwhimdcs5lawom60bb7.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%2Fgjwhimdcs5lawom60bb7.png" alt=" " width="800" height="667"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;By above graph we can able to understand what neural network can do.&lt;/p&gt;

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

&lt;p&gt;Neural Network is the best tool to fit the data points which are scattered with curve which we can use it to predict the values in between the data points.&lt;/p&gt;

&lt;p&gt;We got to know with basic example what it actualy do.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&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%2Fabn6nl3iehrohehnxgje.png" alt="git-lrc" width="800" height="373"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Any feedback or contributors are welcome! It’s online, source-available, and ready for anyone to use. &lt;br&gt;
⭐ Star it on GitHub: &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;https://github.com/HexmosTech/git-lrc&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Attention Is All You Need - Part 6</title>
      <dc:creator>Ganesh Kumar</dc:creator>
      <pubDate>Wed, 06 May 2026 10:56:21 +0000</pubDate>
      <link>https://dev.to/ganesh-kumar/attention-is-all-you-need-part-6-519e</link>
      <guid>https://dev.to/ganesh-kumar/attention-is-all-you-need-part-6-519e</guid>
      <description>&lt;p&gt;Hello, I'm Ganesh. I'm building &lt;em&gt;git-lrc&lt;/em&gt;, an AI code reviewer that runs on every commit. It is free, unlimited, and source-available on Github. &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;Star Us&lt;/a&gt; to help devs discover the project. Do give it a try and share your feedback for improving the product.&lt;/p&gt;

&lt;p&gt;In previous article we discussed about why traditional RNN model didn't work for long sentences.&lt;/p&gt;

&lt;p&gt;In this article we will discuss about, how single attention head works?&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Single Attention Head is not enough?
&lt;/h2&gt;

&lt;p&gt;In single attention head, context of word is maintained and relates word/ token to each other.&lt;/p&gt;

&lt;p&gt;But this also comes with a limitation of contextual understanding.&lt;/p&gt;

&lt;p&gt;For Example:&lt;/p&gt;

&lt;p&gt;If the sentence had multiple meanings, single attention head will focus on one.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;In 5 Coach long train, in first coach the man was sleeping in 2nd coach the man was standing in 3rd coach the man was playing and in 4th coach the man was eating food.
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;So, for contextual understanding of &lt;code&gt;man&lt;/code&gt; in above example needed and that is where single attention head fails.&lt;/p&gt;

&lt;p&gt;To Solve this, multi head attention is introduced.&lt;/p&gt;

&lt;h2&gt;
  
  
  Multi Attention Head
&lt;/h2&gt;

&lt;p&gt;Multi Attention Head works parallelly and independently. So, it captures contextual understanding of word/ token.&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%2F4wk0koo8gt3x8yvc8ejd.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%2F4wk0koo8gt3x8yvc8ejd.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  What next?
&lt;/h2&gt;

&lt;p&gt;Finaly we got some idea on what end all happening under this.&lt;/p&gt;

&lt;p&gt;I just want to hold upcomming exploration.&lt;/p&gt;

&lt;p&gt;Just by getting into surface level I learned many things. But detailing i couldn't learn.&lt;/p&gt;

&lt;p&gt;I think by 2 weeks I will explore those field and share my learning.&lt;/p&gt;

&lt;p&gt;Reference: &lt;a href="https://proceedings.neurips.cc/paper_files/paper/2017/file/3f5ee243547dee91fbd053c1c4a845aa-Paper.pdf" rel="noopener noreferrer"&gt;https://proceedings.neurips.cc/paper_files/paper/2017/file/3f5ee243547dee91fbd053c1c4a845aa-Paper.pdf&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&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%2Fabn6nl3iehrohehnxgje.png" alt="git-lrc"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Any feedback or contributors are welcome! It’s online, source-available, and ready for anyone to use. &lt;br&gt;
⭐ Star it on GitHub: &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;https://github.com/HexmosTech/git-lrc&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>Attention Is All You Need - Part 5</title>
      <dc:creator>Ganesh Kumar</dc:creator>
      <pubDate>Mon, 04 May 2026 12:56:30 +0000</pubDate>
      <link>https://dev.to/ganesh-kumar/attention-is-all-you-need-part-5-5cma</link>
      <guid>https://dev.to/ganesh-kumar/attention-is-all-you-need-part-5-5cma</guid>
      <description>&lt;p&gt;Hello, I'm Ganesh. I'm building &lt;em&gt;git-lrc&lt;/em&gt;, an AI code reviewer that runs on every commit. It is free, unlimited, and source-available on GitHub. &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;Star Us&lt;/a&gt; to help devs discover the project. Do give it a try and share your feedback for improving the product.&lt;/p&gt;

&lt;p&gt;In previous article we discussed about step 2 of transformer model, i.e. position encoding.&lt;/p&gt;

&lt;p&gt;In this article we will discuss step 3 of transformer model, i.e. Multi-Head Attention.&lt;/p&gt;

&lt;h2&gt;
  
  
  Why Traditional RNN model didn't work for long sentences?
&lt;/h2&gt;

&lt;p&gt;Before 2017, we were using LSTM and RNN models for NLP tasks. &lt;/p&gt;

&lt;p&gt;Basicaly as the input of words and processing and context was very less.&lt;/p&gt;

&lt;p&gt;For Example let's assume there are 3 words model processes words 1 by 1.&lt;/p&gt;

&lt;p&gt;So, first sentence it was taking about river bank.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;The river bank.
The United Bank
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&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%2Fptr448fmwumrgszmvto7.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%2Fptr448fmwumrgszmvto7.png" alt=" " width="800" height="381"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Next it is about united bank which is has no related data but as we did embeding and positonal encodings we have very low probablity of understanding the context.&lt;/p&gt;

&lt;p&gt;Here is the example of how it vector might look like.&lt;br&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%2Fo4ineg0vl9p7r4sjye47.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%2Fo4ineg0vl9p7r4sjye47.png" alt=" " width="800" height="845"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  How Single Attention Head works?
&lt;/h2&gt;

&lt;p&gt;A single attention head works by determining how much focus a specific token (word) in a sequence should place on other tokens to better understand its own context.&lt;/p&gt;

&lt;p&gt;Let's take example: "The cat sat on the mat."&lt;/p&gt;

&lt;p&gt;For the token "sat", the attention head might learn to pay high attention to "cat" and "mat" because they are directly related to "sat".&lt;/p&gt;

&lt;p&gt;Let's get understanding these in details in next article by actual implementing it.&lt;/p&gt;

&lt;p&gt;Reference: &lt;a href="https://proceedings.neurips.cc/paper_files/paper/2017/file/3f5ee243547dee91fbd053c1c4a845aa-Paper.pdf" rel="noopener noreferrer"&gt;https://proceedings.neurips.cc/paper_files/paper/2017/file/3f5ee243547dee91fbd053c1c4a845aa-Paper.pdf&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&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%2Fabn6nl3iehrohehnxgje.png" alt="git-lrc" width="800" height="373"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Any feedback or contributors are welcome! It’s online, source-available, and ready for anyone to use. &lt;br&gt;
⭐ Star it on GitHub: &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;https://github.com/HexmosTech/git-lrc&lt;/a&gt;&lt;/p&gt;

</description>
    </item>
    <item>
      <title>How to Configure Nginx as an HTTPS Proxy Server?</title>
      <dc:creator>Ganesh Kumar</dc:creator>
      <pubDate>Sat, 02 May 2026 12:41:36 +0000</pubDate>
      <link>https://dev.to/ganesh-kumar/how-to-configure-nginx-as-an-https-proxy-server-2pc</link>
      <guid>https://dev.to/ganesh-kumar/how-to-configure-nginx-as-an-https-proxy-server-2pc</guid>
      <description>&lt;p&gt;Hello, I'm Ganesh. I'm building &lt;em&gt;git-lrc&lt;/em&gt;, an AI code reviewer that runs on every commit. It is free, unlimited, and source-available on Github. &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;Star Us&lt;/a&gt; to help devs discover the project. Do give it a try and share your feedback for improving the product.&lt;/p&gt;

&lt;p&gt;In previous article we could able to setup basic nginx server and server simple html page. &lt;/p&gt;

&lt;p&gt;Now let's setup https for our nginx server.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Requirements&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Before we start setting up https we should do the following:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Buy a domain name from any registrar.&lt;/li&gt;
&lt;li&gt;Set up dns records to point to our server ip.&lt;/li&gt;
&lt;li&gt;Setup Certificate for our domain name.&lt;/li&gt;
&lt;li&gt;Install nginx on our server.&lt;/li&gt;
&lt;li&gt;Set up nginx server to serve our website.&lt;/li&gt;
&lt;/ol&gt;

&lt;h2&gt;
  
  
  Buying Domain Name
&lt;/h2&gt;

&lt;p&gt;We can buy domain name from any registrar like Namecheap, GoDaddy, etc. &lt;/p&gt;

&lt;p&gt;It depends on which name it is and the charges will be around &lt;/p&gt;

&lt;h2&gt;
  
  
  Setting Up DNS Records
&lt;/h2&gt;

&lt;p&gt;Once buy setup the dns records to point to our server ip.&lt;/p&gt;

&lt;p&gt;Example:&lt;br&gt;
For your server the ip address is [IP_ADDRESS]. &lt;br&gt;
And your domain name is [EMAIL_ADDRESS]&lt;/p&gt;

&lt;p&gt;So, you need to set up a dns record to point to your server ip.&lt;/p&gt;
&lt;h2&gt;
  
  
  Setting up Certificate
&lt;/h2&gt;

&lt;p&gt;Now let's setup certificate for our domain name.&lt;/p&gt;

&lt;p&gt;&lt;code&gt;example.com&lt;/code&gt; &lt;/p&gt;

&lt;p&gt;so, we setup&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;certbot &lt;span class="nt"&gt;--nginx&lt;/span&gt; &lt;span class="nt"&gt;-d&lt;/span&gt; &lt;span class="sb"&gt;`&lt;/span&gt;example.com&lt;span class="sb"&gt;`&lt;/span&gt; &lt;span class="nt"&gt;--email&lt;/span&gt; &lt;span class="o"&gt;[&lt;/span&gt;EMAIL_ADDRESS] &lt;span class="nt"&gt;--agree-tos&lt;/span&gt; &lt;span class="nt"&gt;--no-eff-email&lt;/span&gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Here is simple workflow on how certificate is fetched and how &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%2Fftruvgc7r97ocn2ggu19.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%2Fftruvgc7r97ocn2ggu19.png" alt=" "&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Key generation&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;The Certbot generates a private key and a CSR (Certificate Signing Request) entirely on your machine. &lt;/p&gt;

&lt;p&gt;The private key is the core security guarantee.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;HTTP-01 Challenge&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Let's Encrypt needs to verify you actually control &lt;code&gt;example.com&lt;/code&gt;. It sends Certbot a random token. &lt;/p&gt;

&lt;p&gt;Certbot places it at:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;/var/www/html/.well-known/acme-challenge/&amp;lt;random-token&amp;gt;
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Nginx (already running on port 80) serves this file publicly.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Let's Encrypt fetches the token&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;LE makes a plain HTTP request to &lt;code&gt;http://example.com/.well-known/acme-challenge/&amp;lt;token&amp;gt;&lt;/code&gt;. &lt;/p&gt;

&lt;p&gt;If it gets the right response back, it's satisfied that you own the domain. &lt;/p&gt;

&lt;p&gt;This is why DNS must be pointing to your server before you run Certbot — if the domain pointed elsewhere, LE would fetch the token from the wrong machine and the challenge would fail.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Certificate issued &amp;amp; saved&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;LE signs and returns your certificate. &lt;/p&gt;

&lt;p&gt;Certbot saves four files to &lt;code&gt;/etc/letsencrypt/live/example.com/&lt;/code&gt;:&lt;/p&gt;

&lt;div class="table-wrapper-paragraph"&gt;&lt;table&gt;
&lt;thead&gt;
&lt;tr&gt;
&lt;th&gt;File&lt;/th&gt;
&lt;th&gt;What it is&lt;/th&gt;
&lt;/tr&gt;
&lt;/thead&gt;
&lt;tbody&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;fullchain.pem&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Your cert + intermediate CA chain (this is what Nginx uses)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;privkey.pem&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Your private key (Nginx uses this too)&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;cert.pem&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Just your cert alone&lt;/td&gt;
&lt;/tr&gt;
&lt;tr&gt;
&lt;td&gt;&lt;code&gt;chain.pem&lt;/code&gt;&lt;/td&gt;
&lt;td&gt;Just the CA chain alone&lt;/td&gt;
&lt;/tr&gt;
&lt;/tbody&gt;
&lt;/table&gt;&lt;/div&gt;

&lt;p&gt;&lt;strong&gt;Nginx config is rewritten&lt;/strong&gt; &lt;/p&gt;

&lt;p&gt;Certbot patches your &lt;code&gt;server&lt;/code&gt; block to add the &lt;code&gt;listen 443 ssl&lt;/code&gt; lines and the cert paths, and adds a new &lt;code&gt;server { listen 80; }&lt;/code&gt; block that redirects all HTTP traffic to HTTPS. &lt;/p&gt;

&lt;p&gt;Then it reloads Nginx for you.&lt;/p&gt;

&lt;h2&gt;
  
  
  Setting up with nginx
&lt;/h2&gt;

&lt;p&gt;Assuming your application running in local host 8090. and you are setting up https for your domain name example.com.&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight conf"&gt;&lt;code&gt;&lt;span class="n"&gt;server&lt;/span&gt; {
    &lt;span class="n"&gt;listen&lt;/span&gt; &lt;span class="m"&gt;443&lt;/span&gt; &lt;span class="n"&gt;ssl&lt;/span&gt; &lt;span class="n"&gt;http2&lt;/span&gt;;
    &lt;span class="n"&gt;server_name&lt;/span&gt; &lt;span class="n"&gt;example&lt;/span&gt;.&lt;span class="n"&gt;com&lt;/span&gt;;

    &lt;span class="n"&gt;ssl_certificate&lt;/span&gt;     /&lt;span class="n"&gt;etc&lt;/span&gt;/&lt;span class="n"&gt;letsencrypt&lt;/span&gt;/&lt;span class="n"&gt;live&lt;/span&gt;/&lt;span class="n"&gt;example&lt;/span&gt;.&lt;span class="n"&gt;com&lt;/span&gt;/&lt;span class="n"&gt;fullchain&lt;/span&gt;.&lt;span class="n"&gt;pem&lt;/span&gt;;
    &lt;span class="n"&gt;ssl_certificate_key&lt;/span&gt; /&lt;span class="n"&gt;etc&lt;/span&gt;/&lt;span class="n"&gt;letsencrypt&lt;/span&gt;/&lt;span class="n"&gt;live&lt;/span&gt;/&lt;span class="n"&gt;example&lt;/span&gt;.&lt;span class="n"&gt;com&lt;/span&gt;/&lt;span class="n"&gt;privkey&lt;/span&gt;.&lt;span class="n"&gt;pem&lt;/span&gt;;

    &lt;span class="c"&gt;# All requests — public, no auth
&lt;/span&gt;    &lt;span class="n"&gt;location&lt;/span&gt; / {
        &lt;span class="n"&gt;proxy_pass&lt;/span&gt; &lt;span class="n"&gt;http&lt;/span&gt;://&lt;span class="n"&gt;localhost&lt;/span&gt;:&lt;span class="m"&gt;8090&lt;/span&gt;;
        &lt;span class="n"&gt;proxy_set_header&lt;/span&gt; &lt;span class="n"&gt;Host&lt;/span&gt; $&lt;span class="n"&gt;host&lt;/span&gt;;
        &lt;span class="n"&gt;proxy_set_header&lt;/span&gt; &lt;span class="n"&gt;X&lt;/span&gt;-&lt;span class="n"&gt;Real&lt;/span&gt;-&lt;span class="n"&gt;IP&lt;/span&gt; $&lt;span class="n"&gt;remote_addr&lt;/span&gt;;
        &lt;span class="n"&gt;proxy_set_header&lt;/span&gt; &lt;span class="n"&gt;X&lt;/span&gt;-&lt;span class="n"&gt;Forwarded&lt;/span&gt;-&lt;span class="n"&gt;For&lt;/span&gt; $&lt;span class="n"&gt;proxy_add_x_forwarded_for&lt;/span&gt;;
        &lt;span class="n"&gt;proxy_set_header&lt;/span&gt; &lt;span class="n"&gt;X&lt;/span&gt;-&lt;span class="n"&gt;Forwarded&lt;/span&gt;-&lt;span class="n"&gt;Proto&lt;/span&gt; &lt;span class="n"&gt;https&lt;/span&gt;;
    }
}
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Add to symlink to sites enabled&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo ln&lt;/span&gt; &lt;span class="nt"&gt;-s&lt;/span&gt; /etc/nginx/sites-available/example.com /etc/nginx/sites-enabled/
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Restarting nginx&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight shell"&gt;&lt;code&gt;&lt;span class="nb"&gt;sudo &lt;/span&gt;nginx &lt;span class="nt"&gt;-t&lt;/span&gt; &lt;span class="o"&gt;&amp;amp;&amp;amp;&lt;/span&gt; &lt;span class="nb"&gt;sudo &lt;/span&gt;systemctl reload nginx
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



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

&lt;p&gt;We could get https for our domain name example.com.&lt;/p&gt;

&lt;p&gt;&lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&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%2Fabn6nl3iehrohehnxgje.png" alt="git-lrc"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Any feedback or contributors are welcome! It’s online, source-available, and ready for anyone to use. &lt;br&gt;
⭐ Star it on GitHub: &lt;a href="https://github.com/HexmosTech/git-lrc" rel="noopener noreferrer"&gt;https://github.com/HexmosTech/git-lrc&lt;/a&gt;&lt;/p&gt;

</description>
      <category>devops</category>
      <category>security</category>
      <category>tutorial</category>
      <category>webdev</category>
    </item>
  </channel>
</rss>
