<?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: Jasim Alam</title>
    <description>The latest articles on DEV Community by Jasim Alam (@jasim_alam_88ad5ffe68ef66).</description>
    <link>https://dev.to/jasim_alam_88ad5ffe68ef66</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%2F2437845%2Ff7678680-3081-4b1f-b07d-5324139b6b9d.png</url>
      <title>DEV Community: Jasim Alam</title>
      <link>https://dev.to/jasim_alam_88ad5ffe68ef66</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/jasim_alam_88ad5ffe68ef66"/>
    <language>en</language>
    <item>
      <title>𝗛𝗼𝘄 𝗗𝗼𝗲𝘀 𝗔𝗜 𝗕𝗲𝗰𝗮𝗺𝗲 𝗦𝗼 𝗚𝗼𝗼𝗱?</title>
      <dc:creator>Jasim Alam</dc:creator>
      <pubDate>Mon, 21 Jul 2025 06:09:58 +0000</pubDate>
      <link>https://dev.to/jasim_alam_88ad5ffe68ef66/-17ip</link>
      <guid>https://dev.to/jasim_alam_88ad5ffe68ef66/-17ip</guid>
      <description>&lt;p&gt;How LLM like ChatGPT reads between the lines like a mind reader?&lt;/p&gt;

&lt;p&gt;Picture this: “𝘛𝘩𝘦 𝘤𝘢𝘵 𝘴𝘢𝘵 𝘰𝘯 𝘵𝘩𝘦 𝘮𝘢𝘵 𝘣𝘦𝘤𝘢𝘶𝘴𝘦 𝘪𝘵 𝘸𝘢𝘴 𝘵𝘪𝘳𝘦𝘥.”&lt;/p&gt;

&lt;p&gt;You instantly know “&lt;strong&gt;it&lt;/strong&gt;” = the cat.&lt;/p&gt;

&lt;p&gt;But for a machine? That’s pure magic.&lt;/p&gt;

&lt;p&gt;Meet &lt;a href="https://en.wikipedia.org/wiki/Attention_(machine_learning)" rel="noopener noreferrer"&gt;&lt;strong&gt;attention&lt;/strong&gt;&lt;/a&gt; — the breakthrough that gave AI its superpower of understanding context.&lt;/p&gt;




&lt;p&gt;𝗛𝗲𝗿𝗲’𝘀 𝗵𝗼𝘄 𝘁𝗵𝗲 𝗺𝗮𝗴𝗶𝗰 𝘄𝗼𝗿𝗸𝘀:&lt;/p&gt;

&lt;p&gt;Think of AI like a detective examining evidence. For every word, it asks:&lt;/p&gt;

&lt;p&gt;“𝘞𝘩𝘪𝘤𝘩 𝘤𝘭𝘶𝘦𝘴 𝘪𝘯 𝘵𝘩𝘪𝘴 𝘴𝘦𝘯𝘵𝘦𝘯𝘤𝘦 𝘩𝘦𝘭𝘱 𝘮𝘦 𝘤𝘳𝘢𝘤𝘬 𝘵𝘩𝘦 𝘤𝘢𝘴𝘦?”&lt;/p&gt;

&lt;p&gt;The model becomes a master multitasker, simultaneously:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Querying: “What am I trying to solve right now?”&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;️ Keying: “What secrets does each word hold?”&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Valuing: “Which insights should I actually use?”&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Result? The AI gives “&lt;strong&gt;cat&lt;/strong&gt;” a spotlight while “&lt;strong&gt;mat&lt;/strong&gt;” fades to background lighting when decoding “it.”&lt;/p&gt;




&lt;p&gt;𝗪𝗵𝘆 𝘁𝗵𝗶𝘀 𝗰𝗵𝗮𝗻𝗴𝗲𝘀 𝗲𝘃𝗲𝗿𝘆𝘁𝗵𝗶𝗻𝗴:&lt;/p&gt;

