<?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: Md Imtiyaz Ahmed</title>
    <description>The latest articles on DEV Community by Md Imtiyaz Ahmed (@imtiyazcode).</description>
    <link>https://dev.to/imtiyazcode</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%2F577960%2F30ac7e32-d366-44a9-853b-430dabf0eafd.jpeg</url>
      <title>DEV Community: Md Imtiyaz Ahmed</title>
      <link>https://dev.to/imtiyazcode</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/imtiyazcode"/>
    <language>en</language>
    <item>
      <title>How Neural Networks Actually Work — A Thread for Curious Minds</title>
      <dc:creator>Md Imtiyaz Ahmed</dc:creator>
      <pubDate>Wed, 27 May 2026 16:43:07 +0000</pubDate>
      <link>https://dev.to/imtiyazcode/how-neural-networks-actually-work-a-thread-for-curious-minds-4a2g</link>
      <guid>https://dev.to/imtiyazcode/how-neural-networks-actually-work-a-thread-for-curious-minds-4a2g</guid>
      <description>&lt;p&gt;Everything starts from something you already know:&lt;/p&gt;

&lt;p&gt;y = mx + c&lt;/p&gt;

&lt;p&gt;That's just a line. But stack enough of them, connect them, and add non-linearity? You have a neural network.&lt;/p&gt;

&lt;p&gt;Here's the full breakdown &lt;/p&gt;

&lt;p&gt;━━━━━━━━━━━━━━━&lt;/p&gt;

&lt;p&gt;📌 TRAINING — How the Model Learns&lt;/p&gt;

&lt;p&gt;We don't know the best values of m and c at first. So we:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Start with random values&lt;/li&gt;
&lt;li&gt;Predict ŷ = mx + c&lt;/li&gt;
&lt;li&gt;Compare with the actual value (y)&lt;/li&gt;
&lt;li&gt;Compute the loss (error):&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;L = (y − ŷ)²&lt;/p&gt;

&lt;p&gt;This is Mean Squared Error (MSE). Our goal? Minimize this loss.&lt;/p&gt;

&lt;p&gt;━━━━━━━━━━━━━━━&lt;/p&gt;

&lt;p&gt;📐 Gradients — The Learning Step&lt;/p&gt;

&lt;p&gt;We use differentiation to see how changing m or c affects the loss.&lt;/p&gt;

&lt;p&gt;These are called gradients. Then we use gradient descent:&lt;/p&gt;

&lt;p&gt;m_new = m_old − η · (∂L/∂m)&lt;br&gt;
c_new = c_old − η · (∂L/∂c)&lt;/p&gt;

&lt;p&gt;Where η = learning rate (how fast the model updates).&lt;/p&gt;

&lt;p&gt;━━━━━━━━━━━━━━━&lt;/p&gt;

&lt;p&gt;🔗 From Line to Neural Network&lt;/p&gt;

&lt;p&gt;Now imagine multiple inputs — x₁, x₂, x₃...&lt;/p&gt;

&lt;p&gt;y = w₁x₁ + w₂x₂ + w₃x₃ + ... + b&lt;/p&gt;

&lt;p&gt;→ wᵢ = weight for each input (how important that input is)&lt;br&gt;
→ b = bias (like c, helps shift the curve)&lt;/p&gt;

&lt;p&gt;Each xᵢ, wᵢ pair = one "connection strength."&lt;/p&gt;

&lt;p&gt;This is one neuron.&lt;/p&gt;

&lt;p&gt;━━━━━━━━━━━━━━━&lt;/p&gt;

&lt;p&gt;🏗️ The Network Structure&lt;/p&gt;

&lt;p&gt;→ Input Layer: where data enters (x1, x2, x3...)&lt;br&gt;
→ Hidden Layers: learn complex features&lt;br&gt;
→ Output Layer: gives the final prediction&lt;/p&gt;

&lt;p&gt;Each neuron connects to neurons in the next layer. Every connection has its own weight.&lt;/p&gt;

