<?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: Saurab Gyawali</title>
    <description>The latest articles on DEV Community by Saurab Gyawali (@saurab_gyawalii).</description>
    <link>https://dev.to/saurab_gyawalii</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%2F4067086%2Ffd7cac5e-c4f4-462c-92eb-956edb129421.jpg</url>
      <title>DEV Community: Saurab Gyawali</title>
      <link>https://dev.to/saurab_gyawalii</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/saurab_gyawalii"/>
    <language>en</language>
    <item>
      <title>What's This Thing In A Laptop Charger ?</title>
      <dc:creator>Saurab Gyawali</dc:creator>
      <pubDate>Mon, 17 Aug 2026 02:53:10 +0000</pubDate>
      <link>https://dev.to/saurab_gyawalii/whats-this-thing-in-a-laptop-charger--3g08</link>
      <guid>https://dev.to/saurab_gyawalii/whats-this-thing-in-a-laptop-charger--3g08</guid>
      <description>&lt;p&gt;Have you noticed this in laptop chargers and wondered what that is??&lt;/p&gt;

&lt;p&gt;Give me 4 minutes and I will explain all the ins and outs of this component. But answer me one thing first&amp;nbsp;: what will happen if you travel at fast speed on speed breakers? You'll probably think, what kind of rubbish is this, but ask this to yourself first. Imagine this&amp;nbsp;: you are traveling at normal speed on speed breakers, nothing probably happens&amp;nbsp;, but at high speed&amp;nbsp;, you'll be blocked but the path of traffic is the same&amp;nbsp;, isn't it&amp;nbsp;? Yes it is the same&amp;nbsp;. Congratulations! You have learned the purpose of this in just one example, but what's it called&amp;nbsp;????&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0cqn439llcbvestp65v2.jpg" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2F0cqn439llcbvestp65v2.jpg" alt=" " width="738" height="415"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;This is called ferrite bead&amp;nbsp;. But what does it actually do? As speed breaker stops you going at higher speed&amp;nbsp;, similarly ferrite beads help suppress these unwanted high-frequency signals while allowing the normal power to pass through&amp;nbsp;. Ok that means&amp;nbsp;, It's blocking high frequency noise&amp;nbsp;, this is making sense as LPF ( Low Pass Filter ) also does the same work. Does that imply its LPF in a nutshell&amp;nbsp;? Yes, a ferrite bead (also known as a ferrite choke or ferrite ring) is a simple passive electronic component designed to act as a low-pass filter ( LPF )&amp;nbsp;. These are inexpensive, passive, and require no power. Removing one usually does not stop the charger from working, but it can increase radiated EMI and may cause the product to fail regulatory electromagnetic compatibility (EMC) tests. Similar ferrite cores appear on USB cables, HDMI cables, monitor power cords, and many other electronics for the same reason.&lt;/p&gt;

&lt;p&gt;It is designed to impede unwanted high-frequency electrical currents while having very little effect on the normal DC power being delivered to the laptop. Laptop chargers use high-frequency switching electronics, which can generate electromagnetic noise (EMI). &lt;/p&gt;

&lt;p&gt;That noise can travel through the cable and even make the cable act like an antenna, allowing the noise to radiate into the surroundings. A modern laptop charger is essentially a switch-mode power supply (SMPS).&lt;br&gt;
For example&amp;nbsp;: we get 220 V AC, 50 Hz in Nepal but the charger has to convert that into something like 19 to 20 V DC for the laptop. Buy following this series of conversions&amp;nbsp;:&lt;br&gt;
230 V AC ~&amp;gt; rectifier ~&amp;gt; high voltage DC ~&amp;gt; high frequency switching ~&amp;gt; transformer ~&amp;gt; rectification/filtering ~&amp;gt; ~20 V DC&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvfgrfl3wt9iji8ru6cyq.jpg" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fvfgrfl3wt9iji8ru6cyq.jpg" alt=" " width="588" height="321"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;But in which place does the ferrite bead come as the saviour&amp;nbsp;??&lt;/p&gt;

