<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Saman Mahmood on Medium]]></title>
        <description><![CDATA[Stories by Saman Mahmood on Medium]]></description>
        <link>https://medium.com/@Saman-Mahmood?source=rss-8a54d8542753------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*4xqToM0IpESy8fN6TLZcfQ.png</url>
            <title>Stories by Saman Mahmood on Medium</title>
            <link>https://medium.com/@Saman-Mahmood?source=rss-8a54d8542753------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 10:25:04 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@Saman-Mahmood/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Flow and Error Control in Data Communication: Noiseless and Noisy Channels]]></title>
            <link>https://medium.com/@Saman-Mahmood/flow-and-error-control-in-data-communication-noiseless-and-noisy-channels-a2f044746378?source=rss-8a54d8542753------2</link>
            <guid isPermaLink="false">https://medium.com/p/a2f044746378</guid>
            <category><![CDATA[computer-networking]]></category>
            <dc:creator><![CDATA[Saman Mahmood]]></dc:creator>
            <pubDate>Wed, 25 Mar 2026 14:51:53 GMT</pubDate>
            <atom:updated>2026-03-25T14:53:06.573Z</atom:updated>
            <content:encoded><![CDATA[<h4>Flow Control Mechanisms; Purpose and Importance of Flow Control; Comparison: Noiseless vs Noisy Channels</h4><h3><strong>Flow Control</strong></h3><p>It is an important function of the Data Link Layer. It refers to a set of procedures that tells the sender how much data it can transmit before waiting for acknowledgment from the receiver.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/867/1*bb1BQ1-Iy0f2U-29O5yTqw.jpeg" /></figure><h3><strong>Purpose of Flow Control</strong></h3><p>Any receiving device has a limited speed at which it can process incoming data and also a limited amount of memory to store incoming data. If the source is sending the data at a faster rate than the capacity of the receiver, there is a possibility of the receiver being swamped. The receiver will keep losing some of the frames simply because they are arriving too quickly and the buffer is also getting filled up.</p><p>This will generate waste frames on the network. Therefore, the receiving device must have some mechanism to inform the sender to send fewer frames or stop transmission temporarily. In this way, flow control will control the rate of frame transmission to a value that can be handled by the receiver.</p><p>· For Flow control there are two approaches : Feedback-based Flow Control and Rate-based Flow Control. For Flow control there are two approaches : Feedback-based Flow Control and Rate-based Flow Control.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/612/1*8skInouCsAQ3U7GCJLoqaQ.png" /></figure><p>· It prevents the loss of data and avoid over running of receive buffers.</p><p>· Example of Flow Control techniques are : Stop &amp; Wait Protocol and Sliding Window Protocol. Example of Flow Control techniques are : Stop &amp; Wait Protocol and Sliding Window Protocol.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/279/1*JzVU9UNayxg99i1I65c5hQ.png" /></figure><h3><strong>Error Control</strong></h3><p>The error control function of the data link layer detects the errors in transmitted frames and re-transmits all the erroneous frames.</p><h3><strong>Purpose of Error Control</strong></h3><p>The function of error control function of the data link layer helps in dealing with data frames that are damaged in transit, data frames lost in transit and acknowledged frames that are lost in transmission. The method used for error control is called Automatic Repeat Request (ARQ) which is used for the noisy channel.</p><p>· To detect error in data, the approaches are : Checksum To detect error in data, the approaches are : Checksum, Cyclic Redundancy Check and Parity Checking. To correct error in data, the approaches are : Hamming code, Binary Convolution codes, Reed-Solomon code, Low-Density Parity Check codes., Cyclic Redundancy Check and Parity Checking. <br> To correct error in data, the approaches are : Hamming code, Binary Convolution codes, Reed-Solomon code, Low-Density Parity Check codes.</p><p>· It is used to detect and correct the error occurred in the code. It is used to detect and correct the error occurred in the code.</p><p>· Example of Error Control techniques are : Stop &amp; Wait ARQ and Sliding Window ARQ (Go-back-N ARQ, Selected Repeat ARQ).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/571/1*mtfSJ53E92DCchAw8WqHZg.jpeg" /></figure><p><strong>Conclusion</strong></p><p>Flow control and error control are two vital sub layers of the Data Link Layer that assists in data communication to be smooth. Flow is mainly concerned with the control of data flow rate to avoid overloading of the receiver while error control is mainly concerned with the identification and elimination of errors in the stream of data.</p><h3>Noiseless and noisy channels</h3><p><strong>Data link layer protocols</strong> are divided into two categories based on whether the transmission channel is noiseless or noisy.</p><p>The data link layer protocol is diagrammatically represented below −</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/620/1*8luM2o5Q0rR_-VKi16j0jg.jpeg" /></figure><h3>Noiseless Channels</h3><p>There are two noiseless channels which are as follows −</p><ul><li>Simplex channel</li><li>Stop &amp; wait channel</li></ul><p>Let us consider an ideal channel where no frames are lost, duplicated, or corrupted. We introduce two protocols for this type of channel. These two protocols are as follows −</p><ul><li>Protocol that does not use flow control.</li><li>Protocol that uses the flow control.</li></ul><h3>Simplest Protocol</h3><p><strong>Step 1</strong> − Simplest protocol that does not have flow or error control.</p><p><strong>Step 2</strong> − It is a unidirectional protocol where data frames are traveling in one direction that is from the sender to receiver.</p><p><strong>Step 3</strong> − Let us assume that the receiver can handle any frame it receives with a processing time that is small enough to be negligible, the data link layer of the receiver immediately removes the header from the frame and hands the data packet to its network layer, which can also accept the packet immediately.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*fFGb4P2cWdlSdhnJoYxl9w.jpeg" /></figure><h3>Stop-and-Wait Protocol</h3><p><strong>Step 1</strong> − If the data frames that arrive at the receiver side are faster than they can be processed, the frames must be stored until their use.</p><p><strong>Step 2</strong> − Generally, the receiver does not have enough storage space, especially if it is receiving data from many sources. This may result in either discarding of frames or denial of service.</p><p><strong>Step 3</strong> − To prevent the receiver from becoming overwhelmed with frames, the sender must slow down. There must be ACK from the receiver to the sender.</p><p><strong>Step 4</strong> − In this protocol the sender sends one frame, stops until it receives confirmation from the receiver, and then sends the next frame.</p><p><strong>Step 5</strong> − We still have unidirectional communication for data frames, but auxiliary ACK frames travel from the other direction. We add flow control to the previous protocol.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/700/1*bnkyLStMa1chQEeylcf2JA.jpeg" /></figure><h3>Noisy Channels</h3><p>There are three types of requests for the noisy channels, which are as follows −</p><ul><li>Stop &amp; wait Automatic Repeat Request.</li><li>Go-Back-N Automatic Repeat Request.</li><li>Selective Repeat Automatic Repeat Request.</li></ul><p>Noiseless channels are generally non-existent channels. We can ignore the error or we need to add error control to our protocols.</p><h3>Stop and Wait Automatic Repeat Request</h3><p><strong>Step 1</strong> − In a noisy channel, if a frame is damaged during transmission, the receiver will detect with the help of the checksum.</p><p><strong>Step 2</strong> − If a damaged frame is received, it will be discarded, and the transmitter will retransmit the same frame after receiving a proper acknowledgement.</p><p><strong>Step 3</strong> − If the acknowledgement frame gets lost and the data link layer on ‘A’ eventually times out. Not having received an ACK, it assumes that its data frame was lost or damaged and sends the frame containing packet 1 again. This duplicate frame also arrives at the data link layer on ‘B’, thus part of the file will be duplicated and protocol is said to be failed.</p><p><strong>Step 4</strong> − To solve this problem, assign a sequence number in the header of the message.</p><p><strong>Step 5</strong> − The receiver checks the sequence number to determine if the message is a duplicate since only the message is transmitted at any time.</p><p><strong>Step 6</strong> − The sending and receiving station needs only a 1-bit alternating sequence of ‘0’ or ‘1’ to maintain the relationship of the transmitted message and its ACK/ NAK.</p><p><strong>Step 7</strong> − A modulo-2 numbering scheme is used where the frames are alternatively labelled with ‘0’ or ‘1’ and positive acknowledgements are of the form ACK 0 and ACK 1.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/484/1*N7o7bTlCXjloLbD7AZtQWA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/547/1*qX2_3hmSMd-61lfN1qn1XA.jpeg" /></figure><h3>Go-Back-N ARQ</h3><p>To improve the transmission efficiency, we need more than one frame to be outstanding to keep the channel busy while the sender is waiting for acknowledgement.</p><p>There are two protocols developed for achieving this goal and they are as follows −</p><ul><li>Go — Back — N — Automatic — Repeat Request</li><li>Sliding window protocol</li></ul><h3>Go-Back-N ARQ</h3><p><strong>Step 1</strong> − In this protocol we can send several frames before receiving acknowledgements.</p><p><strong>Step 2</strong> − we keep a copy of these frames until the acknowledgment arrives.</p><p><strong>Step 3</strong> − Frames from a sending station are numbered sequentially. However, we need to include the sequence number of each frame in the header; we need to set a limit.</p><p><strong>Step 4</strong> − If the header of the frame allows m bits for the sequence number, the sequence numbers range from 0 to 2m-1. We can also repeat the sequence numbers.</p><h3>Example</h3><p>For m = 2, the range of sequence numbers is: 0 to 3, i.e.</p><pre>0,1,2,3, 0,1,2,3,…</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/560/1*BLAp2IOIjcaiHflBT5mlrg.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a2f044746378" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering Loop Invariants: The Key to Writing Correct Algorithms]]></title>
            <link>https://medium.com/@Saman-Mahmood/mastering-loop-invariants-the-key-to-writing-correct-algorithms-69a780c9d502?source=rss-8a54d8542753------2</link>
            <guid isPermaLink="false">https://medium.com/p/69a780c9d502</guid>
            <category><![CDATA[invariantloop]]></category>
            <category><![CDATA[algorithms]]></category>
            <dc:creator><![CDATA[Saman Mahmood]]></dc:creator>
            <pubDate>Wed, 25 Mar 2026 13:58:44 GMT</pubDate>
            <atom:updated>2026-03-25T13:58:44.622Z</atom:updated>
            <content:encoded><![CDATA[<h4>What is a Loop Invariant; Step-by-Step Dry Run with Loop Invariants</h4><p><strong>Loop Invariant</strong></p><p>A <strong>loop invariant</strong> is a condition that holds true before and after each iteration of a loop during the execution of an algorithm. It is used to prove the correctness of loops by demonstrating that certain properties remain unchanged across all iterations.</p><p>The loop invariant must be true:</p><ul><li>before the loop starts</li><li>before each iteration of the loop</li><li>after the loop terminates</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/686/1*hTsYNVOIkiVizpMlyIQRXw.jpeg" /></figure><p><strong>Usage:</strong></p><p>Loop invariants capture key facts that explain why code works. This means that if you write code in which the loop invariant is not obvious, you should add a comment that gives the loop invariant. This helps other programmers understand the code, and helps keep them from accidentally breaking the invariant with future changes.</p><p>A loop Invariant can help in the design of iterative algorithms when considered an assertion that expresses important relationships among the variables that must be true at the start of every iteration and when the loop terminates. If this holds, the computation is on the road to effectiveness. If false, then the algorithm has failed.</p><p>Loop invariants are used to reason about the correctness of computer programs. Intuition or trial and error can be used to write easy algorithms however when the complexity of the problem increases, it is better to use formal methods such as loop invariants.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9nfXIO4OFHZaeVe2ubB5hw.jpeg" /></figure><p><strong>Explanation:</strong></p><p>To understand loop invariants, consider a loop as a repetitive process that alters the state of some variables. A <strong>loop invariant</strong> is a logical statement about these variables that remains consistent before and after each iteration of the loop.</p><p>In a typical proof using loop invariants, you follow these steps:</p><p>1. <strong>Initialization</strong>: Show that the loop invariant is true before the first iteration (i.e., when the loop starts). The loop invariant must be true before the first execution of the loop. Or ,The loop invariant must be true before the first execution of the loop.</p><p>2. <strong>Maintenance</strong>: Show that if the loop invariant is true before an iteration, it remains true after the iteration. Or, If the invariant is true before an iteration of the loop, it should be true also after the iteration.If the invariant is true before an iteration of the loop, it should be true also after the iteration.</p><p>3. <strong>Termination</strong>: When the loop terminates, the loop invariant helps show that the algorithm has achieved its goal. Or, When the loop is terminated the invariant should tell us something useful, something that helps us understand the algorithm.When the loop is terminated the invariant should tell us something useful, something that helps us understand the algorithm.</p><p><strong>For example -Insertion Sort:Insertion Sort:</strong></p><p>Arrey: 6 3 5 7 2 4</p><p>for (j = 2 to length(A)</p><p>{</p><p>key = A[j];</p><p>i = j-1;</p><p>while (i &gt; 0 and A[i] &gt; key)</p><p>{</p><p>A[i+1] = A[i];</p><p>i = i-1;</p><p>}</p><p>A[i+1] = key;</p><p>}</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=69a780c9d502" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Digital-to-Analog Conversion]]></title>
            <link>https://medium.com/@Saman-Mahmood/digital-to-analog-conversion-a5d3188aadda?source=rss-8a54d8542753------2</link>
            <guid isPermaLink="false">https://medium.com/p/a5d3188aadda</guid>
            <category><![CDATA[digital-transformation]]></category>
            <category><![CDATA[computer-networking]]></category>
            <category><![CDATA[analog]]></category>
            <category><![CDATA[computer-network-design]]></category>
            <dc:creator><![CDATA[Saman Mahmood]]></dc:creator>
            <pubDate>Mon, 09 Mar 2026 15:05:26 GMT</pubDate>
            <atom:updated>2026-03-09T15:05:26.905Z</atom:updated>
            <content:encoded><![CDATA[<h4>How Digital Signals Become Analog: A Simple Guide</h4><h3>Introduction</h3><p>In communication systems, sometimes <strong>digital data (0s and 1s)</strong> needs to be transmitted through a medium that carries <strong>analog signals</strong>, such as telephone lines or radio waves.</p><p>To do this, the digital data is converted into an analog signal. This process is called <strong>Digital-to-Analog Conversion.</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rymxDWkxAu-0s2AJvbiRdA.png" /></figure><h3>Definition</h3><p><strong>Digital-to-Analog Conversion</strong> is the process of converting <strong>digital data into an analog signal</strong> by changing one of the characteristics of the analog signal (amplitude, frequency, or phase). An analog signal (sine wave) has <strong>three main characteristics</strong>:</p><p><strong>Amplitude</strong></p><p><strong>Frequency</strong></p><p><strong>Phase</strong></p><p>By changing any of these characteristics, digital data can be transmitted as an analog signal. This is called <strong>modulation.</strong></p><h3>Types of Digital-to-Analog Conversion</h3><p>There are <strong>four main types</strong>:</p><p><strong>ASK (Amplitude Shift Keying)</strong></p><p><strong>FSK (Frequency Shift Keying)</strong></p><p><strong>PSK (Phase Shift Keying)</strong></p><p><strong>QAM (Quadrature Amplitude Modulation)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/957/1*eQBBK2uS-qrcat31fTBZLQ.jpeg" /></figure><h3>ASK (Amplitude Shift Keying)</h3><p>Amplitude Shift Keying (ASK) is a digital-to-analog modulation technique in which the <strong>amplitude of the carrier signal is changed to represent digital data (0 and 1)</strong> while <strong>frequency and phase remain constant</strong>.</p><h3>Binary ASK (BASK)</h3><p>ASK usually uses <strong>two amplitude levels</strong>. This is called <strong>Binary Amplitude Shift Keying (BASK)</strong> or <strong>On-Off Keying (OOK)</strong>.</p><p><strong>Representation:</strong></p><ul><li><strong>1 → High amplitude (carrier present)</strong></li><li><strong>0 → Zero amplitude (no carrier)</strong></li></ul><h3>Bandwidth of ASK</h3><p>Bandwidth depends on the <strong>signal rate (S)</strong>.</p><p><strong>Formula:</strong><br><strong>B = (1 + d) S</strong></p><p><strong>Range:</strong></p><p>Minimum bandwidth = <strong>S</strong></p><p>Maximum bandwidth = <strong>2S</strong></p><h3>2.FSK (Frequency Shift Keying)</h3><p><strong>Frequency Shift Keying (FSK)</strong> is a digital-to-analog modulation technique in which the <strong>frequency of the carrier signal changes</strong> to represent digital data <strong>(0 and 1)</strong>, while <strong>amplitude and phase remain constant</strong>.</p><h3>Working</h3><p>In FSK, <strong>two different frequencies</strong> are used:</p><p><strong>1 → Higher frequency (f₁)</strong></p><p><strong>0 → Lower frequency (f₂)</strong></p><p>So the <strong>frequency changes according to the digital bit</strong>.</p><h3>Binary FSK (BFSK)</h3><p>When only <strong>two frequencies</strong> are used to represent <strong>0 and 1</strong>, it is called <strong>Binary Frequency Shift Keying (BFSK)</strong>.</p><h3>Bandwidth of FSK</h3><p>The bandwidth depends on:</p><p><strong>Signal rate (S)</strong></p><p><strong>Difference between the two frequencies</strong></p><p>FSK usually requires <strong>more bandwidth than ASK</strong>.</p><h3>3.PSK (Phase Shift Keying)</h3><p><strong>Phase Shift Keying (PSK)</strong> is a digital-to-analog modulation technique in which the <strong>phase of the carrier signal is changed</strong> to represent digital data <strong>(0 and 1)</strong>, while <strong>amplitude and frequency remain constant</strong>.</p><h3>Working</h3><p>In PSK, the <strong>phase of the signal shifts</strong> according to the bit value.</p><p><strong>0 → one phase (for example 0°)</strong></p><p><strong>1 → another phase (for example 180°)</strong></p><h3>Binary PSK (BPSK)</h3><p>When <strong>two different phases</strong> are used to represent <strong>0 and 1</strong>, it is called <strong>Binary Phase Shift Keying (BPSK)</strong>.</p><h3>4.QAM (Quadrature Amplitude Modulation)</h3><p><strong>Quadrature Amplitude Modulation (QAM)</strong> is a digital-to-analog modulation technique in which <strong>both amplitude and phase of the carrier signal are changed</strong> to represent digital data.</p><h3>Working</h3><p>In QAM:</p><p><strong>Amplitude changes</strong></p><p><strong>Phase also changes</strong></p><p>Because two characteristics change, <strong>more bits can be transmitted in one signal</strong>.</p><p>QAM combines <strong>ASK and PSK</strong>, so it is <strong>more efficient</strong> and can transmit <strong>more data</strong> in the same bandwidth.</p><h3>Usage</h3><p>QAM is commonly used in:</p><p><strong>Wi-Fi</strong></p><p><strong>Cable TV</strong></p><p><strong>High-speed internet communication</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/927/1*q0RDZtU4PWeSmSfgjzWiVQ.jpeg" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=a5d3188aadda" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Analysis on Nature of Input and Size of Input & Asymptotic Notation]]></title>
            <link>https://medium.com/@Saman-Mahmood/analysis-on-nature-of-input-and-size-of-input-asymptotic-notation-426b897a0d52?source=rss-8a54d8542753------2</link>
            <guid isPermaLink="false">https://medium.com/p/426b897a0d52</guid>
            <category><![CDATA[algorithm-analysis]]></category>
            <category><![CDATA[asymptotic-notation]]></category>
            <category><![CDATA[algorithms]]></category>
            <dc:creator><![CDATA[Saman Mahmood]]></dc:creator>
            <pubDate>Mon, 09 Mar 2026 02:47:33 GMT</pubDate>
            <atom:updated>2026-03-09T02:47:33.297Z</atom:updated>
            <content:encoded><![CDATA[<h4>Evaluating Algorithm Performance: Input Type, Size, and Asymptotic Behavior</h4><p>A simple approach is to implement both algorithms and compare how long they take to run on various inputs. However, this technique has several limitations when it comes to properly analyzing algorithms.</p><p>For certain inputs, the first algorithm may perform better than the second, while for other inputs the second algorithm might show better performance. It is also possible that the first algorithm works faster on one computer system, whereas the second algorithm may perform more efficiently on a different machine for some other inputs.</p><p>The performance of an algorithm depends mainly on:</p><p>1.Nature of Input</p><p>2.Size of Input</p><p>3.Growth Rate (Asymptotic Notation).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/704/1*203F3e1Ul1fz7mhOL-kVGA.png" /></figure><h3><strong>1.Analysis Based on Nature of Input</strong></h3><p>The performance of an algorithm can change depending on the type of input it receives. So, we analyse algorithms based on <strong>best, worst, and average scenarios</strong>.</p><h3><strong>Types</strong></h3><h4>1. <strong>Best Case</strong></h4><p>The best case occurs when the algorithm performs the minimum number of operations for a given input size The <strong>best case</strong> occurs when the algorithm performs the <strong>minimum number of operations</strong> for a given input size. The input for which the algorithm performs the fastest. (Minimum time is required.)</p><p><strong>Example — Linear Search</strong></p><p>Suppose we search for element <strong>10</strong> in the array:</p><p>[10, 20, 30, 40, 50]</p><p>The algorithm finds the element in the <strong>first comparison</strong>.</p><p>Number of operations = <strong>1</strong></p><p>Time Complexity: <strong>O(1)</strong></p><h4>2. <strong>Worst Case</strong></h4><p>The worst case occurs when the algorithm performs the maximum number of operations. The <strong>worst case</strong> occurs when the algorithm performs the <strong>maximum number of operations</strong>.The input for which the algorithm performs the <strong>slowest</strong>.<strong><br> Example — Linear Search</strong></p><p>Search element 50 in:</p><p>[10, 20, 30, 40, 50]</p><p>The algorithm must check every element.</p><p>Number of operations = n</p><p>If element is not present, it also checks all elements.</p><p>Time Complexity: <strong>O(n)</strong></p><h4><strong>3.Average Case</strong></h4><p>The average case represents the expected running time when input data is random. The <strong>average case</strong> represents the <strong>expected running time</strong> when input data is random.</p><p><strong>Example: </strong>Element may appear anywhere in the array.</p><p>Average comparisons:</p><p>(n + 1) / 2</p><p>Example: For n = 10</p><p>Average comparisons ≈ 5</p><p><strong>Time Complexity</strong></p><p>O(n/2) → O(n)</p><p>In asymptotic notation, constants are ignored, so it becomes O(n).</p><h3><strong>2. Analysis Based on Size of Input</strong></h3><p>Algorithm efficiency is also affected by the size of input (n).</p><p>Input size (n) can be:</p><p>1. Number of elements in an array or list</p><p>2. Number of nodes in a graph</p><p>3. Length of a string, etc.</p><p><strong>Observation:<br> </strong>As <strong>n increases</strong>, the number of operations grows according to the algorithm’s <strong>growth rate</strong>.<strong><br> </strong>A loop from 1 to n executes <strong>n operations</strong>, so the time increases linearly with input size.</p><p>for i = 1 to n</p><p>print(i)</p><h3>3.Growth Rate (Asymptotic Notation)</h3><h4><strong>Asymptotic Notations</strong></h4><p>Asymptotic notation is a mathematical concept that describes the behavior of functions as they approach a limit. It is primarily used in computer science to analyse the efficiency of algorithms.</p><p>Asymptotic notations are the mathematical notations used to describe the running time of an algorithm when the input tends towards a particular value or a limiting value.</p><p><strong>For example</strong>: In bubble sort, when the input array is already sorted, the time taken by the algorithm is linear i.e. the best case.</p><p>But, when the input array is in reverse condition, the algorithm takes the maximum time (quadratic) to sort the elements i.e. the worst case.</p><p>When the input array is neither sorted nor in reverse order, then it takes average time. These durations are denoted using asymptotic notations.</p><p><strong>There are mainly Five asymptotic notations:</strong></p><p><strong><em>1.Big-O notation</em></strong></p><p><strong><em>2. Omega notation</em></strong></p><p><strong><em>3. Theta notation</em></strong></p><p><strong><em>4. Little ω</em></strong></p><p><strong><em>5. Little o</em></strong></p><p><strong>Why Use Asymptotic Notation?</strong></p><p>• Asymptotic notation provides a high-level understanding of an algorithm’s performance.</p><p>• It abstracts away constant factors and lower-order terms for simplified comparison.</p><p>• This makes it easier to analyse algorithms’ scalability and efficiency in large inputs.</p><h4><strong>Big-O Notation (O-notation)</strong></h4><p>Big-O notation represents the upper bound of the running time of an algorithm. Thus, it gives the worst-case complexity of an algorithm.</p><p>O(g(n)) = { f(n): there exist positive constants c and n0</p><p>such that 0 ≤ f(n) ≤ cg(n) for all n ≥ n0 }</p><p>It indicates the worst-case scenario for the growth rate of an algorithm’s run time.</p><p>The above expression can be described as a function f(n) belongs to the set O(g(n)) if there exists a positive constant c such that it lies between 0 and cg(n), for sufficiently large n.</p><p>For any value of n, the running time of an algorithm does not cross the time provided by O(g(n)).</p><p>Since it gives the worst-case running time of an algorithm, it is widely used to analyse an algorithm as we are always interested in the worst-case scenario.</p><h4><strong>Omega Notation (Ω-notation)</strong></h4><p>Omega notation represents the lower bound of the running time of an algorithm. Thus, it provides the best case complexity of an algorithm.</p><p>Ω(g(n)) = { f(n): there exist positive constants c and n0</p><p>such that 0 ≤ cg(n) ≤ f(n) for all n ≥ n0 }</p><p>The above expression can be described as a function f(n) belongs to the set Ω(g(n)) if there exists a positive constant c such that it lies above cg(n), for sufficiently large n.</p><p>For any value of n, the minimum time required by the algorithm is given by Omega Ω(g(n)).</p><h4><strong>Theta Notation (Θ-notation)</strong></h4><p>Theta notation encloses the function from above and below. Since it represents the upper and the lower bound of the running time of an algorithm, it is used for analysing the average-case complexity of an algorithm.</p><p>For a function g(n), Θ(g(n)) is given by the relation:</p><p>Θ(g(n)) = { f(n): there exist positive constants c1, c2 and n0</p><p>such that 0 ≤ c1g(n) ≤ f(n) ≤ c2g(n) for all n ≥ n0 }</p><p>The above expression can be described as a function f(n) belongs to the set Θ(g(n)) if there exist positive constants c1 and c2 such that it can be sandwiched between c1g(n) and c2g(n), for sufficiently large n.</p><p>If a function f(n) lies anywhere in between c1g(n) and c2g(n) for all n ≥ n0, then f(n) is said to be asymptotically tight bound.</p><h4><strong>Little o Asymptotic Notation:</strong></h4><p>Big O is used as a tight upper bound on the growth of an algorithm’s effort (this effort is described by the function<strong> f(n)),</strong> even though, as written, it can also be a loose upper bound. “<strong>Little o</strong>” (<strong>o</strong>) notation is used to describe an upper bound that cannot be tight.</p><p>In the domain of algorithm analysis, the little o notation is a valuable tool used to describe the behaviour of functions as they approach certain limits. When we say that a function <strong>f(n)</strong> is <strong>o(g(n))</strong>, we are essentially stating that <strong>f(n)</strong> grows slower than<strong> g(n)</strong> as n approaches infinity. In simpler terms, if <strong>f(n) = o(g(n))</strong>, it means that <strong>g(n)</strong> grows faster than<strong> f(n).</strong></p><p>Thus, Little o means loose upper-bound of f(n). Little o is a rough estimate of the maximum order of growth whereas Big-O may be the actual order of growth. Thus, <strong>Little o</strong> means <strong>loose upper-bound</strong> of <strong>f(n)</strong>. Little o is a rough estimate of the maximum order of growth whereas Big-O may be the actual order of growth.</p><h4><strong>Little ω Asymptotic Notation:</strong></h4><p>On the other hand, little ω notation is used to describe the relationship between two functions when one grows strictly faster than the other. If a function f(n) is ω(g(n)), it means that g(n) grows slower than f(n) as n approaches infinity.</p><p><strong>f(n)</strong> has a higher growth rate than <strong>g(n)</strong> so main difference between <strong>Big Omega (</strong>Ω<strong>)</strong> and<strong> Little omega (ω)</strong> lies in their definitions. In the case of Big Omega <strong>f(n)=ω(g(n))</strong> and the bound is <strong>0&lt;=cg(n)&lt;=f(n)</strong>, but in case of little omega, it is true for <strong>0&lt;=c*g(n)&lt;f(n).</strong></p><p>The relationship between <strong>Big Omega (</strong>Ω<strong>) </strong>and <strong>Little Omega (ω) </strong>is similar to that of Big-O and<strong> Little o</strong> except that now we are looking at the lower bounds. Little Omega (<strong>ω</strong>) is a rough estimate of the order of the growth whereas Big Omega (Ω) may represent exact order of growth. We use notation to denote a lower bound that is not asymptotically tight, and<strong> f(n) ∈ ω(g(n))</strong> if and only if <strong>g(n) ∈ ο((f(n)).</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=426b897a0d52" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Understanding Transmission Modes in Data Communication]]></title>
            <link>https://medium.com/@Saman-Mahmood/understanding-transmission-modes-in-data-communication-7c8ac79a2851?source=rss-8a54d8542753------2</link>
            <guid isPermaLink="false">https://medium.com/p/7c8ac79a2851</guid>
            <category><![CDATA[parallel-transmisson]]></category>
            <category><![CDATA[serial-transmission]]></category>
            <category><![CDATA[computer-networking]]></category>
            <dc:creator><![CDATA[Saman Mahmood]]></dc:creator>
            <pubDate>Sun, 08 Mar 2026 13:54:18 GMT</pubDate>
            <atom:updated>2026-03-08T14:01:23.772Z</atom:updated>
            <content:encoded><![CDATA[<h4>Introduction to Data Transmission in Communication Systems; How Serial Communication Transfers Data Between Devices</h4><p>In data communication, information travels from one device to another through a communication medium such as a cable, optical fiber, or wireless channel. The information being transmitted is usually in the form of <strong>binary data</strong>, which consists of <strong>0s and 1s</strong>.</p><p>When devices exchange data, an important question arises: <strong>how should these bits be sent through the communication channel?</strong> Should multiple bits travel together, or should they move one by one?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/525/1*l8xB1ieMssmd5XaxC8sOZg.jpeg" /></figure><p>The method used to transfer data between devices is known as the <strong>transmission mode</strong>. Transmission modes determine <strong>how data flows across a communication link</strong> and how bits are organized during transmission.</p><h3>Transmission Modes</h3><p>Transmission modes describe <strong>how bits are transmitted between two communicating devices</strong> through a communication medium.</p><p>Binary data can be grouped into <strong>n bits</strong>, and these groups can be transmitted either <strong>simultaneously</strong> or <strong>sequentially</strong>. Based on this behavior, transmission modes are divided into two categories.</p><ul><li><strong>Parallel Transmission</strong></li><li><strong>Serial Transmission</strong></li></ul><p>These two modes define how binary data moves from a sender to a receiver.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zmncQCQy59OCoLMK_RxZIg.png" /></figure><h3>1. Parallel Transmission</h3><p>In <strong>parallel transmission</strong>, multiple bits of data are sent <strong>at the same time</strong>.</p><p>Computers usually organize data in groups of bits, such as <strong>8 bits (1 byte)</strong>. Instead of sending each bit individually, parallel transmission allows the entire group to be transmitted <strong>simultaneously</strong>.</p><p>To achieve this, the system uses <strong>multiple communication lines</strong>. If the data group contains <strong>n bits</strong>, then <strong>n wires</strong> are required. Each wire carries one bit of the data.</p><p>For example, when sending <strong>8 bits</strong>, the system uses <strong>eight wires</strong>, and each wire transmits one bit. All bits travel together during the same clock signal from the sender to the receiver.</p><p>In most cases, these wires are <strong>bundled together inside a cable</strong> with connectors at both ends, allowing the devices to communicate directly.</p><p>Parallel transmission is commonly used in <strong>short-distance communication</strong>, especially within computer systems or between closely connected hardware components.</p><h3>2. Serial Transmission</h3><p>In <strong>serial transmission</strong>, data is transmitted <strong>one bit at a time</strong> through a <strong>single communication channel</strong>.</p><p>Instead of sending several bits simultaneously, serial transmission sends each bit <strong>sequentially</strong>, one after another, until the entire message is delivered.</p><p>Because only <strong>one communication line</strong> is required, serial transmission is widely used in many communication systems and networks.</p><p>Although computers internally handle data in parallel form, communication channels often rely on serial transmission. For this reason, devices use special converters:</p><p><strong>Parallel-to-Serial converters</strong> transform parallel data into serial form before transmission.</p><p><strong>Serial-to-Parallel converters</strong> convert received serial data back into parallel form for processing.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/534/1*Q9GwKQbCohKpEbZGfbvF8g.jpeg" /></figure><p>Serial transmission plays an important role in modern digital communication and networking systems.</p><h3>Types of Serial Transmission</h3><p>Serial transmission can occur in <strong>three different ways</strong>, depending on how the sender and receiver manage <strong>timing and synchronization</strong> during data transfer.</p><p>These types include:</p><p><strong>Asynchronous Transmission</strong></p><p><strong>Synchronous Transmission</strong></p><p><strong>Isochronous Transmission</strong></p><p>Each method organizes the data stream differently to ensure accurate communication.</p><h3>1. Asynchronous Transmission</h3><p>In <strong>asynchronous transmission</strong>, data is sent <strong>one character at a time</strong>. Each character is usually made up of <strong>8 bits</strong>.</p><p>Since the sender and receiver are not continuously synchronized, additional bits are added to each character to mark the <strong>beginning and end</strong> of the data.</p><p>These bits are known as:</p><p><strong>Start bit</strong> — indicates the beginning of the character</p><p><strong>Stop bit</strong> — indicates the end of the character</p><p>Because each character has its own start and stop signals, there may be <strong>small gaps between characters</strong> during transmission.</p><p>Asynchronous transmission is often used in situations where data is transmitted <strong>irregularly or in small amounts</strong>, such as communication between a computer and peripheral devices.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/918/1*GrUgmY0ARw9kS7pepDEIww.jpeg" /></figure><h3>2. Synchronous Transmission</h3><p>In <strong>synchronous transmission</strong>, data is sent as a <strong>continuous stream of bits</strong> rather than individual characters.</p><p>In this method, the sender and receiver operate using a <strong>shared timing mechanism</strong>, allowing them to stay synchronized during data transfer. Because of this synchronization, there is no need to add start and stop bits for each character.</p><p>Data is usually transmitted in <strong>blocks or frames</strong>, which allows larger amounts of information to be transferred efficiently.</p><p>Synchronous transmission is widely used in <strong>network communication systems</strong>, where large volumes of data must be transmitted continuously.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/943/1*wo14mxBf9ICAo1_ybIypyw.jpeg" /></figure><h3>3. Isochronous Transmission</h3><p>In <strong>isochronous transmission</strong>, data is delivered at <strong>consistent and predictable time intervals</strong>.</p><p>This method is designed for situations where <strong>timing is very important</strong>. The data must arrive at a steady rate so that delays or irregular timing do not affect the communication.</p><p>Isochronous transmission is commonly used in applications that involve <strong>real-time data</strong>, such as audio and video communication, where maintaining consistent timing is essential.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7c8ac79a2851" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Ensemble Learning in Machine Learning: Combining Models for Better Accuracy]]></title>
            <link>https://medium.com/@Saman-Mahmood/ensemble-learning-in-machine-learning-combining-models-for-better-accuracy-54ceea44b1e2?source=rss-8a54d8542753------2</link>
            <guid isPermaLink="false">https://medium.com/p/54ceea44b1e2</guid>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[stacking]]></category>
            <category><![CDATA[adaboost]]></category>
            <category><![CDATA[boosting]]></category>
            <category><![CDATA[ensemble-learning]]></category>
            <dc:creator><![CDATA[Saman Mahmood]]></dc:creator>
            <pubDate>Thu, 30 Oct 2025 05:03:12 GMT</pubDate>
            <atom:updated>2025-10-30T05:04:41.168Z</atom:updated>
            <content:encoded><![CDATA[<h4>Discover how ensemble learning leverages multiple models — like Bagging, Boosting, and Random Forests — to improve prediction accuracy, reduce overfitting, and build more robust AI systems.</h4><h3>Ensemble Learning</h3><p>Ensemble learning refers to a machine learning approach where several models are trained to address a common problem, and their predictions are combined to enhance the overall performance. The idea behind ensemble learning is that by combining multiple models, each with its strengths and weaknesses, the ensemble can achieve better results than any single model alone. Ensemble learning can be applied to various machine learning tasks, including classification, regression, and clustering. Ensemble methods are techniques that aim at improving the accuracy of results in models by combining multiple models instead of using a single model. The combined models increase the accuracy of the results significantly. This has boosted the popularity of ensemble methods in machine learning.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/850/1*ADemVH785YfOrYsDgWX_aA.jpeg" /><figcaption>Ensemble learning</figcaption></figure><h3>Categories of Ensemble Methods</h3><p>Categories of Ensemble Methods Ensemble methods fall into two broad categories:</p><ol><li>Sequential ensemble techniques</li></ol><p>2. Parallel ensemble techniques</p><p><strong>Sequential ensemble</strong> techniques generate base learners in a sequence, e.g., Adaptive Boosting (AdaBoost). The sequential generation of base learners promotes the dependence between the base learners. The performance of the model is then improved by assigning higher weights to previously misrepresented learners.</p><p>In <strong>parallel ensemble techniques</strong>, base learners are generated in a parallel format, e.g., random forest. Parallel methods utilize the parallel generation of base learners to encourage independence between the base learners. The independence of base learners significantly reduces the error due to the application of averages.</p><h3><strong>Ensemble Techniques</strong></h3><p>Ensemble techniques in machine learning involve combining multiple models to improve performance. One common ensemble technique is bagging, which uses bootstrap sampling to create multiple datasets from the original data and trains a model on each dataset. Another technique is boosting, which trains models sequentially, each focusing on the previous models’ mistakes. Random forests are a popular ensemble method that uses decision trees as base learners and combines their predictions to make a final prediction. Ensemble techniques are effective because they reduce overfitting and improve generalization, leading to more robust models.</p><h3><strong>Main Types of Ensemble Methods</strong></h3><h3>1. Bagging Bagging</h3><p>The short form for bootstrap aggregating, is mainly applied in classification and regression. It increases the accuracy of models through decision trees, which reduces variance to a large extent. The reduction of variance increases accuracy, eliminating overfitting, which is a challenge to many predictive models. Bagging is classified into two types, i.e., bootstrapping and aggregation. Bootstrapping is a sampling technique where samples are derived from the whole population (set) using the replacement procedure. The sampling with replacement method helps make the selection procedure randomized. The base learning algorithm is run on the samples to complete the procedure. Aggregation in bagging is done to incorporate all possible outcomes of the prediction and randomize the outcome. Without aggregation, predictions will not be accurate because all outcomes are not put into consideration. Therefore, the aggregation is based on the probability bootstrapping procedures or on the basis of all outcomes of the predictive models.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*hxUWV84ilhOp1H6DE0vCsg.jpeg" /><figcaption>Ensemble learning types</figcaption></figure><h3><strong>2. Boosting</strong></h3><p>Boosting is an ensemble technique that learns from previous predictor mistakes to make better predictions in the future. The technique combines several weak base learners to form one strong learner, thus significantly improving the predictability of models. Boosting works by arranging weak learners in a sequence, such that weak learners learn from the next learner in the sequence to create better predictive models. Boosting takes many forms, including gradient boosting, Adaptive Boosting (AdaBoost), and XGBoost (Extreme Gradient Boosting). AdaBoost uses weak learners in the form of decision trees, which mostly include one split that is popularly known as decision stumps. AdaBoost’s main decision stump comprises observations carrying similar weights. Gradient boosting adds predictors sequentially to the ensemble, where preceding predictors correct their successors, thereby increasing the model’s accuracy. New predictors are fit to counter the effects of errors in the previous predictors. The gradient of descent helps the gradient booster identify problems in learners’ predictions and counter them accordingly. XGBoost makes use of decision trees with boosted gradient, providing improved speed and performance. It relies heavily on the computational speed and the performance of the target model. Model training should follow a sequence, thus making the implementation of gradient boosted machines slow.</p><h3>3. Stacking Stacking</h3><h4>Introduction:</h4><p>Another ensemble method, is often referred to as stacked generalization. This technique works by allowing a training algorithm to ensemble several other similar learning algorithm predictions. Stacking has been successfully implemented in regression, density estimations, distance learning, and classifications. It can also be used to measure the error rate involved during bagging.</p><h4>Explanation:</h4><p>Stacking is a ensemble learning technique where the final model known as the “stacked model” combines the predictions from multiple base models. The goal is to create a stronger model by using different models and combining them.</p><h4>Architecture of Stacking</h4><p>Stacking architecture is like a team of models working together in two layers to improve prediction accuracy. Each layer has a specific job and the process is designed to make the final result more accurate than any single model alone.</p><p>It has two parts:</p><h3>1. Base Models (Level-0)</h3><p>These are the first models that directly learn from the original training data. You can think of them as the “helpers” that try to make predictions in their own way. Base models can be Decision Tree, Logistic Regression, Random Forest, etc. Each model is trained separately using the same training data.</p><h3>2. Meta-Model (Level-1)</h3><p>This is the final model that learns from the output of the base models instead of the raw data. Its job is to combine the base models predictions in a smart way to make the final prediction. A simple Linear Regression or Logistic Regression can act as a meta-model. It looks at the outputs of the base models and finds patterns in how they make mistakes or agree.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*TxHfdzN6HuPcn3LXmltGww.jpeg" /><figcaption>Stacking</figcaption></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=54ceea44b1e2" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[A Complete Overview: Introduction, Concept, and Importance of Software Testing]]></title>
            <link>https://medium.com/@Saman-Mahmood/a-complete-overview-introduction-concept-and-importance-of-software-testing-ede953a3965b?source=rss-8a54d8542753------2</link>
            <guid isPermaLink="false">https://medium.com/p/ede953a3965b</guid>
            <category><![CDATA[software-testing]]></category>
            <category><![CDATA[test-automation]]></category>
            <category><![CDATA[testing]]></category>
            <dc:creator><![CDATA[Saman Mahmood]]></dc:creator>
            <pubDate>Sun, 12 Oct 2025 14:12:48 GMT</pubDate>
            <atom:updated>2025-10-12T14:12:48.200Z</atom:updated>
            <content:encoded><![CDATA[<h4>Understanding the fundamentals of software testing, its purpose, and why it plays a vital role in delivering quality software.</h4><p>Software testing is nothing but an art of investigating software to ensure that its quality under test is in line with the requirement of the client. Software testing is carried out in a systematic manner with the intent of finding defects in a system. It is required for evaluating the system. As the technology is advancing we see that everything is getting digitized. You can access your bank online, you can shop from the comfort of your home, and the options are endless.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/828/1*BTPRaDKsO028sNgxPxPwpQ.png" /></figure><h3><strong>Concept of Testing</strong></h3><p>Testing is the process of evaluating a software system or its components to determine whether it meets the required results and behaves as expected. It helps to identify defects, bugs, or gaps between expected and actual behavior. Testing is not only about finding bugs but also about ensuring the overall quality and reliability of the system.</p><p><strong>Why is Testing Important?</strong></p><ul><li><strong>Ensures Quality:</strong> Delivers a high-quality product to customers.</li><li><strong>Detects Errors Early:</strong> Fixing issues early saves cost and time.</li><li><strong>Improves User Experience:</strong> Well-tested applications perform smoothly.</li><li><strong>Reduces Risk:</strong> Minimizes chances of future system failures.</li></ul><h3><strong>Goals of Testing</strong></h3><p><strong>Verification:</strong> Are we building the product right? (Check design and code correctness)</p><p><strong>Validation:</strong> Are we building the right product? (Check if it meets user requirements)</p><h3><strong>Techniques of Testing</strong></h3><p>Testing techniques are methods used to test software effectively. They are divided into three main types:</p><h4><strong>A) Black Box Testing Techniques</strong></h4><p>Focuses on what the system does, without knowing its internal structure. It is mainly performed by testers who do not need coding knowledge.</p><ul><li><strong>Functional Testing:</strong> Checks each feature, e.g., login and signup.</li><li><strong>Boundary Value Analysis (BVA):</strong> Tests at input boundaries (e.g., minimum and maximum values).</li><li><strong>Equivalence Partitioning:</strong> Divides input into valid and invalid classes (e.g., valid ages 18–60).</li><li><strong>Regression Testing:</strong> Ensures new changes do not affect previously working features.</li></ul><h4><strong>B) White Box Testing Techniques</strong></h4><p>Focuses on the internal logic and code structure, requiring programming knowledge.</p><ul><li><strong>Unit Testing:</strong> Tests individual functions or modules (e.g., checking the add() function).</li><li><strong>Code Coverage Testing:</strong> Ensures all code lines and branches are tested.</li><li><strong>Path Testing:</strong> Tests all possible execution paths in the code.</li><li><strong>Loop Testing:</strong> Verifies proper execution of loops.</li></ul><h4><strong>C) Grey Box Testing Techniques</strong></h4><p>Combines black box and white box approaches. The tester knows some internal details but tests mainly at the user level.</p><p><strong>Manual vs Automated Testing</strong></p><p><strong>Manual Testing:</strong></p><p>Tester executes steps manually without tools.</p><p>Best for small or one-time testing.</p><p><strong>Automated Testing:</strong></p><p>Uses scripts and tools like Selenium, JUnit, TestNG.</p><p>Suitable for repetitive or long-term testing tasks.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*-qEudw9Lhmn_JGYxXIZEDQ.png" /></figure><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ede953a3965b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Introduction to Machine Learning]]></title>
            <link>https://medium.com/@Saman-Mahmood/introduction-to-machine-learning-884e4036e7cf?source=rss-8a54d8542753------2</link>
            <guid isPermaLink="false">https://medium.com/p/884e4036e7cf</guid>
            <category><![CDATA[model]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[machine-learning-ai]]></category>
            <dc:creator><![CDATA[Saman Mahmood]]></dc:creator>
            <pubDate>Wed, 08 Oct 2025 05:23:03 GMT</pubDate>
            <atom:updated>2025-10-08T05:23:03.662Z</atom:updated>
            <content:encoded><![CDATA[<h3><strong>What is Machine Learning?</strong></h3><p><strong>Machine Learning (ML)</strong> is a subfield of Artificial Intelligence (AI) that enables computers to learn from data and improve their performance automatically without being explicitly programmed for every task.</p><p>In traditional programming, humans write explicit rules for the computer to follow.<br> In machine learning, we instead feed data into algorithms, and the system learns patterns and relationships from that data to make predictions or decisions.</p><p><strong>Example:</strong><br> Suppose we want a computer to recognize cats in pictures.<br> Instead of manually coding “a cat has whiskers, four legs, and a tail,” we show the computer thousands of labelled images (“cat” and “not cat”). Over time, it learns the distinguishing features on its own.</p><p>Machine learning allows systems to adapt, improve with experience, and handle complex, data-driven tasks — making it a core technology behind modern innovations such as recommendation systems, voice assistants, and self-driving cars.</p><p><strong>How Machine Learning Works</strong></p><p>Machine Learning operates through a systematic process in which data is collected, processed, and used to train a model capable of making predictions or decisions. The overall workflow consists of three key stages: <strong>Data Collection</strong>, <strong>Model Training</strong>, and <strong>Prediction or Decision-Making</strong>.</p><p><strong>Step 1: Data Collection</strong></p><p>Data is the foundation of every machine learning system. It provides the raw material that enables algorithms to learn and identify patterns. In simple terms, <em>data</em> refers to any form of information that a computer can process — this could be numbers such as age or temperature, text like customer reviews, images of animals or medical scans, audio recordings, or even video footage.</p><p>These data can come from various sources, including company databases, sensors, IoT devices, public datasets such as those available on Kaggle or the UCI Machine Learning Repository, and even user interactions like clicks, searches, and purchases.</p><p>The quality of data is crucial for successful learning. If the data is inaccurate, incomplete, or biased, the resulting model will likely make poor or unfair predictions. This idea is often summarized by the phrase <strong>“Garbage in, garbage out”</strong> — poor-quality data leads to poor-quality results.</p><p><strong>Step 2: Model Training</strong></p><p>Model training is the central phase of machine learning — the stage where the algorithm actually learns. Once data is collected, it is divided into two portions: a <strong>training set</strong> (typically 70–80% of the total data) used to teach the model, and a <strong>testing set</strong> (the remaining 20–30%) used to evaluate how well the model performs on unseen data.</p><p>During training, the algorithm analyses the input variables (called <strong>features</strong>) and learns how they relate to the output variable (called the <strong>label</strong> or <strong>target</strong>). For example, in predicting house prices, the features might include the house’s size, location, number of rooms, and age, while the label would be the house price. As the model processes this data, it gradually adjusts its internal parameters to minimize errors and improve prediction accuracy.</p><p>Various algorithms are used for training depending on the problem type. Some of the most common include <strong>Linear Regression</strong> (for predicting continuous values), <strong>Decision Trees</strong> and <strong>Random Forests</strong> (for classification and regression tasks), <strong>Support Vector Machines (SVM)</strong>, and <strong>Neural Networks</strong>, which are used for complex pattern recognition tasks.</p><p>The ultimate goal of model training is to build a model that not only performs well on the data it was trained on but also <strong>generalizes</strong> effectively — meaning it can make accurate predictions on new, unseen data.</p><p><strong>Step 3: Prediction / Decision</strong></p><p>After the model has been successfully trained, it can be used to make predictions or decisions on new data. In this phase, the model receives fresh input — data it has never encountered before — and uses the patterns it learned during training to produce an output.</p><p>For example, if a model trained on historical housing data is given the details of a new house (such as its size, location, and age), it might predict that the house is worth <strong>$300,000</strong>.</p><p>To assess the model’s performance, various evaluation metrics are used. <strong>Accuracy</strong> measures the overall correctness of predictions, <strong>Precision</strong> and <strong>Recall</strong> determine how reliable the model is for specific classes, and the F1-score provides a balance between the two.</p><p>In regression problems (like predicting prices), metrics such as Mean Absolute Error (MAE) are used to quantify the average prediction error.</p><p>Finally, in many real-world applications, machine learning models are used directly in automated decision-making systems. For example, <strong>self-driving cars</strong> use ML models to decide when to accelerate, turn, or stop; recommendation systems suggest products, movies, or music based on user preferences; and fraud detection systems automatically flag or block suspicious transactions.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=884e4036e7cf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Top 50 Interview Questions and Answers for B.Ed Students and Aspiring Educators]]></title>
            <link>https://medium.com/@Saman-Mahmood/top-50-interview-questions-and-answers-for-b-ed-students-and-aspiring-educators-04da45e5d021?source=rss-8a54d8542753------2</link>
            <guid isPermaLink="false">https://medium.com/p/04da45e5d021</guid>
            <category><![CDATA[education-technology]]></category>
            <category><![CDATA[teaching]]></category>
            <category><![CDATA[education]]></category>
            <dc:creator><![CDATA[Saman Mahmood]]></dc:creator>
            <pubDate>Fri, 20 Jun 2025 15:03:57 GMT</pubDate>
            <atom:updated>2025-06-20T15:03:57.922Z</atom:updated>
            <content:encoded><![CDATA[<p>Educational Perspective</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/512/1*L8lYGHlgo2F7fGPMVyYteQ.jpeg" /></figure><ol><li><strong>Q:</strong> <strong>What is the purpose of pursuing a B.Ed program?</strong><br> To gain professional training in teaching, classroom management, and educational psychology for becoming an effective educator.</li><li><strong>Q:</strong> <strong>What subjects did you study during your B.Ed?</strong><br> Educational Psychology, Pedagogy of [Subject], Educational Technology, Teaching Methodology, and Curriculum Development.</li><li><strong>Q: Why did you choose teaching as a profession?</strong><br> I believe education is the foundation of society, and I am passionate about shaping young minds.</li><li><strong>Q: What is pedagogy?</strong><br> Pedagogy is the art and science of teaching, including strategies, methods, and understanding how students learn.</li><li><strong>Q: What is your teaching philosophy?</strong><br> I believe in student-centered learning that encourages critical thinking, creativity, and active participation.</li><li><strong>Q: What are the qualities of a good teacher?</strong><br>Patience, empathy, subject knowledge, communication skills, and adaptability.</li><li><strong>Q: How do you handle classroom discipline?</strong><br>By setting clear rules, being consistent, and encouraging positive behavior through motivation.</li><li><strong>Q: What is Bloom’s Taxonomy?</strong><br> A classification of learning objectives into six levels: Remember, Understand, Apply, Analyze, Evaluate, and Create.</li><li><strong>Q: What do you understand by continuous and comprehensive evaluation (CCE)?</strong><br> It’s an assessment system focusing on both scholastic and co-scholastic areas regularly and comprehensively.</li><li><strong>Q: What is the role of ICT in education?</strong> <strong>A:</strong> ICT enhances learning through digital tools, multimedia, and internet resources, making teaching interactive.</li><li><strong>Q: What are your strengths as a teacher?</strong><br> Strong communication, empathy, creativity, and a commitment to student development.</li><li><strong>Q: What is lesson planning and why is it important?</strong><br> Lesson planning organizes the teaching process and ensures learning objectives are met efficiently.</li><li><strong>Q: How do you engage students in a classroom?</strong><br> Through interactive activities, discussions, group work, and real-life examples.</li><li><strong>Q: What is inclusive education?</strong><br> Inclusive education ensures that all students, regardless of ability or background, learn together in the same classroom.</li><li><strong>Q: How do you handle underperforming students?</strong><br> By identifying their learning gaps, providing extra support, and motivating them positively.</li><li><strong>Q: What is a teaching aid?</strong><br> Any material like charts, models, or digital tools that help in teaching concepts more effectively.</li><li><strong>Q: What is the difference between formative and summative assessment?</strong><br> Formative assessment is ongoing and helps improve learning; summative is end-of-term evaluation.</li><li><strong>Q: What is micro-teaching?</strong><br> A teacher training technique where a lesson is taught in a simplified form to improve teaching skills.</li><li><strong>Q: How would you handle a student with a learning disability?</strong><br> By using differentiated instruction, providing extra time, and working closely with parents and specialists.</li><li><strong>Q: How important is moral education in schools?</strong><br> It builds character, teaches ethics, and shapes responsible citizens.</li><li><strong>Q: What is constructivism in education?</strong><br> A theory where learners build their own understanding through experiences and reflection.</li><li><strong>Q: What challenges do teachers face today?</strong><br> Large class sizes, diverse learners, limited resources, and adapting to technology.</li><li><strong>Q: What are co-curricular activities?</strong><br> Activities like sports, music, drama, and clubs that support overall student development.</li><li><strong>Q: What is reflective teaching?</strong><br> Teachers evaluating their own teaching practices to improve and grow professionally.</li><li><strong>Q: How do you handle criticism as a teacher?</strong><br> I see it as an opportunity for growth and try to learn from constructive feedback.</li><li><strong>Q: What is child-centered education?</strong><br> An approach that considers the interests, needs, and abilities of the child as the focus of teaching.</li><li><strong>Q: What is the National Education Policy (NEP) 2020’s impact on teaching?</strong><br> It promotes multidisciplinary learning, digital education, and a focus on foundational literacy and numeracy.</li><li><strong>Q: How can teachers use social media in education?</strong><br> For sharing resources, collaborating with students, and staying updated with trends.</li><li><strong>Q: What are your future goals as a teacher?</strong><br> To continue learning, enhance my teaching methods, and contribute to educational reform.</li><li><strong>Q: What are the major responsibilities of a teacher?</strong><br> Teaching, planning lessons, assessing student performance, classroom management, and mentoring.</li><li><strong>Q: How would you use group activities in your class?</strong><br> To encourage teamwork, communication, and peer learning among students.</li><li><strong>Q: What is experiential learning?</strong><br> Learning through experience and reflection rather than passive listening.</li><li><strong>Q: Why is teacher training important?</strong><br> It equips teachers with new skills, methods, and knowledge for effective teaching.</li><li><strong>Q: What is your opinion on homework?</strong><br> It should be meaningful, limited, and support the learning done in class.</li><li><strong>Q: How do you assess student learning?</strong><br> Through quizzes, assignments, observations, and classroom participation.</li><li><strong>Q: What are soft skills and why are they important in teaching?</strong><br> Skills like communication, empathy, teamwork, and time management help create a positive learning environment.</li><li><strong>Q: How do you manage your time effectively?</strong><br> By prioritizing tasks, setting daily goals, and using planners.</li><li><strong>Q: What is your favorite teaching method?</strong><br> Activity-based learning as it keeps students engaged and active in their learning process.</li><li><strong>Q: How do you keep your knowledge updated?</strong><br> By reading educational journals, attending workshops, and taking online courses.</li><li><strong>Q: What is the role of a teacher in nation-building?</strong><br> Teachers shape future citizens by imparting knowledge, values, and discipline.</li><li><strong>Q: How can a teacher support emotional development in students?</strong><br> By listening, showing empathy, and creating a safe and supportive classroom.</li><li><strong>Q: What do you understand by classroom diversity?</strong><br> The presence of students from varied backgrounds, cultures, abilities, and learning needs.</li><li><strong>Q: What is educational psychology?</strong><br> The study of how students learn and how teaching can be made more effective.</li><li><strong>Q: What strategies do you use for slow learners?</strong><br> One-on-one support, visual aids, simplified content, and regular revision.</li><li><strong>Q: How do you motivate students?</strong><br> By recognizing their efforts, making lessons interesting, and setting achievable goals.</li><li><strong>Q: What is curriculum development?</strong><br> The process of designing, organizing, and reviewing educational content and learning outcomes.</li><li><strong>Q: How do you evaluate your teaching effectiveness?</strong><br> Through student feedback, self-reflection, and learning outcomes.</li><li><strong>Q: What is the role of parental involvement in education?</strong><br> It improves student performance, behavior, and school attendance.</li><li><strong>Q: How do you handle stress in your teaching job?</strong><br>Through proper planning, staying positive, and maintaining a work-life balance.</li><li><strong>Q: What do you hope to contribute to the teaching profession?</strong><br> Innovative methods, a passion for lifelong learning, and commitment to student success.</li></ol><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=04da45e5d021" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering AWS: A Complete Introduction to Amazon Web Services and Its Core Components]]></title>
            <link>https://medium.com/@Saman-Mahmood/mastering-aws-a-complete-introduction-to-amazon-web-services-and-its-core-components-9e3c6df575cd?source=rss-8a54d8542753------2</link>
            <guid isPermaLink="false">https://medium.com/p/9e3c6df575cd</guid>
            <category><![CDATA[aws]]></category>
            <category><![CDATA[cloud-computing]]></category>
            <category><![CDATA[aws-cost-optimization]]></category>
            <category><![CDATA[aws-ec2]]></category>
            <category><![CDATA[aws-s3]]></category>
            <dc:creator><![CDATA[Saman Mahmood]]></dc:creator>
            <pubDate>Sat, 17 May 2025 04:39:04 GMT</pubDate>
            <atom:updated>2025-05-17T04:39:04.672Z</atom:updated>
            <content:encoded><![CDATA[<h3>AWS (Amazon Web Services)</h3><p>Amazon Web Services (AWS) is a cloud computing platform provided by Amazon that offers a wide range of services like servers, storage, databases, networking, software, and analytics through the internet. It allows users to access and manage these resources on a pay-as-you-go basis, without the need to buy or maintain physical hardware. AWS helps individuals, startups, and large companies build and run applications easily with high availability, scalability, and security. It is widely used because of its flexibility, cost-effectiveness, and global infrastructure.</p><h3>Real-Life Example:</h3><p>Imagine you&#39;re launching a mobile app:</p><p>You can host the backend on AWS EC2 (virtual server).</p><p>Store images and videos in S3 (Simple Storage Service).</p><p>Use RDS (Relational Database Service) to manage your data.</p><p>Enable fast content delivery through CloudFront (CDN).</p><p>All this can be done within minutes without buying any hardware.</p><h3>Key Features:</h3><p>Pay-as-you-go pricing model – you only pay for what you use.</p><p>Scalable – you can quickly increase or decrease resources based on need.</p><p>Secure and reliable – backed by Amazon&#39;s global infrastructure.</p><p>Global reach – available in multiple regions around the world.</p><h3>Availability Zones</h3><p>Availability Zones (AZs) in AWS are physically separate and isolated data centers within an AWS Region. Each region has multiple AZs, and they are designed to offer high availability, fault tolerance, and scalability.</p><p>AZs are connected through low-latency, high-speed links, so applications can be easily set up across multiple AZs to ensure continuity during hardware failures, power outages, or natural disasters.</p><p><strong>Example:</strong> The Asia Pacific (Mumbai) region has AZs like ap-south-1a, ap-south-1b, etc. You can run your app in both AZs—if one goes down, the other keeps your services running smoothly.</p><p>In simple terms, AZs help protect your applications from data center failures, making AWS more reliable and secure.</p><h3>Edge location</h3><p>Edge Locations in AWS are special data centers used to deliver content to users faster by placing it closer to where the users are located. They are mainly used by AWS services like Amazon CloudFront (Content Delivery Network) to cache copies of data such as images, videos, web pages, and other files.</p><p>Instead of sending every request to a central server or region, AWS uses edge locations to respond quickly with local copies, reducing delay (latency) and improving performance.</p><p>Example: If your website is hosted in the US and a user visits it from India, an edge location in India will serve cached content to that user much faster than loading it from the US.</p><p>In simple terms, edge locations help AWS deliver content quickly and efficiently across the globe.</p><p><strong>AWS Management Console</strong></p><p>The AWS Management Console is a web-based graphical interface that allows users to easily manage and monitor AWS services. It is user-friendly, especially for beginners, as it provides dashboards, buttons, and forms to launch and configure services like EC2, S3, Lambda, and more.</p><p>Example:<br>You can log in to the console, select EC2, and launch a virtual machine by filling in a few details and clicking &quot;Launch&quot;.</p><p><strong>AWS CLI (Command Line Interface)</strong></p><p>The AWS CLI is a text-based tool that allows users to interact with AWS services by typing commands in a terminal or command prompt. It is useful for automating tasks, running scripts, and managing AWS resources without using the web interface. Developers and system administrators prefer the CLI for faster and repeatable tasks like launching servers, managing S3 buckets, or configuring services.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9e3c6df575cd" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>