&lt;p&gt;Output of each neuron = f(W · X + b)&lt;/p&gt;

&lt;p&gt;━━━━━━━━━━━━━━━&lt;/p&gt;

&lt;p&gt;⚡ Activation Functions — Adding Non-Linearity&lt;/p&gt;

&lt;p&gt;If we combine weighted inputs linearly, the model can only learn straight lines. Real-world data is non-linear — so we add activation functions:&lt;/p&gt;

&lt;p&gt;• Sigmoid → probabilities (0 to 1)&lt;br&gt;
• ReLU → max(0, x) — adds non-linearity, efficient&lt;br&gt;
• Tanh → centered around 0&lt;br&gt;
• Softmax → multi-class classification&lt;/p&gt;

&lt;p&gt;These allow the network to model complex, curved decision boundaries.&lt;/p&gt;

&lt;p&gt;━━━━━━━━━━━━━━━&lt;/p&gt;

&lt;p&gt;🌐 Universal Approximation Theorem&lt;/p&gt;

&lt;p&gt;This is the heart of deep learning.&lt;/p&gt;

&lt;p&gt;"A neural network with enough neurons and layers can approximate any function in the world — no matter how complex — as long as you have enough data and training."&lt;/p&gt;

&lt;p&gt;Translation: They can model any pattern, from stock prices to language semantics.&lt;/p&gt;

&lt;p&gt;━━━━━━━━━━━━━━━&lt;/p&gt;

&lt;p&gt;🔢 Why Matrices?&lt;/p&gt;

&lt;p&gt;Instead of computing one weight at a time, we represent inputs, weights, and biases as matrices:&lt;/p&gt;

&lt;p&gt;Y = f(WX + b)&lt;/p&gt;

&lt;p&gt;This allows vectorized computation — very fast on GPUs.&lt;/p&gt;

&lt;p&gt;━━━━━━━━━━━━━━━&lt;/p&gt;

&lt;p&gt;🔁 Backpropagation — Learning in Multi-Layer Networks&lt;/p&gt;

&lt;p&gt;When you have many layers:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;The model predicts an output&lt;/li&gt;
&lt;li&gt;You compute loss (how wrong it is)&lt;/li&gt;
&lt;li&gt;You send this error backward layer by layer — adjusting weights at each step using gradients&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;That's backpropagation — the backbone of neural network training.&lt;/p&gt;

&lt;p&gt;━━━━━━━━━━━━━━━&lt;/p&gt;

&lt;p&gt;🧾 Key Concepts Summary&lt;/p&gt;

&lt;p&gt;• Weights (W) → strength of connection between neurons&lt;br&gt;
• Bias (b) → shifts decision boundary&lt;br&gt;
• Activation Function → adds non-linearity&lt;br&gt;
• Loss Function → measures error&lt;br&gt;
• Gradient Descent → minimizes loss by adjusting weights&lt;br&gt;
• Backpropagation → passes errors backward&lt;/p&gt;

&lt;p&gt;━━━━━━━━━━━━━━━&lt;/p&gt;

&lt;p&gt;🔄 The Visual Flow:&lt;/p&gt;

&lt;p&gt;Input Layer → Hidden Layer(s) → Output Layer&lt;br&gt;
→ Weighted Sum → Activation&lt;br&gt;
→ Loss Computation&lt;br&gt;
→ Backpropagation&lt;br&gt;
→ Update Weights&lt;/p&gt;

&lt;p&gt;Repeat until the network learns patterns perfectly.&lt;/p&gt;

&lt;p&gt;━━━━━━━━━━━━━━━&lt;/p&gt;

&lt;p&gt;🌍 Real-World Analogy&lt;/p&gt;

&lt;p&gt;Think of it like how humans learn:&lt;br&gt;
• Inputs = sensory data&lt;br&gt;
• Weights = attention/importance we give each input&lt;br&gt;
• Bias = our default tendency&lt;br&gt;
• Activation = whether our brain reacts or not&lt;br&gt;
• Loss = how wrong we were&lt;br&gt;
• Gradients = how we adjust next time&lt;/p&gt;

