<?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"><channel><title><![CDATA[The Bug Diary]]></title><description><![CDATA[The Bug Diary]]></description><link>https://thebugdiary.hashnode.dev</link><image><url>https://cdn.hashnode.com/uploads/logos/6ad24e2a5e6724a1d0d8dc76/cfe0cbb0-ab88-4f2e-b1db-61f8056f2163.png</url><title>The Bug Diary</title><link>https://thebugdiary.hashnode.dev</link></image><generator>RSS for Node</generator><lastBuildDate>Sun, 25 Oct 2026 19:10:33 GMT</lastBuildDate><atom:link href="https://thebugdiary.hashnode.dev/rss.xml" rel="self" type="application/rss+xml"/><language><![CDATA[en]]></language><ttl>60</ttl><item><title><![CDATA[What Happens When Python Runs? Bytecode, PVM, and Python Implementations]]></title><description><![CDATA[MY LEARNING JOURNEY · 03]]></description><link>https://thebugdiary.hashnode.dev/what-happens-when-python-runs-bytecode-pvm-and-python-implementations</link><guid isPermaLink="true">https://thebugdiary.hashnode.dev/what-happens-when-python-runs-bytecode-pvm-and-python-implementations</guid><dc:creator><![CDATA[theBugDiary]]></dc:creator><pubDate>Mon, 19 Oct 2026 10:27:51 GMT</pubDate><content:encoded><![CDATA[<p><em>Learning Python with Chai aur Code, one video at a time.</em></p>
<p><strong>Learning source:</strong> <a href="https://www.youtube.com/watch?v=3HTKc-ZgZbg">Chai aur Code — Python Video 3</a></p>
<p>In this video, I started exploring what happens behind the scenes when we run a Python program. What began with a simple example of importing a function from one file into another led me to some interesting concepts: bytecode, <code>__pycache__</code>, the Python Virtual Machine (PVM), and different Python implementations.</p>
<p>I'll be honest: I got confused, especially when trying to understand what the PVM actually does and how Python's rules differ from its implementation.</p>
<p>So, let's break down what I understood.</p>
<h2>1. Starting With a Simple Python Program</h2>
<p>We started with an example involving two Python files: <code>chai.py</code> and <code>hellochai.py</code>:</p>
<p><strong>chai.py</strong></p>
<pre><code class="language-python">def hello():
    print("Hello from Chai aur Code!")
</code></pre>
<p>Now, suppose we want to use this function in another file.</p>
<p><strong>hellochai.py</strong></p>
<pre><code class="language-python">from chai import hello

hello()
</code></pre>
<p>Here, we're importing the <code>hello()</code> function from <code>chai.py</code> and calling it in <code>hellochai.py</code>.</p>
<p>We can run the second file using the terminal command:</p>
<pre><code class="language-bash">python hellochai.py
</code></pre>
<p>Python executes the program, and we get the output:</p>
<pre><code class="language-text">Hello from Chai aur Code!
</code></pre>
<p>But here's where things get interesting.</p>
<p>When we ran the program, a folder named <code>__pycache__</code> appeared, containing a <code>.pyc</code> file.</p>
<p>Why did Python create these files? What are they for? And what do they have to do with bytecode?</p>
<p>To understand that, we first need to understand what happens when Python executes our code.</p>
<h2>2. What Is Bytecode?</h2>
<p>When we write Python code, we write it in a human-readable form.</p>
<p>For example:</p>
<pre><code class="language-python">print("Hello")
</code></pre>
<p>The computer doesn't execute this source code directly as native machine instructions. In the standard Python implementation, CPython, the source code is compiled into an intermediate form called <strong>bytecode</strong>.</p>
<p>Bytecode is a lower-level representation of our Python program. It consists of instructions that the Python runtime can execute.</p>
<p>Think of it as a step between the code we write and the actual execution of our program.</p>
<p>Bytecode is not the same as machine code. Machine code consists of instructions that a processor can execute directly, whereas Python bytecode is designed for a Python virtual machine.</p>
<p>One thing worth remembering is that Python bytecode is not universally compatible across every Python implementation and version. Its format and instructions can differ.</p>
<h3>Why does Python use bytecode?</h3>
<p>Bytecode provides a representation that the Python runtime can execute without having to interpret the original source text from scratch for every instruction.</p>
<p>When CPython runs a program, the process broadly involves:</p>
<ol>
<li><p>Reading the Python source code.</p>
</li>
<li><p>Compiling it into bytecode.</p>
</li>
<li><p>Executing that bytecode using the Python runtime.</p>
</li>
</ol>
<p>The compilation and execution happen as part of running the program, so we usually don't need to perform these steps manually.</p>
<p>However, there is an important distinction: <strong>compiling code into bytecode does not automatically mean that a</strong> <code>.pyc</code> <strong>file will be saved.</strong></p>
<p>That brings us to the <code>__pycache__</code> folder.</p>
<h2>3. What Are <code>__pycache__</code> and <code>.pyc</code> Files?</h2>
<p>When I ran the program that imported a function from another file, I noticed that Python automatically created a <code>__pycache__</code> folder.</p>
<p>Inside it was a file ending in <code>.pyc</code>.</p>
<p>So, what exactly are these?</p>
<p>A <code>.pyc</code> file contains cached compiled Python code, usually bytecode produced by CPython.</p>
<p>When a module such as <code>chai.py</code> is imported, CPython can compile it and cache the resulting bytecode in a <code>.pyc</code> file. The next time the module is imported, Python may reuse that cached version if it is still valid.</p>
<p>This can save time because Python may not need to compile the module from its source code again.</p>
<h3>Why is the folder called <code>__pycache__</code>?</h3>
<p>The <code>__pycache__</code> folder provides a place to store cached bytecode files instead of mixing them with our regular source files.</p>
<p>For example, our project might look like this:</p>
<pre><code class="language-text">my_project/
├── chai.py
├── hellochai.py
└── __pycache__/
    └── chai.cpython-313.pyc
