<?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 Abhimanyu Singh on Medium]]></title>
        <description><![CDATA[Stories by Abhimanyu Singh on Medium]]></description>
        <link>https://medium.com/@abhimanyusingh.as9198?source=rss-ae622322ead0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*MYGO6pojzFmRXQER</url>
            <title>Stories by Abhimanyu Singh on Medium</title>
            <link>https://medium.com/@abhimanyusingh.as9198?source=rss-ae622322ead0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Wed, 02 Dec 2026 08:21:54 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@abhimanyusingh.as9198/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[I Built a Job-Search Agent That Actually Respects the Rules : Here’s How It Fetches, Scores, and…]]></title>
            <link>https://medium.com/@abhimanyusingh.as9198/i-built-a-job-search-agent-that-actually-respects-the-rules-heres-how-it-fetches-scores-and-b7f41607853a?source=rss-ae622322ead0------2</link>
            <guid isPermaLink="false">https://medium.com/p/b7f41607853a</guid>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[job-search]]></category>
            <category><![CDATA[automation]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[python]]></category>
            <dc:creator><![CDATA[Abhimanyu Singh]]></dc:creator>
            <pubDate>Tue, 11 Aug 2026 11:15:26 GMT</pubDate>
            <atom:updated>2026-08-11T11:15:26.895Z</atom:updated>
            <content:encoded><![CDATA[<h3>I Built a Job-Search Agent That Actually Respects the Rules : Here’s How It Fetches, Scores, and Tailors Applications for Free</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*uw77OwNAaRDuX1kUHFXDRw.png" /></figure><p>Job hunting has a boring, repetitive core: check a dozen job boards, read postings that all sound the same, and hand-tailor a resume for every one that looks relevant. So I built an agent to automate that part, while being deliberate about what it <em>shouldn’t</em> automate.</p><p>This post walks through how it actually works under the hood: how it fetches jobs without scraping anything, how the “tailoring” step avoids just making things up, and a few bugs I hit along the way that turned out to be more interesting than the parts that worked on the first try.</p><h4><strong>What it does?</strong></h4><p>Every day, a scheduled job pulls new postings from a handful of public job-board APIs, keeps only the ones matching a target role (ML/AI/Data Engineer, in my case), scores each one against my resume for keyword overlap, and asks an LLM to rewrite my resume and write a cover letter. That rewrite is grounded strictly in what’s actually on my resume; it never invents skills I don’t have. Everything lands in a review queue where I approve or reject. Nothing ever gets submitted to an employer automatically.</p><p>That last part is a design decision, not a limitation, and I’ll come back to it.</p><h4>The architecture, briefly:</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*r0Xyy5hGjqOFTW0jWcEq3w.png" /></figure><pre>GitHub Actions (daily cron)<br> → fetch jobs from public APIs → filter → dedupe → store<br> → score against resume (deterministic) → tailor via LLM → store<br>Supabase (Postgres + Storage + Auth)<br> → holds jobs, resumes, tailored applications<br> → Row Level Security gates the frontend to just me<br>React frontend (deployed static, e.g. Vercel)<br> → review queue, sorted by match score<br> → Approve / Reject - approving just means &quot;ready, I&#39;ll submit it myself&quot;</pre><p>Everything here fits inside free tiers. No server sits around idling and burning money; GitHub Actions spins up, does its job, and shuts down.</p><p><strong>Fetching jobs without scraping anything :</strong></p><p>The first design constraint I set for myself: no scraping LinkedIn, Indeed, or Glassdoor. They explicitly prohibit it in their Terms of Service and actively fight it technically. Instead, the agent only talks to sources that offer a real, public API:</p><ul><li>RemoteOK and Arbeitnow: open, keyless JSON APIs covering a broad range of remote-friendly postings</li><li>Greenhouse, Lever, and Ashby: the three big applicant-tracking systems, each exposing a public, per-company job-board API (e.g. https://boards-api.greenhouse.io/v1/boards/{company}/jobs) for any company that uses them</li><li>Adzuna: a free-tier job-search aggregator API (optional, needs a free signup)</li></ul><p>Here’s the Greenhouse fetcher, which is representative of the pattern:</p><pre>def fetch():<br> jobs = []<br> for slug in GREENHOUSE_COMPANIES:<br> try:<br> data = get_json(<br> f&quot;https://boards-api.greenhouse.io/v1/boards/{slug}/jobs&quot;,<br> params={&quot;content&quot;: &quot;true&quot;},<br> )<br> except Exception:<br> continue # bad slug or private board - skip, don&#39;t crash the run<br> for row in data.get(&quot;jobs&quot;, []):<br> jobs.append(make_job(<br> source=&quot;greenhouse&quot;,<br> external_id=row.get(&quot;id&quot;),<br> company=row.get(&quot;company_name&quot;, slug),<br> title=row.get(&quot;title&quot;, &quot;&quot;),<br> location=(row.get(&quot;location&quot;) or {}).get(&quot;name&quot;, &quot;&quot;),<br> description=row.get(&quot;content&quot;, &quot;&quot;),<br> url=row.get(&quot;absolute_url&quot;, &quot;&quot;),<br> posted_at=row.get(&quot;first_published&quot;) or row.get(&quot;updated_at&quot;),<br> ))<br> return jobs</pre><p>Each source module normalizes into the same shape, so the orchestrator doesn’t care where a job came from. It’s a curated list of company slugs I maintain by hand (fetcher/company_list.py). Bad slugs just get skipped silently, so adding a new company is as low-risk as guessing its URL.</p><h4>The bug that taught me something about “relevance”</h4><p>Once everything was wired up, I ran the fetcher and got results, but a lot of them were wrong. Roles like <em>“Account Director”</em> and <em>“GTM Strategy &amp; Operations Lead”</em> were showing up in a feed that was supposed to be filtered to ML/AI/Data roles.</p><p>My first instinct was that I had a regex bug, and I did have one of those too (more below), but this one was different. The keyword filter was checking the <em>full job description</em> for phrases like “artificial intelligence.” That seemed reasonable until I actually looked at the postings: companies like OpenAI and Notion put boilerplate like <em>“…building artificial intelligence that benefits everyone…”</em> in the company-description paragraph of every single job posting, technical or not. My filter was matching that boilerplate, not the actual role.</p><p>The fix was to only match keywords against the title, not the full description:</p><pre>def matches_keywords(job, keywords):<br> # Title only, not the full description: AI-native companies&#39; postings all<br> # carry &quot;artificial intelligence&quot; boilerplate in the description<br> # regardless of role, which would otherwise match every job at that company.<br> title = job[&quot;title&quot;]<br> return any(_keyword_pattern(kw).search(title) for kw in keywords)</pre><p>Before the fix, 69 postings matched the keyword filter (63 after deduping). After, only 14 matched (10 after deduping), and every single one was an actual ML/AI/Data Engineer role. Sometimes the interesting bug isn’t a crash. It’s the code doing exactly what you told it to, and you realizing what you told it was wrong.</p><p>The regex bug, for what it’s worth: I was matching keywords with plain substring checks (kw in text), which meant the single-letter keyword &quot;r&quot; (the R programming language) matched inside almost any word containing the letter r: &quot;experienced,&quot; &quot;engineer,&quot; you name it. Word-boundary regex fixed it:</p><pre>def _pattern(keyword):<br> escaped = re.escape(keyword)<br> left = r&quot;\b&quot; if keyword[0].isalnum() else &quot;&quot;<br> right = r&quot;\b&quot; if keyword[-1].isalnum() else &quot;&quot;<br> return re.compile(left + escaped + right, re.IGNORECASE)</pre><p>(The boundary check is conditional because a naive \b breaks on keywords like &quot;c++&quot;, where + isn&#39;t a word character.)</p><h4>Scoring and tailoring: keep the LLM on a short leash</h4><p>Once a job clears the filter, two things happen: a deterministic ATS match score, and an LLM tailoring pass. I kept these separate on purpose.</p><p>The score is not an LLM call. It’s a plain keyword-taxonomy match, a curated list of roughly 60 ML/data/infra terms (python, pytorch, airflow, rag, mlops, and so on), checked against both the job description and the resume text with the same word-boundary regex from above:</p><pre>def score(job_description, resume_text):<br> jd_keywords = extract_keywords(job_description)<br> matched = [kw for kw in jd_keywords if _PATTERNS[kw].search(resume_text)]<br> missing = [kw for kw in jd_keywords if kw not in matched]<br> pct = round(100 * len(matched) / len(jd_keywords), 1)<br> return {&quot;score&quot;: pct, &quot;matched&quot;: matched, &quot;missing&quot;: missing}</pre><p>This is fast, free, reproducible, and explainable. When the UI shows “40% match, missing: azure, llm, rag,” that’s not an LLM’s vibes-based guess. It’s a literal list you can double-check against the job posting yourself.</p><p>The tailoring <em>is</em> an LLM call, but a tightly scoped one. The prompt is explicit that it may reorder, rephrase, and emphasize, but never invent:</p><pre>TAILOR_SYSTEM_PROMPT = &quot;&quot;&quot;You tailor a candidate&#39;s resume for a specific job posting.<br>Rules:<br>- Only use experience, skills, and facts that already appear in the base resume.<br> Never invent employers, titles, dates, metrics, or skills the candidate doesn&#39;t have.<br>- You MAY reorder bullets/skills, rephrase wording, and surface relevant existing<br> experience more prominently to better match the job description&#39;s language and<br> the given ATS keyword list.<br>- If a keyword is missing from the resume entirely, do not claim it - leave it out.</pre><p>It’s fed the base resume, the job description, and the specific list of missing keywords from the deterministic scorer, so the model knows exactly what gap it’s <em>not</em> allowed to paper over.</p><h4>The free-tier LLM surprise</h4><p>I originally pointed this at Gemini 2.0 Flash’s free tier. First real request: 429 RESOURCE_EXHAUSTED, with the quota violation explicitly reporting limit: 0. Not &quot;you used your quota.&quot; Zero entitlement, on a brand-new API key, in a brand-new Google Cloud project.</p><p>Before assuming my account was just unlucky, I listed every model the key had access to and tried a few:</p><pre>for model in [&quot;gemini-2.5-flash-lite&quot;, &quot;gemini-2.0-flash-lite&quot;, &quot;gemma-4–26b-a4b-it&quot;]:<br> resp = client.models.generate_content(model=model, contents=&quot;Reply with exactly: OK&quot;)</pre><p>The Gemini-branded models all hit the same zero-quota wall. The open-weight Gemma model, on the same key, worked immediately, full JSON mode and system-instruction support included. Whatever gate Google has on Gemini-branded free tier for some accounts apparently doesn’t apply to Gemma. So that’s what the agent runs on by default now, with an easy override (GEMINI_MODEL env var) for anyone whose account doesn&#39;t hit the same wall.</p><h4>The review queue, and why “approve” doesn’t mean “submit”</h4><p>Everything lands in a queue, sorted by match score, with the tailored resume, cover letter, and a matched/missing keyword breakdown. Approving a job doesn’t submit anything anywhere. It just means “this is ready, I’ll go apply myself.” A few reasons I drew that line deliberately rather than pushing further into full automation:</p><ul><li>Most ATS apply forms need manual file upload and interaction anyway. There’s no clean API for “submit this application” the way there is for “list these postings.”</li><li>Automating past CAPTCHAs or login walls to submit on my behalf would cross into exactly the kind of ToS-hostile territory I avoided for job <em>fetching</em>.</li><li>A bad automated submission with my name on it is a much worse failure mode than a slightly slower manual process.</li></ul><h4>Two browser bugs that only showed up after deploying</h4><p>The resume-upload step needs an LLM API key, which obviously can’t ship inside a public frontend’s JS bundle. So it runs through a tiny local server on my own machine, and the deployed (HTTPS) frontend calls http://localhost:8787 to reach it. This is where things got interesting.</p><p>Chrome blocked it silently at first. The culprit was a security feature called Private Network Access, which requires the local server to explicitly opt in via a response header before an HTTPS page is allowed to call it at all:</p><pre>self.send_header(&quot;Access-Control-Allow-Private-Network&quot;, &quot;true&quot;)</pre><p>Safari, once I switched browsers to test, failed differently, and no header fixed it. Safari enforces strict mixed-content blocking: an HTTPS page cannot fetch plain http:// content at all, not even to localhost, and there&#39;s no opt-out for it. The only real fix was serving the local server over HTTPS too, with a self-signed certificate generated automatically on first run:</p><pre>def ensure_cert():<br> if CERT_FILE.exists() and KEY_FILE.exists():<br> return<br> subprocess.run([<br> &quot;openssl&quot;, &quot;req&quot;, &quot;-x509&quot;, &quot;-newkey&quot;, &quot;rsa:2048&quot;, &quot;-nodes&quot;,<br> &quot;-keyout&quot;, str(KEY_FILE), &quot;-out&quot;, str(CERT_FILE), &quot;-days&quot;, &quot;3650&quot;,<br> &quot;-subj&quot;, &quot;/CN=localhost&quot;,<br> &quot;-addext&quot;, &quot;subjectAltName=DNS:localhost,IP:127.0.0.1&quot;,<br> ], check=True, capture_output=True)</pre><p>That’s the kind of bug that never shows up in ordinary local development. It only appears once real HTTPS meets a real browser’s security model.</p><h4>What it costs to run</h4><p>What it costs to run, at this scale: $0.<br>• Scheduler: GitHub Actions cron, free<br>• Database, storage, auth: Supabase free tier, free<br>• LLM tailoring: Gemini API (Gemma model), free<br>• Job-source APIs: RemoteOK, Arbeitnow, Greenhouse, Lever, Ashby, free and public<br>• Frontend hosting: Vercel free tier, free</p><h4>Closing thought</h4><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*kLEB9Bny2d7T00QaOCoCiQ.png" /></figure><p>The genuinely useful part of “agentic” tooling, for me, wasn’t making something that could act completely unsupervised. It was figuring out exactly where the line should be. Fetching public data and summarizing it is fully automatable, no controversy there. Filtering and scoring against a real taxonomy is automatable too, and just as important, it’s checkable: you can point at the missing-keyword list and verify it yourself. Rewriting a resume needs hard rails against fabrication before it’s safe to automate at all. And clicking “submit” on someone’s behalf, on a page you don’t control? That’s the line. I left it on the other side, on purpose.</p><p>If you’re building something similar, my one piece of advice is to write the “what this deliberately does not do” section of your README before you start coding the happy path. It’s a much better design tool than it sounds like.</p><p>Full source code on GitHub: <a href="http://github.com/abhimanyusingh00/job-search-agent">Job_search_agent</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=b7f41607853a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Common Python Errors Beginners Face and How to Fix Them]]></title>
            <link>https://medium.com/@abhimanyusingh.as9198/common-python-errors-beginners-face-and-how-to-fix-them-090ca65e3055?source=rss-ae622322ead0------2</link>
            <guid isPermaLink="false">https://medium.com/p/090ca65e3055</guid>
            <category><![CDATA[python-error-handling]]></category>
            <category><![CDATA[coding-tips]]></category>
            <category><![CDATA[debugging]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[pythonbegi]]></category>
            <dc:creator><![CDATA[Abhimanyu Singh]]></dc:creator>
            <pubDate>Sat, 01 Aug 2026 15:38:46 GMT</pubDate>
            <atom:updated>2026-08-01T15:38:46.841Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*RqnZhoWmtpCX50qsRg9EpA.jpeg" /></figure><p>Python is popular among beginners because its syntax is clean and readable. However, learning Python still involves encountering errors. These errors are not signs that someone is bad at programming. They are part of learning how Python reads, interprets, and executes code.</p><p>This article covers the most common Python errors beginners face, explains why they happen, and shows how to fix them.</p><ol><li>SyntaxError</li></ol><p>A SyntaxError occurs when Python cannot understand the structure of the code.</p><h3>Incorrect code</h3><pre>age = 21</pre><pre>if age &gt;= 18<br>    print(&quot;You are eligible&quot;)</pre><h3>Error</h3><pre>SyntaxError: expected &#39;:&#39;</pre><h3>Correct code</h3><pre>age = 21</pre><pre>if age &gt;= 18:<br>    print(&quot;You are eligible&quot;)</pre><p>The colon is required after statements such as if, elif, else, for, while, def, and class.</p><h3>2. IndentationError</h3><p>Python uses indentation to define code blocks. Inconsistent or missing indentation causes an IndentationError.</p><h3>Incorrect code</h3><pre>if temperature &gt; 30:<br>print(&quot;It is hot&quot;)</pre><h3>Correct code</h3><pre>if temperature &gt; 30:<br>    print(&quot;It is hot&quot;)</pre><p>Use four spaces for each indentation level. Avoid mixing tabs and spaces.</p><h3>3. NameError</h3><p>A NameError occurs when Python cannot find a variable or function with the specified name.</p><h3>Incorrect code</h3><pre>user_name = &quot;Ava&quot;</pre><pre>print(username)</pre><h3>Error</h3><pre>NameError: name &#39;username&#39; is not defined</pre><h3>Correct code</h3><pre>user_name = &quot;Ava&quot;</pre><pre>print(user_name)</pre><p>Python variable names are case-sensitive. For example, total, Total, and TOTAL are three different names.</p><h3>4. TypeError</h3><p>A TypeError occurs when an operation is applied to an incompatible data type.</p><h3>Incorrect code</h3><pre>age = 25</pre><pre>message = &quot;My age is &quot; + age</pre><p>A string cannot be joined directly with an integer.</p><h3>Correct code</h3><pre>age = 25</pre><pre>message = &quot;My age is &quot; + str(age)<br>print(message)</pre><p>An f-string is usually cleaner:</p><pre>age = 25</pre><pre>message = f&quot;My age is {age}&quot;<br>print(message)</pre><h3>5. ValueError</h3><p>A ValueError occurs when a function receives the correct data type but an invalid value.</p><h3>Incorrect code</h3><pre>quantity = int(&quot;ten&quot;)</pre><p>The int() function accepts strings, but &quot;ten&quot; is not a valid integer representation.</p><h3>Correct code</h3><pre>quantity = int(&quot;10&quot;)</pre><p>User input should be validated before conversion:</p><pre>user_input = input(&quot;Enter a quantity: &quot;)</pre><pre>try:<br>    quantity = int(user_input)<br>    print(f&quot;Quantity: {quantity}&quot;)<br>except ValueError:<br>    print(&quot;Please enter a valid whole number.&quot;)</pre><h3>6. IndexError</h3><p>An IndexError occurs when code tries to access a list position that does not exist.</p><h3>Incorrect code</h3><pre>colors = [&quot;blue&quot;, &quot;gold&quot;, &quot;orange&quot;]</pre><pre>print(colors[3])</pre><p>Python starts indexing at zero:</p><pre>colors[0] -&gt; &quot;blue&quot;<br>colors[1] -&gt; &quot;gold&quot;<br>colors[2] -&gt; &quot;orange&quot;</pre><h3>Correct code</h3><pre>print(colors[2])</pre><p>A safe check can be used when the index is dynamic:</p><pre>index = 3</pre><pre>if 0 &lt;= index &lt; len(colors):<br>    print(colors[index])<br>else:<br>    print(&quot;Index is outside the list.&quot;)</pre><h3>7. KeyError</h3><p>A KeyError occurs when a dictionary does not contain the requested key.</p><h3>Incorrect code</h3><pre>customer = {<br>    &quot;name&quot;: &quot;Jordan&quot;,<br>    &quot;plan&quot;: &quot;Premium&quot;<br>}</pre><pre>print(customer[&quot;email&quot;])</pre><h3>Safer code</h3><pre>email = customer.get(&quot;email&quot;, &quot;Email not available&quot;)</pre><pre>print(email)</pre><p>Use square brackets when the key is required. Use .get() when a missing key is expected and a default value is acceptable.</p><h3>8. AttributeError</h3><p>An AttributeError occurs when an object does not support the requested attribute or method.</p><h3>Incorrect code</h3><pre>numbers = [10, 20, 30]</pre><pre>numbers.upper()</pre><p>Lists do not have an upper() method.</p><h3>Correct code</h3><pre>message = &quot;python&quot;</pre><pre>print(message.upper())</pre><p>Before calling a method, identify the object’s type:</p><pre>print(type(numbers))</pre><h3>9. ModuleNotFoundError</h3><p>A ModuleNotFoundError occurs when Python cannot locate an imported package.</p><h3>Example</h3><pre>import seaborn</pre><p>If Seaborn is not installed, Python may report:</p><pre>ModuleNotFoundError: No module named &#39;seaborn&#39;</pre><p>Install it from a terminal:</p><pre>python -m pip install seaborn</pre><p>In Google Colab or Jupyter:</p><pre>%pip install seaborn</pre><p>Also check for spelling mistakes and confirm that the package is installed in the same Python environment running the program.</p><h3>10. FileNotFoundError</h3><p>A FileNotFoundError occurs when Python cannot find a requested file.</p><h3>Incorrect code</h3><pre>with open(&quot;customers.csv&quot;, &quot;r&quot;) as file:<br>    data = file.read()</pre><p>Possible causes include:</p><ul><li>The filename is incorrect.</li><li>The file is in another directory.</li><li>The program is running from an unexpected working directory.</li><li>The filename uses different capitalization.</li></ul><p>Check the current directory:</p><pre>from pathlib import Path</pre><pre>print(Path.cwd())</pre><p>Check whether the file exists:</p><pre>from pathlib import Path</pre><pre>file_path = Path(&quot;customers.csv&quot;)</pre><pre>if file_path.exists():<br>    print(&quot;File found&quot;)<br>else:<br>    print(&quot;File not found&quot;)</pre><h3>11. ZeroDivisionError</h3><p>Dividing a number by zero raises ZeroDivisionError.</p><h3>Incorrect code</h3><pre>revenue = 1000<br>customers = 0</pre><pre>average_revenue = revenue / customers</pre><h3>Correct code</h3><pre>if customers &gt; 0:<br>    average_revenue = revenue / customers<br>else:<br>    average_revenue = 0</pre><p>Always check denominators when they can be zero.</p><h3>12. Infinite Loops</h3><p>An infinite loop is usually a logic error rather than a Python exception.</p><h3>Incorrect code</h3><pre>count = 1</pre><pre>while count &lt;= 5:<br>    print(count)</pre><p>The value of count never changes, so the condition always remains true.</p><h3>Correct code</h3><pre>count = 1</pre><pre>while count &lt;= 5:<br>    print(count)<br>    count += 1</pre><p>When writing a while loop, confirm that something inside the loop eventually makes its condition false.</p><h3>13. Mutable Default Arguments</h3><p>This mistake is less obvious but important.</p><h3>Problematic code</h3><pre>def add_item(item, items=[]):<br>    items.append(item)<br>    return items</pre><p>Calling the function repeatedly reuses the same list:</p><pre>print(add_item(&quot;apple&quot;))<br>print(add_item(&quot;banana&quot;))</pre><p>Output:</p><pre>[&#39;apple&#39;]<br>[&#39;apple&#39;, &#39;banana&#39;]</pre><h3>Correct code</h3><pre>def add_item(item, items=None):<br>    if items is None:<br>        items = []</pre><pre>    items.append(item)<br>    return items</pre><p>Default argument values are created once when a function is defined, not every time it is called.</p><h3>14. Using = Instead of ==</h3><p>A single equals sign assigns a value. Two equals signs compare values.</p><h3>Assignment</h3><pre>status = &quot;active&quot;</pre><h3>Comparison</h3><pre>if status == &quot;active&quot;:<br>    print(&quot;Account is active&quot;)</pre><p>Beginners often accidentally use assignment syntax when they intend to compare values.</p><h3>15. Off-by-One Errors</h3><p>An off-by-one error happens when a loop runs one time too many or one time too few.</p><h3>Example</h3><pre>for number in range(1, 5):<br>    print(number)</pre><p>Output:</p><pre>1<br>2<br>3<br>4</pre><p>The ending value passed to range() is excluded. To include five:</p><pre>for number in range(1, 6):<br>    print(number)</pre><h3>How to Read a Python Error Message</h3><p>Python error messages usually contain three useful pieces of information:</p><ol><li>The file and line where the problem occurred</li><li>The code involved</li><li>The exception type and message</li></ol><p>Example:</p><pre>Traceback (most recent call last):<br>  File &quot;app.py&quot;, line 8, in &lt;module&gt;<br>    total = price + quantity<br>TypeError: unsupported operand type(s) for +: &#39;float&#39; and &#39;str&#39;</pre><p>Read the traceback from the bottom upward:</p><ul><li>TypeError identifies the error category.</li><li>The message says that a float and a str were combined.</li><li>The traceback points to line 8.</li><li>Inspect price and quantity to determine which value has the wrong type.</li></ul><p>Useful debugging statements include:</p><pre>print(type(price))<br>print(type(quantity))<br>print(repr(quantity))</pre><h3>A Practical Debugging Process</h3><p>When an error occurs:</p><ol><li>Read the final line of the traceback.</li><li>Identify the exception type.</li><li>Open the referenced line.</li><li>Inspect the variables used on that line.</li><li>Verify their values and data types.</li><li>Reduce the problem to the smallest reproducible example.</li><li>Fix one issue at a time.</li><li>Run the code again.</li><li>Add a test for the case that caused the failure.</li></ol><p>Avoid making several unrelated changes at once. Otherwise, it becomes difficult to identify which change fixed or introduced the problem.</p><h3>Conclusion</h3><p>Errors are a normal part of programming. The most valuable skill is not memorizing every exception ,it is learning how to read the traceback, inspect program state, and test assumptions systematically.</p><p>Beginners who become comfortable with error messages improve faster because they stop treating errors as failures and start treating them as useful diagnostic information.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=090ca65e3055" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>