&lt;p&gt;For a laptop charger, you may encounter it in several locations. But in most of the cases is on the DC output cable&amp;nbsp;, isnt it just seeing your charger once again&amp;nbsp;!!&lt;br&gt;
As a ferrite bead is essentially one electronics component so the most realistic impedance can be represented as a function of real and imaginary resistances.&lt;br&gt;
Z = R + jX ( ohm )&lt;br&gt;
Where&amp;nbsp;: R = resistive component and X = reactive component&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fe4hizldonrzfuxhsqu9x.jpg" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fe4hizldonrzfuxhsqu9x.jpg" alt=" " width="600" height="400"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;At high frequencies, it is possible that a ferrite bead has a large effective resistive component. This is useful for electromagnetic interference (EMI) suppression, as the majority of the undesirable RF noise power will be dissipated in the ferrite, as opposed to reflected back into the circuit. So the mechanism by which suppression occurs can be seen as: Electrical energy at higher frequency sacrificed at expense of lossy Magnetic/material factors to produce Heat where normally dissipated by negligible amount Heat Dissipation. For a desired high-frequency noise signal, the ferrite bead seems to provide a large impedance:&lt;br&gt;
If noise current has large impedance, the ferrite will seem to have strong attenuation and the power will eventually be converted into heat. This frequency dependent impedance is the principle behind the ease and elegance of ferrite beads as a method of high-frequency noise reduction.&lt;/p&gt;

&lt;p&gt;So, the next time you see that bead on a laptop charger cable&amp;nbsp;, you will know that it is doing much more than simply sitting there. The ferrite bead is a simple but highly effective tool for controlling electromagnetic interference (EMI)&amp;nbsp;. It allows the normal DC power required by the laptop to pass with minimal effect, while presenting a much higher impedance to unwanted high frequency noise generated by the switching circuits inside the charger&amp;nbsp;.&lt;br&gt;
Its operation can be understood through the same speedbreaker analogy&amp;nbsp;: just as a speed breaker has little effect on a vehicle moving at an appropriate speed but becomes an obstacle at high speed, a ferrite bead has little effect on the intended low-frequency or DC power but strongly opposes undesirable high-frequency currents. Because its impedance becomes increasingly lossy at certain frequencies, part of the unwanted RF energy is dissipated as a small amount of heat within the ferrite material rather than being allowed to propagate along the cable and radiate into the environment.&lt;/p&gt;

&lt;p&gt;Although removing the ferrite may not immediately stop a charger from working, it can significantly increase EMI and compromise electromagnetic compatibility (EMC). Therefore, this tiny component plays an important role in making modern electronic devices quieter, more reliable, and compliant with regulatory requirements. In short, the ferrite bead may look insignificant, but it acts as a silent guardian against high-frequency electrical noise.&lt;/p&gt;

&lt;p&gt;If You Wanna Learn About Data Science You Could Refer To My Note : payhip.com/b/bl3NY &lt;br&gt;
Contact Information :&lt;br&gt;
Name: Saurab Gyawali&lt;br&gt;
Email: &lt;a href="mailto:saurabgyawali77@gmail.com"&gt;saurabgyawali77@gmail.com&lt;/a&gt;&lt;br&gt;
GitHub: &lt;a href="https://github.com/soorabcode" rel="noopener noreferrer"&gt;https://github.com/soorabcode&lt;/a&gt;&lt;br&gt;
LinkedIn: &lt;a href="https://www.linkedin.com/in/saurabgyawalii" rel="noopener noreferrer"&gt;https://www.linkedin.com/in/saurabgyawalii&lt;/a&gt;&lt;br&gt;
Medium: &lt;a href="https://medium.com/@saurabgyawali" rel="noopener noreferrer"&gt;https://medium.com/@saurabgyawali&lt;/a&gt;&lt;br&gt;
I’m available for freelance and long-term writing projects. If you’re looking for high-quality technology content or compelling product advertisement scripts, feel free to get in touch.&lt;/p&gt;