&lt;p&gt;━━━━━━━━━━━━━━━&lt;/p&gt;

&lt;p&gt;💡 In Short:&lt;/p&gt;

&lt;p&gt;Neural networks = layers of weighted connections that transform input → output, learning to minimize loss through gradient-based optimization and non-linear activation.&lt;/p&gt;

</description>
      <category>ai</category>
      <category>deeplearning</category>
      <category>softwaredevelopment</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>Meaningful Names (Clean Code) — Why it is important for software developers?</title>
      <dc:creator>Md Imtiyaz Ahmed</dc:creator>
      <pubDate>Sat, 13 Feb 2021 14:11:56 +0000</pubDate>
      <link>https://dev.to/imtiyazcode/meaningful-names-clean-code-why-it-is-important-for-software-developers-286j</link>
      <guid>https://dev.to/imtiyazcode/meaningful-names-clean-code-why-it-is-important-for-software-developers-286j</guid>
      <description>&lt;p&gt;Robert Martin (&lt;a href="https://twitter.com/unclebobmartin" rel="noopener noreferrer"&gt;Uncle Bob&lt;/a&gt;) once said,&lt;/p&gt;

&lt;blockquote&gt;
&lt;p&gt;"Any fool can write code that computers understand. Good programmers write code that humans can understand"&lt;/p&gt;
&lt;/blockquote&gt;

&lt;p&gt;&lt;a href="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fpohpqh19ofu38iiqvxl3.jpeg" class="article-body-image-wrapper"&gt;&lt;img src="https://media.dev.to/dynamic/image/width=800%2Cheight=%2Cfit=scale-down%2Cgravity=auto%2Cformat=auto/https%3A%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fi%2Fpohpqh19ofu38iiqvxl3.jpeg" alt="Alt Text"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Many of us take pride in ourselves when we provide a solution and write code for a complex problem, but what makes you a complete developer when you write code which your fellow developers can easily understand and giving &lt;code&gt;meaningful names&lt;/code&gt; to the variables, functions and classes plays a vital role in that. &lt;/p&gt;

&lt;p&gt;Let me tell you why?&lt;/p&gt;

&lt;p&gt;I did understand this principle of clean code after a few years into professional coding when I struggled to understand my own code written just a few months ago. You must have us gone through a situation where you would like to prefer writing a fresh code for a bug fix or changes in the requirements instead of incorporate changes to existing code of other developers. These codes are technical debts to the team and organization and if you are also one of them who does not put deliberate effort to keep your code clean and followed the principles of clean codes, someone else down the line reading your code will feel the technical debt you have written that will increase the burden for maintainability, scalability and code debugging.&lt;/p&gt;

&lt;p&gt;Providing meaningful names is one of the many principles of clean code and I feel providing meaningful names is the most important one. &lt;/p&gt;

&lt;p&gt;Here are the rules for providing meaningful names&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Naming Classes:&lt;/strong&gt;&lt;br&gt;
      One class should carry only one responsibility. Hence this intent should reflect through the class name. A good rule of thumb while naming classes and methods is to think of nouns while naming class and verbs while naming methods.&lt;/p&gt;

&lt;p&gt;Not Clean&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;Builder 
Processor 
WebsiteBO 
Utility
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Above class names do not tell what specific single responsibility it holds and hence becomes magnet class for other developers as they shove other responsibilities to these classes.&lt;/p&gt;