</code></pre>
<p>The exact filename depends on the Python implementation and version. The example above is illustrative.</p>
<p>Keeping these generated files in a separate folder helps keep our project organized.</p>
<h3>Does Python create a <code>.pyc</code> file every time we run a program?</h3>
<p>Not necessarily.</p>
<p>In our example, <code>chai.py</code> is imported by <code>hellochai.py</code>, so CPython can cache the compiled bytecode for <code>chai.py</code>.</p>
<p>However, when we execute a regular Python script directly, Python doesn't normally save a <code>.pyc</code> file for that main script simply because we ran it.</p>
<p>The script is still compiled to bytecode for execution. The difference is that the compiled bytecode is not necessarily written to a cache file.</p>
<p>Also, <code>.pyc</code> files don't necessarily get regenerated every time we run a program. Python checks whether cached bytecode is usable and recompiles the source when needed.</p>
<p>One more clarification: <code>.pyc</code> files are not usually called <em>frozen binaries</em>. They are cached compiled Python code. Frozen modules and frozen bytecode are related but distinct concepts.</p>
<h2>4. What Exactly Is the Python Virtual Machine (PVM)?</h2>
<p>This was the part that confused me the most.</p>
<p>I understood that Python code gets compiled into bytecode, but then I wondered:</p>
<p><strong>If bytecode is generated, what does the PVM actually do?</strong></p>
<p>The PVM is commonly described as the component that executes Python bytecode.</p>
<p>In CPython, the runtime contains an interpreter that processes bytecode instructions and carries out the operations they describe.</p>
<p>For example, when we write:</p>
<pre><code class="language-python">a = 10
b = 20
print(a + b)
</code></pre>
<p>The runtime needs to perform several operations: create and assign objects, retrieve values, perform addition, and display the result.</p>
<p>The bytecode represents the operations to be performed, and the interpreter executes the corresponding instructions.</p>
<h3>Does the PVM come with Python?</h3>
<p>When we install a Python implementation such as CPython, we get the runtime and interpreter components needed to execute Python programs.</p>
<p>We don't normally install a separate PVM ourselves.</p>
<p>Also, PVM is a conceptual term used to explain Python's execution model. The precise implementation details depend on which Python implementation we're using.</p>
<h3>Does Python execute source code directly if there are no imports?</h3>
<p>This was another point I needed to clarify.</p>
<p>No. In CPython, the absence of imports does not mean the source code bypasses bytecode.</p>
<p>Even a simple script such as:</p>
<pre><code class="language-python">print("Hello, Python!")
</code></pre>
<p>is compiled into bytecode for execution.</p>
<p>The important distinction is between <strong>compiling code for execution</strong> and <strong>saving compiled bytecode to a</strong> <code>.pyc</code> <strong>file</strong>.</p>
<p>A script can be compiled into bytecode and executed without saving a <code>.pyc</code> file for that script.</p>
<h2>5. How Does the PVM Execute Bytecode?</h2>
<p>One way to understand the process is to imagine the interpreter working through a sequence of instructions.</p>
<p>Broadly, it follows a cycle:</p>
<p><strong>Fetch an instruction → Execute the instruction → Fetch the next instruction → Execute the next instruction → Repeat</strong></p>
<p>This continues as the program runs.</p>
<p>The interpreter processes instructions and performs the corresponding operations. Depending on the instruction, this could involve arithmetic, calling a function, accessing an object, or controlling the program's flow.</p>
<p>The PVM isn't simply a folder containing bytecode, nor is it the same thing as the <code>.pyc</code> file. The <code>.pyc</code> file stores cached compiled code, while the interpreter is responsible for executing the instructions.</p>
<h3>Why is it called a runtime engine?</h3>
<p>A runtime is the environment that supports a program while it executes.</p>
<p>In Python, the runtime does more than process bytecode instructions. It also supports important operations such as:</p>
<ul>
<li><p><strong>Memory management:</strong> Managing memory used by Python objects.</p>
</li>
<li><p><strong>Object management:</strong> Handling Python objects and their behavior.</p>
</li>
<li><p><strong>Execution state:</strong> Keeping track of the program's current execution.</p>
</li>
<li><p><strong>Function calls:</strong> Managing how functions are called and how execution moves between them.</p>
</li>
</ul>
<p>These responsibilities are part of the broader Python runtime, rather than all being performed by one single component called the PVM.</p>
<p>Thinking of the runtime as the machinery that helps a program execute made the concept easier for me to understand.</p>
<h2>6. What Is a Python Implementation?</h2>
<p>Towards the end of the video, we were introduced to different Python implementations.</p>
<p>At first, I was confused by the word <em>implementation</em>. I wondered how it could be different from Python's rules.</p>
<p>A simple way to understand the distinction is this:</p>
<p><strong>Python's language specification describes how Python code should behave. An implementation is the actual software that makes that behavior happen.</strong></p>
<p>The language defines things such as syntax, expressions, data types, and expected behavior. An implementation provides the machinery needed to execute programs according to those rules.</p>
<p>Different implementations can follow the same language specification while using different technologies internally.</p>
<p>Let's look at some examples.</p>
<h3>A. CPython</h3>
<p>CPython is the standard and most widely used implementation of Python.</p>
<p>It is primarily written in C, and it compiles Python source code into bytecode that its interpreter executes.</p>
<p>When we download Python from the official Python website for a typical installation, we're generally using CPython.</p>
<h3>B. PyPy</h3>
<p>PyPy is another Python implementation that focuses on execution speed.</p>
<p>One of its important features is a Just-In-Time (JIT) compiler, which can compile frequently executed code into machine code while the program is running.</p>
<p>This can make some programs run faster than they do under CPython, although the actual performance depends on the workload.</p>
<h3>C. Jython</h3>
<p>Jython is a Python implementation that runs on the Java Virtual Machine (JVM).</p>
<p>It allows Python code to work with Java classes and libraries.</p>
<p>The JVM is the runtime environment that executes Java bytecode and provides services for Java-based applications.</p>
<p>Jython is a distinct implementation, and its Python language-version support differs from modern CPython.</p>
<h3>D. Stackless Python</h3>
<p>Stackless Python is based on CPython and focuses on alternative ways of managing execution, including task scheduling and lightweight tasklets.</p>
<p>It aims to reduce dependence on the traditional C call stack used in ordinary function calls and supports alternative approaches to concurrency.</p>
<p>In simpler terms, it explores different ways to manage tasks and execution rather than relying entirely on the usual call-stack model.</p>
<h3>E. IronPython</h3>
<p>IronPython is a Python implementation designed to work with the .NET ecosystem.</p>
<p>It allows Python code to interact with .NET libraries and technologies.</p>
<p>But what exactly is .NET?</p>
<p>.NET is a development platform from Microsoft that provides tools, libraries, and a runtime for building different types of applications.</p>
<p>IronPython makes it possible to use Python in that ecosystem.</p>
<h3>A quick comparison</h3>
<table>
<thead>
<tr>
<th>Implementation</th>
<th>Main technology or focus</th>
</tr>
</thead>
<tbody><tr>
<td>CPython</td>
<td>Standard implementation, primarily written in C</td>
</tr>
<tr>
<td>PyPy</td>
<td>JIT compilation and execution speed</td>
</tr>
<tr>
<td>Jython</td>
<td>Java Virtual Machine and Java ecosystem</td>
</tr>
<tr>
<td>Stackless Python</td>
<td>Alternative execution and task management</td>
</tr>
<tr>
<td>IronPython</td>
<td>.NET ecosystem integration</td>
</tr>
</tbody></table>
<p>These implementations demonstrate that Python is not just one particular executable program. It is a programming language that can be implemented in different ways.</p>
<h2>7. My Key Takeaways</h2>
<p>Here's what I took away from this video:</p>
<ol>
<li><p><strong>Bytecode</strong> is an intermediate representation of Python code that the runtime can execute. It is not machine code.</p>
</li>
<li><p><code>__pycache__</code> is a folder where Python can store cached compiled bytecode for imported modules.</p>
</li>
<li><p><code>.pyc</code> <strong>files</strong> contain cached compiled Python code and may be reused when the cache is valid.</p>
</li>
<li><p><strong>The PVM</strong> is commonly used to explain how Python bytecode is executed by the interpreter.</p>
</li>
<li><p><strong>The Python runtime</strong> provides the machinery required to execute and manage a running program.</p>
</li>
<li><p><strong>A Python implementation</strong> is the actual software that implements the language's rules.</p>
</li>
<li><p><strong>CPython, PyPy, Jython, Stackless Python, and IronPython</strong> are examples of different implementations, each with its own approach or focus.</p>
</li>
</ol>
<h2>Final Thoughts</h2>
<p>This video made me realize that running a Python program involves more than simply giving instructions to the computer.</p>
<p>There's source code, bytecode, an interpreter, cached compiled files, and a runtime environment working together to make execution possible.</p>
<p>The concept that took me the longest to understand was the PVM. Initially, I thought bytecode was something generated only when imports happened. Now I understand that compilation for execution and caching compiled code are two different things.</p>
<p>I also learned that Python's language rules and its implementation aren't the same. The rules describe how the language should behave, while an implementation provides the software that makes it work.</p>
<p>I'm still learning these concepts, but connecting them to an actual program made them much easier to explore.</p>
<p>One question leads to another, and that's exactly what makes this journey interesting.</p>
<hr />
<p><em>This is part of my Python learning journey, where I document what I understand from each Chai aur Code lecture, the questions I encounter, and the concepts I explore along the way.</em></p>
<p><strong>Have you explored how Python works behind the scenes?</strong> If you have a simpler explanation, a useful resource, or a correction to something I've misunderstood, I'd love to learn from you in the comments.</p>
]]></content:encoded></item><item><title><![CDATA[Getting Started with Python: What is the best way to install Python]]></title><description><![CDATA[MY LEARNING JOURNEY · 02]]></description><link>https://thebugdiary.hashnode.dev/getting-started-with-python-what-is-the-best-way-to-install-python</link><guid isPermaLink="true">https://thebugdiary.hashnode.dev/getting-started-with-python-what-is-the-best-way-to-install-python</guid><category><![CDATA[Chaiaurcode]]></category><category><![CDATA[Python]]></category><category><![CDATA[Beginner Developers]]></category><category><![CDATA[#LearninPublic]]></category><dc:creator><![CDATA[theBugDiary]]></dc:creator><pubDate>Sun, 18 Oct 2026 05:02:39 GMT</pubDate><content:encoded><![CDATA[<p><em>Learning Python with Chai aur Code, one video at a time.</em></p>
<p><strong>Learning source:</strong> <a href="https://youtu.be/0e2e2KcoQm4?si=w1HUvVPJDB7GGZnZ">Watch Video 2 — Chai aur Code</a></p>
<p>Before coding our first program in Python, we must ask ourselves some more fundamental questions: how can we install Python, and where can we execute our code?</p>
<p>In this video, I learned how to install Python on our computer, explored online alternatives, and got introduced to tools like Google Colab, Anaconda, Miniconda, and conda.</p>
<p>Let's break down what I understood.</p>
<h2>1. Installing Python + VS Code</h2>
<p>The recommended approach is to install Python on our computer using the official <a href="https://www.python.org/downloads/">Python website</a>.</p>
<p>Installing Python locally gives us more control over our development environment. We can work with files on our computer, install packages, and build projects without depending entirely on an online coding platform.</p>
<p>On Windows, the installer is generally a <code>.exe</code> file. Windows also provides the Python launcher (<code>py</code>) in many installations.</p>
<p>On macOS, the official installer is generally a <code>.pkg</code> file, and we commonly use the <code>python3</code> command to run Python 3.</p>
<p>For example, depending on the operating system and installation, we might run Python using:</p>
<pre><code class="language-bash">python --version
</code></pre>
<p>or:</p>
<pre><code class="language-bash">python3 --version
</code></pre>
<p>The command that works depends on how Python is installed and configured.</p>
<p>Although online environments are convenient, installing Python locally helps us work in a more complete development environment and avoid certain limitations we might encounter online. However, a local installation can also have setup issues, so it is important to understand how our environment works.</p>
<h2>2. What If I Don't Want to Install Python?</h2>
<p>If we don't want to install Python immediately, there are other tools that allow us to write and run code through a browser.</p>
<p>Let's look at the alternatives I learned about.</p>
<h3>A. OnlineGDB</h3>
<p><a href="https://www.onlinegdb.com/">Try OnlineGDB</a></p>
<p>OnlineGDB is a browser-based coding environment that allows us to write, execute, and debug programs in several programming languages, including Python.</p>
<p>We can use it to practise coding without setting up a complete local development environment.</p>
<p>It is useful when we want to:</p>
<ul>
<li><p>Try small code examples.</p>
</li>
<li><p>Practise programming exercises.</p>
</li>
<li><p>Test our understanding of a concept quickly.</p>
</li>
<li><p>Debug simple programs.</p>
</li>
</ul>
<p>OnlineGDB is an example of an online IDE (Integrated Development Environment). An IDE brings together tools that help us write, run, and debug code.</p>
<p>Online coding editors are convenient because we can start coding directly in our browser. However, they may have limitations when we move towards larger projects or need a specialized development environment.</p>
<h3>B. Google Colab</h3>
<p><a href="https://colab.research.google.com/">Try Google Colab</a></p>
<p>Google Colab is another browser-based environment for writing and running Python code. However, it is particularly useful for data science, machine learning, and working with data.</p>
<p>One of its main advantages is that it provides a cloud-based environment with many commonly used libraries already available. This means we often don't need to spend time installing and configuring every library ourselves.</p>
<p>This is especially helpful when working with data analysis, graphs, visualizations, and machine learning experiments.</p>
<p>Since the code runs in a cloud environment, we need a reliable internet connection. The available computing resources also depend on the environment and access level.</p>
<h4>What Is a Notebook?</h4>
<p>While exploring Google Colab, I learned about notebooks.</p>
<p>A notebook is a document made up of individual sections called <em>cells</em>. These cells can contain different types of content, such as:</p>
<ul>
<li><p>Code</p>
</li>
<li><p>Text and notes</p>
</li>
<li><p>Images</p>
</li>
<li><p>Data and tables</p>
</li>
<li><p>Graphs and visualizations</p>
</li>
<li><p>Outputs generated by running code</p>
</li>
</ul>
<p>Unlike a traditional Python script, where we commonly execute the file as a whole, a notebook allows us to run individual cells and see their outputs.</p>
<p>For example, we could use one cell to load a dataset, another to analyse it, and another to create a graph.</p>
<p>This makes notebooks particularly useful for data science because we can experiment with code step by step and immediately inspect the results.</p>
<h4>OnlineGDB vs Google Colab</h4>
<p>Although both allow us to write Python code through a browser, their main uses are different.</p>
<table>
<thead>
<tr>
<th>Feature</th>
<th>OnlineGDB</th>
<th>Google Colab</th>
</tr>
</thead>
<tbody><tr>
<td>Main purpose</td>
<td>General coding practice</td>
<td>Data science and experimentation</td>
</tr>
<tr>
<td>Working style</td>
<td>Code editor</td>
<td>Notebook with cells</td>
</tr>
<tr>
<td>Outputs</td>
<td>Program output and debugging</td>
<td>Code output, data, graphs, and more</td>
</tr>
<tr>
<td>Best suited for</td>
<td>Small programs and exercises</td>
<td>Data analysis, visualization, and ML experiments</td>
</tr>
</tbody></table>
<p>Neither tool is universally better. The right choice depends on what we want to accomplish.</p>
<h2>3. Anaconda and Miniconda</h2>
<p>The next tools I learned about were Anaconda and Miniconda.</p>
<p>Both are related to Python package and environment management, but they differ in what they include when installed.</p>
<h3>A. Anaconda</h3>
<p><a href="https://www.anaconda.com/">Explore Anaconda</a></p>
<p>Anaconda is a Python distribution designed mainly for data science and scientific computing.</p>
<p>It comes with Python, conda, and a collection of commonly used packages and tools.</p>
<p>These packages support tasks such as:</p>
<ul>
<li><p>Artificial intelligence and machine learning</p>
</li>
<li><p>Data analysis and exploration</p>
</li>
<li><p>Data visualization</p>
</li>
<li><p>Scientific computing</p>
</li>
<li><p>Data transformation</p>
</li>
</ul>
<p>The main advantage is convenience. Many useful packages and tools are included, so we can start working without installing everything separately.</p>
<p>However, because it includes a large collection of packages, the installation requires more disk space.</p>
<h3>B. Miniconda</h3>
<p><a href="https://www.anaconda.com/docs/getting-started/miniconda/main">Explore Miniconda</a></p>
<p>Miniconda is a smaller, minimal installer for working with Python and conda.</p>
<p>Instead of installing a large collection of packages upfront, it provides the essentials, including conda and a Python installation, so we can install the additional packages we need later.</p>
<p>This gives us more control over our environment and avoids installing a large number of packages that we might never use.</p>
<h4>Anaconda vs Miniconda</h4>
<table>
<thead>
<tr>
<th>Feature</th>
<th>Anaconda</th>
<th>Miniconda</th>
</tr>
</thead>
<tbody><tr>
<td>Installation size</td>
<td>Larger</td>
<td>Smaller</td>
</tr>
<tr>
<td>Included packages</td>
<td>Many packages included</td>
<td>Minimal setup</td>
</tr>
<tr>
<td>Flexibility</td>
<td>Convenient to start with</td>
<td>More control over what to install</td>
</tr>
<tr>
<td>Best suited for</td>
<td>Those who want many tools ready to use</td>
<td>Those who prefer a lightweight setup</td>
</tr>
</tbody></table>
<p>Neither option is automatically better. Anaconda can be convenient if we want many data science tools ready to use, while Miniconda is useful if we prefer to install only what we need.</p>
<h2>4. So, What Exactly Is Conda?</h2>
<p>This was another concept I wanted to understand clearly.</p>
<p>Conda is a package and environment manager. It helps us install and manage packages, handle dependencies, and create isolated environments for different projects.</p>
<p>Let's understand these two main uses.</p>
<h3>Package Management</h3>
<p>A package is reusable software that we can use in our programs.</p>
<p>For example, NumPy and pandas are Python libraries that provide functionality for numerical calculations and data analysis.</p>
<p>Instead of implementing everything ourselves, we can install and use these libraries in our projects.</p>
<p>Conda helps us install packages and manage their dependencies.</p>
<h3>Environment Management</h3>
<p>Imagine that we're working on two different projects.</p>
<p>Project A requires one version of a library, while Project B requires another version. Installing everything into a single shared environment could lead to dependency conflicts.</p>
<p>Conda allows us to create separate environments for these projects, each with its own packages and configurations.</p>
<p>This helps keep projects organized and reduces the chance of dependencies interfering with one another.</p>
<p><strong>One important distinction:</strong> Anaconda and Miniconda are distributions or installers, whereas conda is the tool used to manage packages and environments.</p>
<p>They're related, but they aren't the same thing.</p>
<h2>5. My Key Takeaways</h2>
<p>Here's what I took away from this video:</p>
<ol>
<li><p>We can install Python locally to get more control over our development environment.</p>
</li>
<li><p>Online alternatives like OnlineGDB allow us to write and run code without setting up Python locally.</p>
</li>
<li><p>Google Colab is especially useful for data science because it supports notebook-based coding and provides a cloud environment with commonly used libraries.</p>
</li>
<li><p>A notebook contains cells that can hold code, notes, and outputs, and we can execute individual cells.</p>
</li>
<li><p>Anaconda includes a broad collection of packages, whereas Miniconda provides a more minimal starting point.</p>
</li>
<li><p>Conda helps us manage packages, dependencies, and isolated environments for Python projects.</p>
</li>
</ol>
<h2>Final Thoughts</h2>
<p>Before this video, I thought getting started with Python was mainly about installing it and writing code. Now I understand that there are different tools and environments available, depending on what we want to do.</p>
<p>For someone just starting out, knowing these options is useful. We can install Python locally for general development, use an online editor for quick experiments, or explore specialized tools like Google Colab when working with data.</p>
<p>I still have a lot to learn, but understanding the available tools gives me a clearer starting point.</p>
<p>This is just the beginning of my Python learning journey!</p>
<hr />
<p><em>This is part of my learning-in-public series, where I document what I understand from each Chai aur Code Python lecture.</em></p>
<p><strong>Have any tips for someone just starting with Python?</strong> I'd love to hear your suggestions in the comments. I'm still learning, and recommendations that can make my learning process more effective are always welcome.</p>
]]></content:encoded></item><item><title><![CDATA[How I Started Learning Python with Chai aur Code — And the Learning Habit That's Helping Me Most]]></title><description><![CDATA[MY LEARNING JOURNEY · 01]]></description><link>https://thebugdiary.hashnode.dev/how-i-started-learning-python-with-chai-aur-code-and-the-learning-habit-that-s-helping-me-most</link><guid isPermaLink="true">https://thebugdiary.hashnode.dev/how-i-started-learning-python-with-chai-aur-code-and-the-learning-habit-that-s-helping-me-most</guid><category><![CDATA[Chaiaurcode]]></category><category><![CDATA[Python]]></category><category><![CDATA[#learninginpublic]]></category><category><![CDATA[Beginner Developers]]></category><dc:creator><![CDATA[theBugDiary]]></dc:creator><pubDate>Sat, 17 Oct 2026 16:37:59 GMT</pubDate><enclosure url="https://cdn.hashnode.com/uploads/covers/6ad24e2a5e6724a1d0d8dc76/80dc9f45-5f21-4e6c-8231-3bfc401dcbba.jpg" length="0" type="image/jpeg"/><content:encoded><![CDATA[<p><em>I am keeping a record of Python learning journey here, video by video. However, before dealing with the technical aspects, I would like to explain how I have come to this point and what has been assisting me in understanding the subject better.</em></p>
<p>I'm learning Python through the "Chai aur Python", and I'll be documenting my understanding of each video as I progress.</p>
<h2>It Started With a Recommendation From My Brother</h2>
<p>For a long time my brother has been recommending me the youtube channel named "<a href="https://www.youtube.com/@chaiaurcode">Chai Aur Code</a>".</p>
<p>When I was first learning JavaScript, he advised me to have a look at their lectures but at that time I was following some other youtube channel so ignored his reccomendation. And when I recently let him know that I was attempting to learn Python, he suggested Chai aur Code once again.</p>
<p>At this point, I started wondering:</p>
<p><strong>What is it about Chai aur Code that leads him to recommend it so frequently? What does it offer that other channels lack?</strong></p>
<p>So this time I decided to give it a proper try and not just brush off the recommendation.</p>
<p>Honestly,so far I have watched 3-4 video and I'm glad I went with my brother's recommendation.</p>
<h2>My First Impressions of Chai aur Code</h2>
<p>What I personally like about Chai aur Code is that its lectures get straight to the point and never make you feel like an outsider.</p>
<p>For a person who is just starting out, programming can at times be rather intimidating since there are some terms you've never come across, there are concepts that appear out of nowhere, and the explanations given may make you question whether or not everyone else understands the subject except you.</p>
<p>Chai aur Code has served me well as a starting point since the way it teaches seems accessible. I don't want to disparage other channels but I feel many channel either focus on beginner friendly content that is very slow paced or make very fast paced content having overwhelming amount of knowledge in single video.</p>
<p>Certainly, each individual has their own way of learning and different teachers suit different people. And finally I have found a channel who a moderate pace giving you space for your research about the things you learn in the videos.</p>
<p>The greatest gain I've experienced in my learning has not been due to the lectures alone.</p>
<p>It is due to another idea that my brother suggested to me.</p>
<h2><mark class="bg-yellow-200 dark:bg-yellow-500/30">The Advice That Changed How I Learn</mark></h2>
<p>My brother proposed a very simple idea, which was that each time I had a doubt or a question as I was watching a lecture I should ask ChatGPT or some other AI tool.</p>
<p>And do not just ask one question, then move on.</p>
<p><strong>Keep questioning the AI until the idea actually makes sense to me.</strong></p>
<p>At first, I thought what is he even talking about like isn't that common sense that we should do our own research rather than asking AI — but later on when I used this approach I understood that when I do my own research it take way much time and many times I don't even understand the topic and I move on because it is taking so long just to find an answer.</p>
<p>The difference for me lies in the extent to which I pursue the question.</p>
<p>Imagine that I have learned a programming concept and understand what it is. I may then think that I have really understood it. But then I ask myself:</p>
<ul>
<li><p>What is the reason it functions in this manner? — What is really going on behind the scenes? Can you explain it with an easier example?</p>
</li>
<li><p>What will occur if I make a change to the code?</p>
</li>
<li><p>What is the difference between this and a similar concept? (Try to use the concept in reference to normal life or other tool that you use)</p>
<ul>
<li>Example : I have already used notion,so when I started hashnode my questions were like can I make a text bold,italics,change font color,etc in hasnode similar to notion. Now this is a very simple question that would've taken a long time to answer if I started learning whole hashnode tutorial from a video but AI gave a straightaway answer.</li>
</ul>
</li>
<li><p>Could you put it another way?</p>
</li>
</ul>
<p>The answers to one question can sometimes lead to two new questions, which is why I continue on until the concept is clear enough for me to put it into my own words.</p>
<p>It is then that I think I have actually made genuine progress.</p>
<p>Of course, AI isn't always correct, so I also have to check over important explanations by testing the code and consulting reliable learning materials. Yet it has been extremely useful to me as a tool for exploring my doubts and considering the concepts from different points of view.</p>
<h2><mark class="bg-yellow-200 dark:bg-yellow-500/30">My Next-Day Routine: Teaching an Imaginary Audience</mark></h2>
<p>I have begun to adopt one more habit and I think that it's especially useful.</p>
<p>The day after having learned something, I pretend that I am giving a lecture to an audience on what I had learned the previous day. This helps with improving the flow by which I speak and later on may prepare me for interviews.</p>
<p>That may sound a bit odd, I suppose. There isn't really an audience, no classroom, and no one is asking me questions.</p>
<p>But that's the point.</p>
<p>I explain the concepts using my own words, as though a person were sitting in front of me and trying to understand them for the first time.</p>
<p>Here's the interesting point: I turn the doubts that I had resolved the previous day into questions for my imaginary audience.</p>
<p>For instance, suppose that I came to know a certain concept day before yesterday and had to put several questions to the AI before I understood it.</p>
<p>The next day, I might pretend someone in my audience asks:</p>
<p>Why is it arranged in that way?</p>
<p>Or:</p>
<p>What would the outcome be if we took a different approach?</p>
<p>After that I attempt to answer the questions without at once looking up the explanation again.</p>
<p><strong>A good indication that I understand the concept is if I'm able to explain it clearly. When I have difficulty understanding something, I realise that I need to go over the relevant part again.</strong></p>
<p>This procedure not only enables me to remember definitions but also encourages me to organize my thoughts, make connections between concepts, and become aware of the gaps in my understanding.</p>
<p>It also provides an opportunity for me to work on explaining technical ideas in a manner that a beginner could understand.</p>
<h2>What I'm Taking Away From This Experience</h2>
<p>I am still getting on with learning Python and have a long way to go; I am not writing this from the point of view of someone who has mastered programming, but rather as a person finding out what works best for their own learning.</p>
<p>So far, these are the three things that stand out to me:</p>
<p><strong>1. It's important to find a teacher with whom you can connect.</strong></p>
<p>A good learning resource can make a subject which is unfamiliar seem a lot more accessible.</p>
<p><strong>2. Do not limit yourself to grasping the first explanation.</strong></p>
<p>If a thing doesn't make sense then you should ask another question, use a different example, or tackle the concept from a new angle. It's perfectly all right to need several explanations.</p>
<p><strong>3. Put into practice the knowledge that you have acquired.</strong></p>
<p>It makes a difference whether or not your audience is imaginary in that your understanding of a topic can be tested by explaining it without referring to your notes.</p>
<p>Just because these habits don't ensure that every concept will become easy doesn't mean they don't provide me with a method of actively dealing with confusion rather than just moving on.</p>
<h2>Why I'm Starting This Blog</h2>
<p>I would like to use Hashnode to document my Pythong Learning Journey, one video at a time.</p>
<p>I intend to discuss what I understood from each lecture, the examples that I tried, the doubts that I had, and the explanations which finally made everything clear.</p>
<p>What I also hope is that this blog should extend beyond being merely a set of notes.</p>
<p><strong>I should really appreciate it if someone with more experience came across my articles and pointed out a more effective way of understanding a concept, or suggested a useful resource for me to look into, or indicated a habit that might enhance my learning process.</strong></p>
<p>My purpose is to gain knowledge, and I believe that learning has greater value when we share the process with other people.</p>
<p>That is where my journey starts.</p>
<p>One video at a time. One question at a time. One concept at a time.</p>
<p>I hope that by keeping a record of the journey I'll one day be able to see exactly how far I've come.</p>
<p>If you're likewise picking up coding, I should be interested to know the habits or techniques which have helped you to get a better understanding. I'm always up for finding out something new.</p>
<p>Let's study in public! 🐍</p>
]]></content:encoded></item></channel></rss>