<?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 yetesfa alemayehu on Medium]]></title>
        <description><![CDATA[Stories by yetesfa alemayehu on Medium]]></description>
        <link>https://medium.com/@yetesfadev?source=rss-52dfbb277718------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*V8pTOXTMUa_BuX6PGf5nqA.jpeg</url>
            <title>Stories by yetesfa alemayehu on Medium</title>
            <link>https://medium.com/@yetesfadev?source=rss-52dfbb277718------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 13:56:18 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@yetesfadev/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[The One Thing I’ve Learned After All These Years]]></title>
            <link>https://medium.com/@yetesfadev/the-one-thing-ive-learned-after-all-these-years-c480ae24698a?source=rss-52dfbb277718------2</link>
            <guid isPermaLink="false">https://medium.com/p/c480ae24698a</guid>
            <dc:creator><![CDATA[yetesfa alemayehu]]></dc:creator>
            <pubDate>Fri, 03 Apr 2026 09:34:01 GMT</pubDate>
            <atom:updated>2026-04-03T09:34:01.050Z</atom:updated>
            <content:encoded><![CDATA[<blockquote><em>It doesn’t matter who you are — something is always bothering you.</em></blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*mo4qZdTTLx89CgWp" /><figcaption>Photo by <a href="https://unsplash.com/@bytapish?utm_source=medium&amp;utm_medium=referral">Tapish</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>🏠 The Rich Person’s Worry</h3><p>I once worked for a startup founder worth millions. He drove a Tesla, owned three houses, and flew business class everywhere.</p><p>One night, over a late dinner, he confessed: <em>“I haven’t slept well in two years. What if the company fails? What if I lose everything? What if my kids grow up spoiled because I was never home?”</em></p><p>He had money. He had success. He had everything I thought would solve all my problems.</p><p>And yet — he couldn’t sleep.</p><h3>🧱 The Poor Person’s Worry</h3><p>Meanwhile, I’ve been on the other side too. Months where rent felt like a mountain. Where I counted every Birr before buying bread. Where one unexpected expense meant borrowing from someone.</p><p>The worry there is different: <em>“What if I can’t pay school fees? What if my child gets sick? What if the boss doesn’t pay this month?”</em></p><h3>🔄 The Universal Truth</h3><p>Here’s what I’ve learned after watching both worlds:</p><p>The rich worry about losing what they have.<br>The poor worry about never getting enough.<br>The middle worries about staying where they are.</p><p>But everyone worries.</p><p>It doesn’t matter:</p><ul><li>How much is in your bank account</li><li>Where you live</li><li>What job you have</li><li>How many followers you have</li></ul><p>There will always be something bothering you.</p><h3>🎯 The Mistake We All Make</h3><p>For years, I thought:</p><blockquote>“If I just get that promotion, I’ll finally be at peace.”</blockquote><p>Then I got the promotion. New worries appeared.</p><blockquote>“If I just move to a better apartment, I’ll feel settled.”</blockquote><p>I moved. New worries. Always new worries.</p><blockquote>“If I just make $600 a month, I’ll be fine.”</blockquote><p>I made it. Then I worried about keeping it.</p><p>The problem wasn’t my circumstances.<br>The problem was my mindset.</p><h3>🧠 The Real Shift</h3><p>I used to spend energy on three things that never helped:</p><h3>1. Blaming Others</h3><p><em>“If my boss would just reply faster…”</em><br><em>“If the economy wasn’t so bad…”</em><br><em>“If my parents had given me a better start…”</em></p><p>Blaming never solved anything. It just made me bitter.</p><h3>2. Blaming Myself</h3><p><em>“Why didn’t I study harder?”</em><br><em>“Why did I make that stupid decision?”</em><br><em>“Why can’t I figure this out?”</em></p><p>Self-blame didn’t fix the past. It just stole my present.</p><h3>3. Worrying About the Future</h3><p><em>“What if the baby needs surgery?”</em><br><em>“What if the startup fires me?”</em><br><em>“What if inflation eats everything?”</em></p><p>Worrying about tomorrow never prepared me for it. It just exhausted me today.</p><h3>🌅 What Actually Works</h3><p>After years of trial and error — and plenty of sleepless nights — here’s what I’ve learned works:</p><h3>✅ 1. Accept That Worry Never Leaves</h3><p>You won’t wake up one day with zero problems. Stop waiting for that day. It doesn’t exist.</p><p>The goal isn’t to eliminate worry.<br>The goal is to work anyway.</p><h3>✅ 2. Stop Blaming — Start Solving</h3><p>Every time you catch yourself blaming someone (including yourself), pause and ask:</p><blockquote>“What can I do about this RIGHT NOW?”</blockquote><p>Not yesterday. Not tomorrow. Now.</p><p>Can’t fix the whole problem? Fix one small piece.</p><h3>✅ 3. Learn From the Past — Then Leave It There</h3><p>The past is a school, not a prison.</p><ul><li>Learn the lesson ✅</li><li>Feel the feeling ✅</li><li>Then close the door ✅</li></ul><p>Don’t live in a classroom forever.</p><h3>✅ 4. Stop Living in Tomorrow</h3><p>You don’t know the future. Neither do I. Neither does the richest person on earth.</p><p>You can plan. You can prepare. But you cannot control.</p><p>So do what you can today. Then rest.</p><h3>✅ 5. Work on Your Mindset Like You Work on Your Code</h3><p>When I write TypeScript, I debug constantly. I look for errors. I refactor. I improve.</p><p>Why don’t we do the same with our thoughts?</p><p>Every morning, ask yourself:</p><ul><li><em>What am I worried about today that I cannot control?</em></li><li><em>What CAN I control?</em></li><li><em>What’s one small action I can take right now?</em></li></ul><p>That’s mindset work. It’s not magic. It’s practice.</p><h3>☮️ The Peace I’ve Found</h3><p>I’m not saying I never worry anymore. I do. Every day.</p><p>But I’ve stopped:</p><ul><li>Waiting for the perfect moment</li><li>Blaming circumstances</li><li>Punishing myself for the past</li><li>Terrifying myself about the future</li></ul><p>Instead, I focus on:</p><blockquote>What is in front of me right now?</blockquote><p>Sometimes it’s code. Sometimes it’s my daughter’s homework. Sometimes it’s my pregnant wife needing tea. Sometimes it’s just breathing for five minutes.</p><p>That’s enough.</p><h3>📝 A Simple Practice</h3><p>When you feel the worry rising — whether you’re rich or poor, employed or searching, calm or panicking — try this:</p><p><strong>Step 1:</strong> Breathe. Just once. Deep.</p><p><strong>Step 2:</strong> Ask: <em>“Can I solve this in the next 5 minutes?”</em></p><p><strong>Step 3:</strong> If yes → Do it.<br>If no → Write it down. Schedule it. Then let it go until that time.</p><p><strong>Step 4:</strong> Do one small thing that moves you forward. Not the whole mountain. Just one stone.</p><p><strong>Step 5:</strong> Remind yourself: <em>“I have solved every problem I’ve ever faced so far. I will solve this one too.”</em></p><h3>🌟 Final Truth</h3><p>The richest person you know has something keeping them awake.<br>The poorest person you know has something keeping them awake.<br>You have something keeping you awake.</p><p>That’s not a failure. That’s being human.</p><p>The difference is not in having worries.<br>The difference is in how you hold them.</p><p>Do you carry them like bricks on your back?<br>Or do you hold them like leaves in an open palm — noticing them, but not crushed by them?</p><h3>🕊️ What I Wish Someone Told Me Years Ago</h3><blockquote>“The goal is not to stop worrying. The goal is to stop letting worry stop you.”</blockquote><p>Work anyway.<br>Love anyway.<br>Try anyway.<br>Fail anyway.<br>Get up anyway.</p><p>The worry will be there.But so will you.And that’s enough.</p><p><em>What’s one worry you’re carrying today that you can put down — just for an hour? Share below. Let’s practice together.</em> 👇</p><p>#MindsetMatters #MentalHealth #Resilience #Fatherhood #LifeLessons</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c480ae24698a" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TypeScript Utility Types Explained Like You’re 10! ]]></title>
            <link>https://medium.com/@yetesfadev/typescript-utility-types-explained-like-youre-10-ba2b81d3f86d?source=rss-52dfbb277718------2</link>
            <guid isPermaLink="false">https://medium.com/p/ba2b81d3f86d</guid>
            <category><![CDATA[typescript-utility-types]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[omit]]></category>
            <category><![CDATA[nextjs]]></category>
            <category><![CDATA[partial]]></category>
            <dc:creator><![CDATA[yetesfa alemayehu]]></dc:creator>
            <pubDate>Mon, 09 Mar 2026 16:13:12 GMT</pubDate>
            <atom:updated>2026-03-09T16:13:12.436Z</atom:updated>
            <content:encoded><![CDATA[<p>Hey there! Let’s imagine you’re organizing your school backpack. TypeScript utility types are like special backpack organizers that help you keep everything neat and safe!</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*dMqwuQ0fPcOJBYRM" /><figcaption>Photo by <a href="https://unsplash.com/@jsweissphoto?utm_source=medium&amp;utm_medium=referral">Josiah Weiss</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>🎒 Your Backpack = Your Data</h3><p>Think of your data like a backpack with different compartments:</p><pre>interface Backpack {<br>  id: string;          // Your name tag<br>  books: string[];     // Your school books<br>  lunch: string;       // Your sandwich<br>  diary: string;       // Your secret diary<br>  money: number;       // Your lunch money<br>  oldHomework: Date;   // Last week&#39;s homework<br>}</pre><p>Now let’s learn how to organize this backpack! 🎯</p><h3>🎯 1. PICK — “Only Take What You Need”</h3><h3>The Problem:</h3><p>When you go to class, you don’t need your ENTIRE backpack. You just need specific things!</p><h3>The Solution:</h3><pre>// 🎒 Full backpack<br>interface Backpack {<br>  id: string;<br>  books: string[];<br>  lunch: string;<br>  diary: string;     // ❌ Too private for class!<br>  money: number;     // ❌ Shouldn&#39;t bring to class!<br>  oldHomework: Date;<br>}</pre><pre>// 📚 What you actually need for class:<br>type ClassItems = Pick&lt;Backpack, &#39;id&#39; | &#39;books&#39; | &#39;lunch&#39;&gt;;<br>// Result: { id: string; books: string[]; lunch: string; }</pre><pre>// Now you have:<br>// ✅ id (so teacher knows it&#39;s yours)<br>// ✅ books (for learning)<br>// ✅ lunch (for break time)<br>// ❌ NO diary (too private!)<br>// ❌ NO money (should be safe at home!)</pre><h3>Real Life Example:</h3><pre>// Going to math class<br>function goToMathClass(items: Pick&lt;Backpack, &#39;books&#39; | &#39;lunch&#39;&gt;) {<br>  console.log(&quot;Taking these to math class:&quot;);<br>  console.log(&quot;Books:&quot;, items.books);<br>  console.log(&quot;Lunch:&quot;, items.lunch);<br>  // ❌ items.diary - CAN&#39;T access private diary!<br>}</pre><pre>goToMathClass({<br>  books: [&quot;Math Book&quot;, &quot;Calculator&quot;],<br>  lunch: &quot;Sandwich&quot;<br>});</pre><h3>🚫 2. OMIT — “Leave Behind What You Don’t Need”</h3><h3>The Problem:</h3><p>Sometimes it’s easier to say what you DON’T want rather than list everything you DO want.</p><h3>The Solution:</h3><pre>// 🎒 Full backpack<br>interface Backpack {<br>  id: string;<br>  books: string[];<br>  lunch: string;<br>  diary: string;     // ❌ Don&#39;t want this!<br>  money: number;     // ❌ Don&#39;t want this!<br>  oldHomework: Date; // ❌ Don&#39;t want this!<br>}</pre><pre>// 🏫 Safe items for school:<br>type SchoolSafe = Omit&lt;Backpack, &#39;diary&#39; | &#39;money&#39; | &#39;oldHomework&#39;&gt;;<br>// Result: { id: string; books: string[]; lunch: string; }</pre><pre>// This is like saying:<br>// &quot;Take everything EXCEPT diary, money, and old homework&quot;</pre><h3>Real Life Example:</h3><pre>// Mom checking your backpack for school<br>function checkBackpackForSchool(backpack: Omit&lt;Backpack, &#39;diary&#39; | &#39;money&#39;&gt;) {<br>  console.log(&quot;✅ Backpack is school-safe!&quot;);<br>  console.log(&quot;Has:&quot;, backpack.books, backpack.lunch);<br>  // ❌ backpack.diary - Mom can&#39;t see your diary!<br>  // ❌ backpack.money - No money needed for school!<br>}</pre><pre>checkBackpackForSchool({<br>  id: &quot;John&#39;s Backpack&quot;,<br>  books: [&quot;Science&quot;, &quot;English&quot;],<br>  lunch: &quot;Apple&quot;,<br>  oldHomework: new Date()<br>});</pre><h3>❓ 3. PARTIAL — “Maybe Bring These Things”</h3><h3>The Problem:</h3><p>When you’re not sure what you’ll need, you want the OPTION to bring things.</p><h3>The Solution:</h3><pre>// 🎒 Normally you need everything:<br>interface Homework {<br>  math: string;<br>  science: string;<br>  english: string;<br>  history: string;<br>}</pre><pre>// 📝 But some days you only do SOME homework:<br>type SomeHomework = Partial&lt;Homework&gt;;<br>// Result: { math?: string; science?: string; english?: string; history?: string; }</pre><pre>// Now you can have:<br>// ✅ Just math homework<br>// ✅ Math and science homework  <br>// ✅ All homework<br>// ✅ No homework (empty object)</pre><h3>Real Life Example:</h3><pre>// Teacher collecting homework<br>function collectHomework(homework: Partial&lt;Homework&gt;) {<br>  if (homework.math) {<br>    console.log(&quot;📐 Math homework:&quot;, homework.math);<br>  }<br>  if (homework.science) {<br>    console.log(&quot;🔬 Science homework:&quot;, homework.science);<br>  }<br>  // All subjects are OPTIONAL - you might not have done them all<br>}</pre><pre>// All of these work:<br>collectHomework({ math: &quot;Page 25&quot; });<br>collectHomework({ science: &quot;Lab report&quot;, english: &quot;Essay&quot; });<br>collectHomework({}); // No homework today! 😅</pre><h3>✅ 4. REQUIRED — “You MUST Bring These!”</h3><h3>The Problem:</h3><p>Sometimes things are optional, but for important trips, you NEED everything.</p><h3>The Solution:</h3><pre>// 🎒 Normally some items are optional:<br>interface FieldTripItems {<br>  permissionSlip?: string;    // 😬 Maybe your parents forgot to sign<br>  lunch?: string;             // 😬 Maybe you&#39;ll buy lunch<br>  money?: number;             // 😬 Maybe you won&#39;t need money<br>  jacket?: string;            // 😬 Maybe it won&#39;t be cold<br>}</pre><pre>// 🚌 For the field trip, everything is REQUIRED:<br>type FieldTripMustHaves = Required&lt;FieldTripItems&gt;;<br>// Result: { permissionSlip: string; lunch: string; money: number; jacket: string; }</pre><pre>// Now you MUST have:<br>// ✅ Permission slip (signed!)<br>// ✅ Lunch (can&#39;t buy there!)<br>// ✅ Money (for souvenirs!)<br>// ✅ Jacket (it will be cold!)</pre><h3>Real Life Example:</h3><pre>// Teacher checking field trip preparation<br>function checkFieldTripReadiness(items: Required&lt;FieldTripItems&gt;) {<br>  console.log(&quot;✅ Permission slip:&quot;, items.permissionSlip);<br>  console.log(&quot;✅ Lunch:&quot;, items.lunch);<br>  console.log(&quot;✅ Money: $&quot;, items.money);<br>  console.log(&quot;✅ Jacket:&quot;, items.jacket);<br>  // ALL are required - no maybe&#39;s!<br>}</pre><pre>// This works:<br>checkFieldTripReadiness({<br>  permissionSlip: &quot;Signed by mom&quot;,<br>  lunch: &quot;Sandwich and juice&quot;,<br>  money: 20,<br>  jacket: &quot;Winter coat&quot;<br>});</pre><pre>// This would ERROR:<br>// checkFieldTripReadiness({<br>//   permissionSlip: &quot;Signed&quot;, <br>//   lunch: &quot;Sandwich&quot;<br>//   // ❌ Missing money and jacket!<br>// });</pre><h3>🎮 Let’s Play With Real Examples!</h3><h3>Game Character Example:</h3><pre>// 🎮 Your video game character:<br>interface GameCharacter {<br>  health: number;<br>  armor: number;<br>  weapons: string[];<br>  secretCode: string;    // 🤫 Only developers should know!<br>  password: string;      // 🔒 Super secret!<br>  level: number;<br>}</pre><pre>// 👥 What other players can see:<br>type PublicCharacter = Pick&lt;GameCharacter, &#39;health&#39; | &#39;armor&#39; | &#39;weapons&#39; | &#39;level&#39;&gt;;<br>// OR<br>type PublicCharacter = Omit&lt;GameCharacter, &#39;secretCode&#39; | &#39;password&#39;&gt;;</pre><pre>// Both give you: { health: number; armor: number; weapons: string[]; level: number; }<br>// ❌ No secret codes or passwords!</pre><h3>Social Media Example:</h3><pre>// 📱 Your social media profile:<br>interface UserProfile {<br>  username: string;<br>  displayName: string;<br>  bio: string;<br>  email: string;         // 🔒 Private!<br>  password: string;      // 🔒 Super private!<br>  birthDate: Date;       // 🔒 Private!<br>  posts: string[];<br>  followers: number;<br>}</pre><pre>// 🌐 What the public sees:<br>type PublicProfile = Omit&lt;UserProfile, &#39;email&#39; | &#39;password&#39; | &#39;birthDate&#39;&gt;;</pre><pre>// 👤 What appears in search results:<br>type SearchResult = Pick&lt;UserProfile, &#39;username&#39; | &#39;displayName&#39; | &#39;bio&#39;&gt;;</pre><h3>🧩 Putting It All Together</h3><h3>School Week Planner:</h3><pre>interface SchoolWeek {<br>  monday: string[];<br>  tuesday: string[];<br>  wednesday: string[];<br>  thursday: string[];<br>  friday: string[];<br>}</pre><pre>// 🎯 This week&#39;s focus (only some days):<br>type ThisWeekFocus = Pick&lt;SchoolWeek, &#39;monday&#39; | &#39;wednesday&#39; | &#39;friday&#39;&gt;;</pre><pre>// 📅 Update your schedule (some days might change):<br>type WeekUpdates = Partial&lt;SchoolWeek&gt;;</pre><pre>// 🚨 Important test week (ALL days required):<br>type TestWeek = Required&lt;SchoolWeek&gt;;</pre><h3>🎯 Quick Cheat Sheet for Kids!</h3><pre>// 🎒 PICK - &quot;I want THESE specific things&quot;<br>type WhatIWant = Pick&lt;Backpack, &#39;books&#39; | &#39;lunch&#39;&gt;;</pre><pre>// 🚫 OMIT - &quot;I want everything EXCEPT these&quot;<br>type WhatIDontWant = Omit&lt;Backpack, &#39;diary&#39; | &#39;money&#39;&gt;;</pre><pre>// ❓ PARTIAL - &quot;Maybe I&#39;ll bring these, maybe not&quot;<br>type MaybeBring = Partial&lt;Backpack&gt;;</pre><pre>// ✅ REQUIRED - &quot;I MUST bring all of these!&quot;<br>type MustBring = Required&lt;Backpack&gt;;</pre><h3>🎁 Your Turn to Practice!</h3><p>Imagine you have a Pizza Order:</p><pre>interface PizzaOrder {<br>  size: string;<br>  crust: string;<br>  toppings: string[];<br>  specialInstructions?: string;<br>  customerName: string;<br>  phoneNumber: string;      // 🔒 Private!<br>  address: string;          // 🔒 Private!<br>  paymentInfo: string;      // 🔒 Super private!<br>}</pre><p>Your Challenges:</p><ol><li>Create a type for the kitchen (they don’t need customer info)</li><li>Create a type for updating an order (maybe change toppings)</li><li>Create a type for the delivery driver (they need address but not payment)</li><li>Create a type that requires all optional fields</li></ol><p>Try it yourself first, then check below! 👇</p><h3>🏆 Answer Key</h3><pre>// 1. Kitchen view (no private info)<br>type KitchenOrder = Omit&lt;PizzaOrder, &#39;phoneNumber&#39; | &#39;address&#39; | &#39;paymentInfo&#39;&gt;;</pre><pre>// 2. Update order (everything optional except maybe order ID in real life)<br>type OrderUpdate = Partial&lt;PizzaOrder&gt;;</pre><pre>// 3. Delivery driver (needs address but not payment info)<br>type DeliveryInfo = Pick&lt;PizzaOrder, &#39;customerName&#39; | &#39;address&#39;&gt;;</pre><pre>// 4. Complete order (no optional fields)<br>type CompleteOrder = Required&lt;PizzaOrder&gt;;ty</pre><h3>🎉 You Did It!</h3><p>Now you understand TypeScript utility types! Remember:</p><ul><li>Pick = “I want these!” 👉</li><li>Omit = “I don’t want these!” 👈</li><li>Partial = “Maybe these?” 🤔</li><li>Required = “Must have these!” ✅</li></ul><p>These are like superpowers for organizing your code — and they work in ANY TypeScript project! 🚀</p><p>What other examples can you think of? Share your ideas below! 💬</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=ba2b81d3f86d" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Regular Expressions (Regex) Demystified: The Ultimate Guide with Practical Examples]]></title>
            <link>https://medium.com/@yetesfadev/regular-expressions-regex-demystified-the-ultimate-guide-with-practical-examples-1b1286e432e1?source=rss-52dfbb277718------2</link>
            <guid isPermaLink="false">https://medium.com/p/1b1286e432e1</guid>
            <category><![CDATA[regexp]]></category>
            <category><![CDATA[regex-in-javascript]]></category>
            <category><![CDATA[regex]]></category>
            <category><![CDATA[regex-in-python]]></category>
            <dc:creator><![CDATA[yetesfa alemayehu]]></dc:creator>
            <pubDate>Sat, 08 Nov 2025 15:36:09 GMT</pubDate>
            <atom:updated>2025-11-08T15:46:42.139Z</atom:updated>
            <content:encoded><![CDATA[<p>Regular expressions can look like alien code at first, but they’re actually one of the most powerful tools in programming. Let me break them down into simple, practical concepts you can use immediately.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*77-T6rYfaA_-gGgP" /><figcaption>Photo by <a href="https://unsplash.com/@dani_franco?utm_source=medium&amp;utm_medium=referral">Danie Franco</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>🎯 What is Regex?</h3><p>Regex is a pattern-matching language that helps you find, extract, or replace text based on specific patterns. Think of it like CTRL+F on steroids 🔍</p><h3>🔤 Basic Building Blocks</h3><h3>1. Literal Characters</h3><pre>// Matches exact text<br>const pattern = /hello/;<br>console.log(pattern.test(&quot;hello world&quot;)); // ✅ true<br>console.log(pattern.test(&quot;hi world&quot;));    // ❌ false</pre><h3>2. Character Classes</h3><pre>// Match any one of these characters<br>const vowels = /[aeiou]/;<br>console.log(vowels.test(&quot;hello&quot;)); // ✅ true (matches &#39;e&#39;)<br>console.log(vowels.test(&quot;xyz&quot;));   // ❌ false<br>// Match any digit<br>const digits = /[0-9]/;<br>console.log(digits.test(&quot;Room 101&quot;)); // ✅ true</pre><h3>3. Common Shorthand Classes</h3><pre>\d  // Any digit (0-9)<br>\w  // Any word character (a-z, A-Z, 0-9, _)<br>\s  // Any whitespace (space, tab, newline)<br>.   // Any character except newline<br>// Uppercase = opposite<br>\D  // Non-digit<br>\W  // Non-word character  <br>\S  // Non-whitespace</pre><h3>⚡ Real-World Examples</h3><h3>Example 1: Email Validation</h3><pre>const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;<br>console.log(emailRegex.test(&quot;user@example.com&quot;));    // ✅ true<br>console.log(emailRegex.test(&quot;invalid.email&quot;));       // ❌ false<br>console.log(emailRegex.test(&quot;user@company.co.uk&quot;));  // ✅ true</pre><p>Breakdown:</p><ul><li>^ - Start of string</li><li>[^\s@]+ - One or more characters that aren&#39;t space or @</li><li>@ - Literal @ symbol</li><li>[^\s@]+ - Domain name (no spaces or @)</li><li>\. - Literal dot (escaped)</li><li>[^\s@]+ - Top-level domain</li><li>$ - End of string</li></ul><h3>Example 2: Phone Number Formatting</h3><pre>const phoneRegex = /^(\d{3})-(\d{3})-(\d{4})$/;<br>console.log(phoneRegex.test(&quot;555-123-4567&quot;)); // ✅ true<br>console.log(phoneRegex.test(&quot;5551234567&quot;));   // ❌ false<br>// Extract parts<br>const match = &quot;555-123-4567&quot;.match(phoneRegex);<br>console.log(match[1]); // &quot;555&quot; (area code)<br>console.log(match[2]); // &quot;123&quot; (prefix)<br>console.log(match[3]); // &quot;4567&quot; (line number)</pre><h3>Example 3: Password Strength Check</h3><pre>// At least 8 chars, contains uppercase, lowercase, number, and special char<br>const strongPassword = /^(?=.*[a-z])(?=.*[A-Z])(?=.*\d)(?=.*[@$!%*?&amp;])[A-Za-z\d@$!%*?&amp;]{8,}$/;<br>console.log(strongPassword.test(&quot;Password123!&quot;)); // ✅ true<br>console.log(strongPassword.test(&quot;weak&quot;));         // ❌ false<br>console.log(strongPassword.test(&quot;NoSpecial123&quot;)); // ❌ false</pre><h3>🔧 Quantifiers — How Many Times?</h3><pre>*      // Zero or more times<br>+      // One or more times  <br>?      // Zero or one time<br>{3}    // Exactly 3 times<br>{3,}   // 3 or more times<br>{3,5}  // Between 3 and 5 times</pre><h3>Examples:</h3><pre>const multipleA = /a+/;        // One or more &#39;a&#39;s<br>console.log(multipleA.test(&quot;baad&quot;)); // ✅ true<br>const exactThree = /\d{3}/;    // Exactly three digits<br>console.log(exactThree.test(&quot;123&quot;)); // ✅ true<br>const betweenTwoFour = /[a-z]{2,4}/;<br>console.log(betweenTwoFour.test(&quot;abc&quot;)); // ✅ true</pre><h3>🎭 Grouping and Capturing</h3><h3>Capturing Groups:</h3><pre>const dateRegex = /(\d{4})-(\d{2})-(\d{2})/;<br>const match = &quot;2024-03-15&quot;.match(dateRegex);<br>console.log(match[0]); // &quot;2024-03-15&quot; (full match)<br>console.log(match[1]); // &quot;2024&quot; (year)<br>console.log(match[2]); // &quot;03&quot; (month)  <br>console.log(match[3]); // &quot;15&quot; (day)</pre><h3>Non-Capturing Groups:</h3><pre>// Use (?:...) when you don&#39;t need to capture the group<br>const nonCapture = /(?:Mr|Ms|Mrs)\. (\w+)/;<br>const nameMatch = &quot;Mr. Smith&quot;.match(nonCapture);<br>console.log(nameMatch[1]); // &quot;Smith&quot; (only this is captured)</pre><h3>🔍 Flags — Change How Regex Works</h3><pre>// Add these after the closing slash<br>g  // Global (find all matches, not just first)<br>i  // Case insensitive<br>m  // Multiline (^ and $ match start/end of lines)<br>// Examples:<br>const globalRegex = /a/g;<br>&quot;banana&quot;.match(globalRegex); // [&quot;a&quot;, &quot;a&quot;, &quot;a&quot;]<br>const caseInsensitive = /hello/i;<br>caseInsensitive.test(&quot;HELLO&quot;); // ✅ true<br>const multiline = /^start/m;<br>`beginning<br>start here`.match(multine); // ✅ matches &quot;start&quot;</pre><h3>🛠 Practical JavaScript Methods</h3><h3>1. test() — Check if pattern exists</h3><pre>const hasNumber = /\d/;<br>console.log(hasNumber.test(&quot;Hello 123&quot;)); // ✅ true</pre><h3>2. match() — Extract matches</h3><pre>const text = &quot;Apples: 5, Oranges: 3&quot;;<br>const numbers = text.match(/\d+/g);<br>console.log(numbers); // [&quot;5&quot;, &quot;3&quot;]</pre><h3>3. replace() — Find and replace</h3><pre>const message = &quot;Hello John Doe&quot;;<br>const anonymized = message.replace(/\w+/g, &quot;XXX&quot;);<br>console.log(anonymized); // &quot;XXX XXX XXX&quot;<br>// With capture groups<br>const nameSwap = &quot;John Smith&quot;.replace(/(\w+) (\w+)/, &quot;$2, $1&quot;);<br>console.log(nameSwap); // &quot;Smith, John&quot;</pre><h3>4. search() — Find position</h3><pre>const position = &quot;Hello World&quot;.search(/World/);<br>console.log(position); // 6 (index where match starts)</pre><h3>5. split() — Split by pattern</h3><pre>const csv = &quot;apple,banana,cherry&quot;;<br>const fruits = csv.split(/,/);<br>console.log(fruits); // [&quot;apple&quot;, &quot;banana&quot;, &quot;cherry&quot;]</pre><h3>💼 Real Project Examples</h3><h3>1. Form Validation</h3><pre>function validateForm(email, phone) {<br>    const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/;<br>    const phoneRegex = /^\(\d{3}\) \d{3}-\d{4}$/;<br>    <br>    return {<br>        emailValid: emailRegex.test(email),<br>        phoneValid: phoneRegex.test(phone)<br>    };<br>}</pre><h3>2. Data Extraction</h3><pre>function extractPrices(text) {<br>    const priceRegex = /\$\d+(\.\d{2})?/g;<br>    return text.match(priceRegex) || [];<br>}<br>const ad = &quot;Sale! Chair: $299.99, Table: $150, Lamp: $45.50&quot;;<br>console.log(extractPrices(ad)); // [&quot;$299.99&quot;, &quot;$150&quot;, &quot;$45.50&quot;]</pre><h3>3. Text Cleaning</h3><pre>function cleanText(input) {<br>    return input<br>        .replace(/\s+/g, &#39; &#39;)          // Multiple spaces to single<br>        .replace(/[^\w\s.,!?]/g, &#39;&#39;)   // Remove special chars<br>        .trim();                       // Remove leading/trailing spaces<br>}</pre><h3>🚀 Advanced Patterns</h3><h3>Lookahead and Lookbehind</h3><pre>// Positive lookahead - match &#39; dollars&#39; only if preceded by number<br>const price = /\d+(?= dollars)/;<br>console.log(price.exec(&quot;100 dollars&quot;)); // ✅ &quot;100&quot;<br>// Negative lookahead - match &#39;Python&#39; not followed by &#39; script&#39;<br>const python = /Python(?! script)/;<br>console.log(python.test(&quot;Python developer&quot;)); // ✅ true<br>// Lookbehind - match number only if preceded by &#39;$&#39;<br>const dollarAmount = /(?&lt;=\$)\d+/;<br>console.log(dollarAmount.exec(&quot;Price: $100&quot;)); // ✅ &quot;100&quot;</pre><h3>Named Capture Groups</h3><pre>const dateRegex = /(?&lt;year&gt;\d{4})-(?&lt;month&gt;\d{2})-(?&lt;day&gt;\d{2})/;<br>const match = &quot;2024-03-15&quot;.match(dateRegex);<br>console.log(match.groups.year);  // &quot;2024&quot;<br>console.log(match.groups.month); // &quot;03&quot;<br>console.log(match.groups.day);   // &quot;15&quot;</pre><h3>🎯 Quick Reference Cheat Sheet</h3><pre>// Anchors<br>^     // Start of string/line<br>$     // End of string/line<br>\b    // Word boundary<br>// Character classes<br>[abc]     // Any of a, b, or c<br>[^abc]    // Not a, b, or c<br>[a-z]     // Any lowercase letter<br>[0-9]     // Any digit<br>// Quantifiers<br>*        // 0 or more<br>+        // 1 or more  <br>?        // 0 or 1<br>{n}      // Exactly n<br>{n,}     // n or more<br>{n,m}    // Between n and m<br>// Common patterns<br>/\w+@\w+\.\w+/                 // Simple email<br>/^\d{3}-\d{3}-\d{4}$/          // US phone<br>/^https?:\/\/.+\..+/           // URL<br>/^\d{1,3}(\.\d{1,3}){3}$/      // IP address</pre><h3>💡 Pro Tips</h3><ol><li>Start simple — Don’t try to build complex regex in one go</li><li>Test incrementally — Use tools like <a href="https://regex101.com/">regex101.com</a></li><li>Comment complex patterns — They can be hard to read later</li><li>Consider alternatives — Sometimes string methods are simpler</li><li>Use online testers — Regex101, RegExr, or Debuggex</li></ol><h3>🏁 Your Turn to Practice</h3><p>Try these challenges:</p><ol><li>Validate a username (3–15 chars, letters, numbers, underscores only)</li><li>Extract all hashtags from a social media post</li><li>Format credit card numbers (add spaces every 4 digits)</li><li>Find duplicate words in a sentence</li></ol><p>Starter code:</p><pre>// Challenge 1: Username validation<br>function isValidUsername(username) {<br>    const usernameRegex = /^[a-zA-Z0-9_]{3,15}$/;<br>    return usernameRegex.test(username);<br>}<br>console.log(isValidUsername(&quot;user_123&quot;)); // ✅ true<br>console.log(isValidUsername(&quot;ab&quot;));       // ❌ false</pre><p>Remember: Regex is a skill that improves with practice. Start with simple patterns and gradually tackle more complex ones. The time you invest in learning regex will pay back many times over in your programming career!</p><p><em>Need help with a specific regex pattern? Share your challenge in the comments! And Do not forget to Clapp 👏 if you learn form the Article only !!!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1b1286e432e1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[TypeScript vs JavaScript: The Ultimate Guide with Real Code Examples]]></title>
            <link>https://medium.com/@yetesfadev/typescript-vs-javascript-the-ultimate-guide-with-real-code-examples-aaef365bae73?source=rss-52dfbb277718------2</link>
            <guid isPermaLink="false">https://medium.com/p/aaef365bae73</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[javascript-frameworks]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[javascript-interview]]></category>
            <category><![CDATA[javascript-tips]]></category>
            <dc:creator><![CDATA[yetesfa alemayehu]]></dc:creator>
            <pubDate>Thu, 06 Nov 2025 11:46:34 GMT</pubDate>
            <atom:updated>2025-11-06T11:46:34.838Z</atom:updated>
            <content:encoded><![CDATA[<p>If you’ve ever wondered what exactly makes TypeScript different from JavaScript, you’re not alone. Many developers start with JavaScript and then hear about TypeScript, but the practical differences aren’t always clear. Let me break it down with real code examples that show exactly what changes and why it matters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/830/1*0bAn-sHapHFr9uGaFwIKDw.png" /></figure><h3>🧠 1. Core Difference: TypeScript = JavaScript + Types</h3><p>Think of it like this:</p><ul><li>JavaScript is like having a conversation without grammar rules</li><li>TypeScript is the same conversation, but with proper grammar and spell-check</li></ul><p>FeatureJavaScriptTypeScriptType systemDynamic typingStatic typingError detectionRuntime errorsCompile-time errorsRuns directlyYesNo (must compile to JS)ToolingBasicAdvanced autocomplete</p><h3>🔍 Real Code Examples: See the Difference</h3><h3>Example 1: Basic Variables</h3><h4>JavaScript:</h4><pre>let age = 25;<br>age = &quot;twenty five&quot;; // ✅ No error in JavaScript<br>console.log(age); // Output: &quot;twenty five&quot;</pre><h4>TypeScript:</h4><pre>let age: number = 25;<br>age = &quot;twenty five&quot;; // ❌ COMPILER ERROR: <br>// Type &#39;string&#39; is not assignable to type &#39;number&#39;</pre><p>Why this matters: TypeScript catches the error before you even run the code, while JavaScript would happily let you change a number to a string, potentially causing bugs later.</p><h3>Example 2: Function Parameters</h3><h4>JavaScript:</h4><pre>function calculateArea(length, width) {<br>    return length * width;<br>}<br><br>console.log(calculateArea(10, 5));     // ✅ 50<br>console.log(calculateArea(&quot;10&quot;, 5));   // 😬 50 (works but dangerous)<br>console.log(calculateArea(10));        // 😬 NaN (runtime error)</pre><h4>TypeScript:</h4><pre>function calculateArea(length: number, width: number): number {<br>    return length * width;<br>}<br><br>console.log(calculateArea(10, 5));     // ✅ 50<br>console.log(calculateArea(&quot;10&quot;, 5));   // ❌ COMPILER ERROR<br>console.log(calculateArea(10));        // ❌ COMPILER ERROR</pre><p>Why this matters: TypeScript ensures you always pass the right types and the right number of arguments.</p><h3>Example 3: Working with Objects</h3><h4>JavaScript:</h4><pre>function printUser(user) {<br>    console.log(&quot;Name: &quot; + user.name);<br>    console.log(&quot;Age: &quot; + user.age);<br>}<br><br>printUser({ name: &quot;Yetesfa&quot;, age: 30 });        // ✅ Works<br>printUser({ username: &quot;Yetesfa&quot;, age: 30 });    // 😬 Runtime error: user.name is undefined</pre><h4>TypeScript:</h4><pre>interface User {<br>    name: string;<br>    age: number;<br>}<br><br>function printUser(user: User) {<br>    console.log(&quot;Name: &quot; + user.name);<br>    console.log(&quot;Age: &quot; + user.age);<br>}<br>printUser({ name: &quot;Yetesfa&quot;, age: 30 });        // ✅ Works<br>printUser({ username: &quot;Yetesfa&quot;, age: 30 });    // ❌ COMPILER ERROR: <br>// Property &#39;name&#39; is missing</pre><p>Why this matters: TypeScript’s interfaces act like blueprints for your objects, ensuring they always have the right structure.</p><h3>Example 4: Arrays</h3><h4>JavaScript:</h4><pre>let numbers = [1, 2, 3];<br>numbers.push(&quot;4&quot;); // ✅ JavaScript allows this<br>console.log(numbers); // [1, 2, 3, &quot;4&quot;] - mixed types!</pre><h4>TypeScript:</h4><pre>let numbers: number[] = [1, 2, 3];<br>numbers.push(&quot;4&quot;); // ❌ COMPILER ERROR:<br>// Argument of type &#39;string&#39; is not assignable to parameter of type &#39;number&#39;</pre><h3>🛠 How TypeScript Actually Works</h3><h3>The Compilation Process:</h3><p>You write TypeScript:</p><pre>// app.ts<br>let message: string = &quot;Hello TypeScript!&quot;;<br>let count: number = 42;</pre><p>TypeScript compiler converts it to JavaScript:</p><pre>tsc app.ts</pre><p>You get plain JavaScript:</p><pre>// app.js<br>let message = &quot;Hello TypeScript!&quot;;<br>let count = 42;</pre><p>Run the JavaScript:</p><pre>node app.js</pre><p>Key insight: <strong>TypeScript is a development tool, not a runtime language. It helps you write better code, but it all runs as regular JavaScript</strong>.</p><h3>🚀 Advanced TypeScript Features (That JavaScript Doesn’t Have)</h3><h3>1. Interfaces</h3><pre>interface Product {<br>    id: number;<br>    name: string;<br>    price: number;<br>    inStock?: boolean; // Optional property<br>}<br><br>function displayProduct(product: Product) {<br>    console.log(`${product.name}: $${product.price}`);<br>}</pre><h3>2. Union Types</h3><pre>let id: string | number;<br>id = &quot;ABC123&quot;;  // ✅ Valid<br>id = 123;       // ✅ Valid<br>id = true;      // ❌ Error: boolean not allowed</pre><h3>3. Generics</h3><pre>function getLast&lt;T&gt;(array: T[]): T {<br>    return array[array.length - 1];<br>}<br><br>const lastNumber = getLast([1, 2, 3]);        // Type: number<br>const lastString = getLast([&quot;a&quot;, &quot;b&quot;, &quot;c&quot;]);  // Type: string</pre><h3>📊 Comparison Table: When to Use Which</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/830/1*0bAn-sHapHFr9uGaFwIKDw.png" /></figure><h3>💡 My Practical Advice</h3><p>Start with JavaScript if you’re:</p><ul><li>Learning to program for the first time</li><li>Building small projects or prototypes</li><li>Working on quick scripts</li></ul><p>Switch to TypeScript when you:</p><ul><li>Work on large projects with multiple developers</li><li>Need to maintain code long-term</li><li>Want to catch errors before runtime</li><li>Value autocomplete and better tooling</li></ul><h3>🔄 Migration Example: Converting JavaScript to TypeScript</h3><h3>Before (JavaScript):</h3><pre>function processUserData(user) {<br>    return {<br>        fullName: user.firstName + &quot; &quot; + user.lastName,<br>        age: user.age,<br>        isAdult: user.age &gt;= 18<br>    };<br>}</pre><h3>After (TypeScript):</h3><pre>interface User {<br>    firstName: string;<br>    lastName: string;<br>    age: number;<br>}<br><br>interface ProcessedUser {<br>    fullName: string;<br>    age: number;<br>    isAdult: boolean;<br>}<br>function processUserData(user: User): ProcessedUser {<br>    return {<br>        fullName: `${user.firstName} ${user.lastName}`,<br>        age: user.age,<br>        isAdult: user.age &gt;= 18<br>    };<br>}</pre><p>Notice how much clearer the TypeScript version is! You can immediately see what data structures you’re working with.</p><h3>🎯 Bottom Line</h3><p>TypeScript doesn’t change what JavaScript can do — it changes how reliably you can do it.</p><p>Think of it as having a smart assistant that:</p><ul><li>✅ Checks your work as you type</li><li>✅ Suggests better approaches</li><li>✅ Catches mistakes before they become bugs</li><li>✅ Documents your code through types</li></ul><p>JavaScript gets the job done, but TypeScript helps you do it with confidence, especially as your projects grow.</p><h3>🚀 Next Steps</h3><p>Ready to try TypeScript? Here’s how to start:</p><ol><li>Install TypeScript:</li></ol><pre>npm install -g typescript</pre><p>Create your first .ts file:</p><pre>// hello.ts<br>function greet(name: string): string {<br>    return `Hello, ${name}!`;<br>}<br><br>console.log(greet(&quot;TypeScript&quot;));</pre><p>Compile and run:</p><pre>tsc hello.ts<br>node hello.js</pre><p>Remember: Every valid JavaScript file is already a valid TypeScript file! You can migrate gradually.</p><p><em>Have questions about specific TypeScript features or migration scenarios? Ask in the comments below! I’m happy to help you navigate the TypeScript journey.</em> 🚀</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=aaef365bae73" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Back to Basics: Rediscovering Coding Fundamentals in the Age of AI]]></title>
            <link>https://medium.com/@yetesfadev/back-to-basics-rediscovering-coding-fundamentals-in-the-age-of-ai-3bbb865d76db?source=rss-52dfbb277718------2</link>
            <guid isPermaLink="false">https://medium.com/p/3bbb865d76db</guid>
            <dc:creator><![CDATA[yetesfa alemayehu]]></dc:creator>
            <pubDate>Wed, 05 Nov 2025 08:47:04 GMT</pubDate>
            <atom:updated>2025-11-05T08:47:04.226Z</atom:updated>
            <content:encoded><![CDATA[<p><em>How a decade in tech and a spontaneous conversation with an old friend brought me back to programming fundamentals</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1000/1*o5AiVXFr1ccqxa1L-e4VJg.jpeg" /></figure><h3>The Wake-Up Call</h3><p>It was a typical Tuesday evening when my phone rang. It was Richa — the same friend who sat beside me from grade 12 through university, the one I learned to code with, the person who remembered my first “Hello World” program.</p><p>We were catching up about life, careers, and the job market when she suddenly interrupted: “Wait — you should apply to this company I’m thinking of! Yes yes, go apply! They’re looking for someone exactly with your TypeScript background.”</p><p>Her spontaneous enthusiasm hit me hard. After 10 years working in various companies, climbing the corporate ladder, and managing teams, I realized something troubling: In this AI-driven development world, I had started doubting my fundamental programming skills.</p><h3>The AI Paradox</h3><p>For the past two years, I’ve been working extensively with TypeScript and Next.js. I can architect complex systems, manage state across distributed applications, and optimize performance. But when Richa started describing the technical interview process, I felt that familiar panic.</p><p>My first instinct? <em>I should use AI to practice.</em></p><p>That’s when I knew I had a problem. In this era where AI can generate code in seconds, we’re losing something fundamental: the ability to think like programmers.</p><h3>Back to the Drawing Board</h3><p>I decided to take Richa’s spontaneous suggestion seriously. I went back to basics — the same kinds of problems we solved in university when we were learning C, then Java, then everything else that followed.</p><p>Here’s what I rediscovered:</p><h3>The Fundamentals Still Matter</h3><p><em>Write a TypeScript function that takes two numbers and returns their sum</em></p><pre>/*****  <br> * Write a TypeScript function that takes two numbers and returns their sum<br> * *****/<br>function add(a: number, b: number): number {<br>    return a + b;<br>}</pre><p>Simple, right? But how often do we actually write these basic building blocks anymore? We import utility libraries or let AI generate them. We’re losing touch with the very foundations that make us engineers, not just “AI prompters.”</p><h3>Problem-Solving Muscle Memory</h3><p>Remember working with algorithms that required actual thought?</p><p><em>Write a function that takes a string and returns the first non-repeated character.</em></p><pre>/***** Write a function that takes a string and returns the first non-repeated character. *****/<br>function firstNonRepeatedCharacter(str: string): string | null {<br>    const charCount: {[key: string]: number} = {};<br>    <br>    // Count occurrences<br>    for(const char of str) {<br>        charCount[char] = (charCount[char] || 0) + 1;<br>    }<br>    <br>    // Find first non-repeated<br>    for(const char of str) {<br>        if(charCount[char] === 1) {<br>            return char;<br>        }<br>    }<br>    return null;<br>}</pre><p>This isn’t just about writing code — it’s about developing the problem-solving intuition that AI can’t give you. It’s the difference between knowing <em>what</em> code works and understanding <em>why</em> it works.</p><h3>The University Flashback</h3><p>Working through these problems transported me back to those university days with Richa. The late nights in the Debire Damo space, computer lab, the frustration of debugging, the triumph when something finally worked. We weren’t just learning syntax; we were learning how to think.</p><p>We’d wrestle with problems like:</p><p><em>Write a function that takes two strings and returns true if they are anagrams</em></p><pre>/***** Write a function that takes two strings and returns true if they are anagrams *****/<br>function areAnagrams(str1: string, str2: string): boolean {<br>    const formatStr = (str: string) =&gt; <br>        str.replace(/\s+/g, &#39;&#39;).toLowerCase().split(&#39;&#39;).sort().join(&#39;&#39;);<br>    return formatStr(str1) === formatStr(str2);<br>}</pre><p>Back then, we had to understand time complexity, space complexity, and different approaches. Today, we just prompt: “Write a function to check if two strings are anagrams.”</p><h3>Why This Matters for Job Seekers</h3><p>If you’re looking for a new job in this competitive market, here’s the hard truth: Companies still test fundamentals.</p><p>While AI can help you build projects and write production code, technical interviews still require you to:</p><ol><li>Write code on a whiteboard (or in a shared editor)</li><li>Explain your thought process in real-time</li><li>Optimize solutions without external tools</li><li>Debug logically without Stack Overflow</li></ol><h3>The Reality Check</h3><p>I challenge you: Try to solve these without AI:</p><p><em>Write a function that takes an array of numbers and returns the median value.</em></p><pre>/***** Write a function that takes an array of numbers and returns the median value. *****/<br>function calculateMedian(numbers: number[]): number | null {<br>    if(numbers.length === 0) return null;<br>    <br>    const sortedNumbers = numbers.slice().sort((a, b) =&gt; a - b);<br>    const mid = Math.floor(sortedNumbers.length / 2);<br>    <br>    if(sortedNumbers.length % 2 === 0) {<br>        return (sortedNumbers[mid - 1] + sortedNumbers[mid]) / 2;<br>    } else {<br>        return sortedNumbers[mid];<br>    }<br>}</pre><p>Could you do it? More importantly, could you explain <em>why</em> you’re sorting the array and how you handle even vs. odd lengths?</p><h3>The Practice Regimen</h3><p>Here’s what I’m doing to rebuild my fundamental skills:</p><h3>1. Daily Algorithm Practice</h3><ul><li>30 minutes of pure problem-solving</li><li>No AI, no autocomplete</li><li>Just me, a text editor, and my brain</li></ul><h3>2. Understanding Over Implementation</h3><p>For each solution, I ask myself:</p><ul><li>What’s the time complexity?</li><li>What’s the space complexity?</li><li>Are there edge cases I’m missing?</li><li>Can I optimize further?</li></ul><h3>3. The Whiteboard Test</h3><p>I practice explaining my code aloud, as if in an interview. It’s surprising how different it feels when you have to vocalize your thought process.</p><h3>A Message to My Fellow Developers</h3><p>To anyone who’s been in the industry for a while, or even those just starting: don’t let AI make you complacent. The tools are amazing and can dramatically increase productivity, but they shouldn’t replace your fundamental understanding.</p><p>That spontaneous call with Richa reminded me of who I was — that curious student who loved solving problems for the sake of solving them. Not for a paycheck, not for a promotion, but for the sheer joy of making something work.</p><h3>The Way Forward</h3><p>AI isn’t the enemy — it’s a powerful tool. But like any tool, it’s most effective in the hands of someone who understands the fundamentals. You wouldn’t want a surgeon who only knows how to use automated tools but doesn’t understand human anatomy.</p><p>Similarly, we need to be developers who understand computational thinking, not just prompt engineering.</p><h3>Your Challenge</h3><p>I’ll leave you with the same realization I had after that conversation with Richa:</p><p>Take one hour. No AI. No libraries. Just you and these basic problems.</p><p>Start with something simple:</p><p><em>Write a function that takes a string and returns true if it’s a palindrome</em></p><pre>/***** Write a function that takes a string and returns true if it&#39;s a palindrome *****/<br>function isPalindrome(str: string): boolean {<br>    const cleanedStr = str.replace(/[\W_]/g, &#39;&#39;).toLowerCase();<br>    return cleanedStr === cleanedStr.split(&#39;&#39;).reverse().join(&#39;&#39;);</pre><p>Then work your way up. Rediscover the joy of solving problems. Remember why you fell in love with coding in the first place.</p><p>Because in the end, AI might write code, but you solve problems. And that’s what makes you valuable.</p><h3>Here Are the Questions I Worked On</h3><p>Use these questions to start your own practice journey. If you’re working with TypeScript, you can reference the solutions. If you’re using a different language, take the questions and create your own solutions!</p><h3>Basic Problems to Build Your Foundation</h3><ol><li>Write a function that takes two numbers and returns their sum</li><li>Write a function that takes an array of numbers and returns the largest one</li><li>Write a function that takes a string and returns the string reversed</li><li>Write a function that takes an object with properties ‘name’ and ‘age’ and prints a formatted string</li><li>Write a function that takes an array of strings and returns a new array with all strings capitalized</li></ol><h3>Intermediate Challenges</h3><ol><li>Write a function that takes a number and returns true if it’s even, false otherwise</li><li>Write a function that takes a string and a character, and returns the number of times the character appears</li><li>Write a function that takes an array of numbers and returns a new array with each number squared</li><li>Write a function that takes a date object and returns the day of the week as a string</li><li>Write a function that takes two strings and returns true if they are anagrams</li></ol><h3>Advanced Problem Solving</h3><ol><li>Write a function that takes an array of objects with ‘name’ and ‘score’, and returns the object with the highest score</li><li>Write a function that takes a string and returns true if it’s a palindrome</li><li>Write a function that takes an array of numbers and returns the average</li><li>Write a function that takes a string and returns the number of vowels</li><li>Write a function that takes an array of numbers and returns a new array with only the prime numbers</li></ol><h3>Expert Level Challenges</h3><ol><li>Write a function that takes a number and returns its factorial</li><li>Write a function that takes a string and returns the first non-repeated character</li><li>Write a function that takes an array of numbers and returns the second largest number</li><li>Write a function that takes a string and returns a new string with the words in reverse order</li><li>Write a function that takes a number and returns true if it’s a leap year</li></ol><p>And 80+ more challenges covering:</p><ul><li>String manipulation</li><li>Array operations</li><li>Object handling</li><li>Mathematical calculations</li><li>Algorithm optimization</li><li>Data structure implementation</li></ul><h3>Start Your Journey Today</h3><p>Whether you’re preparing for interviews, sharpening your skills, or just rediscovering the joy of coding, these problems will strengthen your foundation.</p><p>If you’re working with TypeScript, you can find all the solutions in my GitHub repository: <a href="https://github.com/hanhabesha/typescript-exercises">https://github.com/hanhabesha/typescript-exercises</a></p><p>If you’re using a different language, take these questions and implement them in your preferred language. Then share your solutions and let’s learn from each other!</p><p>Your Challenge: Pick 5 problems from the list above and solve them without AI assistance. Share your GitHub repository in the comments below!</p><p><em>Special thanks to Richa, for that spontaneous “Yes yes, go apply!” that sparked this journey of rediscovery. Some friendships don’t need formal messages — just the right words at the right time.</em></p><p>What was your journey back to fundamentals? Share your story and GitHub links in the comments below! 👇</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=3bbb865d76db" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[What is a DTO? The Restaurant Order Form of the Software World]]></title>
            <link>https://medium.com/@yetesfadev/what-is-a-dto-the-restaurant-order-form-of-the-software-world-410db31e9bbd?source=rss-52dfbb277718------2</link>
            <guid isPermaLink="false">https://medium.com/p/410db31e9bbd</guid>
            <category><![CDATA[clean-code]]></category>
            <category><![CDATA[dto]]></category>
            <category><![CDATA[data-transfer-object]]></category>
            <dc:creator><![CDATA[yetesfa alemayehu]]></dc:creator>
            <pubDate>Wed, 10 Sep 2025 08:16:20 GMT</pubDate>
            <atom:updated>2025-09-10T08:16:20.348Z</atom:updated>
            <content:encoded><![CDATA[<p>If you’ve ever wondered how different parts of a software application talk to each other without creating a mess, the secret often lies in a simple, powerful concept: the c, or DTO.</p><p>Think of it like an order form at a restaurant. Let’s break down this analogy to understand how DTOs make modern software reliable, secure, and efficient.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*C7ngViAlmlfMgU4C" /><figcaption>Photo by <a href="https://unsplash.com/@liqiair?utm_source=medium&amp;utm_medium=referral">Qi Li</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>The Restaurant Kitchen vs. The Software Backend</h3><p>A backend system is like a busy restaurant kitchen. It has a specific, organized way of working to ensure every customer gets exactly what they ordered, quickly and correctly. The journey of a customer’s request (like ordering a burger) mirrors the journey of an API request through a backend.</p><p>Here’s how our backend works, step by step, using the restaurant analogy:</p><h3>The Journey of a Request</h3><h3>1. HTTP Request 📱 → “The Customer Places an Order”</h3><ul><li><strong>What it is</strong>: Your frontend application (like a website or mobile app) sends a request to the server.</li><li><strong>Example</strong>: A user clicks “Generate Ad,” sending a message: &quot;Create an ad for my lemonade stand!&quot;</li><li><strong>The Analogy</strong>: This is you telling the waiter, “I’d like a burger, please.”</li></ul><h3>2. Endpoint 🚪 → “The Waiter Hears the Order”</h3><ul><li><strong>What it is</strong>: A specific URL on the server (an endpoint) is programmed to listen for this type of request.</li><li><strong>Example</strong>: A file like generateAd.ts is triggered.</li><li><strong>The Analogy</strong>: The waiter hears your order and knows which station to bring it to.</li></ul><h3>3. DTO (Data Transfer Object) 📋 → “The Waiter Writes a Clear Order Ticket”</h3><ul><li><strong>What it is</strong>: This is the star of our show. The DTO is a simple object that defines the exact structure and rules for the incoming data. It takes the raw, messy request and organizes it into a clean, predictable format.</li><li><strong>Example</strong>: The raw request is shaped into a neat DTO:</li></ul><pre>{<br>  &quot;text&quot;: &quot;Best Lemonade Ever!&quot;,<br>  &quot;type&quot;: &quot;premium&quot;,<br>  &quot;size&quot;: &quot;square&quot;<br>}</pre><ul><li><strong>The Analogy</strong>: This is the order form the waiter fills out. It standardizes your request into clear, kitchen-friendly terms: <em>“1 Burger, No Pickles, Extra Cheese.”</em> Without this form, your special requests might get lost or misunderstood.</li></ul><h3>4. Validator ✅ → “The Kitchen Checks the Order Ticket”</h3><ul><li><strong>What it is</strong>: Before any work begins, the system checks the DTO to ensure the data is valid and makes sense.</li><li><strong>Example</strong>: It checks:</li></ul><p>❌ Is the text over 100 characters? → Error!</p><p>❌ Is the type one we recognize (&#39;premium&#39;, &#39;basic&#39;)? → Error!</p><p>✅ Everything looks perfect! → Proceed.</p><ul><li><strong>The Analogy</strong>: The kitchen manager looks at the order ticket. <em>“We can make that burger.”</em> Or, <em>“Sorry, we don’t have any more lobster today”</em> (returns an error immediately).</li></ul><h3>5. Service 👨‍🍳 → “The Chef Cooks the Meal”</h3><ul><li><strong>What it is</strong>: This is where the actual business logic happens. The service uses the clean, validated data from the DTO to do its work.</li><li><strong>Example</strong>: It calls AI models to generate ad text, creates images, and saves everything to the database.</li><li><strong>The Analogy</strong>: The chef uses the precise instructions on the order ticket to cook your meal perfectly.</li></ul><h3>6. Response DTO 📦 → “The Meal is Plated Nicely”</h3><ul><li><strong>What it is</strong>: The service’s result is packaged into another DTO to ensure a consistent response structure.</li><li><strong>Example</strong>: The service’s complex result is neatly packaged:</li></ul><pre>{<br>  &quot;headline&quot;: &quot;Refreshing Lemonade!&quot;,<br>  &quot;description&quot;: &quot;Made with real lemons&quot;,<br>  &quot;imageUrls&quot;: [&quot;image1.jpg&quot;, &quot;image2.png&quot;]<br>}</pre><ul><li><strong>The Analogy</strong>: The sous-chef plates the cooked food beautifully, adding garnish and ensuring every plate looks the same before it leaves the kitchen.</li></ul><h3>7. HTTP Response 📱 → “The Waiter Serves the Meal”</h3><ul><li><strong>What it is</strong>: The neatly packaged Response DTO is sent back to the client (your phone/computer).</li><li><strong>Example</strong>: Your app receives the JSON response and displays the new, shiny ad.</li><li><strong>The Analogy</strong>: The waiter brings the perfectly plated meal to your table.</li></ul><h3>Why Are DTOs So Important? The Benefits of the “Order Form”</h3><p>Using a DTO system isn’t just about being organized; it provides crucial advantages:</p><ol><li><strong>Consistency &amp; Reliability</strong>: Every request must fit the “order form” mold. This prevents weird, malformed data from causing crashes deep in your system (the “kitchen”).</li><li><strong>Security</strong>: By explicitly defining what data you accept, you automatically ignore any extra, potentially malicious data sent by a client. This is a key security practice.</li><li><strong>Decoupling</strong>: The inner workings of your Service (the “kitchen”) don’t need to change based on how the data arrives. It just gets a clean DTO. This makes your code more maintainable and flexible.</li><li><strong>Clear Documentation</strong>: The DTO itself acts as documentation. By looking at it, a developer can instantly see what an endpoint expects and what it will return.</li><li><strong>Better Error Handling</strong>: Validation happens at the door. You can tell the user instantly if their “order” doesn’t make sense, rather than having it fail halfway through a complex process.</li></ol><h3>Conclusion</h3><p>The next time you use an app that works seamlessly, remember the humble DTO — the digital order form working behind the scenes. It’s the unsung hero that ensures clarity from the moment a request is made until the response is served, keeping the entire “kitchen” running smoothly.</p><p>Just as a well-written order ticket is the key to a happy restaurant customer, a well-defined DTO is the key to a robust, reliable, and secure API.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=410db31e9bbd" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Stop Obsessing Over Tomorrow (Your Brain is a Drama Queen)]]></title>
            <link>https://medium.com/@yetesfadev/stop-obsessing-over-tomorrow-your-brain-is-a-drama-queen-2c1a887a6dad?source=rss-52dfbb277718------2</link>
            <guid isPermaLink="false">https://medium.com/p/2c1a887a6dad</guid>
            <category><![CDATA[stop-overthinking]]></category>
            <category><![CDATA[overthinking]]></category>
            <dc:creator><![CDATA[yetesfa alemayehu]]></dc:creator>
            <pubDate>Sun, 30 Mar 2025 12:02:05 GMT</pubDate>
            <atom:updated>2025-03-30T12:02:05.431Z</atom:updated>
            <content:encoded><![CDATA[<h3>Your Brain’s Greatest Hits: “What If” on Repeat</h3><p>Let’s be real: Worrying about the future is like letting your brain binge-watch a horror movie called <em>“Worst-Case Scenarios: The Director’s Cut.”</em> <em>Will I lose my job? What about rent? How will my kids cope?</em> Your mind autoplays these questions like a Netflix algorithm gone rogue. But here’s the twist: <strong>Worrying doesn’t prevent disaster — it just ruins today.</strong> Let’s flip the script.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*5aSXd4JNznj5Fx0p" /><figcaption>Photo by <a href="https://unsplash.com/@bretkavanaugh?utm_source=medium&amp;utm_medium=referral">Bret Kavanaugh</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>1. Your Brain is a Terrible Fortune Teller</h3><p><strong>Science fact:</strong> Humans are awful at predicting the future. We overestimate doom and underestimate our ability to adapt.</p><ul><li><strong>Example:</strong> That time you panicked about a presentation, nailed it, and realized <em>“Huh, I wasted 3 days stressing for nothing.”</em></li></ul><p><strong>Try this:</strong></p><ul><li><strong>Ask:</strong> <em>“What evidence do I have that this fear will come true?”</em> (Spoiler: Usually none.)</li><li><strong>Write the worst-case, best-case, and most-likely-case scenarios.</strong> You’ll see: Even the “worst” often has solutions.</li></ul><h3>2. The “Job Loss” Boogeyman (And How to Rob Its Power)</h3><p>Yes, losing a job would suck. But fixating on it? That’s like rehearsing your Oscar speech before auditioning.</p><p><strong>Prep, don’t panic:</strong></p><ul><li><strong>Build a “Plan B” fund.</strong> Even $20/week adds up.</li><li><strong>Update your resume/LinkedIn monthly.</strong> It’s like flossing: Annoying but soothing later.</li><li><strong>Upskill in bite-sized chunks.</strong> 15 minutes a day on Coursera &gt; 0 minutes.</li></ul><p><strong>Remember:</strong> You’ve survived tough times before. You’re more resilient than your anxiety claims.</p><h3>3. Kids, Rent, and School Fees: The Trifecta of Terror</h3><p><strong>Here’s the secret:</strong> Kids don’t need perfection — they need <em>you</em>.</p><ul><li><strong>Talk to them (age-appropriately):</strong> <em>“We might have to cut back on toys for a bit, but we’ll figure it out together.”</em> Kids handle honesty better than silent stress.</li><li><strong>Rent panic?</strong> Research backup options <em>now</em> (roommates? temporary gigs?) so fear doesn’t snowball later.</li></ul><p><strong>Pro tip:</strong> Schools often have scholarships or payment plans. Ask. The worst they can say is <em>“No,”</em> which is where you’re already at.</p><h3>4. Work Performance: The Self-Fulfilling Prophecy</h3><p>Worrying about failing at work? Congrats, you’re sabotaging the focus you need to <em>not</em> fail.</p><p><strong>Break the cycle:</strong></p><ul><li><strong>Use the “5–4–3–2–1” trick</strong> to reset: Name 5 things you see, 4 you hear, 3 you feel, 2 you smell, 1 you taste.</li><li><strong>Focus on <em>one</em> task at a time.</strong> Multitasking with anxiety is like juggling chainsaws.</li></ul><h3>5. Mental Health ≠ Future Health (Unless You Let It)</h3><p>Constant stress <em>today</em> harms your mind and body <em>now</em>. <strong>You can’t control tomorrow, but you can protect today.</strong></p><p><strong>Try:</strong></p><ul><li><strong>The “Worry Window”:</strong> Give yourself 10 minutes daily to freak out. Then close the window and live.</li><li><strong>Move your body:</strong> A walk, dance party, or angry yoga. Stress needs an exit route.</li></ul><h3>The Antidote: Focus on What You Can Control</h3><ul><li><strong>Your actions:</strong> Save $5, hug your kid, apply for one job.</li><li><strong>Your mindset:</strong> Swap <em>“What if I fail?”</em> with <em>“What if I adapt?”</em></li><li><strong>Your now:</strong> Breathe. Eat. Laugh. Tomorrow isn’t guaranteed, but today is here.</li></ul><p><em>If this helped you hit ‘pause’ on panic, give it 50 claps — or 1 for every ‘what if’ you’re letting go of today. Follow for more ‘chill, you’ve got this’ energy.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2c1a887a6dad" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Kick Low Self-Esteem to the Curb (Because You’re Way Cooler Than You Think)]]></title>
            <link>https://medium.com/@yetesfadev/how-to-kick-low-self-esteem-to-the-curb-because-youre-way-cooler-than-you-think-f19af74de2d1?source=rss-52dfbb277718------2</link>
            <guid isPermaLink="false">https://medium.com/p/f19af74de2d1</guid>
            <category><![CDATA[motivation]]></category>
            <category><![CDATA[motivational]]></category>
            <category><![CDATA[low-self-esteem]]></category>
            <dc:creator><![CDATA[yetesfa alemayehu]]></dc:creator>
            <pubDate>Sun, 30 Mar 2025 06:02:06 GMT</pubDate>
            <atom:updated>2025-03-30T06:02:06.428Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*T6UBTAQU4whYISCH" /><figcaption>Photo by <a href="https://unsplash.com/@anniespratt?utm_source=medium&amp;utm_medium=referral">Annie Spratt</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>The Sneaky Voice in Your Head</h3><p>That little voice whispering <em>“You’re not good enough”</em>? Yeah, it’s full of nonsense. Low self-esteem is like wearing foggy glasses — it distorts how you see yourself. But here’s the good news: <strong>you can wipe those glasses clean.</strong> Let’s talk about how.</p><h3>1. Stop Comparing Your Behind-the-Scenes to Everyone Else’s Highlight Reel</h3><ul><li><strong>Problem:</strong> Scrolling through social media and feeling like everyone’s life is perfect? Spoiler: It’s not. People only post their wins, not their <em>“I burnt my toast and cried”</em> moments.</li><li><strong>Fix:</strong> Next time you compare, ask: <em>“Would I judge my best friend this harshly?”</em> (Hint: No. So why do it to yourself?)</li></ul><h3>2. Fake It Till You Make It (Seriously, It Works)</h3><ul><li><strong>Science Says:</strong> Acting confident tricks your brain into <em>becoming</em> confident. Stand tall, speak up, and pretend you’re the main character — even if you feel like an extra.</li><li><strong>Try This:</strong> Before a scary moment (like a presentation), strike a “power pose” (hands on hips, superhero-style) for 2 minutes. It sounds silly, but it <em>works</em>.</li></ul><h3>3. Collect Wins Like Pokémon</h3><p>Low self-esteem loves to spotlight failures. Fight back by <strong>tracking tiny victories</strong>:</p><ul><li><em>“I got out of bed on time.”</em></li><li><em>“I made someone smile today.”</em></li><li><em>“I tried something new.”</em><br>Write them down. Over time, you’ll see: <em>You’re doing better than you think.</em></li></ul><h3>4. Talk to Yourself Like You’d Talk to Your Best Friend</h3><ul><li><strong>Bad self-talk:</strong> <em>“I’m such an idiot for messing up.”</em></li><li><strong>Good self-talk:</strong> <em>“Oops, that didn’t go well. What can I learn?”</em><br>Swap insults for encouragement. (Yes, it feels weird at first. Do it anyway.)</li></ul><h3>5. Do Stuff That Scares You (Start Small)</h3><ul><li>Confidence grows by <strong>doing</strong>, not waiting to “feel ready.” Try:</li><li>Complimenting a stranger.</li><li>Raising your hand in class.</li><li>Wearing that outfit you love but think is “too much.”<br>Each small win proves: <em>You’re capable.</em></li></ul><h3>6. Surround Yourself with Cheerleaders</h3><ul><li><strong>Ditch energy vampires:</strong> People who make you feel small aren’t worth your time.</li><li><strong>Find your hype squad:</strong> Friends, family, or mentors who remind you of your awesomeness when you forget.</li></ul><h3>Remember: Self-Esteem is a Skill, Not a Gift</h3><p>No one’s born confident — it’s built over time, like leveling up in a game. Some days you’ll feel unstoppable; other days, that sneaky voice will return. <strong>That’s normal.</strong> Keep going.</p><p><em>If this helped, give it 50 claps — or 1 for every time you’ve been too hard on yourself this week. Follow for more ‘heck yeah, I got this!’ energy.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f19af74de2d1" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Mental Models: Your Brain’s Secret Shortcuts]]></title>
            <link>https://medium.com/@yetesfadev/mental-models-your-brains-secret-shortcuts-e4e8fbafbe62?source=rss-52dfbb277718------2</link>
            <guid isPermaLink="false">https://medium.com/p/e4e8fbafbe62</guid>
            <category><![CDATA[mental-models]]></category>
            <dc:creator><![CDATA[yetesfa alemayehu]]></dc:creator>
            <pubDate>Fri, 28 Mar 2025 21:29:24 GMT</pubDate>
            <atom:updated>2025-03-28T21:29:24.521Z</atom:updated>
            <content:encoded><![CDATA[<h3>Imagine Your Brain is a Superhero…</h3><p>…and <strong>mental models</strong> are its superpowers! They’re like special glasses that help you see the world more clearly — or a cheat sheet for making smarter decisions.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*3mcj6u4wcSn9LH4F" /><figcaption>Photo by <a href="https://unsplash.com/@kellysikkema?utm_source=medium&amp;utm_medium=referral">Kelly Sikkema</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>What’s a Mental Model? (Think LEGO Instructions for Your Brain)</h3><p>A mental model is a <strong>simple idea</strong> that helps you understand how things work. For example:</p><ol><li><strong>“Inversion”</strong></li></ol><ul><li><em>What it means:</em> Instead of asking <em>“How do I succeed?”</em> ask <em>“How could I fail?”</em> and avoid those mistakes.</li><li><em>Like when:</em> You pack an umbrella <em>not</em> because you’re sure it’ll rain, but because you don’t want to get soaked!</li></ul><p><strong>2. “Margin of Safety”</strong></p><ul><li><em>What it means:</em> Always leave extra room for error.</li><li><em>Like when:</em> You finish homework a day early so you’re not rushing at the last minute.</li></ul><p><strong>3. “First Principles”</strong></p><ul><li><em>What it means:</em> Break big problems into tiny <em>basic</em> truths.</li><li><em>Like when:</em> Instead of saying <em>“I’m bad at math,”</em> you ask: <em>“Which exact part don’t I get?”</em></li></ul><h3>Why Should You Care?</h3><p>Mental models help you:<br>✅ <strong>Solve problems faster</strong> (like choosing the best video game strategy).<br>✅ <strong>Spot bad ideas</strong> (like <em>“I’ll just wake up early tomorrow to study”</em> — ha!).<br>✅ <strong>Learn anything better</strong> (by connecting new stuff to what you already know).</p><h3>Try It Yourself!</h3><p>Next time you’re stuck, ask:</p><ul><li><em>“What’s the simplest way to explain this?”</em> (First Principles)</li><li><em>“What’s the worst that could happen?”</em> (Inversion)</li></ul><p><strong>Example:</strong> Want a pet? Think:</p><ul><li><em>“What’s the bare minimum a pet needs?”</em> (Food, space, time).</li><li><em>“What would make this go terribly wrong?”</em> (Not cleaning the hamster cage. Ever.).</li></ul><h3>Final Tip: Collect Models Like Superpowers!</h3><p>The more you have, the smarter you’ll get. Start with these 3, and soon you’ll see patterns <em>everywhere</em> — in games, school, even friendships!</p><p><strong>Fun Challenge:</strong> Spot a mental model in your favorite movie. (Hint: <em>“Think long-term”</em> is why Simba didn’t stay with Timon and Pumbaa forever!)</p><p><em>If this made sense, give it a clap! 👏 Follow for more ‘brain hacks’ — because who doesn’t want to be a thinking ninja?”</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e4e8fbafbe62" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The Limits of My Language Are the Limits of My World (And Why Google Translate Won’t Save You)]]></title>
            <link>https://medium.com/@yetesfadev/the-limits-of-my-language-are-the-limits-of-my-world-and-why-google-translate-wont-save-you-c576eced849b?source=rss-52dfbb277718------2</link>
            <guid isPermaLink="false">https://medium.com/p/c576eced849b</guid>
            <category><![CDATA[language-learning]]></category>
            <category><![CDATA[language]]></category>
            <dc:creator><![CDATA[yetesfa alemayehu]]></dc:creator>
            <pubDate>Fri, 28 Mar 2025 21:22:35 GMT</pubDate>
            <atom:updated>2025-03-28T21:22:35.878Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/0*60MRYZbPKWknTuYj" /><figcaption>Photo by <a href="https://unsplash.com/@brett_jordan?utm_source=medium&amp;utm_medium=referral">Brett Jordan</a> on <a href="https://unsplash.com/?utm_source=medium&amp;utm_medium=referral">Unsplash</a></figcaption></figure><h3>Lost in (No) Translation</h3><p>Ludwig Wittgenstein famously said, <em>“The limits of my language mean the limits of my world.”</em> And while that sounds poetic, let’s be real — most of us experience this as:</p><ul><li><strong>Trying to explain a joke in a second language and getting blank stares.</strong></li><li><strong>Ordering food abroad and receiving something <em>completely</em> unexpected.</strong></li><li><strong>Realizing your entire personality changes depending on which language you’re speaking.</strong></li></ul><p>Language doesn’t just help us communicate — it shapes how we think, argue, flirt, and even dream. So what happens when you hit those linguistic walls?</p><h3>1. The “I Know What I Want to Say, But Not How to Say It” Dilemma</h3><p>Ever felt <em>more</em> intelligent in one language than another? That’s not imposter syndrome — it’s your brain wrestling with <strong>untranslatable concepts</strong>.</p><ul><li>In German, there’s <em>“Kummerspeck”</em> (literally “grief bacon”) — the weight you gain from emotional eating. English? We just say “stress weight” and pretend it’s fine.</li><li>In Japanese, <em>“Komorebi”</em> describes sunlight filtering through leaves. English calls it “pretty trees” and moves on.</li></ul><p><strong>Takeaway:</strong> Some ideas don’t <em>fully</em> cross borders. Your world expands with every word you learn — and shrinks with every one you forget.</p><h3>2. The Personality Swap: Why You’re Funnier in One Language</h3><p>Bilinguals know this truth: <strong>You’re not the same person in every language.</strong></p><ul><li>In Spanish, you might be bold and quick-witted.</li><li>In English, you overthink every idiom.</li><li>In your mother tongue, you revert to teenage slang when arguing with family.</li></ul><p>This isn’t just confidence — it’s because humor, sarcasm, and emotion are <strong>culturally coded</strong>. Ever tried sarcasm in a language where tone doesn’t carry it? <em>Good luck.</em></p><h3>3. Google Translate: The False Savior</h3><p>We’ve all pasted a phrase into Translate and gotten back something like:</p><ul><li><em>“I’m excited to meet you!”</em> → <em>“I am electrically aroused by your presence.”</em></li></ul><p>Machine translation gets the words right but misses:</p><ul><li><strong>Nuance</strong> (Formal vs. casual? Sarcastic vs. sincere?)</li><li><strong>Cultural landmines</strong> (Innocent phrases that accidentally offend.)</li><li><strong>The fact that some things just don’t translate</strong> (Try explaining “rizz” to your grandma in Mandarin.)</li></ul><p><strong>Pro Tip:</strong> If you’re using Translate for love letters, <em>maybe</em> have a human check it first.</p><h3>4. How to Push the Limits (Without Becoming a Polyglot)</h3><p>You don’t need fluency to expand your world. Try:</p><ul><li><strong>Learning “emotional” vocabulary</strong> (How to say “I’m frustrated but not at you” in 5 languages.)</li><li><strong>Embracing the awkward</strong> (Mispronouncing words? It’s endearing. Probably.)</li><li><strong>Consuming media in your target language</strong> (Watch comedies to learn humor, dramas to learn drama.)</li></ul><h3>Final Thought: The Words You Lack Are the Thoughts You Can’t Think</h3><p>Every new language isn’t just a skill — it’s a <strong>new way of seeing</strong>. So next time you’re stuck searching for a word, remember: You’re not just missing vocabulary. You’re missing a <em>version of yourself</em>.</p><p><em>If this resonated (or if you’ve ever accidentally insulted someone in another language), give it 50 claps — or 10 for every language you wish you spoke. Follow for more linguistic existential crises.</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c576eced849b" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>