&lt;p&gt;Clean&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;User 
QueryBuilder 
ProductRepository
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;&lt;strong&gt;&lt;em&gt;Naming Method:&lt;/em&gt;&lt;/strong&gt;&lt;br&gt;
By method name reader should understand what is there inside the method and should have only one job to do.&lt;br&gt;
Not Clean&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;send()
get()
export()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Clean&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;sendMail()
getValidUser()
exportZipFile()
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Not Clean&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;//Code 1
Public Boolean sendSuccessMail( User user){
  If(user.status == STATUS.active &amp;amp;&amp;amp; 
          isValidUserMail(user.mail)){                   
      //code for generating emailId,subject and email body
     MailUtils.sendMail(mailId,subject,body);
   }
}
```


code 1 breaks 2 rules of clean code. It not only performs two responsibilities and but also its name does not indicate its jobs clearly. Which may cause lots of problem in future.

Let's look at the better version but still not clean


```
Code 2
Public Boolean checkValidUserAndSendSuccessMail( User user){
If(user.status == STATUS.active &amp;amp;&amp;amp; isValidUserMail(user.mail)){
   //code for generating emailId,subject and email body
   ....
   MailUtils.sendMail(mailId,subject,body);
  }
}
```


Code 2 with method name `checkUserAndSendSuccessMail` is somewhat better in terms of clear intent, but it still carries more than one responsibility which is not good for code reusability and codebase may end up with many duplicate codes and in many places, you may need different logic for user validation or only mail send. And if there is any change in user validation code, it will not only impact user validation test cases but also send mail test cases.

Clean Code


```
Public Boolean checkValidUser ( User user){
  return user.status == STATUS.active &amp;amp;&amp;amp; 
                   isValidUserMail(user.mail)
}
Public Boolean sendSuccessMail( User user){
  //code for generating emailId,subject and email body
  ...
  MailUtils.sendMail(mailId,subject,body);
}

Boolean isValidUser = checkValidUser(user);
   If(isValidUser){
      sendSuccessMail(user)
    }
```


`Warning signs for methods carrying multiple jobs: AND, OR, IF etc
Avoid Abrr like isUsrRegis, regisDone`

***Naming Boolean variable:***
Boolean variable should always ask questions and should be symmetrical when used in pair.

Not Clean


```
send
complete
close
login
open/completed
```


if you declare these kinds of variable, the reader will face problem to understand the use of these variables later in code something like `if(login == true)`

Clean


```
loggedIn
isMailSent
isValidationDone
closed
open/close (symmetric)
```



***Conditions:***
Write implicit code around boolean variables

Not Clean


```
If(isValidationDone == true)
```


Clean


```
if( isValidationDone)
```


Not Clean


```
Boolean isEligibleforDiscount;
If(purchaseAmount &amp;gt;3000){
   isEligibleforDiscount = true;
}else{
   isEligibleforDiscount = false
}
```


Clean


```
Boolean isEligibleforDiscount = purchaseAmount &amp;gt;3000;
```


Use positive conditions

Not Clean


```
If(!isUserNotValid)
```


Clean


```
If(isValidUser)
```


User ternary operator
Avoid using “stringly-typed”/”hard-coded” value

Not Clean


```
If(process.status == “completed”)
```


Instead of stringly typed value, we can use Enums and keep all the status of the process in a single place and we can get rid of typos with strongly typed and help maintain code base with a single place to change.

Avoid using magic numbers
Not Clean


```
If( employee.yearsWorked &amp;gt; 10){
}
```


replace constant or enums with magic number

Clean


```
Int promotionEligibleYears = 10;
If(employee.yearsWorked &amp;gt; promotionEligibleYears)
```


&amp;gt;“Programming is the art of telling another human what one wants a computer to do” — Donal Knuth


For more knowledge on the clean code principles, you can go through below listed resources

***References &amp;amp; Resources:***
[Clean Code: Writing Code for Humans](https://www.pluralsight.com/courses/writing-clean-code-humans)
[Clean Code: A Handbook of Agile Software Craftsmanship (Robert C. Martin)](https://www.amazon.in/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882)

Follow me [Twitter](https://twitter.com/imimtiyaz9)    [Linkedin](https://www.linkedin.com/in/md-imtiyaz-ahmed-092a6597/)

&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>javascript</category>
      <category>cleancode</category>
    </item>
  </channel>
</rss>