&lt;p&gt;This isn’t just clever programming — it’s a cognitive revolution. AI can now:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Jump across entire documents to connect ideas&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Understand sarcasm and tone&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Translate languages while preserving meaning&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Write code that actually makes sense&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Hold conversations that feel genuinely human&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;𝗧𝗵𝗲 𝗺𝗶𝗻𝗱-𝗯𝗹𝗼𝘄𝗶𝗻𝗴 𝗽𝗮𝗿𝘁?&lt;/p&gt;

&lt;p&gt;This breakthrough came from a single 2017 paper: “&lt;a href="https://arxiv.org/pdf/1706.03762" rel="noopener noreferrer"&gt;Attention Is All You Need&lt;/a&gt;”&lt;/p&gt;

&lt;p&gt;Total transformation of how machines understand us.&lt;/p&gt;

&lt;p&gt;This attention breakthrough now powers everything from ChatGPT, Google Translate to the entire modern AI ecosystem.&lt;/p&gt;

&lt;p&gt;Note: Originally Published On &lt;a href="https://medium.com/@jasimalam211/-2a0ab7b2422c" rel="noopener noreferrer"&gt;Medium&lt;/a&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>machinelearning</category>
    </item>
    <item>
      <title>Auto Rotation of PM2 log</title>
      <dc:creator>Jasim Alam</dc:creator>
      <pubDate>Mon, 21 Jul 2025 06:05:55 +0000</pubDate>
      <link>https://dev.to/jasim_alam_88ad5ffe68ef66/auto-rotation-of-pm2-log-4ied</link>
      <guid>https://dev.to/jasim_alam_88ad5ffe68ef66/auto-rotation-of-pm2-log-4ied</guid>
      <description>&lt;p&gt;PM2 by default stdout to log directory, default ($HOME/.pm2/logs). Over time this can be huge unless rotated.&lt;/p&gt;

&lt;p&gt;Below process uses npm module to handle the rotation.&lt;/p&gt;

&lt;ol&gt;
&lt;li&gt;Install the pm2-logrotate module
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ pm2 install pm2-logrotate
[PM2][Module] Installing NPM pm2-logrotate module
[PM2][Module] Calling [NPM] to install pm2-logrotate …
[PM2][Module] Module downloaded
[PM2][WARN] Applications pm2-logrotate not running, starting…
[PM2] App [pm2-logrotate] launched (1 instances)
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;Set max size of the log
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ pm2 set pm2-logrotate:max_size 50M
[PM2] Module pm2-logrotate restarted
[PM2] Setting changed
Module: pm2-logrotate
$ pm2 set pm2-logrotate:max_size 50M
$ pm2 set pm2-logrotate:retain 20
$ pm2 set pm2-logrotate:compress true
$ pm2 set pm2-logrotate:dateFormat YYYY-MM-DD_HH-mm-ss
$ pm2 set pm2-logrotate:workerInterval 30
$ pm2 set pm2-logrotate:rotateInterval 0 0 * * *
$ pm2 set pm2-logrotate:rotateModule true
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;set log rotation interval in cron format.
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ pm2 set pm2-logrotate:rotateInterval '0 0 * * *'
[PM2] Module pm2-logrotate restarted
[PM2] Setting changed
Module: pm2-logrotate
$ pm2 set pm2-logrotate:max_size 50M
$ pm2 set pm2-logrotate:retain 20
$ pm2 set pm2-logrotate:compress true
$ pm2 set pm2-logrotate:dateFormat YYYY-MM-DD_HH-mm-ss
$ pm2 set pm2-logrotate:workerInterval 30
$ pm2 set pm2-logrotate:rotateInterval 0 0 * * *
$ pm2 set pm2-logrotate:rotateModule true
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;ol&gt;
&lt;li&gt;change the retention time
&lt;/li&gt;
&lt;/ol&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;$ pm2 set pm2-logrotate:retain 10
[PM2] Module pm2-logrotate restarted
[PM2] Setting changed
Module: pm2-logrotate
$ pm2 set pm2-logrotate:max_size 50M
$ pm2 set pm2-logrotate:retain 10
$ pm2 set pm2-logrotate:compress true
$ pm2 set pm2-logrotate:dateFormat YYYY-MM-DD_HH-mm-ss
$ pm2 set pm2-logrotate:workerInterval 30
$ pm2 set pm2-logrotate:rotateInterval 0 0 * * *
$ pm2 set pm2-logrotate:rotateModule true
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;p&gt;Note: Originally published on &lt;a href="https://medium.com/@jasimalam211/rotate-pm2-logs-39958a3e950c" rel="noopener noreferrer"&gt;Medium&lt;/a&gt;&lt;/p&gt;

