<?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 Sumit Shrestha on Medium]]></title>
        <description><![CDATA[Stories by Sumit Shrestha on Medium]]></description>
        <link>https://medium.com/@thesumitshrestha?source=rss-c80d98eca813------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*rNrssQhrdId_429_tOWQNw.jpeg</url>
            <title>Stories by Sumit Shrestha on Medium</title>
            <link>https://medium.com/@thesumitshrestha?source=rss-c80d98eca813------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sun, 22 Nov 2026 08:32:42 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@thesumitshrestha/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[AI in April 2026: 5 Trends That Are Reshaping Everything Right Now]]></title>
            <link>https://thesumitshrestha.medium.com/ai-in-april-2026-5-trends-that-are-reshaping-everything-right-now-25726f465a52?source=rss-c80d98eca813------2</link>
            <guid isPermaLink="false">https://medium.com/p/25726f465a52</guid>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[anthropics]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[tsswrites]]></category>
            <category><![CDATA[claude-code]]></category>
            <dc:creator><![CDATA[Sumit Shrestha]]></dc:creator>
            <pubDate>Wed, 08 Apr 2026 05:43:03 GMT</pubDate>
            <atom:updated>2026-04-08T05:45:31.766Z</atom:updated>
            <content:encoded><![CDATA[<p>If you blinked in the last few weeks, you may have missed a staggering amount of movement in the AI world. We’re not just talking incremental updates — we’re talking about AI writing drug prescriptions, models that consume 100× less energy, and a protocol quietly becoming the backbone of the entire agentic ecosystem. Let’s break it all down.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*bzrTvNCYMHIbHw0IYMdiAw.png" /></figure><h4>1. Agentic AI Isn’t Coming — It’s Already Here</h4><p>For the past year or so, “AI agents” have been the buzzword du jour. But 2026 is the year the rubber finally met the road.</p><p>Right now, every major model release — from Google’s Gemini 3.1 Ultra to Anthropic’s Claude Mythos 5 — is being designed from the ground up with agentic workflows at the center. That means AI that doesn’t just answer questions, but actually breaks complex goals into subtasks and executes them across multiple tools and systems — on its own.</p><p>The numbers back this up. Analysts estimate that by end of 2026, 40% of business applications will incorporate some form of AI agent, up from fewer than 5% just last year. The market is projected to jump from $7.8 billion today to over $52 billion by 2030.</p><p>But here’s what’s actually fascinating: most of the “AI agent” vendors out there aren’t really building agents at all. Analysts estimate only around 130 out of thousands of companies claiming to build agentic systems are genuinely doing it. The hype is enormous, but the real builders are few — and that gap is an opportunity.</p><h4>2. The Protocol That’s Stitching It All Together: MCP</h4><p>You’ve probably heard of APIs. But there’s a newer standard that’s becoming the connective tissue of the AI world — and it’s moving fast.</p><p>Anthropic’s Model Context Protocol (MCP) crossed 97 million installs in March 2026, and every major AI provider has now shipped MCP-compatible tooling. That includes Google, Microsoft, OpenAI, and dozens of smaller players.</p><p>Why does this matter? Because MCP is the standard that lets AI agents connect to external tools, APIs, and data sources in a unified way. Think of it like USB-C, but for AI. Instead of every company building custom integrations for every service, you write once to MCP and it just works — whether the underlying model is Claude, Gemini, or GPT.</p><p>The real unlock here is multi-agent orchestration. When multiple AI agents need to collaborate — one researching, one writing, one verifying — MCP is how they pass context and coordinate in real time. This is what “digital assembly lines” actually look like in practice.</p><h4>3. AI Just Got 100× More Energy Efficient (Seriously)</h4><p>One of the most underreported stories of the week is a breakthrough out of Tufts University that could fundamentally change how we think about AI’s environmental footprint.</p><p>Researchers there have developed a neuro-symbolic AI model that combines traditional neural networks with human-like symbolic reasoning — essentially teaching AI to break problems into logical steps rather than relying on brute-force pattern matching.</p><p>The results are hard to believe until you read them twice: training time dropped from 36+ hours to just 34 minutes. Energy use during training fell to just 1% of what conventional models require. And during operation, the system uses only 5% of the energy of standard models. Oh, and accuracy? It went up — from a 34% success rate on the Tower of Hanoi planning benchmark to 95%.</p><p>This comes at a critical moment. AI data centers consumed an estimated 415 terawatt hours of electricity in 2024 alone. If neuro-symbolic approaches scale, this isn’t just an efficiency story — it’s a sustainability story that could change the public and political perception of AI entirely.</p><h4>4. AI Is Now Prescribing Your Medication</h4><p>This one hit differently.</p><p>Utah became the first state in the US to allow an AI system to legally renew drug prescriptions — without a doctor’s sign-off. A startup called Doctronic deployed its autonomous AI health platform inside Utah’s regulatory sandbox, and it’s now handling routine prescription refills for patients directly.</p><p>To be clear, this isn’t diagnosing cancer or performing surgery. It’s refilling maintenance medications — blood pressure pills, cholesterol drugs, and the like. But the precedent is enormous.</p><p>The broader regulatory picture is messy. The FDA hasn’t weighed in on Doctronic’s program. States like California, Illinois, and Texas are rushing to pass their own AI healthcare laws. California’s AB 489, for example, now prohibits AI systems from implying they hold a medical license — a sign of how quickly things are moving and how unprepared regulators were even six months ago.</p><p>There’s a real tension here between access (AI could make healthcare more accessible for millions of underserved patients) and safety (who’s accountable when something goes wrong?). This debate is only getting louder.</p><h4>5. The Model Race Is Entering a New Phase</h4><p>If the last two years were about who could build the biggest model, 2026 is about something more nuanced: who can build the most capable, most efficient, most deployable model.</p><p>A few standouts worth knowing:</p><p>Claude Mythos 5 from Anthropic is the first widely recognized ten-trillion-parameter model engineered specifically for high-stakes environments — think cybersecurity, academic research, and complex multi-step coding tasks. It’s not for casual chat; it’s for serious work.</p><p>Gemini 3.1 Ultra from Google ships with a 2-million token context window and processes text, images, audio, and video natively — no transcription middleware needed. For multimodal workflows, this is a big deal.</p><p>Gemma 4, Google’s open model series, is designed specifically for agentic reasoning, making powerful AI more accessible to smaller teams and startups who can’t afford the heavyweight API costs.</p><p>And the investment keeps flowing. OpenAI just closed a $122 billion funding round — including $3 billion from retail investors — at a valuation of $852 billion. The model arms race isn’t slowing down; it’s just shifting toward quality, efficiency, and real-world deployability.</p><h4>What This All Means</h4><p>Step back and look at the picture these five trends paint together, and a clear theme emerges: AI is growing up.</p><p>The agentic shift means AI is moving from a tool you prompt to a system that acts. MCP means that ecosystem is becoming interoperable. The energy breakthrough means it could become sustainable. The healthcare developments mean it’s touching life-and-death decisions. And the model evolution means the underlying intelligence keeps compounding.</p><p>We’re no longer in the “wow, it can write an essay” phase. We’re in the “it’s rewriting how entire industries operate” phase — and April 2026 is a pretty good snapshot of what that actually looks like in practice.</p><p>If you found this useful, follow me here on Medium for daily AI breakdowns — no hype, just signal.</p><p>#tsswrites #AI #ArtificialIntelligence #AgenticAI #MachineLearning #AITrends #TechNews #FutureOfWork #AIHealthcare #DeepLearning #AIAgents</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=25726f465a52" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[LangChain vs LangGraph: The Secret Sauce Behind AI Agents]]></title>
            <link>https://thesumitshrestha.medium.com/from-confused-to-curious-how-langchain-and-langgraph-are-changing-the-way-ai-thinks-f443dcc6c697?source=rss-c80d98eca813------2</link>
            <guid isPermaLink="false">https://medium.com/p/f443dcc6c697</guid>
            <category><![CDATA[langchain]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <category><![CDATA[large-language-models]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[langraph]]></category>
            <dc:creator><![CDATA[Sumit Shrestha]]></dc:creator>
            <pubDate>Tue, 21 Oct 2025 05:01:35 GMT</pubDate>
            <atom:updated>2025-10-21T16:11:18.845Z</atom:updated>
            <content:encoded><![CDATA[<p>If you’ve ever wondered how AI tools like ChatGPT or those “smart assistants” seem to think and connect information, you’re not alone. The tech behind them can sound intimidating — terms like “LangChain” and “LangGraph” get thrown around a lot. But don’t worry! By the end of this, you’ll not only understand what they are but also how they can be applied in the real world… even if you’re not a coder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d_N79zWjqZHKKYKVEIwOUA.png" /></figure><h3>What is LangChain? Think of It as AI LEGO Blocks</h3><p>Imagine you have a box of LEGO bricks. Each brick can do something: one can answer questions, another can summarize text, and yet another can translate languages.</p><p>LangChain is like a system that connects all these bricks together so your AI can solve bigger, more complex problems.</p><p>Instead of asking AI a single question and hoping it gives the right answer, LangChain helps the AI follow a chain of reasoning steps — hence the name.</p><p><strong>Example:</strong><br> You want to plan a weekend trip using AI. Here’s how a “LangChain approach” works:</p><ol><li><strong>Step 1</strong>: Ask AI for cities within 3 hours of your location.</li><li><strong>Step 2</strong>: For each city, find interesting landmarks.</li><li><strong>Step 3</strong>: Pick the one with the highest user ratings and create an itinerary.</li></ol><p>Without LangChain, the AI might give you a messy answer or skip steps. With LangChain, it systematically chains the steps, making sure nothing is skipped.</p><h3>Or If LEGO Isn’t Your Thing… Think of LangChain Like a Recipe</h3><p>Imagine you’re following a <strong>recipe</strong> to bake a cake.<br> You don’t just throw everything into a bowl and hope for the best — you follow <strong>steps in a sequence</strong>:</p><ol><li>Gather ingredients</li><li>Mix the batter</li><li>Bake it</li><li>Add frosting</li></ol><p>Each step builds on the previous one.</p><p>That’s exactly how LangChain works.<br> Instead of baking, the AI follows a <strong>recipe for thinking</strong>: each step is carefully planned so the final output (your “cake”) turns out the way you expect.</p><p>If it skips a step (like forgetting to preheat the oven), the result won’t be great.<br> LangChain prevents that by structuring the process from start to finish.</p><h3>Enter LangGraph: Mapping AI’s Thought Process</h3><p>Now, let’s talk about <strong>LangGraph</strong>.<br> If LangChain is connecting the pieces (or following the recipe), LangGraph is the <strong>map that shows how everything connects</strong>.</p><p>It visualizes AI’s reasoning in a <strong>flowchart-style graph</strong>, showing every step, decision, and outcome.</p><p>Think of it as the <strong>GPS for AI thinking</strong> — you can trace the entire route from question to answer.</p><p><strong>Example:</strong><br> Continuing our weekend trip idea:</p><ul><li>LangGraph shows that the AI first looked up nearby cities.</li><li>Then it filtered by landmarks.</li><li>Then compared ratings.</li><li>Finally, it picked the top destination.</li></ul><p>If the AI makes a weird choice, you can check the LangGraph and say,<br> “Ah! It skipped checking ratings.”</p><h3>Why This Matters Even for Non-Tech People</h3><p>You might be thinking: “This sounds cool, but why should I care if I’m not coding?”</p><p>Here’s why: LangChain and LangGraph are <strong>making AI more reliable, explainable, and useful</strong> for everyone.</p><p><strong>Better automation</strong> — Build smarter tools that actually follow logic.<br><strong>Transparent decisions</strong> — You can see <em>why</em> AI made a choice.<br><strong>Customized workflows</strong> — Automate your own step-by-step tasks without needing deep code knowledge.</p><h3>Real-Life Example: AI as Your Personal Assistant</h3><p>Imagine you have an AI assistant for work. You want it to:</p><ol><li>Check your emails.</li><li>Summarize urgent messages.</li><li>Schedule meetings with high-priority contacts.</li><li>Draft replies based on your tone and style.</li></ol><p>With <strong>LangChain</strong>, each step is clearly defined and connected.<br> With <strong>LangGraph</strong>, you can visualize and track how AI makes each decision.</p><p>Now your assistant doesn’t just <em>act smart</em> — it <em>thinks smart</em>.</p><h3>Wrapping It Up: Why You Should Care About These Tools</h3><p>LangChain and LangGraph are part of a larger shift in AI — from guessing to reasoning.<br> They make AI <strong>structured, transparent, and smarter</strong>.</p><p>So next time someone mentions these terms, just remember:</p><p><strong>LangChain</strong> = AI connecting steps like LEGO or following a recipe.<br><strong>LangGraph</strong> = AI mapping its thought process like a GPS.</p><p>The future of AI isn’t about robots replacing people — it’s about giving people tools that think <em>with</em> them.</p><p>#tsswrites #AI #LangChain #LangGraph #ArtificialIntelligence #NoCodeAI #AIAutomation #FutureOfWork #TechForEveryone</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f443dcc6c697" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ 20 “Simple” JavaScript Questions That Can Still Trip You Up in Interviews (With Examples)]]></title>
            <link>https://thesumitshrestha.medium.com/20-simple-javascript-questions-that-can-still-trip-you-up-in-interviews-with-examples-ea5f2af45be4?source=rss-c80d98eca813------2</link>
            <guid isPermaLink="false">https://medium.com/p/ea5f2af45be4</guid>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[interview]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[javascript-tips]]></category>
            <category><![CDATA[leetcode]]></category>
            <dc:creator><![CDATA[Sumit Shrestha]]></dc:creator>
            <pubDate>Mon, 20 Oct 2025 00:35:47 GMT</pubDate>
            <atom:updated>2025-10-20T00:35:47.490Z</atom:updated>
            <content:encoded><![CDATA[<p>So you think you know JavaScript? 👀<br> Sure — you can write loops, functions, and maybe even a React component or two. But when it comes to <strong>JavaScript interviews</strong>, it’s often the “simple” questions that throw even experienced developers off guard.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2WySNmqtE3UMqqgbVXndww.png" /></figure><p>Let’s fix that. Here are <strong>20 minor-but-tricky JavaScript questions</strong> you <em>must</em> know before your next interview — explained simply, with examples you’ll actually remember.</p><h3>1. What’s the Difference Between var, let, and const?</h3><p><strong>Short answer:</strong></p><ul><li>var → function-scoped (old way)</li><li>let → block-scoped (modern)</li><li>const → block-scoped and can’t be reassigned</li></ul><pre>var a = 10;<br>let b = 20;<br>const c = 30;</pre><p><strong>Tip:</strong> Prefer let and const — var is old-school and can cause weird bugs.</p><h3>2. What is Hoisting?</h3><p><strong>Hoisting</strong> moves variable and function declarations to the top of their scope.</p><pre>console.log(a); // undefined<br>var a = 10;</pre><p>JS “hoists” var a, but not its value — that’s why you get undefined, not an error.</p><h3>3. What’s the Difference Between == and ===?</h3><ul><li>== → compares <strong>values</strong>, does type conversion</li><li>=== → compares <strong>value + type</strong></li></ul><pre>&#39;5&#39; == 5   // true<br>&#39;5&#39; === 5  // false</pre><p>Always use === unless you <em>really</em> need type coercion.</p><h3>4. What is a Closure?</h3><p>A <strong>closure</strong> gives you access to an outer function’s variables even after it’s done executing.</p><pre>function makeCounter() {<br>  let count = 0;<br>  return function() {<br>    return ++count;<br>  }<br>}<br>const counter = makeCounter();<br>console.log(counter()); // 1<br>console.log(counter()); // 2</pre><p><strong>Why it matters:</strong> It’s used in React hooks, event handlers, and more.</p><h3>5. What Does this Mean?</h3><p>this refers to <strong>the object that owns the function</strong> at execution time.</p><pre>const obj = {<br>  name: &#39;JS&#39;,<br>  sayHi() {<br>    console.log(this.name);<br>  }<br>};<br>obj.sayHi(); // &quot;JS&quot;</pre><p>Arrow functions don’t have their own this — they use the outer one.</p><h3>6. What’s the Difference Between null and undefined?</h3><ul><li>undefined → variable declared but not assigned</li><li>null → explicitly set to “nothing”</li></ul><pre>let a;<br>console.log(a); // undefined<br>a = null;<br>console.log(a); // null</pre><h3>7. What is the typeof Operator?</h3><p>It tells you the type of a variable.</p><pre>typeof 123; // &#39;number&#39;<br>typeof &#39;JS&#39;; // &#39;string&#39;<br>typeof null; // &#39;object&#39; 😅</pre><p>That last one’s a long-standing JS bug that never got fixed.</p><h3>8. What is the Event Loop?</h3><p>JS is <strong>single-threaded</strong>, but it handles async tasks using the <strong>event loop</strong>.</p><pre>console.log(&#39;A&#39;);<br>setTimeout(() =&gt; console.log(&#39;B&#39;), 0);<br>console.log(&#39;C&#39;);<br>// Output: A, C, B</pre><p>setTimeout goes to the event queue and executes later.</p><h3>9. What is NaN?</h3><p>NaN means “Not a Number,” but it’s still of type number.</p><pre>typeof NaN; // &quot;number&quot;</pre><pre>NaN === NaN; // false 😱</pre><p>Use Number.isNaN() to check safely.</p><h3>10. How to Copy an Object Without Reference?</h3><pre>const obj = { a: 1 };<br>const copy = { ...obj }; // shallow copy</pre><p>Or deep copy:</p><pre>const deepCopy = JSON.parse(JSON.stringify(obj));</pre><h3>11. Difference Between Shallow and Deep Copy?</h3><p>Shallow copy only duplicates the first layer; nested objects still reference the original.</p><h3>12. What are Template Literals?</h3><p>String interpolation with backticks!</p><pre>const name = &#39;Sumit&#39;;<br>console.log(`Hello ${name}!`);</pre><h3>13. What is Destructuring?</h3><p>Extract values from arrays or objects easily.</p><pre>const [a, b] = [1, 2];<br>const { name, age } = { name: &#39;John&#39;, age: 25 };</pre><h3>14. What are Arrow Functions?</h3><p>Shorter syntax + lexical this.</p><pre>const add = (a, b) =&gt; a + b;</pre><h3>15. What is the Spread Operator?</h3><p>Copies arrays or objects.</p><pre>const arr = [1, 2];<br>const newArr = [...arr, 3];</pre><h3>16. What is map() vs forEach()?</h3><ul><li>map() → returns a new array</li><li>forEach() → just loops</li></ul><pre>const nums = [1, 2, 3];<br>nums.map(n =&gt; n * 2); // [2, 4, 6]</pre><h3>17. What is Debouncing and Throttling?</h3><p>Used to <strong>limit how often</strong> a function runs (e.g., during typing or scroll).</p><pre>function debounce(fn, delay) {<br>  let timer;<br>  return function() {<br>    clearTimeout(timer);<br>    timer = setTimeout(fn, delay);<br>  }<br>}</pre><h3>18. What are Promises?</h3><p>Handle async operations.</p><pre>fetch(&#39;api/data&#39;)<br>  .then(res =&gt; res.json())<br>  .then(data =&gt; console.log(data))<br>  .catch(err =&gt; console.error(err));</pre><h3>19. What is async/await?</h3><p>Cleaner syntax for promises.</p><pre>async function getData() {<br>  const res = await fetch(&#39;api/data&#39;);<br>  const data = await res.json();<br>  console.log(data);<br>}</pre><h3>20. What are JavaScript Modules?</h3><p>You can split code into files and import/export easily.</p><pre>// math.js<br>export function add(a, b) { return a + b; }</pre><pre>// main.js<br>import { add } from &#39;./math.js&#39;;</pre><h3>Final Thoughts</h3><p>JavaScript interviews aren’t about memorizing syntax — they test how well you <em>understand the language</em>. The more you play around with these examples, the more confident you’ll get.</p><p>Remember: Every developer once googled “What is closure?” 😄</p><p>#tsswrites #JavaScript #WebDevelopment #CodingInterview #Frontend #Developer #Programming #Tech #JSInterview #LearnToCode #WebDev #CareerGrowth</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ea5f2af45be4" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Git Like a Pro: From Beginner Confusion to Intermediate Confidence]]></title>
            <link>https://thesumitshrestha.medium.com/git-like-a-pro-from-beginner-confusion-to-intermediate-confidence-94bb5850f358?source=rss-c80d98eca813------2</link>
            <guid isPermaLink="false">https://medium.com/p/94bb5850f358</guid>
            <category><![CDATA[git]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[version-control]]></category>
            <category><![CDATA[github]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <dc:creator><![CDATA[Sumit Shrestha]]></dc:creator>
            <pubDate>Sun, 19 Oct 2025 01:58:23 GMT</pubDate>
            <atom:updated>2025-10-19T01:58:23.699Z</atom:updated>
            <content:encoded><![CDATA[<p>If you’ve ever stared at your terminal, typed git init, and thought, <em>“Now what?”</em>, you’re not alone. Git can feel like magic, a puzzle, and a lifesaver all at once. But once you get the hang of it, it’s like having superpowers for your code. Let’s take a journey from <strong>Git newbie</strong> to <strong>intermediate wizard</strong>, sprinkle in some tricks, and make your life easier.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iQbTvHCNARDWZIDhZ0zr9A.png" /></figure><h3>1. Git 101: The Basics You Can’t Skip</h3><p>Think of Git as a <strong>time machine for your code</strong>. Every commit is a snapshot, every branch a parallel universe, and every merge… well, that can sometimes feel like defusing a bomb.</p><p>Here’s the “starter pack” of Git commands:</p><pre>git init        # start a new repo<br>git add .       # stage all changes<br>git commit -m &quot;Initial commit&quot;  # save a snapshot<br>git status      # check what’s changed</pre><p><strong>Pro tip:</strong> Commit often and write meaningful messages. “Fixed stuff” won’t save you when debugging later. Treat commits like diary entries: future-you needs context.</p><h3>2. Branching Out: Your Safe Playground</h3><p>Branches are the playgrounds of Git. Want to add a feature? Break something? Experiment? Do it on a branch.</p><pre>git checkout -b feature/login<br># work on your code<br>git checkout main<br>git merge feature/login</pre><p><strong>Pro tip:</strong> Keep main pristine. It’s your team’s lifeline, not your sandbox.</p><h3>3. Git Log: Your Project’s Diary</h3><p>git log is like your project’s secret diary. See who did what, when, and why.</p><pre>git log --oneline --graph --all</pre><p>Pretty, right? It’s basically the social media feed of your code history.</p><h3>4. Handling Conflicts: Don’t Panic</h3><p>Conflicts happen. Merging two branches sometimes produces:</p><pre>CONFLICT (content): Merge conflict in index.html</pre><p>Calm down. Open the file, resolve the &lt;&lt;&lt;&lt;&lt;&lt;, ======, &gt;&gt;&gt;&gt;&gt;&gt; sections, stage, and commit:</p><pre>git add index.html<br>git commit</pre><p><strong>Pro tip:</strong> Conflicts are normal — think of them as Git’s way of asking you, <em>“Hey, human, pay attention!”</em></p><h3>5. Remote Repositories: Play Nice with Others</h3><p>Local Git is awesome, but real power comes when you <strong>collaborate</strong>. Push your code to GitHub, GitLab, or Bitbucket:</p><pre>git remote add origin https://github.com/username/repo.git<br>git push -u origin main</pre><p>Pull updates from teammates before pushing:</p><pre>git pull origin main</pre><p><strong>Pro tip:</strong> Pull before push. Merge conflicts are easier to handle when your local copy is up-to-date.</p><h3>6. Intermediate Tricks That Impress</h3><p>Once you’ve got the basics down, these tricks make you look like a Git wizard:</p><p><strong>Rebase</strong> — rewrite history for a cleaner timeline:</p><pre>git checkout feature/login <br>git rebase main</pre><p><strong>Stash</strong> — save changes temporarily without committing:</p><pre>git stash <br>git stash pop</pre><p><strong>Cherry-pick</strong> — grab a single commit from another branch:</p><pre>git cherry-pick &lt;commit-hash&gt;</pre><p><strong>Pro tip:</strong> Use these wisely. Rewriting history is powerful but can be dangerous if misused.</p><h3>7. Git Aliases: Save Your Fingers</h3><p>Typing git checkout -b feature/login every time can be tedious. Git aliases to the rescue!</p><pre>git config --global alias.co checkout<br>git config --global alias.br branch<br>git config --global alias.ci commit</pre><p>Now you can do:</p><pre>git co main<br>git br<br>git ci -m &quot;Add new feature&quot;</pre><p>Your fingers (and your brain) will thank you.</p><h3>8. Undo Like a Pro</h3><p>Made a mistake? Don’t sweat it. Git has your back:</p><p><strong>Undo last commit (keep changes staged):</strong></p><pre>git reset --soft HEAD~1</pre><p><strong>Discard local changes:</strong></p><pre>git checkout -- &lt;file&gt;</pre><p><strong>Reset to a previous commit (dangerous!):</strong></p><pre>git reset --hard &lt;commit-hash&gt;</pre><p><strong>Pro tip:</strong> Always double-check before --hard. There’s no undo button outside of Git.</p><h3>9. Understanding Git Internals</h3><p>Here’s the secret sauce: Git is basically three things:</p><ol><li><strong>Working directory</strong> — your actual files.</li><li><strong>Staging area</strong> — the “about-to-commit” zone.</li><li><strong>Repository</strong> — where your history lives.</li></ol><p>Knowing this makes branching, merging, and rebasing way less mysterious.</p><h3>10. The Git Mindset</h3><p>Git isn’t just commands — it’s a <strong>way of thinking</strong>. Commit early, commit often. Branch for experiments. Collaborate respectfully. And don’t be afraid to explore — you can always go back in time.</p><h3>Final Thoughts</h3><p>Git can feel intimidating at first. But with practice, it becomes like riding a bike — you forget how scary it was, and then it feels natural. Once you embrace branching, logging, stashing, and rebasing, you’ll wonder how you ever coded without it.</p><p>So open your terminal, make mistakes, fix them, and level up. Git mastery is a journey — and it’s actually fun.</p><p>#tsswrites #githacks #github #getstartedwithgit #computerscience #versioncontrol</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=94bb5850f358" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How Does AI Actually Work? (Tokens, Hallucinations & The Brains Behind Chat Models)]]></title>
            <link>https://thesumitshrestha.medium.com/how-does-ai-actually-work-tokens-hallucinations-the-brains-behind-chat-models-c6cbc69d9536?source=rss-c80d98eca813------2</link>
            <guid isPermaLink="false">https://medium.com/p/c6cbc69d9536</guid>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[computer-science]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <dc:creator><![CDATA[Sumit Shrestha]]></dc:creator>
            <pubDate>Sat, 18 Oct 2025 01:40:45 GMT</pubDate>
            <atom:updated>2025-10-18T01:40:45.957Z</atom:updated>
            <content:encoded><![CDATA[<p>Let’s be honest — everyone’s <em>talking</em> about AI these days, but very few people actually understand <strong>how it works under the hood</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DiXbVQ8Qer_EhOyoypiU0w.png" /></figure><p>You might have heard words like “tokens,” “hallucinations,” or “reasoning models,” and thought, “Wait, are we still talking about robots or are we in a philosophy class?”</p><p>Don’t worry — this isn’t another technical whitepaper.<br> Let’s unpack how AI really works, <em>in plain English</em>, and why some chatbots seem like geniuses while others confidently make stuff up.</p><h3>First Things First: What Is AI Actually Doing?</h3><p>When you ask ChatGPT a question — say, <em>“Explain quantum physics like I’m 10”</em> — there isn’t a human secretly typing on the other end.<br> What happens instead is that an <strong>AI model</strong>, trained on billions of words, predicts the most likely next word based on your input.</p><p>That’s right. <strong>AI doesn’t know facts — it knows patterns.</strong></p><p>It’s kind of like finishing your friend’s sentence, but at galactic scale.</p><h3>The Building Blocks: Tokens</h3><p>If words are atoms, <strong>tokens</strong> are the molecules AI uses to think.</p><p>Every piece of text you write — <em>a word, punctuation mark, or even a partial word</em> — gets broken down into tiny chunks called <strong>tokens</strong>.</p><p>Example:</p><blockquote><em>“AI is amazing!” → [“AI”, “ is”, “ amazing”, “!”]</em></blockquote><p>When you chat with an AI model, it’s processing thousands of these tokens every second, predicting what comes next, one token at a time.</p><p>That’s why you’ll sometimes see responses “typing out” slowly — it’s generating token by token, not recalling prewritten answers.</p><h3>What’s Really Happening Inside the Model?</h3><p>Here’s the magic:<br> AI models like <strong>GPT</strong> or <strong>Claude</strong> are trained on enormous amounts of text data — books, websites, research papers, code, and more.</p><p>They use something called <strong>transformer architecture</strong> (that’s the “T” in GPT) to learn how words relate to each other across contexts.</p><p>So instead of memorizing, they <em>generalize</em>.<br> They learn things like:</p><ul><li>“The capital of France is likely Paris.”</li><li>“Python” can mean a snake or a programming language — depending on the words around it.</li></ul><p>It’s pattern recognition, not fact storage.</p><h3>But Then… What Are Hallucinations?</h3><p>If AI is so smart, why does it sometimes make stuff up — like inventing research papers or fake quotes?</p><p>That’s what we call <strong>hallucinations</strong>.</p><p>AI doesn’t lie intentionally — it <em>predicts</em>.<br> When it runs out of context or encounters uncertainty, it still tries to fill in the blank with something <em>plausible</em>.</p><p>Imagine your brain guessing an answer during a test. You’re not sure, but it “feels right.”<br> That’s exactly what happens in an AI’s neural network — confidence ≠ correctness.</p><p>Example:</p><blockquote><em>You: “Who won the 2025 Nobel Prize in Physics?”<br> AI: “Dr. Sarah Lin for quantum field research.”<br> → Problem? There’s no such person. The model just generated a name that </em>sounds<em> believable.</em></blockquote><h3>Chat Models vs. Reasoning Models</h3><p>This is where things get interesting.<br> Not all AI models think alike. In fact, the field is now splitting into <strong>two big categories</strong>:</p><h3>1. Chat Models</h3><p>These are your familiar conversational AIs — ChatGPT, Claude, Gemini.<br> They’re trained to sound natural, polite, and context-aware. Their goal: <em>“Keep the conversation flowing.”</em></p><p>They’re great at:</p><ul><li>Explaining concepts</li><li>Writing and summarizing</li><li>Creative tasks like blogs or stories</li></ul><p>But they’re not always logical reasoners.<br> They can hallucinate, get facts wrong, or make confident-sounding nonsense.</p><h3>2. Reasoning Models</h3><p>This is the <em>next generation</em> — AI that can <strong>think step-by-step</strong>, like a human solving a math problem.</p><p>Reasoning models (like OpenAI’s new <strong>o1</strong> or <strong>DeepSeek-R1</strong>) focus on <em>logic and verification</em>, not just fluency.<br> They actually “pause” to think through steps internally — something older chat models never did.</p><p>Example:</p><ul><li><strong>Chat Model:</strong> “2 + 2 = 5 (oops!)”</li><li><strong>Reasoning Model:</strong> “Wait, 2 + 2 = 4 because 2 + 1 + 1 = 4.”</li></ul><p>It’s like the difference between someone answering fast vs. someone answering <em>correctly</em>.</p><h3>Why This Matters</h3><p>Understanding how AI works helps you use it smarter.<br> Once you know it’s predicting patterns, not pulling from an encyclopedia, you start prompting differently.</p><p>Instead of asking:</p><blockquote><em>“Tell me everything about climate change.”</em></blockquote><p>You might say:</p><blockquote><em>“Summarize the causes and effects of climate change using verified scientific sources.”</em></blockquote><p>That structure gives the model context — and keeps it from hallucinating.</p><h3>What’s Next for AI?</h3><p>We’re moving fast toward <strong>agentic AI</strong> — models that can <em>reason, plan, and take action autonomously</em>.<br> Imagine an AI that doesn’t just answer, but also:</p><ul><li>Researches online</li><li>Cross-checks facts</li><li>Writes a report</li><li>Emails it to you</li></ul><p>That’s where the new wave of <strong>reasoning models</strong> and <strong>AI agents</strong> are headed — blending logic, language, and action into one intelligent loop.</p><h3>Final Thoughts</h3><p>AI isn’t magic — it’s math with a good personality.<br> It breaks text into tokens, predicts patterns, and sometimes gets overconfident (hence the hallucinations).</p><p>But as reasoning models evolve, we’re watching the shift from <em>talking machines</em> to <em>thinking companions.</em></p><p>So the next time you chat with an AI, remember:<br> It’s not answering from memory — it’s building an answer, one token and one thought at a time.</p><p>That’s all for today.</p><p>Thank You and See you Again! Happy coding!</p><p>#tsswrites #ArtificialIntelligence #MachineLearning #AIExplained #ReasoningModels #TechEducation #LangChain #ChatGPT #OpenAI #AIAgents #TechTrends</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c6cbc69d9536" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ The Ultimate AI Roadmap: From Beginner to Building Autonomous AI Agents]]></title>
            <link>https://thesumitshrestha.medium.com/the-ultimate-ai-roadmap-from-beginner-to-building-autonomous-ai-agents-d57cdab516be?source=rss-c80d98eca813------2</link>
            <guid isPermaLink="false">https://medium.com/p/d57cdab516be</guid>
            <category><![CDATA[large-language-models]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[machine-learning]]></category>
            <category><![CDATA[autonomous-agent]]></category>
            <category><![CDATA[tsswrites]]></category>
            <dc:creator><![CDATA[Sumit Shrestha]]></dc:creator>
            <pubDate>Fri, 17 Oct 2025 03:45:03 GMT</pubDate>
            <atom:updated>2025-10-17T03:45:03.268Z</atom:updated>
            <content:encoded><![CDATA[<p><em>So you want to dive into AI — but don’t know where to start?</em><br> If you’re a developer who’s curious about artificial intelligence and want to go from zero to building <strong>AI-powered agents</strong>, this guide is for you.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*8cVhTuc1ulwSmEWNQIgurA.png" /></figure><p>Let’s break down everything — from core machine learning concepts to advanced agent frameworks — in one structured roadmap.</p><h3>Stage 1: Understanding the Foundations</h3><p>Before you train your first model, you need to understand the vocabulary of AI.</p><h3>Key Terms You Must Know</h3><ul><li><strong>Artificial Intelligence (AI):</strong> Machines performing tasks that require human-like intelligence.</li><li><strong>Machine Learning (ML):</strong> Systems that learn from data instead of explicit programming.</li><li><strong>Deep Learning (DL):</strong> Neural networks with many layers that recognize complex patterns.</li><li><strong>Model:</strong> A mathematical representation that makes predictions based on data.</li><li><strong>Training:</strong> Teaching a model to recognize patterns.</li><li><strong>Inference:</strong> Using a trained model to make predictions.</li><li><strong>Feature:</strong> A measurable input (like age, temperature, or pixel value).</li><li><strong>Label:</strong> The “correct answer” used in supervised learning.</li></ul><h3>Stage 2: The Machine Learning Layer</h3><p>Once you know what AI <em>is</em>, it’s time to understand how it <em>learns</em>.</p><h3>Types of Machine Learning</h3><ul><li><strong>Supervised Learning:</strong> Learns from labeled data.<br> → Example: Predicting house prices.</li><li><strong>Unsupervised Learning:</strong> Finds hidden patterns without labels.<br> → Example: Customer segmentation.</li><li><strong>Reinforcement Learning:</strong> Learns by trial and error with rewards and penalties.<br> → Example: AlphaGo.</li><li><strong>Self-Supervised Learning:</strong> Learns from data itself — the foundation of LLMs like GPT.</li></ul><h3>Key Concepts</h3><ul><li><strong>Loss Function:</strong> Measures how wrong your model is.</li><li><strong>Optimizer:</strong> Adjusts model parameters to minimize loss (e.g., Adam, SGD).</li><li><strong>Overfitting / Underfitting:</strong> Too specific vs. too general models.</li><li><strong>Hyperparameters:</strong> External training settings (like learning rate, batch size).</li><li><strong>Cross-Validation:</strong> A way to test model reliability.</li></ul><h3>Stage 3: Neural Networks and Deep Learning</h3><p>When data gets big and complex — deep learning takes over.</p><h3>Neural Network Basics</h3><ul><li><strong>Neuron:</strong> Basic processing unit of a network.</li><li><strong>Layer:</strong> Group of neurons (Input → Hidden → Output).</li><li><strong>Activation Function:</strong> Adds non-linearity (ReLU, Softmax).</li><li><strong>Backpropagation:</strong> Algorithm that teaches the network.</li></ul><h3>Types of Networks</h3><ul><li><strong>CNN (Convolutional Neural Network):</strong> Best for images.</li><li><strong>RNN (Recurrent Neural Network):</strong> Best for sequences.</li><li><strong>Transformer:</strong> The architecture behind ChatGPT, Claude, and Gemini.</li></ul><p>Transformers changed everything. Instead of processing data step-by-step like RNNs, they use <strong>self-attention</strong> to understand relationships between all words in a sentence at once — making them powerful for language, vision, and beyond.</p><h3>Stage 4: Enter the World of LLMs (Large Language Models)</h3><p>LLMs are the reason AI feels <em>human</em> today. They’re massive neural networks trained on internet-scale text to understand and generate language.</p><h3>Core Concepts</h3><ul><li><strong>LLM:</strong> Large model trained on text to predict the next token (word fragment).</li><li><strong>Token:</strong> The smallest unit of input text.</li><li><strong>Embedding:</strong> Numeric representation of meaning.</li><li><strong>Fine-tuning:</strong> Customizing a pre-trained model on your own dataset.</li><li><strong>Prompt Engineering:</strong> Writing instructions that guide model behavior.</li><li><strong>Context Window:</strong> How much the model can “remember” at once (e.g., 128k tokens).</li></ul><h3>Famous LLMs</h3><ul><li>GPT-4 (OpenAI)</li><li>Claude (Anthropic)</li><li>Gemini (Google DeepMind)</li><li>LLaMA (Meta AI)</li></ul><h3>Stage 5: Building with LangChain and RAG</h3><p>Now that you understand LLMs, it’s time to make them <em>useful</em>.</p><p><strong>LangChain</strong> is a powerful framework that lets you build <strong>AI apps</strong> combining LLMs, databases, and tools.</p><h3>Core Components</h3><ul><li><strong>Chains:</strong> Sequences of operations (Prompt → LLM → Output).</li><li><strong>Memory:</strong> Keeps conversation history.</li><li><strong>Retriever:</strong> Fetches relevant data.</li><li><strong>Vector Database:</strong> Stores embeddings for semantic search (Pinecone, Chroma, FAISS).</li><li><strong>RAG (Retrieval-Augmented Generation):</strong> Combines LLMs with external knowledge bases for more factual answers.</li></ul><p>Imagine uploading your company docs into a vector DB and having a chatbot that answers questions with your own data — that’s RAG in action.</p><h3>Stage 6: AI Agents — The Future of AI Development</h3><p>Now we reach the frontier: <strong>AI Agents</strong> — autonomous systems that can plan, reason, and take actions.</p><h3>What Is an AI Agent?</h3><p>An AI agent is powered by an LLM and a reasoning framework that allows it to:</p><ol><li><strong>Perceive</strong> (understand tasks)</li><li><strong>Plan</strong> (decide next steps)</li><li><strong>Act</strong> (execute actions via tools/APIs)</li><li><strong>Reflect</strong> (analyze its own results and self-correct)</li></ol><h3>Core Concepts</h3><p><strong>ReAct Framework: </strong>Combines reasoning (“Thought”) and action (“Tool Use”).</p><p><strong>Tool Use: </strong>Agents call APIs, code, or databases.</p><p><strong>Memory: </strong>Stores short-term and long-term context.</p><p><strong>Reflection Loop: </strong>Self-correction based on previous actions.</p><p><strong>LangGraph: </strong>Graph-based framework for multi-agent coordination in LangChain.</p><p><strong>Multi-Agent Systems: </strong>Multiple agents working together (researcher + coder + tester).</p><h3>Popular Frameworks</h3><ul><li><strong>LangChain Agents</strong></li><li><strong>CrewAI</strong></li><li><strong>LlamaIndex (GPT Index)</strong></li><li><strong>AutoGen (Microsoft)</strong></li><li><strong>AutoGPT / BabyAGI</strong></li></ul><p><strong>Example:</strong><br> An AI agent that researches a topic, writes a blog post, and edits it based on feedback — all autonomously.</p><h3>Stage 7: Math, Theory, and Real-World AI</h3><h3>Mathematical Foundations</h3><ul><li><strong>Linear Algebra:</strong> Vectors, matrices (used in neural layers).</li><li><strong>Calculus:</strong> Derivatives power optimization.</li><li><strong>Statistics:</strong> Understanding uncertainty and performance.</li><li><strong>Information Theory:</strong> Concepts like entropy and cross-entropy.</li></ul><h3>Final Thoughts</h3><p>The AI landscape is evolving fast — but here’s the truth:<br> You don’t need to learn everything at once.</p><p>Start simple.<br> Build something small — a chatbot, a classifier, a summarizer.<br> Then expand into <strong>LangChain</strong>, <strong>RAG</strong>, and eventually <strong>AI Agents</strong> that think and act on their own.</p><p>Every expert AI engineer once started where you are now. The key is consistency and curiosity.</p><p>That’s all for today.</p><p>Thank You and See you Again! Happy coding!</p><p>#ArtificialIntelligence #MachineLearning #LangChain #AIAgents #LLMs #DeepLearning #TechEducation #BeginnerGuide #AIRevolution #PythonForAI #tsswrites</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d57cdab516be" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Python Interview Questions You NEED to Know (If You Want to Land That Job!)]]></title>
            <link>https://thesumitshrestha.medium.com/python-interview-questions-you-need-to-know-if-you-want-to-land-that-job-60d86517da8c?source=rss-c80d98eca813------2</link>
            <guid isPermaLink="false">https://medium.com/p/60d86517da8c</guid>
            <category><![CDATA[coding-interviews]]></category>
            <category><![CDATA[python]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[software-engineering]]></category>
            <category><![CDATA[tech-career]]></category>
            <dc:creator><![CDATA[Sumit Shrestha]]></dc:creator>
            <pubDate>Fri, 17 Oct 2025 01:37:52 GMT</pubDate>
            <atom:updated>2025-10-17T01:37:52.745Z</atom:updated>
            <content:encoded><![CDATA[<p>Python has become one of the most in-demand programming languages — whether you’re applying for a backend, automation, or data science role, chances are you’ll face Python interview questions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*A61BpxVd8Ep7o06UyudyCQ.png" /></figure><p>To help you ace your next technical round, here are <strong>20 Python interview questions (with explanations)</strong> that every developer should know.</p><h3>1. What’s the Difference Between is and ==?</h3><ul><li>== checks <strong>value equality</strong> (whether two objects have the same value).</li><li>is checks <strong>identity equality</strong> (whether two references point to the same object in memory).</li></ul><pre>a = [1, 2, 3]<br>b = [1, 2, 3]</pre><pre>print(a == b)  # True<br>print(a is b)  # False</pre><h3>2. What Are Python’s Mutable and Immutable Data Types?</h3><ul><li><strong>Mutable:</strong> Lists, Sets, Dictionaries</li><li><strong>Immutable:</strong> Tuples, Strings, Integers, Booleans</li></ul><p>Mutable objects can be changed after creation, while immutable ones cannot.</p><h3>3. Explain List Comprehensions.</h3><p>A Pythonic way to create lists in a single line.</p><pre>squares = [x**2 for x in range(5)]</pre><p>Equivalent to:</p><pre>squares = []<br>for x in range(5):<br>    squares.append(x**2)</pre><h3>4. What Are Python Decorators?</h3><p>Decorators let you <strong>modify the behavior of a function or class</strong> without changing its source code.</p><pre>def log(func):<br>    def wrapper():<br>        print(&quot;Before function call&quot;)<br>        func()<br>        print(&quot;After function call&quot;)<br>    return wrapper</pre><pre>@log<br>def say_hi():<br>    print(&quot;Hi!&quot;)</pre><h3>5. What’s the Difference Between Deep Copy and Shallow Copy?</h3><ul><li><strong>Shallow copy</strong>: Copies only the outer object.</li><li><strong>Deep copy</strong>: Recursively copies all nested objects.</li></ul><p>Use the copy module:</p><pre>import copy<br>deep_copied = copy.deepcopy(obj)</pre><h3>6. What Is the Global Interpreter Lock (GIL)?</h3><p>The <strong>GIL</strong> ensures that only one thread executes Python bytecode at a time — limiting true parallelism in multi-threaded programs, though multiprocessing can bypass this.</p><h3>7. What’s the Difference Between @staticmethod, @classmethod, and Instance Methods?</h3><pre>| Method Type     | Accesses Class? | Accesses Instance? |<br>| --------------- | --------------- | ------------------ |<br>| @staticmethod   | ❌               | ❌                 |<br>| @classmethod    | ✅               | ❌                 |<br>| Instance method | ✅               | ✅                 |</pre><h3>8. How Do You Manage Memory in Python?</h3><p>Python uses:</p><ul><li><strong>Automatic garbage collection</strong></li><li><strong>Reference countine</strong></li><li><strong>gc module</strong> for manual control</li></ul><h3>9. What’s the Use of *args and **kwargs?</h3><p>They allow variable-length arguments.</p><pre>def show(*args, **kwargs):<br>    print(args)<br>    print(kwargs)</pre><pre>show(1, 2, name=&quot;Sumit&quot;)</pre><h3>10. What Are Generators and Why Use Them?</h3><p>Generators yield values one at a time using yield, making them memory-efficient.</p><pre>def countdown(n):<br>    while n &gt; 0:<br>        yield n<br>        n -= 1</pre><h3>11. Explain Python’s with Statement.</h3><p>It simplifies resource management, like closing files automatically.</p><pre>with open(&#39;file.txt&#39;) as f:<br>    data = f.read()</pre><h3>12. What Is the Difference Between @property and Normal Methods?</h3><p>@property lets you access methods like attributes.</p><pre>class Circle:<br>    def __init__(self, r):<br>        self._r = r</pre><pre>    @property<br>    def area(self):<br>        return 3.14 * self._r ** 2</pre><p>Now you can use c.area instead of c.area().</p><h3>13. What Are Lambda Functions?</h3><p>Anonymous, single-expression functions.</p><pre>add = lambda x, y: x + y<br>print(add(2, 3))</pre><h3>14. What’s the Difference Between range() and xrange()?</h3><p>In Python 3, xrange() is removed.<br> range() in Python 3 behaves like xrange() in Python 2 — it’s lazy and memory efficient.</p><h3>15. How Do You Handle Exceptions in Python?</h3><p>Using try-except-finally.</p><pre>try:<br>    x = 1 / 0<br>except ZeroDivisionError:<br>    print(&quot;Cannot divide by zero.&quot;)<br>finally:<br>    print(&quot;Done.&quot;)</pre><h3>16. What Is the Difference Between __str__ and __repr__?</h3><ul><li>__str__: User-friendly output (print()).</li><li>__repr__: Developer-oriented output (debugging).</li></ul><h3>17. What Are Python Modules and Packages?</h3><ul><li><strong>Module</strong>: A single .py file.</li><li><strong>Package</strong>: A folder with __init__.py containing multiple modules.</li></ul><h3>18. What’s the Difference Between Iterables and Iterators?</h3><ul><li><strong>Iterable</strong>: Object that can return an iterator (list, tuple).</li><li><strong>Iterator</strong>: Object that produces data one element at a time using __next__().</li></ul><h3>19. What Are Python Data Structures Commonly Used in Interviews?</h3><ul><li><strong>List</strong> → dynamic arrays</li><li><strong>Tuple</strong> → immutable sequences</li><li><strong>Set</strong> → unique elements</li><li><strong>Dict</strong> → key-value pairs</li></ul><p>Knowing their <strong>time complexities</strong> is a plus!</p><h3>20. What’s the Use of __init__.py?</h3><p>It tells Python to treat a directory as a package. It can also execute initialization code for that package.</p><h3>🧠 Final Tip</h3><p>Most interviewers focus not only on <em>syntax</em> but also on your ability to <strong>write clean, efficient, and Pythonic code</strong>.<br> Practice solving problems on <strong>LeetCode</strong>, <strong>HackerRank</strong>, or <strong>InterviewBit</strong> — and remember: Python interviews are as much about <strong>clarity and thought process</strong> as they are about code.</p><p><strong>💼 Ready to land that Python job?</strong><br> Keep this list handy, write clean code, and walk into your interview with confidence!</p><p>#thesumitshresthawrites #Python #Programming #CodingInterviews #TechCareers #SoftwareEngineering</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=60d86517da8c" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Prompt Engineering Is the New Coding: Here’s How to Master It]]></title>
            <link>https://thesumitshrestha.medium.com/prompt-engineering-is-the-new-coding-heres-how-to-master-it-5f4ba9fc6dfb?source=rss-c80d98eca813------2</link>
            <guid isPermaLink="false">https://medium.com/p/5f4ba9fc6dfb</guid>
            <category><![CDATA[prompt-engineering]]></category>
            <category><![CDATA[technology]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[writing-prompts]]></category>
            <category><![CDATA[ai-agent]]></category>
            <dc:creator><![CDATA[Sumit Shrestha]]></dc:creator>
            <pubDate>Thu, 16 Oct 2025 01:51:33 GMT</pubDate>
            <atom:updated>2025-10-16T01:51:33.921Z</atom:updated>
            <content:encoded><![CDATA[<p>We’re living in a time when typing a sentence into an AI feels like writing a line of code. It’s wild to think about — but the way we talk to machines is becoming just as important as the way we program them.</p><p>Welcome to the era of <em>prompt engineering</em>, where words are the new syntax and creativity is the new compiler.</p><p>Most people still treat prompts like Google searches. They toss in a few keywords, hope for the best, and scroll through the output like they’re browsing results. But prompt engineering isn’t about fishing for luck — it’s about understanding how to <em>speak machine</em>. It’s the bridge between what you imagine and what AI actually delivers.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qVOm9My2uhN_8z7a4C9l2g.png" /></figure><h3>Why Prompting Feels Like Coding</h3><p>Think about it: coding is all about logic, clarity, and structure. You tell the computer <em>exactly</em> what to do, in a language it understands.</p><p>Prompting works the same way — except now, you’re doing it in plain English (or whatever language you think in).</p><p>But behind the scenes, it’s not that different.<br> Good prompts have inputs, conditions, and expected outputs. They need precision. They reward iteration. They fail silently when you’re vague.</p><p>And just like debugging, half the skill lies in figuring out <em>why</em> your prompt didn’t work the way you thought it would.</p><p>The best prompters are basically developers — but instead of writing code, they’re writing conversations.</p><h3>The Secret Sauce: Clarity, Context, and Control</h3><p>If there’s a “formula” to prompt engineering, it’s this:</p><ol><li><strong>Clarity</strong> — Say exactly what you want. Ambiguity is your worst enemy.</li><li><strong>Context</strong> — Give the AI what it needs to think like you. Background, tone, audience — all of it matters.</li><li><strong>Control</strong> — Guide the response. Specify format, length, style, or perspective. The more control you assert, the better the result.</li></ol><p>For example, “Write a summary” gets you generic text.<br> But “Summarize this as a casual LinkedIn post that feels like a personal reflection” turns the same AI into your ghostwriter.</p><h3>Iteration Is the New Debugging</h3><p>No one nails a perfect prompt on the first try. You test, tweak, and refine — just like code.</p><p>You look at what worked, what didn’t, and where the AI “misunderstood” you.<br> Each iteration teaches you something about how it <em>thinks</em>. That’s the part most people skip, and it’s why they never level up.</p><p>Prompt engineering isn’t about memorizing templates. It’s about developing intuition — the same way coders develop a feel for patterns, syntax, and edge cases.</p><h3>Learn to Think in Layers</h3><p>The best prompts aren’t written in one shot. They’re layered.</p><p>Start with a broad idea. Then add role instructions (<em>“You are a marketing strategist”</em>), tone (<em>“friendly and confident”</em>), and structure (<em>“use bullet points for clarity”</em>). Finally, define your goal (<em>“help the reader take action”</em>).</p><p>Each layer makes the AI’s mental model sharper — like adding more detail to a sketch until it becomes art.</p><h3>From Code to Conversation</h3><p>The next generation of builders won’t just be coders — they’ll be <em>prompt engineers</em>.<br> The ones who can fuse logic with language will shape how we use AI in everything: design, storytelling, research, even product development.</p><p>You don’t have to be technical to start. You just need curiosity, patience, and a willingness to talk to machines like they’re your collaborators — not your tools.</p><h3>Final Thought</h3><p>Coding taught us how to talk to computers.<br> Prompting is teaching us how to <em>think</em> with them.</p><p>And the ones who master that balance — between precision and imagination — will be the ones writing the future.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=5f4ba9fc6dfb" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mastering JavaScript Arrays: Essential Techniques for Array Creation and Manipulation]]></title>
            <link>https://thesumitshrestha.medium.com/mastering-javascript-arrays-essential-techniques-for-array-creation-and-manipulation-3dcf6f79213b?source=rss-c80d98eca813------2</link>
            <guid isPermaLink="false">https://medium.com/p/3dcf6f79213b</guid>
            <category><![CDATA[javascript-tips]]></category>
            <category><![CDATA[array-methods]]></category>
            <category><![CDATA[tsswrites]]></category>
            <category><![CDATA[interview-questions]]></category>
            <category><![CDATA[javascript]]></category>
            <dc:creator><![CDATA[Sumit Shrestha]]></dc:creator>
            <pubDate>Fri, 01 Nov 2024 02:41:09 GMT</pubDate>
            <atom:updated>2024-11-01T02:41:09.937Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/851/1*tfw2kUMwJwMN7savOSgQig.png" /></figure><p>Arrays are foundational in JavaScript, enabling developers to handle data collections effectively. If you’re new to JavaScript or looking to refine your understanding of array manipulation, we’re going to explore some powerful tools for checking, creating, and flattening arrays. From leveraging spread operators to using static array methods, here’s how you can make your code more concise and efficient. <a href="https://medium.com/@thesumitshrestha/mastering-javascript-array-methods-61f7415501ab">Also, discover These Game-Changing Secrets to Master JavaScript Array Methods!</a></p><h3>1. Using the Spread Operator to Create Arrays</h3><p>The spread operator (...) in JavaScript allows you to expand elements in an array or object. This is particularly useful when creating copies or merging arrays. Let’s look at a couple of examples:</p><h4>Example 1: Merging Arrays</h4><pre>const array1 = [1, 2, 3];<br>const array2 = [4, 5, 6];<br>const mergedArray = [...array1, ...array2];<br>console.log(mergedArray); // Output: [1, 2, 3, 4, 5, 6]</pre><h4>Example 2: Copying Arrays</h4><pre>const originalArray = [7, 8, 9];<br>const copyArray = [...originalArray];<br>console.log(copyArray); // Output: [7, 8, 9]</pre><p>The spread operator simplifies array manipulations, especially when dealing with nested data structures or multiple arrays.</p><h3>2. Flattening an Array</h3><p>Flattening involves transforming an array of arrays into a single-dimensional array. The spread operator can handle this, but if you need deep flattening, JavaScript provides the Array.prototype.flat() method. <a href="https://thesumitshrestha.medium.com/how-to-flatten-an-array-in-javascript-with-and-without-an-inbuilt-function-3169c64c6b19">Dive Deeper into Array Flattening with This Must-Read Guide!</a></p><h4>Example: Flattening an Array</h4><pre>const nestedArray = [1, [2, 3], [4, [5, 6]]];<br>const flattenedArray = nestedArray.flat(2);<br>console.log(flattenedArray); // Output: [1, 2, 3, 4, 5, 6]</pre><p>The flat() method takes an argument specifying the depth level to flatten (in this case, 2). This approach is clean and eliminates the need for loops.</p><h3>3. Using Static Array Methods</h3><p>JavaScript’s array static methods help to create, check, and manipulate arrays effectively.</p><h4>a) Array.isArray()</h4><p>This method checks if a variable is an array. It’s an essential tool when validating data structures, especially in dynamic applications where data types may vary.</p><pre>const fruits = [&#39;apple&#39;, &#39;banana&#39;, &#39;mango&#39;];<br>console.log(Array.isArray(fruits)); // Output: true<br>console.log(Array.isArray(&quot;apple&quot;)); // Output: false</pre><h4>b) Array.from()</h4><p>Array.from() creates a new array from any iterable or array-like object. This is particularly useful for converting strings, NodeLists, or Sets into arrays.</p><pre>const numbers = &#39;12345&#39;;<br>const numbersArray = Array.from(numbers);<br>console.log(numbersArray); // Output: [&#39;1&#39;, &#39;2&#39;, &#39;3&#39;, &#39;4&#39;, &#39;5&#39;]</pre><h4>c) Array.of()</h4><p>Array.of() creates a new array from a variable number of arguments. Unlike the Array constructor, it treats all arguments as elements of the new array.</p><pre>const numbers = Array.of(1, 2, 3, 4);<br>console.log(numbers); // Output: [1, 2, 3, 4]</pre><p>Array.of() is ideal for ensuring that your array is created without unexpected behaviors, as it avoids interpreting arguments as array dimensions.</p><h3>Summary</h3><p>Mastering array manipulation techniques in JavaScript can elevate the way you handle data. These methods — from the versatile spread operator to the robust static methods in Array — provide you with powerful, efficient tools to make your code cleaner and more maintainable.</p><p>Whether you’re working with simple arrays or deeply nested data, knowing how to use these JavaScript features will improve your coding efficiency and enhance the quality of your applications. Dive in and start experimenting with these array techniques to see how they can streamline your JavaScript projects.</p><p>That’s all for today.</p><p>Thank You and See you Again! Happy coding!</p><p>#tsswrites #javascriptinterview #javascriptTricks #spreadoperator #arraymethods #array #javascript</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3dcf6f79213b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Unlock the Hidden Beauty of Silicon Valley with This Stunning Hiking Trail!]]></title>
            <link>https://thesumitshrestha.medium.com/unlock-the-hidden-beauty-of-silicon-valley-with-this-stunning-hiking-trail-18bcb6f4a671?source=rss-c80d98eca813------2</link>
            <guid isPermaLink="false">https://medium.com/p/18bcb6f4a671</guid>
            <category><![CDATA[sierravista]]></category>
            <category><![CDATA[siliconvalle]]></category>
            <category><![CDATA[bay-area]]></category>
            <category><![CDATA[tsswrites]]></category>
            <category><![CDATA[bayareahikers]]></category>
            <dc:creator><![CDATA[Sumit Shrestha]]></dc:creator>
            <pubDate>Mon, 28 Oct 2024 01:18:43 GMT</pubDate>
            <atom:updated>2024-10-28T01:18:43.637Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*O4EOKhDRW0mQ_l5E1CC1hg.jpeg" /></figure><p>On a crisp October morning, we — Himanshu Pathak, Roshan Shrestha, and Sumit Shrestha — set out to conquer the scenic <strong>Boccardo Loop Trail</strong>, part of the stunning <strong>Sierra Vista Trail</strong>. This fall hike promised a mix of challenging climbs, panoramic views, and a close encounter with nature. Here’s a detailed account of our journey and tips for anyone planning to explore this beautiful trail.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*v8cHlCPIh1MxuUXsJgEybw.png" /></figure><h3>Starting at the Trailhead: A Journey into the Hills</h3><p>We began our adventure at the trailhead located along Sierra Road, where ample parking for around 40 vehicles made it easy to kick off our hike. The trail initially led us upward, winding through an open area with sweeping views of the surrounding hills and the city of San Jose below. The clear skies and open landscape gave us our first taste of the picturesque scenery to come.</p><p>However, the second half of the hike was all about the descent. We gradually made our way down from the Boccardo View Point, which was a true test of endurance. One thing to keep in mind: there is no shade throughout the hike, so bringing plenty of water is essential to stay hydrated.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*d9A4J8snIHfXjyKxp5nofA.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*q5XmVUy6CfqhAtJcB_feMg.jpeg" /></figure><h3>An Open Trail with Diverse Sights: Wildlife and Scenic Views</h3><p>As we made our way through the loop, we were delighted to spot a few <strong>deer</strong>, gracefully moving through the brush — a pleasant reminder of the trail’s wildlife. The open, exposed terrain also made it a great spot for <strong>birdwatching</strong>, with a variety of birds flitting through the clear fall skies. Although dogs are not permitted on this trail, the area is popular for <strong>hiking, mountain biking</strong>, and soaking in the vast views of the valley.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*J3doH4BNV0RKP1w8Ypf0Ug.jpeg" /></figure><h3>The Ascent: A Challenging Climb with Unmatched Views</h3><p>The ascent back to the trailhead was a steady and invigorating <strong>2-hour uphill</strong> climb. Despite the lack of shade and greenery typical of fall, the golden hues of the landscape provided their own unique beauty. As we climbed higher, the views of <strong>Silicon Valley and San Jose</strong> became more dramatic, unfolding below us in a vast panorama. This open landscape, bathed in the cool October light, was a photographer’s dream.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*k2lTbPDBfY0pinptFoNRYw.jpeg" /></figure><h3>Boccardo View Point: A Rewarding Panorama</h3><p>At the top, we reached the <strong>Boccardo View Point</strong>, the crown jewel of the hike. From this vantage point, we could take in the entirety of <strong>Silicon Valley</strong>, stretched out beneath a partly cloudy sky. The view was nothing short of breathtaking, and it was the perfect spot for a well-deserved break.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*eD65REvRq-IhTNtL92s7zg.jpeg" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*YJiT_Pl_pEaSeTTWyjJQAQ.jpeg" /></figure><h3>The Scenic Descent: Clouded Hills and Golden Valleys</h3><p>The descent took us around <strong>1 hour and 20 minutes</strong>, and it was just as beautiful as the climb. With clouds rolling in, the atmosphere became almost mystical. Sunlight pierced through breaks in the cloud cover, casting a golden glow over the trail as we made our way down. The scenery shifted from wide, open hills to more intimate paths with occasional wildlife sightings.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*u2OkUoaseZz4ndHdxg4jIA.jpeg" /></figure><h3>Practical Tips: What to Know Before You Go</h3><ul><li><strong>Parking</strong>: There is a parking lot at the trailhead along <strong>Sierra Road</strong> with space for around 40 vehicles.</li><li><strong>Trail Conditions</strong>: The path is exposed with <strong>no shade</strong>, so be sure to bring plenty of water and wear sun protection.</li><li><strong>Wildlife</strong>: Keep an eye out for <strong>deer</strong> along the way and bring binoculars if you’re interested in <strong>birdwatching</strong>.</li><li><strong>Trail Usage</strong>: The area is popular not only for hiking but also for <strong>mountain biking</strong>. Note that dogs are not allowed on this trail.</li><li><strong>Navigation</strong>: The loop has several intersections with other trails, so it’s helpful to have a map or a reliable hiking app to stay on course.</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*upRpCG1eu-vlomijEruJ7A.jpeg" /></figure><h3>Final Thoughts: A Must-Do Hike in the Bay Area</h3><p>Our hike along the Boccardo Loop on the Sierra Vista Trail was an incredible journey filled with moments of challenge and reward. The open vistas, diverse wildlife, and the joy of hiking together made it an experience we won’t soon forget. Whether you’re a seasoned hiker or just looking for a refreshing day out in nature, this trail is well worth a visit — just remember to pack enough water and enjoy the stunning views!</p><p>#thesumitshresthatravels #bayareahike #scenichikebayarea #sierravista #siliconvalley</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=18bcb6f4a671" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>