<?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 Rameenkashif on Medium]]></title>
        <description><![CDATA[Stories by Rameenkashif on Medium]]></description>
        <link>https://medium.com/@rameenkashif243?source=rss-8ab4704e6486------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*QMrTJ_TAHlYD3wXB</url>
            <title>Stories by Rameenkashif on Medium</title>
            <link>https://medium.com/@rameenkashif243?source=rss-8ab4704e6486------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 22:22:57 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@rameenkashif243/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[The Things We Learn From Errors That Tutorials Never Teach]]></title>
            <link>https://medium.com/@rameenkashif243/the-things-we-learn-from-errors-that-tutorials-never-teach-fa7fccd8dc3e?source=rss-8ab4704e6486------2</link>
            <guid isPermaLink="false">https://medium.com/p/fa7fccd8dc3e</guid>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[debugging]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[software-development]]></category>
            <dc:creator><![CDATA[Rameenkashif]]></dc:creator>
            <pubDate>Thu, 03 Sep 2026 16:09:31 GMT</pubDate>
            <atom:updated>2026-09-03T16:09:31.013Z</atom:updated>
            <content:encoded><![CDATA[<p>Some of the most useful programming lessons come from the problems we face when our code does not work.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/811/1*X_T8sSmZbZM8E43lDqlkeg.png" /><figcaption>Errors can be frustrating, but they are also part of learning programming.</figcaption></figure><blockquote>When we start learning programming, most tutorials show us the correct way to write code. We follow the steps, run the program, and usually get the expected output. Everything seems straightforward.</blockquote><p>Real programming, however, is often very different.</p><p>Sometimes a small mistake can stop an entire program. Sometimes a library refuses to install, or code that works perfectly on one computer gives an error on another. There are also situations where a program runs without showing any error, but the result is still wrong.</p><p>I have faced many of these situations while working on different projects, and they have changed the way I think about programming. I have started to realize that errors are not simply problems that need to disappear. They can also show us how our code works, where our understanding is incomplete, and what we need to improve.</p><h3>When the Code Looks Correct but Still Does Not Work</h3><p>One of the most frustrating things about programming is when you look at your code and cannot immediately see what is wrong.</p><p>For example, imagine creating a variable called name and then accidentally using nam somewhere else. It is only one missing letter, but Python does not know that you meant the same thing.</p><pre>name = &quot;Rameen&quot;<br>print(nam)</pre><p>Python will produce a NameError because nam was never defined.</p><p>The mistake is small, but the important part is learning how to find it. Instead of randomly changing different parts of the program, we can read the error and check what Python is actually complaining about.</p><p>This is one of the first things debugging teaches us: <strong>small details matter in programming</strong>.</p><h3>Understanding What an Error Is Telling You</h3><p>An error message can look confusing, especially when it contains several lines. But it usually gives us useful information.</p><p>Consider a simple example where a program tries to divide a number by zero. Python might show something like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/726/1*gcbNgOYZN7F9rkLax4ftGQ.png" /></figure><p>We do not necessarily need to understand every word immediately. We can start from the bottom.</p><p>ZeroDivisionError tells us the type of problem. The message after it explains that the program tried to divide by zero. The traceback also tells us the file and line where Python found the problem.</p><p>Learning to read errors this way makes debugging much less intimidating.</p><p>Instead of seeing an error message as a wall of technical text, we can treat it as a set of clues.</p><h3>Not Every Problem Produces an Error</h3><p>One thing that took me some time to understand is that a program can run successfully and still be wrong.</p><p>These are often called <strong>logical errors</strong>.</p><p>For example, imagine writing a grading program. If the condition is incorrect, Python may happily run the program even though the result is not what we intended.</p><pre>marks = 80</pre><pre>if marks &gt; 90:<br>    print (&quot;A Grade&quot;)<br>else:<br>    print (&quot;Fail&quot;)</pre><p>There is nothing here that Python cannot understand, so no error message appears. But the logic may not match the grading system we wanted.</p><p>This is why testing is so important. We cannot always depend on Python to tell us when something is wrong.</p><p>Sometimes we have to look at the output ourselves and ask whether it actually makes sense.</p><h3>Fixing an Error Is Not the Same as Understanding It</h3><p>When we find an error, our first goal is usually to make the program run again. That is understandable, especially when we have a deadline.</p><p>But simply removing the error does not always mean that we have solved the real problem.</p><p>Suppose a program is trying to divide a number by zero. We could change the value just to stop the error, but that might change the purpose of the program.</p><p>A better approach is to understand why zero was possible in the first place and decide how the program should handle that situation.</p><p>For example, we can check the value before performing the calculation:</p><pre>if y != 0:<br>    print(x / y)<br>else:<br>    print(&quot;Cannot divide by zero&quot;)</pre><p>The important lesson here is not the if statement itself. It is the habit of asking <strong>why the problem happened</strong> and <strong>how the program should properly handle it</strong>.</p><h3>When Libraries Become Part of the Problem</h3><p>Programming projects often use libraries because we do not have to build everything from scratch.</p><p>For example, a computer vision project might use OpenCV, while a machine learning project might require TensorFlow or another framework.</p><p>But using libraries also means dealing with dependencies.If a required library is not installed, we may see an error such as:</p><pre>ModuleNotFoundError: No module named &#39;cv2&#39;</pre><p>The solution may simply be to install the required package. But sometimes the situation is more complicated. A package might not support the Python version being used, or two packages may require different versions of the same dependency.</p><p>This is one area where programming becomes different from what we usually see in basic tutorials.</p><p>Writing the code is only part of making a project work. The environment in which that code runs also matters.</p><h3>When the Same Code Works on One Computer but Not Another</h3><p>This is a problem many students experience when sharing projects.</p><p>You send your project to someone else, and they open it expecting everything to work. Instead, they get errors.</p><p>The first reaction can be:</p><p><strong>“But it works on my computer.”</strong></p><p>The code may actually be fine. The difference could be the environment.</p><p>One computer might have all the required packages installed, while the other might be missing some of them. The Python versions could also be different, or the project might depend on a particular configuration.</p><p>This is why project dependencies should be documented.</p><p>For Python projects, a requirements.txt file is one simple way to list the packages a project needs. Someone else can then install those dependencies rather than trying to guess what is missing.</p><p>This taught me that making a project is not only about getting it to work on my own computer. It is also about making the setup understandable for someone else.</p><h3>Searching for Errors Online Is Part of Programming</h3><p>There is nothing wrong with searching for an error online.</p><p>In fact, developers do it all the time. Documentation, forums, tutorials, and community discussions can save a lot of time.</p><p>The problem is when we copy a solution without understanding it.</p><p>Sometimes we find a one-line fix, add it to our code, and the error disappears. It feels great because the problem is gone.</p><p>But if we do not understand why that solution worked, we may face the same problem again later.</p><p>I think there is a useful balance here. We do not need to understand every technical detail before using an online solution. But we should at least try to understand what the solution changed and why it was necessary.</p><p>That small effort turns a quick fix into actual learning.</p><h3>Debugging Is Often About Asking Better Questions</h3><p>When something does not work, it is easy to keep asking:</p><p><strong>“What should I change?”</strong></p><p>But a better question can be:</p><p><strong>“What is actually happening?”</strong></p><p>For example, if a calculation produces an unexpected result, instead of changing random lines, we can check the values being used.</p><p>A simple print() statement can sometimes help:</p><pre>price = 500<br>quantity = 3<br>total = price * quantity<br><br>print(price)<br>print(quantity)<br>print(total)</pre><p>This is a very basic technique, but it can help us find where our assumptions are wrong.</p><p>Maybe the price is not what we expected. Maybe the quantity is coming from the wrong place. Maybe the calculation itself is fine, but the input is incorrect.</p><p>Debugging often becomes easier when we stop guessing and start checking.</p><h3>Big Problems Become Easier When We Break Them Down</h3><p>Large projects can make debugging especially difficult because many things are connected.</p><p>If a complete application is not working, checking the entire project at once can become overwhelming.</p><p>Instead, we can test smaller parts separately.</p><p>For example, if a project has image upload, image processing, prediction, and result display features, we do not necessarily need to test everything together. We can first check whether the image is being uploaded correctly. Then check whether it is being processed correctly. After that, we can test the prediction part.</p><p>This approach helps us narrow down the problem.</p><p>I have found that debugging becomes much easier when a large problem is turned into several smaller questions.</p><h3>Sometimes, Fixing One Problem Creates Another</h3><p>Another thing tutorials don’t always prepare us for is the fact that sometimes, fixing one problem can create another.</p><p>This is especially true for things like packages or other relatively large-scale projects</p><p>For example, if you change a version of a package, it may fix some issues but introduce others relating to its functions. The same issue occurs when making changes to individual projects; if you make a change to one function, it can affect the ways you have to write another.</p><p>This is why it’s important to change one thing at a time and test it, as opposed to making multiple changes and having to figure out which one introduced a bug later.</p><p>It might seem counterintuitive — working in such a way seems like it will make you spend more time working — but it will actually save you time in the long run.</p><h3>Debugging Can Take Longer Than Writing the Code</h3><p>When we begin working on a project, we think about what functions we need to perform.</p><p>We can plan approximately how long it will take to write down the code, but we significantly underestimate the time required for debugging and testing the program.</p><p>A working function that we thought would take an hour to write may end up taking us several hours to debug.</p><p>It can be disheartening, and we may think that we are bad at programming.</p><p>I have begun to think of debugging and testing as an integral part of programming.</p><p>Debugging is no different from writing code.</p><p>The more complicated the project is, the more possible places there are for bugs, and the more time we have to spend locating, fixing, and retesting them.</p><h3>Sometimes You Need to Step Away from the Code</h3><p>There are also times when the issue is not that we don’t know something. We’re just tired.</p><p>After staring at the same set of code for too long, we start to think along the same path and can’t see any other options.</p><p>Taking a break can help us see it with fresh eyes</p><p>I’ve been in situations where a bug seemed to be really persistent and after spending hours trying to figure it out, I took a break and came back to it and it was apparent what the fix was. A break isn’t always giving up, sometimes it’s actually part of the debugging process.</p><h3>Errors Made me Change my Attitude Towards Learning Programming</h3><p>Errors taught me that programming is not about writing perfect code on the first try but rather trial and error.</p><p>I realized that I need to be more careful about the environment where I execute my code because sometimes different versions of Python, packages, file paths, dependencies, or even different computers can cause errors.</p><p>Most importantly, I have become much more resilient to errors because now I know that every time something goes wrong, there is always a reason why it happens so instead of immediately thinking that I am incapable of solving this particular task, I try to analyze what went wrong and find solutions until it works.</p><p>This last thing probably changed my attitude towards learning programming for good!</p><h3>Final Thoughts</h3><p>Tutorials teach us what programming should be, while errors illustrate how programming really is.</p><p>They teach us to read error messages, challenge our assumptions, gain awareness of our environment, test our programs, seek assistance, and, most importantly, ask why.</p><p>I still get frustrated when an error refuses to disappear, but I no longer associate errors with something always being wrong.</p><p>An error could be just another opportunity to learn something new about the code.</p><p>The problem that takes hours to solve today, maybe even the one we are seeking help for, will become second nature to us tomorrow. And, we will be able to fix it in a matter of seconds.</p><p><strong>Sometimes, the best programming lessons are hidden inside the errors we wish we had never seen.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=fa7fccd8dc3e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why We Sometimes Stop Learning Even When We Want To]]></title>
            <link>https://medium.com/@rameenkashif243/why-we-sometimes-stop-learning-even-when-we-want-to-e1b358fe9342?source=rss-8ab4704e6486------2</link>
            <guid isPermaLink="false">https://medium.com/p/e1b358fe9342</guid>
            <category><![CDATA[learning]]></category>
            <category><![CDATA[study]]></category>
            <category><![CDATA[education]]></category>
            <category><![CDATA[personal-development]]></category>
            <category><![CDATA[productivity]]></category>
            <dc:creator><![CDATA[Rameenkashif]]></dc:creator>
            <pubDate>Sun, 16 Aug 2026 17:07:04 GMT</pubDate>
            <atom:updated>2026-08-16T17:07:04.390Z</atom:updated>
            <content:encoded><![CDATA[<p><em>Wanting to learn something and actually making time for it are two very different things.</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1wEzudvrzZnuyVZKWKVIOg.png" /></figure><p>There are always things we want to learn.</p><p>As a Computer Science student, I often come across something that makes me think, “I should learn this.” It could be a programming concept, a new technology, a tool, or simply something I have heard about but never explored properly.</p><p>At that moment, learning feels exciting.</p><p>I might save a tutorial, watch a few videos, read an article, or make a plan to start learning it. But after some time, university work gets busy, another task comes up, or I simply lose the motivation I had at the beginning.</p><p>Then the learning gets postponed.</p><p>And sometimes, postponed again.</p><p>The interesting thing is that the desire to learn does not completely disappear. I still want to learn the same thing. I just find it difficult to sit down and actually continue.</p><p>I think this is something many students experience, especially when there are already so many things competing for their attention.</p><h3>Wanting to Learn Is Not Always Enough</h3><p>It’s one thing to say you want to learn something, but carving out the time to actually, do it? That’s a whole different ballgame.</p><p>With assignments, quizzes, projects, presentations, university work, and a million other responsibilities on your plate, personal learning can easily slip down the priority list.</p><p>You might convince yourself that you’ll hit the books once you wrap up one task.</p><p>But then, another task pops up.</p><p>Before you know it, the day has slipped away.</p><p>This doesn’t mean you’re lazy or that you don’t care about learning. Sometimes, life just throws too much at us all at once.</p><p>I’ve come to realize that motivation isn’t something we can rely on every single day.</p><p>Some days, you’re fired up and ready to learn for hours. Other days, just opening your laptop feels like climbing a mountain.</p><p>If we only learn when we’re feeling motivated, staying consistent can be a real challenge.</p><h3>There Is Always Something New to Learn</h3><p>One of the interesting and sometimes difficult things about Computer Science is how much there is to learn.</p><p>There are programming languages, frameworks, databases, Artificial</p><p>Intelligence, Machine Learning, web development, cybersecurity, cloud technologies, software development tools, and many other areas. You can start learning one thing and then discover three more things that seem interesting.</p><p>This can become overwhelming.</p><p>You may start with Python, then become interested in Machine Learning. While learning Machine Learning, you discover TensorFlow. Then you see something about web development and start thinking about Flask. After that, you come across another technology and want to explore that too.</p><p>Soon, you have a long list of things you want to learn but have not properly started any of them. I have started to realize that sometimes the problem is not a lack of interest. <strong>It is having too many interests at the same time.</strong></p><h3>Trying to Learn Everything Can Make Learning Harder</h3><p>When there are a lot of things you want to get, it’s possible to see that you are backward and give precedence to just one. You might think that during the time you are analyzing one creativity, the other person is already gaining new insight in a very high-tech way.</p><p>That idea may inspire a desire to alter your psyche. However, the constant switching over of the nay always leads to the growth of the trade. Sometimes it’s just a reversal to get back to the beginning.</p><p>I think it’s a great idea to select a specific area, pay adequate attention to it, and then go on with your life. You are conducting a seminar, one that isn’t used to teaching poetry and must learn everything at once. There will always be additional equipment for the following survey here at present.</p><h3>When Learning Becomes Difficult</h3><p>Another reason people stop learning is that the topic becomes harder than expected.</p><p>At the beginning, everything can seem interesting. You watch an introduction and understand the basic idea. Then you try to do something yourself and suddenly the topic feels completely different.</p><p>This happens a lot with programming. A concept may look easy when someone explains it in a tutorial, but when you try to write the code yourself, you may get errors or realize that you do not understand a particular part.</p><p>That can be discouraging. Sometimes the easiest reaction is to close the tutorial and move on to something else. But difficult moments are also part of learning.</p><p>Not understanding something immediately does not mean you cannot learn it. Sometimes you simply need another explanation, more practice, or more time.</p><h3>Forgetting What You Already Learned</h3><p>There is another problem that I think students can relate to: forgetting things.</p><p>You’re probably going to study the theory of scheduling, employ it in your business, and then not use it again for countless calendar months. When you finally need it again, you can remember that you’ve analyzed it, but you don’t remember exactly how to use it.</p><p>That’s something that could exist thwart. You may feel that the time you spend learning knowledge has been a waste.</p><p>Even though I’m doing it, I never think that’s the truth. If you’ve forgotten something, you can look at it again. In view of the fact that you’ve already seen the notion before, the next interval of time may indeed exist easily.</p><p>Acquiring knowledge isn’t always about remembering everything permanently and thus analyzing it once. Sometimes it’s about the knowledge of construction and the ability to come back to the idea when you ask for it.</p><h3>Taking a Break Does Not Mean Giving Up</h3><p>There can also be times when you genuinely need a break.</p><p>An institution can turn into a drain. Here’s an era when you’re mostly working and investing your time in this. It couldn’t be realistic to spend countless extra hours studying something just for yourself during those epochs.</p><p>It is not necessarily a bad thing to catch a fire in identical circumstances. The roadblock comes when a compact fracture turns into a complete abandonment.</p><p>You might stop learning for a week and then realize that you’ve already lost an enormous amount of time, so there won’t be any pinnacle for you to climb back up. But tomorrow’s always a peak when it comes to getting down again.</p><p>You’re never going to be able to go on from where you plan on being. All you’ve got to do is get back to where you started.</p><h3>Comparing Your Progress with Others</h3><p>I think comparison is another reason learning can become difficult.</p><p>We regularly witness the achievement of other citizens without regard to the project following them. A person may share that he has completed a course, built an enterprise, learned a new innovation or, alternatively, obtained a significant achievement.</p><p>It’s easy to look at it and think that we ought to stay on the same level. But the situation of each person is unique. A person may have gotten educated earlier, had more free time, or otherwise had a completely different way of acquiring knowledge.</p><p>comparing your entire trip to a person else’s accomplishments is always fair. Alternatively, ask, “Why am I not used in academic writing despite that? It would be useful to ask, “what immediately do I know that I make nay know prior to?</p><p>Even if the answer is small, it still means something has changed.</p><h3>Consistency Does Not Mean Doing Everything Every Day</h3><p>Consistency can sometimes sound like doing a large amount of work every single day. But I think consistency can be much simpler.</p><p>You might spend an hour learning one day. Another day, you may only have twenty minutes. On another day, university work may leave you with no time at all.</p><p>That does not automatically mean you have failed at being consistent. What matters is returning to the learning instead of abandoning it completely.</p><p>You can revise an old concept, solve one programming problem, read a few pages, watch a short lesson, or practice something you already know. Not every session has to produce a huge result.</p><p>Sometimes the purpose is simply to stay connected with what you are learning.</p><h3>We Sometimes Wait for the Perfect Time</h3><p>Another thing that can stop us from learning is waiting for the perfect time to begin.</p><p>We think, “I will start when my semester is less busy,” or “I will start after finishing my assignments.” Sometimes we tell ourselves that we will start when we have more free time or when we can finally follow a proper schedule.</p><p>Sometimes that perfect time never arrives.</p><p>There will always be another assignment, another project, or another responsibility. This does not mean that we should ignore our responsibilities. It simply means that learning does not always need a perfect schedule.</p><p>Sometimes you can start with a small amount of time. You do not need to finish an entire course in one week, and you do not need to understand everything in one sitting. You just need to begin somewhere.</p><h3>Learning Does Not Have to Become Another Source of Pressure</h3><p>As students, we already have enough things to deal with. There are courses, deadlines, presentations, exams, projects, and many other responsibilities. Because of this, learning something new should not always feel like another task that we have to complete immediately.</p><p>Sometimes it is okay to explore something simply because we are curious about it. We do not have to turn everything we learn into a project, and we do not have to become an expert in every topic that interests us. We also do not have to finish every course we start.</p><p>Sometimes, spending some time with a new topic is enough to understand whether it is something we actually want to continue learning. I think learning becomes much more enjoyable when we give ourselves the freedom to explore without putting too much pressure on ourselves.</p><h3>Starting Again Is Not Starting from Zero</h3><p>One idea I keep coming back to is that starting again does not mean starting from zero.</p><p>If you studied something before and then stopped, you still have that previous experience. Maybe you do not remember everything. Maybe you have to review the basics again. That is okay.</p><p>The second attempt is not exactly the same as the first because now you already know something about the topic. You know what confused you before, you know what you found difficult, and you may even know which learning method did not work for you.</p><p>That experience is still valuable.</p><h3>What I Am Trying to Do Differently</h3><p>I am still figuring out what works best for me. I do not have a perfect learning routine, and I do not think anyone needs to have one.</p><p>What I am trying to do is keep my expectations realistic. Instead of making a huge list of everything I want to learn, I can choose one thing and focus on it for a while.</p><p>Instead of feeling bad because I missed a few days, I can simply continue again. Instead of thinking that I have to understand everything immediately, I can give myself time to work through difficult topics.</p><p>And instead of comparing my progress with everyone else, I can look at my own progress.</p><p>These things may sound small, but they can make learning feel much less stressful.</p><h3>Final Thoughts</h3><p>I’m thinking, in particular, that we’ve got a moment when we really want to study, but we’re not able to stay in one place.</p><p>We’ve got a lot of work to do sometimes. Sometimes we’re not motivated enough. Sometimes the subject turns into a problem. Sometimes we’re too distracted by other things. And sometimes all we need is a shattering.</p><p>None of these things mean that learning has to stop permanently.</p><p>There’s no one’s perfect technique for learning here, and there’s no fixed timetable that everyone needs to follow. A number of citizens are moving swiftly, while different people are grabbing more time. A couple of them study something once and remember it easily, while other people need to revert to the same theory several times.</p><p>That is normal.</p><p>For me, the most important thing is not to try to learn everything at once or to force myself to be productive every single day. It’s about keeping the enthusiasm alive and the will to give it a shot when I leave.</p><p>Because sometimes progress is not about learning something new every day.</p><p>Sometimes, progress is simply deciding to start again.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e1b358fe9342" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Beyond the Classroom: What University Projects Really Teach]]></title>
            <link>https://medium.com/@rameenkashif243/beyond-the-classroom-what-university-projects-really-teach-6ef592c68bc1?source=rss-8ab4704e6486------2</link>
            <guid isPermaLink="false">https://medium.com/p/6ef592c68bc1</guid>
            <category><![CDATA[coding]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[education]]></category>
            <category><![CDATA[project-management]]></category>
            <category><![CDATA[learning]]></category>
            <dc:creator><![CDATA[Rameenkashif]]></dc:creator>
            <pubDate>Sun, 09 Aug 2026 13:20:22 GMT</pubDate>
            <atom:updated>2026-08-09T13:20:22.242Z</atom:updated>
            <content:encoded><![CDATA[<p>Some things become easier to understand when you actually have to build something yourself.</p><p><strong>Why university projects are important</strong></p><p>At university we tend to learn concepts by attending lectures and completing assignments. We learn how to program, about databases, algorithms and software development to name a few. When learning a new concept, it can feel like your end goal is to just understand what you were taught.</p><p>however, when you are actually given the responsibility to complete a project, you realize that understanding the concept is only step 1.</p><p>Throughout my BSCS experience I have been given the opportunity to work on many different types of university projects. From projects that required heavy programming, to projects that focused on research, documentation, presentations, and even Artificial Intelligence.</p><p>What I started to realize was that no matter the project, there was always something new to learn. Whether it be hard coding experience or troubleshooting to understand what could have possibly gone wrong. Sometimes the challenge didn’t come until after you finished coding when you had to research how to create the perfect report or slideshow.</p><p>University projects allow you to gain knowledge that you don’t always get from lectures.</p><h4><strong>1. You Don’t Always Know the Solution at the Start</strong></h4><p>When I first started working on projects, I often expected that I should understand everything before beginning.</p><p>But that doesn’t really happen.</p><p>Sometimes you know what you want to build, but you don’t know exactly how to build it. You search for information, read documentation, try something, get an error, change your approach and try again.</p><p>This became a normal part of working on projects for me.</p><p>I learned that not knowing the solution immediately doesn’t mean you cannot do the task. Sometimes you just need to give yourself enough time to understand the problem first.</p><h4><strong>2. Coding Is Only One Part of a Project</strong></h4><p>Before working on different university projects, I mostly focused on the coding part. Later, I realized that many other things are also involved in completing a project.</p><p>A project may require:</p><ul><li>Understanding the problem</li><li>Researching possible solutions</li><li>Writing and organizing the code</li><li>Testing different features</li><li>Fixing errors and debugging</li><li>Preparing project documentation</li><li>Creating the presentation</li><li>Explaining the project clearly</li></ul><p>For example, even after completing the coding, I still have to think about how to explain the project in the report and how to present its important parts.</p><p>This made me realize that completing a project is not simply about writing the code and submitting it. There is a lot of work happening around the actual coding.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0Qaa_dfP-GvLuXz8nUd1XQ.png" /><figcaption>A small look at the coding work behind a project.</figcaption></figure><h4>3. Errors Can Take More Time Than Expected</h4><p>This is probably one of the most relatable parts of working on a project. Sometimes you can spend a long time trying to understand an error that looks very small.</p><p>There have been situations where:</p><ul><li>A library did not install properly.</li><li>The program did not run even though the code looked correct.</li><li>The output was different from what I expected.</li><li>Something worked in one setup but created problems in another.</li><li>I had to search through different solutions before finding one that actually worked.</li></ul><p>At first, these things can be frustrating. But after dealing with them several times, I started taking errors differently. Instead of immediately thinking that something had gone completely wrong, I started checking the problem step by step.</p><p>Sometimes the solution was simple, and sometimes it took much longer.</p><p>That is also part of working on a project.</p><h4>4. Documentation Is an Important Part of a Project</h4><p>One of the things that I enjoy about participating in university projects is creating the documentation for those projects.</p><p>A project is not only about writing code. A report must also be prepared to describe the work completed within that project.</p><p>In this report, we can explain the details of the project, such as what the project is about, what problem it is trying to solve, what technologies were used in the project and how the project works.</p><p>In addition to writing the content of these reports, I also find myself enjoying the process of formatting these reports. This includes arranging the headings, inserting screenshots, arranging the content and ensuring that the reports appear clean and easy to read.</p><p>While I was working on the reports for the different projects I had been assigned, I started to appreciate how documentation of those projects helped me to understand my project better. The act of having to write down the details of a project forces one to understand the project itself.</p><p><strong>In my opinion, a good project report is not just a requirement of the project but also a proper record of the work that was done within the project.</strong></p><h4>5. Presentations Are Another Part of the Project</h4><p>After completing a project and documenting the steps that were followed in preparation for the documentation of the project, another important task will be to present the project to others as a way to share the project with others within the organization or with others outside of the organization.</p><p>I also enjoy making PowerPoint presentations for my projects.</p><p>I have to decide what information is important and how I can arrange it so that someone looking at the slides can understand the main idea of the project.</p><p>For example, I usually focus on things like:</p><p>What is the project about?<br>What problem does it solve?<br>Which technologies were used?<br>What are the main features?<br>How does the project work?<br>What problems were faced during development?</p><p>Adding too much information to a slide can make it difficult for your audience to understand your message. The best approach is to place the most important information onto the slides and discuss the remaining details during your presentation of those slides.</p><h4>6. Research Is Also Part of Project Work</h4><p>Research plays a crucial role in project work, and the amount needed can vary quite a bit from one project to another.</p><p>Before starting a project, it is often necessary to gather information, explore the topic, and look at different approaches. This helps us understand what might work best for our project.</p><p>For example, I worked on a research study about <a href="https://medium.com/@rameenkashif243/dead-code-elimination-in-modern-compilers-how-removing-unnecessary-code-leads-to-better-3d2e91372d60"><strong>[An Analysis of Dead Code Elimination Techniques in Modern Compilers for Resource Optimization].</strong> </a>While working on this topic, I first had to understand the concept properly before I could explain it in my research.</p><p>This experience taught me that project work isn’t just about jumping straight into coding. Sometimes, taking the time to understand the topic and conduct thorough research is the essential first step.</p><h4>7. Different Projects Teach Different Things</h4><p>Another thing I noticed during my BSCS journey is that every project is different.</p><p>My Compiler Construction project was different from my AI-related projects. One required understanding compiler concepts, while another involved Artificial Intelligence and different technical requirements.</p><p>Because of this, I cannot use exactly the same approach for every project.</p><p>Some projects require more coding. Some require more research. Others may require more time for documentation, testing, or presentation.</p><p>I think this is one of the useful things about university projects. They give us the opportunity to work on different types of problems and learn from each experience.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3B859aalo7eBtZikgyr0FA.png" /><figcaption>A project example from my university coursework.</figcaption></figure><h4>8. The Final Result Does Not Show Everything</h4><p>When someone sees a completed project, they usually see the final result.</p><p>They do not see all the things that happened before reaching that point.</p><p>They may not see the errors, the failed attempts, the time spent searching for solutions, or the changes made during development.</p><p>They also do not see the time spent preparing the documentation and presentation.</p><p>I have realized this while working on my own projects. A final screenshot or a working program may look easy, but there can be a lot of work behind it.</p><p>That is something I have started appreciating more with every project.</p><h4>What University Projects Have Taught Me</h4><p>I would not say that I know everything because of the projects I have completed. There is still a lot I want to learn, especially as I am preparing to enter the final year of my BSCS.</p><p>But projects have changed the way I approach my work.</p><p>I have learned that it is okay if I do not know the solution immediately. I can research the problem, try different approaches, make mistakes, and learn along the way.</p><p>I have also realized that programming is only one part of completing a project.</p><p><strong>Research, documentation, formatting, testing, debugging, and presenting the work are all part of the process.</strong></p><h4>Final Thoughts</h4><p>University projects can sometimes be challenging, but they can also be one of the most useful parts of a Computer Science degree.</p><p>Every project gives us a chance to take something we learned in class and actually use it.</p><p>For me, the biggest value of these projects is not just the final result.</p><p>It is everything that happens while getting there — the coding, the errors, the research, the documentation, the presentations, and all the small problems that have to be solved along the way.</p><p>As I prepare to enter my final year, I know I still have a lot to learn. But I also know that the projects I have worked on so far have given me a better idea of what it means to actually work on a Computer Science project.</p><p><strong>The classroom gives you the concepts. Projects give you the chance to work with them.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6ef592c68bc1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Dead Code Elimination in Modern Compilers: How Removing Unnecessary Code Leads to Better…]]></title>
            <link>https://medium.com/@rameenkashif243/dead-code-elimination-in-modern-compilers-how-removing-unnecessary-code-leads-to-better-3d2e91372d60?source=rss-8ab4704e6486------2</link>
            <guid isPermaLink="false">https://medium.com/p/3d2e91372d60</guid>
            <category><![CDATA[python-programming]]></category>
            <category><![CDATA[gcc-compilers]]></category>
            <category><![CDATA[compiler-design]]></category>
            <category><![CDATA[performance-optimization]]></category>
            <category><![CDATA[computer-science]]></category>
            <dc:creator><![CDATA[Rameenkashif]]></dc:creator>
            <pubDate>Wed, 29 Jul 2026 13:54:20 GMT</pubDate>
            <atom:updated>2026-07-29T13:54:20.001Z</atom:updated>
            <content:encoded><![CDATA[<h3>Dead Code Elimination in Modern Compilers: How Removing Unnecessary Code Leads to Better Performance</h3><p>How modern compiler optimization techniques improve software performance by identifying and removing unnecessary instructions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/990/1*CwGrkU0VRGO3M9T1gp5ykw.png" /></figure><h3>Why Compiler Optimization Matters (Introduction)</h3><p>Every software application begins with source code written to solve a specific problem. As development progresses, programmers continuously modify, debug, and improve their code. During this process, some instructions become unnecessary, certain calculations are no longer required, and some sections of code may never be executed. Although these instructions remain in the program, they no longer contribute to its final output and can negatively affect overall performance.</p><p>Modern compilers address this challenge through various optimization techniques that improve the quality of the generated machine code without changing the intended functionality of the program. These optimizations help reduce executable size, improve execution speed, and make better use of system resources.</p><p>Among the many optimization techniques used in compiler design, <strong>Dead Code Elimination (DCE)</strong> is one of the most effective. It identifies instructions that have no impact on the program’s output and removes them during compilation. This process results in cleaner, more efficient code while maintaining the original behavior of the application. As software systems continue to grow in complexity, optimization techniques like DCE have become increasingly important for improving performance and resource utilization. The significance of this optimization is particularly evident in modern compiler frameworks such as <strong>GCC</strong> and <strong>LLVM</strong>, which apply DCE as part of their optimization process.</p><p>Rather than focusing only on the theoretical concept of Dead Code Elimination, this article explores how modern compilers implement this optimization in practice. It examines the role of DCE in improving software performance, explains the different forms of dead code, and discusses how GCC and LLVM apply optimization techniques to produce smaller, faster, and more efficient executables. The discussion is based on an experimental analysis using different compiler optimization levels to evaluate their impact on execution time, executable size, and overall resource optimization.</p><h3>Understanding Dead Code</h3><p>Before exploring how modern compilers perform optimization, it is important to understand what <strong>dead code</strong> actually means.</p><p>Dead code refers to instructions that do not influence the final output of a program. Although these instructions remain part of the source code, they provide no practical benefit during execution. Modern compilers identify such instructions and remove them automatically, allowing the final executable to become more efficient.</p><p>Dead code generally appears in two different forms:</p><ul><li><strong>Unreachable Code</strong> — Sections of code that can never be executed because the program’s control flow never reaches them.</li></ul><blockquote>if (false) {<br> int x = 10; // Unreachable code<br> }</blockquote><ul><li><strong>Unused Computations</strong> — Calculations that are performed successfully, but their results are never used later in the program.</li></ul><p>Both forms unnecessarily increase executable size, consume processor resources, and make software more difficult to maintain. Eliminating these instructions not only improves execution efficiency but also contributes to better resource management, especially in systems where memory and processing power are limited.</p><blockquote><strong>For example:</strong></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/872/1*yOqJdZqYfLAPkyDLDmx6ZA.png" /></figure><p>In this example, the value assigned to <strong>b</strong> is never used after it is calculated. Since removing this computation does not affect the final output of the program, the compiler safely eliminates it during optimization. Although this example is simple, the same principle applies to much larger software projects where thousands of unnecessary instructions may exist.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/978/1*hxg_oUTIHbPZbjpLvzES1g.png" /><figcaption><strong>Figure 1. </strong><em>General workflow of the Dead Code Elimination process in modern compilers.</em></figcaption></figure><h3>Why Removing Dead Code Improves Performance</h3><p>The quality of software is measured not only by its functionality but also by its efficiency. A program that contains unnecessary instructions requires additional memory, occupies more storage space, and forces the processor to execute operations that have no effect on the final result. While these inefficiencies may seem insignificant in small applications, they become increasingly important in large-scale software systems where thousands of redundant instructions can negatively affect overall performance.</p><p>Dead Code Elimination addresses this problem by removing instructions that no longer contribute to program execution. The optimization process reduces executable size, minimizes memory consumption, and improves processor efficiency without changing the program’s intended behavior. This is one of the reasons why modern compiler frameworks such as GCC and LLVM include Dead Code Elimination as a standard optimization technique.</p><p>The benefits of Dead Code Elimination become even more significant in resource-constrained environments such as embedded systems, mobile applications, and IoT devices, where efficient memory utilization and faster execution are essential. By eliminating unnecessary instructions before execution begins, compilers help developers build software that is both faster and more resource - efficient.</p><h3><strong>Testing Dead Code Elimination in Modern Compilers</strong></h3><p>Understanding the concept of Dead Code Elimination is important, but evaluating its impact requires practical analysis. To examine how this optimization works in real compiler environments, an experimental study was carried out using two of the most widely used compiler frameworks: <strong>GNU Compiler Collection (GCC)</strong> and <strong>Low Level Virtual Machine (LLVM)</strong>.</p><p>Several C++ programs were prepared specifically for this analysis. Each program contained different forms of dead code, including unused variables, unreachable statements, redundant calculations, and unused functions. These examples made it possible to observe how both compilers identify and eliminate unnecessary instructions during the compilation process.</p><p>Instead of compiling the programs with a single configuration, different optimization levels were applied to understand how compiler behavior changes as optimization becomes more aggressive. The generated executables were then analyzed based on three important factors:</p><ul><li>Executable file size</li><li>Program execution time</li><li>Effectiveness of Dead Code Elimination</li></ul><p>This comparison provided a clear understanding of how optimization levels influence software performance and resource utilization.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/568/1*yBBSpYMWYyyFx6M5EOdBmw.png" /><figcaption><strong>Table 1. Optimization levels used during the experimental analysis.</strong></figcaption></figure><p>The optimization levels used throughout the research were <strong>-O0</strong>, <strong>-O1</strong>, <strong>-O2</strong>, and <strong>-O3</strong>. At the <strong>-O0</strong> level, almost no optimization is applied, allowing the program to retain unnecessary instructions. As the optimization level increases, the compiler performs more advanced analyses and removes redundant operations more effectively. Higher optimization levels are generally intended to improve execution speed and reduce executable size while preserving the program’s original behavior.</p><h3>Exploring Dead Code Elimination in GCC</h3><p>One of the primary objectives of this analysis was to understand how the <strong>GNU Compiler Collection (GCC)</strong> performs Dead Code Elimination under different optimization levels. GCC is one of the most widely used compiler frameworks and is known for its reliable optimization capabilities across various programming languages. During this research, GCC was evaluated to understand how effectively it removes dead code under different optimization settings.</p><p>When a program is compiled without optimization (<strong>-O0</strong>), GCC preserves almost every instruction from the source code. This includes unused variables, redundant calculations, and unreachable statements. As a result, the generated executable contains unnecessary instructions that increase both file size and execution time.</p><p>The behavior changes significantly when higher optimization levels are enabled. At <strong>-O2</strong> and <strong>-O3</strong>, GCC begins performing more advanced optimization passes, allowing it to detect and remove instructions that have no influence on the final output of the program. Unreachable code is discarded, unused variables are eliminated, and redundant computations are removed before the executable is generated.</p><p>This optimization process produces cleaner machine code while reducing executable size and improving execution speed. The experimental analysis showed that enabling higher optimization levels allows GCC to make better use of processor resources without affecting the original functionality of the application.</p><blockquote><strong>For example:</strong></blockquote><pre>gcc program.c -O2 -o program</pre><p>The -O2 option enables multiple optimization techniques, including Dead Code Elimination.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/956/1*xjxfaeQxc6_J5MvgqkcD4w.png" /><figcaption><strong>Figure 2. </strong>Experimental Results during the analysis</figcaption></figure><h3>How LLVM Handles Dead Code</h3><p>Alongside GCC, this analysis also examined <strong>LLVM (Low Level Virtual Machine)</strong>, a modern compiler framework recognized for its modular architecture and advanced optimization techniques.</p><p>LLVM performs Dead Code Elimination during its optimization passes using <strong>Static Single Assignment (SSA)</strong>–based analysis. This approach enables the compiler to identify unnecessary instructions more precisely and remove them before generating the final executable.</p><p>Similar to GCC, LLVM removes unreachable statements, unused variables, and redundant computations. However, the analysis indicates that LLVM applies these optimizations more aggressively at higher optimization levels, producing executables that are generally smaller and more efficient.</p><p>One of LLVM’s key strengths is its ability to combine multiple optimization passes throughout the compilation process. Instead of relying on a single optimization stage, LLVM continuously analyzes the Intermediate Representation (IR) and eliminates instructions that no longer contribute to the program’s behavior. This results in highly optimized machine code while maintaining the correctness of the original application.</p><h3>GCC vs LLVM: What the Results Reveal</h3><p>Understanding compiler optimization becomes more meaningful when theoretical concepts are supported by practical results. After compiling the sample programs with different optimization levels, the generated executables were evaluated based on the key metrics mentioned above.</p><p>The comparison clearly demonstrates that both compiler frameworks successfully removed unnecessary instructions when optimization was enabled. Programs compiled with <strong>-O0</strong> retained most of the redundant code, while those compiled with <strong>-O2</strong> and <strong>-O3</strong> produced significantly smaller executables and completed execution in less time.</p><p>Although both compilers showed noticeable improvements after optimization, <strong>LLVM consistently produced slightly smaller executable files and achieved faster execution compared to GCC</strong> at the same optimization levels. These findings indicate that <strong>LLVM applies more aggressive optimization strategies</strong> while maintaining the original behavior of the source program.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/814/1*T-t0mBhZuTHl_PZvbk4aAA.png" /><figcaption><strong>Table 2. </strong>Comparison of GCC and LLVM based on executable size, execution time, and Dead Code Elimination efficiency.</figcaption></figure><p>The results show that programs compiled without optimization (-O0) contain more unnecessary instructions and produce larger executables.</p><p>When optimization levels such as -O2 and -O3 are applied, both GCC and LLVM generate smaller and faster executables.</p><h3>Key Findings</h3><p>The experimental analysis clearly demonstrates that enabling compiler optimization has a significant impact on software performance. Programs compiled without optimization retained unnecessary instructions, resulting in larger executable files and longer execution times. As higher optimization levels were applied, both GCC and LLVM successfully identified and removed dead code, producing cleaner and more efficient executables.</p><p>One of the most noticeable observations was the reduction in executable file size. Removing redundant instructions allowed both compilers to generate smaller binaries, making applications easier to distribute and more suitable for environments where storage space is limited. At the same time, optimized executables required fewer processor cycles, leading to faster execution and improved overall performance.</p><p>Although both compiler frameworks showed excellent optimization capabilities, LLVM consistently demonstrated slightly better results throughout the analysis. At the <strong>-O3</strong> optimization level, LLVM generated the smallest executable files while also achieving the fastest execution time. These results suggest that LLVM’s optimization pipeline applies Dead Code Elimination more aggressively, allowing it to utilize system resources more efficiently than GCC under the tested conditions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/747/1*1YVB-wETMzkax8B_XtFDWw.png" /><figcaption><strong>Table 3.</strong> Overall comparison between GCC and LLVM based on execution time, executable size, optimization efficiency, and Dead Code Elimination performance.</figcaption></figure><h3>Execution Time Comparison</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/789/1*aB-O8Q4XzjeK-GKI9lla1Q.png" /><figcaption><strong>Figure 3: </strong><em>Comparison of execution time between GCC and LLVM under different optimization levels.</em></figcaption></figure><h3>What This Comparison Tells Us</h3><p>The comparison between GCC and LLVM highlights an important aspect of compiler optimization: <strong>the optimization level chosen during compilation can influence software performance just as much as the compiler itself</strong>.</p><p>The analysis showed that <strong>compiling without optimization leaves many unnecessary instructions inside the executable</strong>. As optimization levels increase, compilers become more effective at eliminating redundant code, simplifying program execution, and improving resource utilization.</p><p>While GCC delivered reliable and efficient optimization across all test cases, <strong>LLVM consistently produced slightly better results in terms of executable size, execution speed, and optimization efficiency</strong>. These findings indicate that <strong>LLVM provides a more aggressive optimization strategy, particularly when higher optimization levels such as -O3 are enabled</strong>.</p><p>However, <strong>both compiler frameworks proved highly effective at implementing Dead Code Elimination</strong> and significantly improving software performance compared to non-optimized compilation.</p><h3>Final Thoughts</h3><p>Compiler optimization often takes place behind the scenes, making it easy to overlook its importance during software development. However, this analysis demonstrates that optimization techniques such as <strong>Dead Code Elimination</strong> play a critical role in improving the efficiency of modern applications. By automatically removing instructions that no longer contribute to a program’s execution, compilers reduce executable size, lower memory consumption, and improve overall processing speed without requiring developers to modify the original source code.</p><p>The comparison between GCC and LLVM also shows that different compiler frameworks implement optimization in different ways. Although both compilers successfully eliminated unnecessary code and improved application performance, LLVM consistently achieved slightly better optimization results at higher optimization levels. This makes LLVM a strong choice for projects where execution speed and resource efficiency are major priorities.</p><p>As software systems continue to become larger and more complex, compiler optimizations will remain essential for delivering high-performance applications. Understanding techniques such as Dead Code Elimination not only helps developers appreciate what happens during compilation but also encourages them to write cleaner, more efficient code that allows modern compilers to perform at their best.</p><h3>References</h3><ol><li><a href="https://www.geeksforgeeks.org/compiler-design/code-optimization-in-compiler-design/">Code Optimization in Compiler Design — GeeksforGeeks</a></li><li><a href="https://gcc.gnu.org/onlinedocs/gcc-14.3.0/gcc/">Top (Using the GNU Compiler Collection (GCC))</a></li><li><a href="https://www.researchgate.net/publication/373551502_JavaScript_Dead_Code_Identification_Elimination_and_Empirical_Assessment">(PDF) JavaScript Dead Code Identification, Elimination, and Empirical Assessment</a></li><li><a href="https://llvm.org/docs/Passes.html#dce-dead-code-elimination">LLVM’s Analysis and Transform Passes — LLVM 23.0.0git documentation</a></li><li><a href="https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html">Optimize Options (Using the GNU Compiler Collection (GCC))</a></li><li><a href="https://en.wikipedia.org/wiki/Dead-code_elimination">Dead-code elimination — Wikipedia</a></li><li><a href="https://www.sciencedirect.com/topics/computer-science/dead-code-elimination">Dead-Code Elimination — an overview | ScienceDirect Topics</a></li></ol><h3><strong>Thanks for reading!</strong> 💬</h3><p><em>Which compiler do you usually prefer for your projects — GCC or LLVM? Let me know your thoughts or questions in the comments below!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3d2e91372d60" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[5 Lessons I Learned Before Entering My Final Year in BSCS]]></title>
            <link>https://medium.com/@rameenkashif243/5-lessons-i-learned-before-entering-my-final-year-in-bscs-da94d8032318?source=rss-8ab4704e6486------2</link>
            <guid isPermaLink="false">https://medium.com/p/da94d8032318</guid>
            <category><![CDATA[student-life]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[education]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[learning]]></category>
            <dc:creator><![CDATA[Rameenkashif]]></dc:creator>
            <pubDate>Fri, 17 Jul 2026 13:30:03 GMT</pubDate>
            <atom:updated>2026-07-17T13:30:03.253Z</atom:updated>
            <content:encoded><![CDATA[<p>The lessons that changed the way I learn, build projects, and prepare for my future in Computer Science.</p><h3>Introduction</h3><p>When I first started my BSCS journey, I believed that getting good grades was the most important goal. However, after completing several semesters, I realized that Computer Science is much more than passing exams.</p><p>Every semester introduced new subjects, new challenges, and new opportunities to grow. Some lessons came from classrooms, while others came from project deadlines, programming errors, teamwork, and hours spent debugging code.</p><p>Now, as I prepare to enter my final year, I want to share five lessons that have had the biggest impact on my learning journey. I hope these lessons help other students who are just beginning their Computer Science studies.</p><h4>1. Consistency Is More Important Than Motivation</h4><p>When I started learning programming, I often waited until I felt motivated to practice. Unfortunately, motivation doesn’t always last.</p><p>Over time, I discovered that consistency matters much more than motivation. Even spending one hour each day practicing Python, solving problems, or reading about new technologies helped me improve far more than studying for long hours only before exams.</p><p>Programming is a practical skill. The more regularly you practice, the more confident you become.</p><p>One lesson I learned is that progress doesn’t happen overnight — it happens through small, consistent efforts.</p><h4>2. Documentation Is an Underrated Skill</h4><p>In the beginning, I thought documentation was just another university requirement. I focused only on writing code and completing projects.</p><p>Later, I realized that documentation is an important part of software development.</p><p>Preparing project reports, writing clear explanations, organizing files, and presenting technical information professionally helped me communicate my work more effectively.</p><p>Good documentation also makes it easier to understand your own project months later.</p><p>Today, I enjoy creating well-formatted reports and organizing project documentation because I know these skills are valuable in both academic and professional environments.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*WEgXJEbtvjUc6G3VGWD1uA.png" /><figcaption>Good documentation makes every project more organized and professional.</figcaption></figure><h4>3. The Reality of Teamwork in University Projects</h4><p>Many university projects require students to work in teams, and at first, I thought teamwork would make projects easier. However, my experience was different.</p><p>In some group projects, I noticed that not everyone contributed equally. Sometimes, when I asked teammates to work on a task carefully, they completed it very quickly without paying attention to quality or details. As a result, I often had to review, correct, or even redo parts of the work to meet the expected standard.</p><p>This experience taught me that teamwork is not simply about dividing tasks. It only works well when every member is responsible, communicates clearly, and is willing to put in the same level of effort.</p><p>Personally, I enjoy working independently because I like to think carefully, focus on details, and make sure the final result is well organized. I feel that when a skilled and motivated person has the right guidance, they can often complete a project more efficiently and maintain consistent quality.</p><p>At the same time, I also understand that professional software development usually involves working with teams. Because of this, I continue to improve my communication and collaboration skills while also appreciating the value of independent work.</p><p>This experience taught me that successful teamwork depends on responsibility, communication, and equal effort from every team member. When these qualities are present, teamwork becomes one of the greatest strengths of any project.</p><h4>4. Projects Teach More Than Theory</h4><p>One of the biggest changes in my learning happened when I started building projects.</p><p>Reading about Artificial Intelligence, Python, or databases helped me understand the concepts, but building projects helped me understand how everything works together.</p><p>Every project introduced new challenges that tested both my patience and problem-solving skills. Some of the challenges I faced were:</p><ul><li>Spending hours debugging errors.</li><li>Installing Python libraries and fixing compatibility issues.</li><li>Getting unexpected results during testing.</li><li>Learning new technologies from documentation.</li><li>Improving the project through repeated testing and debugging.</li></ul><p>Although these situations were frustrating, each challenge taught me something new and helped me improve my problem-solving skills. Projects transformed theoretical knowledge into practical skills and increased my confidence as a Computer Science student.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*0VUW4o6vec5QR7g_PvZfQQ.png" /><figcaption>This project reflects my learning experience in Compiler Construction through practical implementation.</figcaption></figure><h4>5. Time Management Is a Skill Every Student Needs</h4><p>Managing time is one of the biggest challenges for Computer Science students. Balancing lectures, assignments, quizzes, presentations, projects, and personal learning can quickly become overwhelming, especially when multiple deadlines arrive at the same time.</p><p>Technical projects often take longer than expected. A small coding error, debugging session, or unexpected issue can consume hours, making it difficult to stay on schedule.</p><p>One effective approach is to divide large tasks into smaller, manageable goals instead of trying to complete everything at once. Setting priorities and working consistently can reduce stress and improve productivity.</p><p>Time management is not about being busy every moment of the day. It is about making thoughtful decisions, focusing on what matters most, and maintaining steady progress throughout the semester.</p><h4>Looking Back</h4><p>As I prepare to enter my final year of BSCS, I realize that every semester has contributed to my personal and academic growth. Looking back, these are some of the most valuable lessons I have gained:</p><ul><li>Every challenge became an opportunity to learn something new.</li><li>Every project helped me gain practical experience and a better understanding of Computer Science concepts.</li><li>Every mistake encouraged me to think more carefully and improve my approach.</li><li>Every semester introduced new skills, experiences, and responsibilities.</li><li>Most importantly, I learned that growth comes through continuous learning, patience, and persistence.</li></ul><p>Although I still have a lot to learn, I look forward to exploring new technologies, building more projects, and continuing my learning journey in the final year of my BSCS degree.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1008/1*9xW5l7VYf5tCfoSc1_uDfQ.png" /><figcaption>Every challenge became another lesson in my Computer Science journey.</figcaption></figure><h4>Final Thoughts</h4><p>As I prepare to enter my final year of BSCS, I realize that every semester has taught me something beyond textbooks and classroom lectures.</p><p>Some lessons came from successful projects, while others came from mistakes, deadlines, debugging, and challenges that tested my patience. Looking back, I understand that these experiences have helped me grow — not because everything went perfectly, but because every challenge taught me something valuable.</p><p>I still consider myself a learner, and I know there is a lot more to explore in the field of Computer Science. However, I believe that every small step, every project, and every new concept contribute to long-term growth.</p><p>If this article helps even one student feel more confident about their own learning journey, then sharing my experience will have been worthwhile.</p><p><strong>Thank you for reading, and I look forward to sharing more about my projects, experiences, and lessons in future articles.</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=da94d8032318" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Why I Chose Computer Science: My Journey as a BSCS Student]]></title>
            <link>https://medium.com/@rameenkashif243/why-i-chose-computer-science-my-journey-as-a-bscs-student-f0eb67861278?source=rss-8ab4704e6486------2</link>
            <guid isPermaLink="false">https://medium.com/p/f0eb67861278</guid>
            <category><![CDATA[students-life]]></category>
            <category><![CDATA[education]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[learning]]></category>
            <dc:creator><![CDATA[Rameenkashif]]></dc:creator>
            <pubDate>Wed, 08 Jul 2026 21:14:41 GMT</pubDate>
            <atom:updated>2026-07-08T21:14:41.958Z</atom:updated>
            <content:encoded><![CDATA[<p>From curiosity to coding — how my journey in Computer Science shaped the way I learn, build, and think.</p><h3><strong>Introduction</strong></h3><p>Choosing a university degree is one of the biggest decisions in a student’s life. Like many others, I also spent a lot of time thinking about what field would be right for me. I wanted to study something that would challenge me, help me grow, and allow me to build things that could solve real-world problems.</p><p>That is why I chose <strong>Computer Science</strong>.</p><p>Looking back today, as I prepare to enter my final year of BSCS, I can confidently say that it has been one of the most rewarding learning experiences of my life.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/838/1*ToOoVcPzfgGKJCNKYKOZsA.png" /><figcaption>Every journey begins with a single decision, and mine started with Computer Science.</figcaption></figure><h3><strong>The Beginning of My Journey</strong></h3><p>When I started my BSCS degree, I had very little knowledge about programming. Words like algorithms, databases, object-oriented programming, and artificial intelligence sounded difficult and confusing.</p><p>Like many beginners, I was nervous about whether I would be able to understand coding.</p><p>However, with every semester, I learned something new. Every course helped me improve my problem-solving skills and gave me a better understanding of how software is built.</p><p>I realized that Computer Science is not only about writing code — it is about solving problems creatively.</p><h3>Discovering My Interests</h3><p>As I progressed through my degree, I explored different areas of Computer Science.</p><p>Some subjects were interesting, while others were more challenging, but each one taught me valuable lessons.</p><p>Over time, I discovered that I enjoy working with:</p><ul><li>Artificial Intelligence</li><li>Python Programming</li><li>Web Development</li><li>Technical Documentation</li><li>Software Projects</li><li>Presentation Design</li><li>Microsoft Word Specialist</li></ul><p>I especially enjoy building projects because they allow me to apply classroom knowledge to real-world situations.</p><p>Every project teaches me something that books alone cannot.</p><h3>Learning Beyond the Classroom</h3><p>One of the biggest lessons I learned during my BSCS journey is that university lectures are only the beginning.</p><p>To improve my skills, I spent time exploring online tutorials, experimenting with different technologies, and practicing through personal and academic projects.</p><p>Sometimes things worked perfectly.</p><p>Sometimes they didn’t.</p><p>But every error taught me something new.</p><p>I learned that debugging is just as important as writing code.</p><h3>My Project Experience</h3><p>During my BSCS journey, I have worked on several academic and practical projects that helped me improve my technical skills.</p><p>One of the most exciting projects I developed was an AI-based <strong>Deepfake Detection System</strong>. Working on this project allowed me to explore Artificial Intelligence, image processing, Python programming, and software development in a practical way.</p><p>Building projects like this has increased my confidence and motivated me to continue learning new technologies.</p><p>In future articles, I’ll share the complete development process, challenges, and lessons I learned while building these projects.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*siDwnlkckvQnGKVKWsM1QQ.png" /><figcaption>A glimpse of one of the AI projects I developed during my BSCS journey.</figcaption></figure><h3>Skills I Continue to Improve</h3><p>Although I still consider myself a learner, my BSCS journey has helped me develop skills in several areas, including:</p><ul><li>Python Programming</li><li>Artificial Intelligence</li><li>Machine Learning Fundamentals</li><li>Web Development</li><li>Software Development</li><li>Technical Documentation</li><li>Microsoft Word Report Formatting</li><li>PowerPoint Presentation Design</li><li>Problem Solving</li><li>Team Collaboration</li></ul><p>I believe learning never stops, especially in the field of technology.</p><h3>Looking Ahead</h3><p>As I enter my final year of BSCS, I am excited about the opportunities ahead.</p><p>I hope to continue building meaningful projects, improve my programming skills, explore advanced topics in Artificial Intelligence, and prepare myself for a successful career in technology.</p><p>This blog will be a place where I document my learning journey, share project experiences, and write about the lessons I learn along the way.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/478/1*mCI88CDw7wH1kUtsbi2M8w.png" /><figcaption>Every project and every challenge has been an important part of my learning journey.</figcaption></figure><h3>Final Thoughts</h3><p>Choosing Computer Science has been one of the best decisions I have made.</p><p>The journey has not always been easy, but every challenge has helped me grow — not only as a student but also as a problem solver.</p><p>I still have a lot to learn, and that is what makes this field so exciting.</p><p>If you’re also a Computer Science student, remember that it’s okay not to know everything. Stay curious, keep practicing, and don’t be afraid to make mistakes. Every line of code you write is another step forward.</p><p>Thank you for reading!</p><p>If you’re interested in Computer Science, Artificial Intelligence, Python, or software development, feel free to follow me as I share more about my projects and learning journey.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f0eb67861278" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CPU Scheduling Algorithms in Operating Systems]]></title>
            <link>https://medium.com/@rameenkashif243/cpu-scheduling-algorithms-in-operating-systems-b6bc6e0742da?source=rss-8ab4704e6486------2</link>
            <guid isPermaLink="false">https://medium.com/p/b6bc6e0742da</guid>
            <dc:creator><![CDATA[Rameenkashif]]></dc:creator>
            <pubDate>Sat, 04 Jul 2026 19:22:35 GMT</pubDate>
            <atom:updated>2026-07-04T19:22:35.952Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>1.</strong> <strong>Introduction</strong></p><p>CPU Scheduling is a fundamental function of an operating system that determines which process will run next on the CPU. Since multiple processes are waiting for execution, the scheduler selects processes using different scheduling algorithms to ensure fairness, efficiency, and optimal resource utilization.</p><p>In scheduling, we commonly calculate:</p><ul><li><strong>Completion Time (CT)</strong> — Time when process finishes</li><li><strong>Turnaround Time (TAT = CT — Arrival Time)</strong></li><li><strong>Waiting Time (WT = TAT — Burst Time)</strong></li><li><strong>Response Time (RT = First CPU start time — Arrival Time)</strong></li></ul><p><strong>Main Techniques</strong></p><p>In this assignment we study:</p><p><strong>· </strong>First Come First Serve (FCFS)</p><p><strong>·</strong> Shortest Job Next (SJN / SJF)</p><p><strong>· </strong>Shortest Remaining Time First (SRTF)</p><p><strong>· </strong>Priority Scheduling</p><p><strong>· </strong>Round Robin (RR)</p><p><strong>Example Data for All Algorithms</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/632/1*sTmsgDaQI3LPcrXQa_Kpbw.png" /></figure><p><strong>2.1 First-Come First-Served (FCFS) Scheduling</strong></p><p>First Come First Serve (FCFS) is the simplest CPU scheduling algorithm where the process that arrives first is processed first. It is non-preemptive, so once a process starts, it runs until it finishes. FCFS is easy to understand but can cause long waiting times if a large process comes first. This sometimes slows down the entire system, known as the convoy effect.</p><p><strong>Practical Example</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/857/1*eJPv6lw-17sch9TanABxtw.png" /><figcaption><strong>Table: FCFS Calculation</strong></figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/557/1*3ZId8EViV_3XThJxt6g80Q.png" /><figcaption><strong>Figure1: Gantt Chart</strong></figcaption></figure><h4>P1</h4><p><strong>·</strong> <strong>CT = ST + BT = 0 + 7 = 7</strong>.</p><p><strong>· TAT = CT − AT = 7 − 0 = 7</strong>.</p><p><strong>· WT = TAT − BT = 7 − 7 = 0</strong>.</p><p><strong>· RT = ST − AT = 0 − 0 = 0</strong>.</p><h4>P2</h4><p><strong>· CT = ST + BT = 7 + 4 = 11</strong>.</p><p>· <strong>TAT = CT − AT = 11 − 2 = 9</strong>.</p><p><strong>· WT = TAT − BT = 9 − 4 = 5</strong></p><p><strong>· RT = 5</strong>.</p><h4>P3</h4><p><strong>· CT = ST + BT = 11 + 1 = 12</strong>.</p><p><strong>· TAT = CT − AT = 12 − 4 = 8</strong>.</p><p><strong>· WT = TAT − BT = 8 − 1 = 7</strong></p><p><strong>· RT = ST − AT = 11–4= 7</strong>.</p><h4>P4</h4><p><strong>· CT = ST + BT = 12 + 4 = 16</strong>.</p><p><strong>· TAT = CT − AT = 16 − 5 = 11</strong>.</p><p><strong>· WT = TAT − BT = 11 − 4 = 7</strong></p><p><strong>· RT = 7</strong>.</p><p><strong>Calculate average wait time</strong></p><p><strong>Average WT = </strong>0+5+7+7/4</p><p>= 4.75 unit</p><p><strong>FCFS — Convey Effect</strong></p><p>The <em>convoy effect</em> occurs in <strong>FCFS scheduling</strong> when one long process arrives first and all the shorter processes behind it are forced to wait. Because FCFS always executes the earliest arrived process first, shorter and faster processes must wait until the long CPU-bound process completes.</p><p><strong>Practical Example</strong></p><p><strong>Process</strong></p><p>P1</p><p>P2</p><p>P3</p><p><strong>Arrival</strong></p><p>0</p><p>0</p><p>0</p><p><strong>Burst</strong></p><p>20</p><p>2</p><p>3</p><p><strong>Gantt Chart</strong></p><p>0 20 22 25</p><p><strong>2.2 Shortest Job Next (Non-Preemptive SJF)</strong></p><p>Shortest Job Next (SJN) is a scheduling algorithm that runs <strong>the process with the shortest</strong> <strong>burst time first.</strong> It helps reduce the average waiting time and makes the system faster. SJN is <strong>non-preemptive</strong>, so the CPU does not switch once a process starts. Its main limitation is that the exact burst time must be known in advance.</p><p><strong>Practical Example</strong></p><p><strong>Process ID</strong></p><p><strong>Burst Time</strong></p><p><strong>Complete</strong></p><p><strong>Time</strong></p><p><strong>Turnaround</strong></p><p><strong>Waiting Time</strong></p><p>P1</p><p>5</p><p>11</p><p>11</p><p>6</p><p>P2</p><p>4</p><p>6</p><p>6</p><p>2</p><p>P3</p><p>7</p><p>18</p><p>18</p><p>11</p><p>P4</p><p>2</p><p>2</p><p>2</p><p>0</p><p><strong>SJF — Gantt Chart</strong></p><p>0 2 6 11 18</p><p><strong>2.3 Shortest Remaining Time First (SRTF)</strong></p><p>Shortest Remaining Time (SRT), also called <strong>Shortest Remaining Time First (SRTF)</strong> or <strong>Shortest Job to Finish (SJTF)</strong>.Shortest Remaining Time (SRT) is a CPU scheduling method that always <strong>picks the process</strong> <strong>with the smallest remaining time to finish</strong>. It is <strong>preemptive</strong>, so if a new shorter process arrives, the CPU switches to it. This helps reduce waiting time, but longer tasks may have to wait more.</p><p><strong>Practical Example</strong></p><p><strong>Process</strong></p><p><strong>Arrival Time</strong></p><p><strong>Burst Time</strong></p><p>P1</p><p>0</p><p>8</p><p>P2</p><p>1</p><p>4</p><p>P3</p><p>2</p><p>9</p><p>P4</p><p>3</p><p>5</p><p><strong>Gantt Chart</strong></p><p>0 1 5 10 17 26</p><p><strong>2.4 Priority Scheduling</strong></p><p>Priority Scheduling is a CPU scheduling technique in which <strong>each process is assigned a priority</strong>, and the CPU executes the process with the <strong>highest priority first</strong>. In Priority Scheduling, the CPU runs the process with the highest priority first.It can stop a process or let it finish before switching.Each process is assigned a priority number by the system or user. Higher priority means the process gets the CPU sooner.</p><p><strong>Practical Example</strong></p><p><strong>Process</strong></p><p><strong>Burst Time</strong></p><p><strong>Priority</strong></p><p>P1</p><p>10</p><p>3</p><p>P2</p><p>1</p><p>1</p><p>P3</p><p>2</p><p>4</p><p>P4</p><p>1</p><p>5</p><p>P5</p><p>5</p><p>2</p><p><strong>Gantt Chart</strong></p><p>0 1 6 16 18 19</p><p><strong>2.5 Round Robin (RR) Scheduling</strong></p><p>Round Robin is a <strong>preemptive CPU scheduling</strong> algorithm.Each process gets a <strong>fixed time quantum (Q)</strong> to execute on CPU.If a process does not finish within the time quantum, it is <strong>preempted</strong> and placed at the <strong>end of the ready queue</strong>. This method is <strong>fair</strong> for all processes and widely used in <strong>time-sharing systems</strong>.</p><p><strong>Practical Example</strong></p><p><strong>Process</strong></p><p><strong>AT</strong></p><p><strong>BT</strong></p><p><strong>ST(first)</strong></p><p><strong>CT</strong></p><p><strong>TAT=CT-AT</strong></p><p><strong>WT=TAT-BT</strong></p><p><strong>RT</strong></p><p>P1</p><p>0</p><p>7</p><p>0</p><p>16</p><p>16</p><p>9</p><p>0</p><p>P2</p><p>2</p><p>4</p><p>2</p><p>11</p><p>9</p><p>5</p><p>0</p><p>P3</p><p>4</p><p>1</p><p>4</p><p>5</p><p>1</p><p>0</p><p>0</p><p>P4</p><p>5</p><p>4</p><p>5</p><p>13</p><p>8</p><p>4</p><p>0</p><p><strong>Gantt Chart</strong></p><p><strong>0 2 4 5 7 9 11 13 16</strong></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b6bc6e0742da" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[CPU Scheduling Algorithms in Operating Systems]]></title>
            <link>https://medium.com/@rameenkashif243/cpu-scheduling-algorithms-in-operating-systems-31ede90164b5?source=rss-8ab4704e6486------2</link>
            <guid isPermaLink="false">https://medium.com/p/31ede90164b5</guid>
            <category><![CDATA[fcf]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[operating-systems]]></category>
            <category><![CDATA[priority-scheduling]]></category>
            <dc:creator><![CDATA[Rameenkashif]]></dc:creator>
            <pubDate>Sun, 30 Nov 2025 16:52:09 GMT</pubDate>
            <atom:updated>2025-11-30T18:23:05.110Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Introduction</strong></p><p>CPU Scheduling is a fundamental function of an operating system that determines which process will run next on the CPU. Since multiple processes are waiting for execution, the scheduler selects processes using different scheduling algorithms to ensure fairness, efficiency, and optimal resource utilization.</p><p>In scheduling, we commonly calculate:</p><ul><li><strong>Completion Time (CT)</strong> — Time when process finishes</li><li><strong>Turnaround Time (TAT = CT — Arrival Time)</strong></li><li><strong>Waiting Time (WT = TAT — Burst Time)</strong></li><li><strong>Response Time (RT = First CPU start time — Arrival Time)</strong></li></ul><p><strong>Main Techniques</strong></p><p>In this assignment we study:</p><p><strong>· </strong>First Come First Serve (FCFS)</p><p><strong>· </strong>Shortest Job Next (SJN / SJF)</p><p><strong>· </strong>Shortest Remaining Time First (SRTF)</p><p><strong>· </strong>Priority Scheduling</p><p><strong>· </strong>Round Robin (RR)</p><p><strong>Example Data for All Algorithms</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/715/1*ZEJ9RFyWQFL9VHw6H6umnQ.png" /></figure><p><strong>First-Come First-Served (FCFS) Scheduling</strong></p><p>First Come First Serve (FCFS) is the simplest CPU scheduling algorithm where the process that arrives first is processed first. It is non-preemptive, so once a process starts, it runs until it finishes. FCFS is easy to understand but can cause long waiting times if a large process comes first. This sometimes slows down the entire system, known as the convoy effect.</p><p><strong>Practical Example</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/857/1*eJPv6lw-17sch9TanABxtw.png" /><figcaption>Table: FCFS Calculation</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/557/1*3ZId8EViV_3XThJxt6g80Q.png" /><figcaption>Figure 1: Gantt Chart</figcaption></figure><h4>Process P1</h4><p><strong>· CT = ST + BT = </strong>0 + 7 = 7.</p><p><strong>· TAT = CT − AT = </strong>7 − 0 = 7.</p><p><strong>· WT = TAT − BT = </strong>7 − 7 = 0.</p><p><strong>· RT = ST − AT = </strong>0 − 0 = 0.</p><h4>Process P2</h4><p><strong>· CT = ST + BT = </strong>7 + 4 = 11.</p><p><strong>· TAT = CT − AT = </strong>11 − 2 = 9.</p><p><strong>· WT = TAT − BT = </strong>9 − 4 = 5</p><p><strong>· RT = </strong>5<strong>.</strong></p><h4>Process P3</h4><p><strong>· CT = ST + BT = </strong>11 + 1 = 12.</p><p><strong>· TAT = CT − AT = </strong>12 − 4 = 8.</p><p><strong>· WT = TAT − BT =</strong> 8 − 1 = 7</p><p><strong>· RT = ST − AT = </strong>11–4= 7.</p><h4>Process P4</h4><p><strong>· CT = ST + BT = </strong>12 + 4 = 16<strong>.</strong></p><p><strong>· TAT = CT − AT = </strong>16 − 5 = 11<strong>.</strong></p><p><strong>· WT = TAT − BT = </strong>11 − 4 = 7</p><p><strong>· RT = </strong>7<strong>.</strong></p><p><strong>Average waiting time = </strong>0+5+7+7/4<strong>=</strong> 4.75</p><p><strong>Average turnaround time = </strong>7+9+8+11 / 4= 8.75</p><p><strong>FCFS — Convey Effect</strong></p><p>The <em>convoy effect</em> occurs in <strong>FCFS scheduling</strong> when one long process arrives first and all the shorter processes behind it are forced to wait. Because FCFS always executes the earliest arrived process first, shorter and faster processes must wait until the long CPU-bound process completes.</p><p><strong>Practical Example</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/803/1*vwjJx5-bOzvB_K7n5Z2a_g.png" /><figcaption>Table: FCFS Calculation</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/682/1*66J8Kpdea836UizAZhCj2Q.png" /><figcaption>Figure 2: Gantt Chart</figcaption></figure><p><strong>Shortest Job Next (Non-Preemptive SJF)</strong></p><p>Shortest Job Next (SJN) is a scheduling algorithm that runs <strong>the process with the shortest</strong> <strong>burst time first.</strong> It helps reduce the average waiting time and makes the system faster. SJN is <strong>non-preemptive</strong>, so the CPU does not switch once a process starts. Its main limitation is that the exact burst time must be known in advance.</p><p><strong>Practical Example</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/875/1*EWwct3DFthCiC5HQ-w0fiQ.png" /><figcaption>Table: SJF Calculation</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/730/1*hNH0bLGGwzktj79dNGnnjg.png" /><figcaption>Figure 3: Gantt Chart</figcaption></figure><h4>Process P1</h4><p><strong>· CT = ST + BT</strong> = 6 + 5 = 11<strong>.</strong></p><p><strong>· TAT = CT − AT</strong> = 11− 0 = 11<strong>.</strong></p><p><strong>·</strong> <strong>WT = TAT − BT</strong> = 11 -5 = 6<strong>.</strong></p><h4>Process P2</h4><p><strong>· CT = ST + BT = 2 + 4 = 6</strong>.</p><p><strong>· TAT = CT − AT</strong> = 6 − 0 = 6<strong>.</strong></p><p><strong>· WT = TAT − BT</strong> = 6− 4 = 2</p><h4>Process P3</h4><p><strong>· CT = ST + BT = </strong>11 + 7= 18.</p><p><strong>· TAT = CT − AT = </strong>18 − 0 = 18.</p><p><strong>· WT = TAT − BT = </strong>18 − 7 = 11</p><h4>Process P4</h4><p><strong>· CT = ST + BT = </strong>0 + 2 = 2.</p><p><strong>· TAT = CT − AT = </strong>2 − 0 =2</p><p><strong>· WT = TAT − BT = </strong>2 − 2 = 0</p><p><strong>Average Turnaround Time</strong> = (11 + 6 + 18 + 2) / 4 = 9.25</p><p><strong>Average Waiting Time</strong> = (6 + 2 + 11+ 0) / 4 = 4.75</p><p><strong>Shortest Remaining Time First (Preemptive SRTF)</strong></p><p>Shortest Remaining Time (SRT), also called <strong>Shortest Remaining Time First (SRTF)</strong> or <strong>Shortest Job to Finish (SJTF)</strong>.Shortest Remaining Time (SRT) is a CPU scheduling method that always <strong>picks the process</strong> <strong>with the smallest remaining time to finish</strong>. It is <strong>preemptive</strong>, so if a new shorter process arrives, the CPU switches to it. This helps reduce waiting time, but longer tasks may have to wait more.</p><p><strong>Practical Example</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/807/1*wUfdVOm-Xg52aTfIgJky1A.png" /><figcaption>Table: SRTF Calculation</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/780/1*ob7MhefGbMNndZOpCwdvXw.png" /><figcaption>Figure 4: Gantt Chart</figcaption></figure><h4>Process P1</h4><p><strong>· </strong>AT = 0, BT = 8</p><p><strong>· </strong>CT = 17</p><p><strong>· TAT = 17 − 0 = 17</strong></p><p><strong>· WT = 17 − 8 = 9</strong></p><p><strong>· RT = 0 − 0 = 0</strong></p><h4>Process P2</h4><p><strong>· </strong>AT = 1, BT = 4</p><p><strong>· </strong>CT = 5</p><p><strong>· TAT = 5 − 1 = 4</strong></p><p><strong>· WT = 4 − 4 = 0</strong></p><p><strong>· RT = 1 − 1 = 0</strong></p><h4>Process P3</h4><p><strong>· </strong>AT = 2, BT = 9</p><p><strong>· </strong>CT = 26</p><p><strong>· TAT = 26 − 2 = 24</strong></p><p><strong>· WT = 24 − 9 = 15</strong></p><p><strong>· RT = 17 − 2 = 15</strong></p><h4>Process P4</h4><p><strong>· </strong>AT = 3, BT = 5</p><p><strong>· </strong>CT = 10</p><p><strong>· TAT = 10 − 3 = 7</strong></p><p><strong>· WT = 7 − 5 = 2</strong></p><p><strong>· RT = 5 − 3 = 2</strong></p><p><strong>Average Turnaround Time</strong> = (17 + 4 + 24 + 7) / 4 = 13</p><p><strong>Average Waiting Time</strong> = (9 + 0 +15+ 2) / 4 = 6.5</p><p><strong>Priority Scheduling</strong></p><p>Priority Scheduling is a CPU scheduling technique in which <strong>each process is assigned a priority</strong>, and the CPU executes the process with the <strong>highest priority first</strong>. In Priority Scheduling, the CPU runs the process with the highest priority first.It can stop a process or let it finish before switching.Each process is assigned a priority number by the system or user. Higher priority means the process gets the CPU sooner.</p><p><strong>Practical Example</strong></p><p><strong>(Non- Preemptive Mode)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/935/1*SyvrnjSZQmCFm_dRUjciCg.png" /><figcaption>Table: Non Preemptive Priority Calculation</figcaption></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/696/1*1kK3f330o_u05D0_r11hfg.png" /><figcaption>Figure 5: Gantt Chart</figcaption></figure><p><strong>Average Turnaround Time</strong> = (1 + 6 + 16 + 18 + 19) / 5 = 12.0</p><p><strong>Average Waiting Time</strong> = (0 + 1 + 6 + 16 + 18) / 5 = 8.2</p><p><strong>(Preemptive Mode)</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/889/1*TL65OEAqBC93-8rgsKUVZg.png" /><figcaption>Table: Preemptive Priority Calculation</figcaption></figure><p><strong>Rule:</strong></p><p><strong>· </strong>Lower number = higher priority</p><p><strong>· </strong>CPU can switch to higher priority arriving process.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/698/1*IWY1N1ibX9dWJmBzA4LCLw.png" /><figcaption>Figure 6: Gantt Chart</figcaption></figure><h3>Process P1</h3><p><strong>· Arrival:</strong> 0</p><p><strong>· Burst Time:</strong> 7</p><p><strong>· Priority:</strong> 2</p><p><strong>· Start Time (ST)</strong> = 0 (first time it ran)<br> <strong>Completion Time (CT)</strong> = resumes later at time 6 and runs till 11 → <strong>CT = 11</strong></p><p><strong>· Turnaround Time (TAT)</strong> = CT − AT = 11 − 0 = <strong>11</strong></p><p><strong>· Waiting Time (WT)</strong> = TAT − BT = 11 − 7 = <strong>4</strong></p><p><strong>· Response Time (RT)</strong> = first start − AT = 0 − 0 = <strong>0</strong></p><h3>Process P2</h3><p>· <strong>Arrival:</strong> 2</p><p><strong>· Burst Time:</strong> 4</p><p><strong>· Priority:</strong> 1</p><p><strong>· CT = 6</strong></p><p><strong>· ST</strong> = 2 (first time it ran)</p><p><strong>· TAT</strong> = CT − AT = 6 − 2 = <strong>4</strong></p><p><strong>· WT</strong> = TAT − BT = 4 − 4 = <strong>0</strong></p><p><strong>· RT</strong> = ST − AT = 2 − 2 = <strong>0</strong></p><h3>Process P1 resumes</h3><p><strong>· </strong>Remaining BT = 5</p><p><strong>· </strong>Next highest priority in ready queue = P1 (priority 2)</p><p><strong>· </strong>Runs <strong>6 → 11</strong> → finishes</p><p><strong>· CT = 11</strong> (already calculated in Step 1)</p><p><strong>· TAT</strong> = 11 − 0 = 11</p><p><strong>· WT </strong>= 11 − 7 = 4</p><p><strong>· RT </strong>= 0 (already started at 0)</p><h3>Process P3</h3><p><strong>· Arrival:</strong> 4</p><p><strong>· Burst:</strong> 1</p><p><strong>· Priority:</strong> 3</p><p><strong>· </strong>Next available process after P1 finishes at 11 → P3 is next</p><p><strong>· CT = 12</strong></p><p><strong>· ST</strong> = 11</p><p><strong>· TAT</strong> = 12 − 4 = <strong>8</strong></p><p><strong>· WT</strong> = TAT − BT = 8 − 1 = <strong>7</strong></p><p><strong>· RT </strong>= ST − AT = 11 − 4 = <strong>7</strong></p><h3>Process P4</h3><p><strong>·</strong> <strong>Arrival:</strong> 5</p><p><strong>· Burst:</strong> 4</p><p><strong>· Priority:</strong> 2</p><p><strong>· </strong>Next available after P3 finishes → <strong>12 → 16</strong> → CT = 16</p><p><strong>· ST</strong> = 12</p><p><strong>· TAT </strong>= 16 − 5 = <strong>11</strong></p><p><strong>· WT</strong> = 11 − 4 = <strong>7</strong></p><p><strong>· RT </strong>= 12 − 5 = <strong>7</strong></p><p><strong>Average Turnaround Time</strong> = (11+ 4 + 8 + 11) / 4 = 8.5</p><p><strong>Average Waiting Time</strong> = (4 + 0 + 7 + 7) / 4 = 4.5</p><p><strong>Round Robin (RR) Scheduling</strong></p><p>Round Robin is a <strong>preemptive CPU scheduling</strong> algorithm. Each process gets a <strong>fixed time quantum (Q)</strong> to execute on CPU. If a process does not finish within the time quantum, it is <strong>preempted</strong> and placed at the <strong>end of the ready queue</strong>. This method is <strong>fair</strong> for all processes and widely used in <strong>time-sharing systems</strong>.</p><p><strong>· </strong>Continues until all processes finish.</p><p><strong>· All processes are preempted if quantum expires</strong>, even if higher priority doesn’t exist — this is <strong>preemptive by design</strong></p><p><strong>Advantages:</strong></p><p><strong>· </strong>Fair to all processes</p><p><strong>· </strong>Suitable for interactive systems</p><p><strong>Disadvantages:</strong></p><p><strong>· </strong>Context switching overhead</p><p><strong>· </strong>Performance depends on the choice of <strong>time quantum</strong></p><p><strong>Practical Example</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/916/1*4mdfeVa78rQDRhgQvjhyOw.png" /><figcaption>Table: RR Calculation</figcaption></figure><p><strong>· </strong>Time quantum (q) is <strong>not given</strong>, let’s assume <strong>q = 2</strong> for calculation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/914/1*mxJdQbvYb9mSF4Wxac7G4A.png" /><figcaption>Figure 7: Gantt Chart</figcaption></figure><h3>Process P1</h3><p><strong>·</strong> <strong>Arrival:</strong> 0</p><p><strong>· Burst Time:</strong> 7</p><p><strong>· ST(first)</strong> = 0</p><p><strong>· CT </strong>= 16</p><p><strong>· TAT = CT − AT</strong> = 16 − 0 = 16</p><p><strong>· WT = TAT − BT</strong> = 16 − 7 = 9</p><p><strong>·</strong> <strong>RT = ST − AT</strong> = 0 − 0 = 0</p><h3>Process P2</h3><p><strong>·</strong> <strong>Arrival:</strong> 2</p><p><strong>·</strong> <strong>Burst Time:</strong> 4</p><p><strong>· ST(first)</strong> = 2</p><p><strong>·</strong> <strong>CT </strong>= 11</p><p><strong>· TAT </strong>= 11 − 2 = 9</p><p><strong>· WT</strong> = 9 − 4 = 5</p><p><strong>·</strong> <strong>RT </strong>= 2 − 2 = 0</p><h3>Process P3</h3><p><strong>· Arrival:</strong> 4</p><p><strong>·</strong> <strong>Burst Time:</strong> 1</p><p><strong>·</strong> <strong>ST(first)</strong> = 4</p><p><strong>· CT </strong>= 5</p><p><strong>·</strong> <strong>TAT</strong> = 5 − 4 = 1</p><p><strong>· WT</strong> = 1 − 1 = 0</p><p><strong>· RT</strong> = 4 − 4 = 0</p><h3>Process P4</h3><p><strong>· Arrival:</strong> 4</p><p><strong>·</strong> <strong>Burst Time:</strong> 1</p><p><strong>· ST(first)</strong> = 5</p><p><strong>· CT </strong>= 13</p><p><strong>· TAT </strong>= 13 − 5 = 8</p><p><strong>· WT</strong> = 8 − 4 = 4</p><p><strong>·</strong> <strong>RT </strong>= 5 − 5 = 0</p><p><strong>Average WT = </strong>(9+5+0+4)/4 = 18/4 = 4.5<br> <strong>Average TAT = </strong>(16+9+1+8)/4 = 34/4 = 8.5</p><p><strong>Final Comparison Table</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/646/1*LulLT1obwgHsYjgBfLR8dQ.png" /></figure><p><strong>Conclusion:</strong></p><p>CPU scheduling is a key technique in operating systems that helps improve overall system performance by efficiently managing process execution, reducing waiting time, and maximizing CPU utilization. In this assignment, we implemented and analyzed several scheduling algorithms, each with its own strengths.<strong>FCFS</strong> is simple and fair; <strong>SJF/SRTF</strong> minimizes waiting and turnaround time; <strong>Priority</strong> handles urgent tasks first; <strong>Round Robin</strong> ensures fairness in multitasking. The choice of algorithm depends on system needs like responsiveness, fairness, or efficiency.</p><p><strong>Published By</strong></p><p>Rameen Kashif , Faryal Iqbal , Mahek Mazhar</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=31ede90164b5" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Assembly Language Debugging: A Deep Dive into Behind-the-Scenes Mechanics]]></title>
            <link>https://medium.com/@rameenkashif243/assembly-language-debugging-a-deep-dive-into-behind-the-scenes-mechanics-66b4f9ebff2e?source=rss-8ab4704e6486------2</link>
            <guid isPermaLink="false">https://medium.com/p/66b4f9ebff2e</guid>
            <category><![CDATA[debugger]]></category>
            <category><![CDATA[assembly]]></category>
            <category><![CDATA[disassembly]]></category>
            <category><![CDATA[low-level-programming]]></category>
            <category><![CDATA[assembly-language]]></category>
            <dc:creator><![CDATA[Rameenkashif]]></dc:creator>
            <pubDate>Sun, 16 Mar 2025 12:28:56 GMT</pubDate>
            <atom:updated>2025-03-16T12:28:56.860Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Introduction</strong></p><p>Assembly language debugging is the process of analyzing and fixing errors in <strong>low-level programs</strong> that interact directly with hardware. Unlike high-level languages, where debugging tools provide abstracted information, assembly debugging requires <strong>detailed tracking of CPU registers, memory, and execution flow</strong>.</p><p>Debugging assembly code involves specialized tools like <strong>AFD (Assembly Format Debugger)</strong> and <strong>GDB (GNU Debugger)</strong>, which help programmers step through instructions, inspect registers, and analyze memory changes. This article explores the <strong>importance of assembly debugging, its mechanics, and the step-by-step sections of a debugger</strong>.</p><p><strong>What is Assembly Language Debugging?</strong></p><p>Assembly language debugging is the process of <strong>finding and fixing errors in assembly code</strong> by:<br> ✔ Tracking <strong>CPU instructions</strong> step by step<br> ✔ Inspecting <strong>registers, stack, and memory</strong><br> ✔ Monitoring <strong>flags and conditional jumps</strong><br> ✔ Identifying <strong>logical errors and crashes</strong></p><p><strong>Why Do We Use Assembly Debugging?</strong></p><p>Debugging assembly programs is essential for:</p><p><strong>1. Fixing Errors (Bugs)</strong></p><p>✔ Identifies <strong>incorrect memory access, wrong register values, and logical errors</strong>.</p><p><strong>2. Understanding CPU Execution</strong></p><p>✔ Helps programmers learn how <strong>instructions are executed at the machine level</strong>.</p><p><strong>3. Performance Optimization</strong></p><p>✔ Debugging helps identify <strong>slow instructions, redundant calculations, and memory inefficiencies</strong>.</p><p><strong>4. Low-Level System Development</strong></p><p>✔ Essential for <strong>OS development, embedded systems, and hardware-level programming</strong>.</p><p><strong>Understanding Assembly Debugging</strong></p><p>Assembly debugging works by <strong>tracking the execution of instructions, monitoring registers, and analyzing memory changes</strong>. Debuggers like AFD allow real-time control over program flow.</p><p><strong>Key Features of Assembly Debugging:</strong></p><p>✔ <strong>Step Execution</strong> — Run code <strong>one instruction at a time</strong>.<br> ✔ <strong>Register Inspection</strong> — Monitor values of EAX, EBX, ECX, EDX, ESP, EBP, and EIP.<br> ✔ <strong>Stack Analysis</strong> — Track function calls and local variables.<br> ✔ <strong>Flag Monitoring</strong> — Check status of Zero Flag (ZF), Carry Flag (CF), Overflow Flag (OF).</p><p><strong>How Do We Use Assembly Debugging?</strong></p><p>Debugging is performed using specialized tools like <strong>AFD (Assembly Format Debugger)</strong> and <strong>GDB (GNU Debugger)</strong>. Let’s go step by step:</p><p><strong>1. Assembly Program</strong></p><p>Create a simple assembly program that adds two numbers.</p><p>Save this file as <strong>program.asm</strong>:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/322/1*mBCJk9BaFNmPOwBS8DkbYg.png" /></figure><p><strong>2. Compiling in Debugger</strong></p><p>Compile the program:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/733/1*8zwbfm_xXrSOYTGOYByzjA.png" /></figure><p><strong>3.Run the program</strong></p><p>To run, use:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/726/1*5kxRaxx8LHnZqMDdpirRaA.png" /></figure><p><strong>Afd Debugger Screen:</strong></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/624/1*UxHJlZNu6n4QnC0W90uJNg.png" /></figure><p><strong>Assembly Debugging Sections</strong></p><p>AFD Debugger consists of multiple sections that help in debugging. Below are the main sections:</p><p><strong>1. Registers Section</strong></p><ul><li>Shows the values stored in CPU registers.</li><li>Includes general-purpose registers like EAX, EBX, ECX, EDX.</li><li>Also displays special registers like ESP, EBP, EIP.</li></ul><p><strong>2. Code Section (Disassembly)</strong></p><ul><li>Displays the assembly instructions currently being executed.</li><li>Shows the address of each instruction.</li><li>Highlights the current instruction being executed.</li></ul><p><strong>3. Stack Section</strong></p><ul><li>Displays stack memory content.</li><li>Shows pushed and popped values.</li><li>Helps in analyzing function calls and return addresses.</li></ul><p><strong>4. Flags Section</strong></p><ul><li>Shows CPU flags such as <strong>Zero Flag (ZF), Carry Flag (CF), Overflow Flag (OF)</strong>.</li><li>Useful in understanding conditional operations like JMP, JE, JNE.</li></ul><p><strong>5. Memory Section</strong></p><ul><li>Displays memory contents at a specific address.</li><li>Helps in analyzing variables, buffers, and function parameters.</li></ul><p><strong>6. Input/Output (I/O) Section</strong></p><ul><li>Displays interaction with external devices.</li><li>Useful when working with ports and hardware communication.</li></ul><p><strong>Conclusion</strong></p><p>AFD full-screen window is essential for <strong>debugging, automation, and system monitoring</strong>. By understanding <strong>its components, registers, flags, and execution methods</strong>, users can optimize their workflow. The example program demonstrates <strong>how assembly code runs in AFD</strong>, making it a valuable tool for developers and system administrators.</p><p><strong>Author</strong></p><p>Rameen Kashif</p><p>Faryal Iqbal</p><p>Mehak Mazhar</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=66b4f9ebff2e" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>