</description>
      <category>electronics</category>
      <category>ece</category>
      <category>information</category>
    </item>
    <item>
      <title>How Does a Machine Actually Learn From Data ?</title>
      <dc:creator>Saurab Gyawali</dc:creator>
      <pubDate>Mon, 10 Aug 2026 02:05:22 +0000</pubDate>
      <link>https://dev.to/saurab_gyawalii/how-does-a-machine-actually-learn-from-data--40kc</link>
      <guid>https://dev.to/saurab_gyawalii/how-does-a-machine-actually-learn-from-data--40kc</guid>
      <description>&lt;p&gt;Machine learning algorithm is the process consists in iteratively assessing a parameterized model over data with an objective function , calculating the gradient of this function in essense with the model parameters then updating the latter in order to minimize this objective function.&lt;/p&gt;

&lt;p&gt;Data → Prediction → Loss → Gradient → Parameter update → Repeat​&lt;/p&gt;

&lt;p&gt;Learning means improving performance on a task by using data, not by being explicitly programmed for every case .&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdtg2ojd4hy7nhb96rv9r.jpg" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fdtg2ojd4hy7nhb96rv9r.jpg" alt=" " width="800" height="450"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;&lt;p&gt;Data&lt;br&gt;
Data is a collection of observed examples used to estimate the parameters of a model. In supervised learning, the training data is typically written as D = { xi , yi } for range ( 0 , n ) where:&lt;br&gt;
xi​ = input / eatures&lt;br&gt;
yi​ = target output&lt;br&gt;
i = index of the observation&lt;br&gt;
A dataset therefore provides the information against which the model's predictions are evaluated.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Prediction&lt;br&gt;
Prediction is the output produced by a model when its current parameters are applied to an input.&lt;br&gt;
A model can be represented as:&lt;br&gt;
ŷ =f( x ; θ )&lt;br&gt;
where:&lt;br&gt;
x = input&lt;br&gt;
θ = model parameters&lt;br&gt;
f = model function&lt;br&gt;
ŷ​ = predicted output&lt;br&gt;
The prediction depends on the current values of the parameters. The prediction tells us what the model currently produces.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Loss&lt;br&gt;
Loss is a numerical measure of the discrepancy between the model's prediction and the target value.&lt;br&gt;
It is represented as: L ( ŷ , y )&lt;br&gt;
A loss function defines what the model is trying to minimize. The loss tells us how undesirable that prediction is according to the chosen objective.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Gradient&lt;br&gt;
The gradient The gradient is the vector of partial derivatives of the objective function with respect to the parameters of the model. The gradient indicates the way how the objective is affected as each parameter is modified, and thus provides the direction in which the objective function increase most rapidly. Most optimizers update the parameters by moving in the opposite direction to the gradient in order to minimize the objective.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Parameter Update&lt;br&gt;
A parameter update changes the model's parameters using information from the gradient so that the objective function is expected to decrease.&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Repeat&lt;br&gt;
After updating the parameters, the model uses the new parameters to produce new predictions.&lt;br&gt;
The process is therefore repeated:&lt;br&gt;
Data → Prediction → Loss → Gradient → Parameter Update → Repeat​&lt;br&gt;
Each iteration is an optimization step.&lt;br&gt;
As training progresses, the parameters are adjusted toward values that produce a lower objective value, assuming the optimization procedure is working effectively.&lt;/p&gt;&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Some other learning paradigms :&lt;br&gt;
Unsupervised: The loss is defined without labels (reconstruction error, contrastive loss, etc.). The model still adjusts θ or theta θ to reduce that loss .&lt;/p&gt;

&lt;p&gt;Reinforcement learning: The “loss” is replaced by a reward signal; the agent adjusts a policy (again usually parameterized by θ \theta θ) to increase expected cumulative reward, typically via policy gradients or value-function approximation .&lt;/p&gt;

&lt;p&gt;Self-supervised / representation learning: The model invents its own predictive tasks from the raw data and optimizes those surrogate losses .&lt;/p&gt;

&lt;p&gt;So what machine learning , deep learning and related fields actually ‘learn from data’ fundamentally is just : calculate current error on parameters , repeatedly , force parameters in the direction of reducing the error . Machine learning is the process of finding parameter values that make a model perform well on a specified objective, using data and optimizations .&lt;/p&gt;