</description>
      <category>php</category>
      <category>devops</category>
    </item>
    <item>
      <title>Types of Machine Learning - Explained Simply</title>
      <dc:creator>Jasim Alam</dc:creator>
      <pubDate>Mon, 21 Jul 2025 05:54:34 +0000</pubDate>
      <link>https://dev.to/jasim_alam_88ad5ffe68ef66/types-of-machine-learning-explained-simply-3lm4</link>
      <guid>https://dev.to/jasim_alam_88ad5ffe68ef66/types-of-machine-learning-explained-simply-3lm4</guid>
      <description>&lt;p&gt;&lt;u&gt;Supervised Learning : Learning with a teacher&lt;br&gt;
&lt;/u&gt;&lt;br&gt;
Imagine a student learning from past exams.&lt;br&gt;
The machine gets both the questions and the correct answers. &lt;br&gt;
Over time, it learns the pattern.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Real-Life Examples:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Spam Email Detection&lt;/li&gt;
&lt;li&gt;House Price Prediction&lt;/li&gt;
&lt;li&gt;Disease Diagnosis&lt;/li&gt;
&lt;li&gt;Stock Market Forecasting&lt;/li&gt;
&lt;li&gt;Weather Predictions&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;You show a computer 1000 labeled images:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;dog&lt;/li&gt;
&lt;li&gt;cat&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;Later, it can say, “That’s a cat!” when shown a new image.&lt;/p&gt;




&lt;p&gt;&lt;u&gt;Unsupervised Learning : Learning without a teacher&lt;br&gt;
&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;Like a child sorting toys by shape or color without knowing their names.&lt;/p&gt;

&lt;p&gt;The machine explores data without labels and discovers hidden patterns.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Real-Life Examples:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Customer Segmentation for targeted ads&lt;/li&gt;
&lt;li&gt;Market Basket Analysis (product recommendations)&lt;/li&gt;
&lt;li&gt;Fraud and Anomaly Detection&lt;/li&gt;
&lt;/ul&gt;

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

&lt;p&gt;Give it 1000 fruit pictures — no names. It might group them like:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Round and red fruits&lt;/li&gt;
&lt;li&gt;Long and yellow fruits&lt;/li&gt;
&lt;li&gt;Small and purple fruits&lt;/li&gt;
&lt;/ul&gt;

&lt;p&gt;It doesn’t know the fruit names but it finds structure.&lt;/p&gt;




&lt;p&gt;&lt;u&gt;Reinforcement Learning : Learning by doing&lt;br&gt;
&lt;/u&gt;&lt;/p&gt;

&lt;p&gt;Like training a pet with rewards and corrections.&lt;/p&gt;

&lt;p&gt;The machine (called an agent) tries different actions, gets rewards or penalties, and learns what works best over time.&lt;/p&gt;

&lt;p&gt;&lt;em&gt;Real-Life Examples:&lt;/em&gt;&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Self-driving Cars&lt;/li&gt;
&lt;li&gt;Game AI (Chess, Go, video games)&lt;/li&gt;
&lt;li&gt;Robotics and Automation&lt;/li&gt;
&lt;li&gt;Stock Trading Bots&lt;/li&gt;
&lt;/ul&gt;

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

&lt;ul&gt;
&lt;li&gt;A robot tries to walk.&lt;/li&gt;
&lt;li&gt;Falls result in no reward.&lt;/li&gt;
&lt;li&gt;Moves forward result in a reward.&lt;/li&gt;
&lt;li&gt;It learns to stay balanced and move smart.&lt;/li&gt;
&lt;/ul&gt;

</description>
      <category>machinelearning</category>
    </item>
  </channel>
</rss>