</description>
      <category>machinelearning</category>
      <category>ai</category>
    </item>
    <item>
      <title>Algorithm That Power Google Maps (And Why They’re Brilliant)</title>
      <dc:creator>Saurab Gyawali</dc:creator>
      <pubDate>Fri, 07 Aug 2026 07:48:57 +0000</pubDate>
      <link>https://dev.to/saurab_gyawalii/algorithm-that-power-google-maps-and-why-theyre-brilliant-23an</link>
      <guid>https://dev.to/saurab_gyawalii/algorithm-that-power-google-maps-and-why-theyre-brilliant-23an</guid>
      <description>&lt;p&gt;If you’ve studied Computer Science, you’ve probably encountered a common question:&lt;/p&gt;

&lt;p&gt;“What algorithm does Google Maps use?”&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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjy2jdki78knbg3r32a3k.webp" 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.us-east-2.amazonaws.com%2Fuploads%2Farticles%2Fjy2jdki78knbg3r32a3k.webp" alt=" " width="800" height="424"&gt;&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;That's technically correct but only in the same way that saying "A mango tree have mangos only" is correct.&lt;/p&gt;

&lt;p&gt;Yes, Google Maps relies on shortest-path algorithms inspired by Dijkstra's work. But if Google actually ran plain Dijkstra's algorithm every time someone requested directions, the app would feel painfully slow.&lt;/p&gt;

&lt;p&gt;Dijkstra’s Algorithm&lt;br&gt;&lt;br&gt;
Dijkstra's Algorithm is a greedy algorithm based upon graph theory which is used to find the shortest path from a single source vertex to all other vertices in a weighted graph with non negative edge weights. It was developed by Dutch computer scientist Edsger W. Dijkstra in 1956 and remains one of the most efficient and widely used shortest-path algorithms.&lt;/p&gt;

&lt;p&gt;Core idea: Always expand the closest unvisited node first (greedy choice). Maintain a priority queue of nodes ordered by the best known distance from the source. When you pop a node, you have found its true shortest path (for non-negative weights).&lt;/p&gt;

&lt;p&gt;Analysis Of Dijkstra’s Algorithm  &lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Space Complexity = O(V + E)&lt;/li&gt;
&lt;li&gt;Time Complexity =O(V^2)
With a binary heap priority queue its time complexity is roughly O((V+E)logV)&lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;A* is Dijkstra with a brain. Because A* focuses the search toward the destination, it often explores only a narrow “corridor” of the graph instead of a giant circle around the start. In practice this can be dramatically faster.&lt;/p&gt;

&lt;p&gt;Does Google Really Use Dijkstra or A*?&lt;/p&gt;

&lt;p&gt;Yes… and no.&lt;/p&gt;

&lt;p&gt;Google (and virtually every major mapping provider) uses a sophisticated combination of techniques. Pure Dijkstra or pure A* on the raw graph is not enough for global-scale, sub-second queries with live traffic.&lt;/p&gt;

&lt;p&gt;The production systems typically include:&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Bidirectional search &lt;/li&gt;
&lt;li&gt;Contraction Hierarchies &lt;/li&gt;
&lt;li&gt;Transit Node Routing &lt;/li&gt;
&lt;li&gt;ALT algorithm (A*, Landmarks, Triangle inequality) &lt;/li&gt;
&lt;li&gt;Customizable Route Planning (CRP) &lt;/li&gt;
&lt;li&gt;Machine learning models &lt;/li&gt;
&lt;/ol&gt;

&lt;p&gt;Conclusion &lt;br&gt;
Google does not run “Dijkstra” or “A*” in the textbook sense for every query. It runs highly engineered descendants of those algorithms on a heavily preprocessed and hierarchical version of the graph, with live traffic layered on top.&lt;/p&gt;

</description>
      <category>software</category>
      <category>algorithms</category>
      <category>programming</category>
      <category>computerscience</category>
    </item>
  </channel>
</rss>
