<?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 Alex Efimenko on Medium]]></title>
        <description><![CDATA[Stories by Alex Efimenko on Medium]]></description>
        <link>https://medium.com/@alexefimenko?source=rss-9f2188764733------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*vgbW3QJkLtAczCTxaWC4WQ.png</url>
            <title>Stories by Alex Efimenko on Medium</title>
            <link>https://medium.com/@alexefimenko?source=rss-9f2188764733------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 28 Nov 2026 19:31:16 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@alexefimenko/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[Your AI Coding Agent Is Only as Good as Its Rules — Here’s How to Write Ones That Actually Work]]></title>
            <link>https://medium.com/@alexefimenko/your-ai-coding-agent-is-only-as-good-as-its-rules-heres-how-to-write-ones-that-actually-work-f6bceb564871?source=rss-9f2188764733------2</link>
            <guid isPermaLink="false">https://medium.com/p/f6bceb564871</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[ai-agent]]></category>
            <category><![CDATA[agentic-ai]]></category>
            <dc:creator><![CDATA[Alex Efimenko]]></dc:creator>
            <pubDate>Mon, 09 Mar 2026 02:20:09 GMT</pubDate>
            <atom:updated>2026-03-09T02:20:57.285Z</atom:updated>
            <content:encoded><![CDATA[<p>I’ve been using AI coding agents for over a year — Cursor, Claude Code, Copilot. And like most developers, I started with a blank .cursorrules file and a vague sense that I should probably put something in it.</p><p>So I did what everyone does: Googled “best cursorrules,” copied something from cursor.directory, and moved on.</p><p>It didn’t help. Half the rules were things like “write clean code” (the AI already does that) and “use 2-space indentation” (that’s what Prettier is for). I was burning tokens on instructions that added zero value. Then I read the ETH Zurich study that confirmed it: LLM-generated rules files reduce task success by 3% and increase costs by 20%+. Bad rules don’t just waste space — they make your AI agent worse.</p><p>That’s when I decided to build something better.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*QQnxT-ewUy1ruccmDFlzBA.png" /></figure><h3>What Agent Rules Builder actually is</h3><p>Agent Rules Builder (agentrulegen.com) is a free web app that does two things:</p><ol><li>Helps you build a rules file for your AI coding agent from a curated library of 10,000+ community-contributed rules — where every single rule has been voted on by other developers and assessed by AI.</li><li>2. Lets you paste any existing rules file and get an instant AI assessment — every rule classified, scored, and explained.</li><li>No sign-up required. No premium tier. No usage limits worth worrying about.</li><li>Let me show you how it works.</li></ol><h3>Building rules: pick, don’t write</h3><p>You go to the builder, pick your language, pick your framework, and immediately get a set of rules tailored to your stack — shown in a live Monaco editor (same engine as VS Code).</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*mWmXyXVqFgrLefkKU2TJrQ.gif" /></figure><p>What makes it different from just copying someone’s rules file:</p><p>Every rule in the library has community votes. Other developers have upvoted or downvoted each one. You can see at a glance which rules are considered essential and which ones the community flagged as redundant. This is a practical signal about what actually changes AI behavior.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*zIo-rUyevFRPpLxJliHA9g.png" /></figure><p>The sidebar organizes rules into categories — Architecture, Testing, Security, Performance, Error Handling, Agent Workflow, and more. Each category shows how many options are available. You browse, toggle on what’s relevant, and skip what isn’t.</p><p>You’re not locked into what the library offers. You can edit any rule’s text directly in the editor, add your own custom rules alongside the curated ones, create multiple rule tabs for different concerns, and choose between three verbosity levels — Concise, Balanced, or Detailed. You can also upload your package.json or pyproject.toml and the builder auto-detects your stack. Everything saves to the cloud so you can come back to it later.</p><p>When you’re done, export with one click to any format: .cursorrules, CLAUDE.md, AGENTS.md, .windsurfrules, GEMINI.md, .github/copilot-instructions.md, or plain Markdown. Same rules, every agent, no manual reformatting.</p><h3>Assessing rules: paste and grade</h3><p>This is the feature I use most myself. Go to the Analyzer, paste your existing rules file — whether you wrote it, copied it from somewhere, or generated it with AI — and hit Analyze.</p><p>The AI reads every single rule and classifies it into one of four tiers:</p><p>Essential — The agent genuinely needs this. Architecture decisions, specific libraries, non-obvious constraints that can’t be inferred from your codebase.</p><p>Helpful — Improves output quality, but the agent would produce acceptable code without it.</p><p>Redundant — The agent already does this by default. Delete it.</p><p>Improve Codebase — This shouldn’t be an AI rule at all. It should be an ESLint rule, a Prettier setting, a tsconfig flag, or a CI check.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Yvtgo9UWKZGPOpgmi8M4gA.png" /></figure><p>Each rule gets a tier badge, a quality score, reasoning for the classification, and a concrete suggestion. For “Improve Codebase” rules, the tool tells you exactly what to add to your tooling config instead.</p><p>The analyzer also catches cross-cutting issues: near-duplicate rules, contradictions, vague rules that won’t change AI behavior, and security problems like rules that accidentally expose credentials or private paths.</p><p>I used this to trim my own CLAUDE.md from 200+ lines down to about 80. The agent works noticeably better with fewer, sharper rules.</p><h3>Why most rules files are bad</h3><p>This isn’t opinion. The ETH Zurich study from February 2026 (“Evaluating AGENTS.md”) tested it systematically. LLM-generated context files showed -3% success rate and +20% cost. Developer-written files showed +4% success rate but +19% cost. No context file was the baseline. Even carefully written human rules increased costs by 19% for a marginal 4% improvement.</p><p>The researchers’ conclusion: “Omit LLM-generated context files entirely and limit human-written instructions to non-inferable details.”</p><p>Most rules files make four mistakes:</p><p>Telling the AI what it already knows. “Use TypeScript” in a .ts project. “Write clean code.” These burn tokens and push your important rules into the low-attention middle of the context window.</p><p>Using AI rules for tooling jobs. “Use 2-space indentation.” That’s Prettier’s job. As the HumanLayer team puts it: “Never send an LLM to do a linter’s job.”</p><p>Being generic instead of specific. Addy Osmani found that specific tool mentions in context files increase agent usage from 0.01 to 1.6 times per task. “Follow best practices” does nothing. “Use server actions for mutations, not API routes” changes behavior immediately.</p><p>Copy-pasting without context. A .cursorrules optimized for Django doesn’t help a Next.js app.</p><p>The four-tier framework (Essential, Helpful, Redundant, Improve Codebase) is how you fix this — and the Analyzer automates the entire classification.</p><h3>More features</h3><p>Templates — 50+ pre-built rule sets for popular stacks like Next.js + TypeScript, Python + FastAPI, Go, Rust + Axum. One click loads into the builder.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*lRQfDzph3TGnVY_UJPP7tg.png" /></figure><p>Popular Rules — a leaderboard of the highest-voted rules across all languages. Filter by language and see quality scores alongside vote counts.</p><p>Share — make any rule set public and get a shareable link. Other developers can fork your rules into their own library.</p><h3>Try it</h3><p>Your AI coding agent follows instructions. If those instructions are bloated with redundancy, the agent works harder and produces worse results. If they’re sharp — focused on decisions the AI can’t infer from your code — the agent writes code that fits your project from the first try.</p><p>Agent Rules Builder makes it easy to get there. Pick rules that other developers have validated. Assess what you already have. Save your customized set. Export to any agent format.</p><p>It’s free at <a href="https://www.agentrulegen.com/">agentrulegen.com</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f6bceb564871" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[The AI Subsidy Phase: Big Tech Is Paying for You to Use Supercomputers — But It Won’t Last]]></title>
            <link>https://medium.com/@alexefimenko/the-ai-subsidy-phase-big-tech-is-paying-for-you-to-use-supercomputers-but-it-wont-last-468c2638a5da?source=rss-9f2188764733------2</link>
            <guid isPermaLink="false">https://medium.com/p/468c2638a5da</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[google]]></category>
            <dc:creator><![CDATA[Alex Efimenko]]></dc:creator>
            <pubDate>Sat, 14 Feb 2026 03:24:24 GMT</pubDate>
            <atom:updated>2026-02-14T03:24:24.973Z</atom:updated>
            <content:encoded><![CDATA[<p>Everyone is talking about the “AI bubble” and how much cash these companies are burning through. But if you zoom out, burning cash is not something new in tech. In fact, it’s the playbook.</p><p>The companies we depend on most today — Amazon, Uber, Tesla — all ran deep in the red for years, sometimes decades, before they turned a single dollar of profit.</p><h3><strong>The Subsidy Phase: A Proven Strategy</strong></h3><p>The most dominant companies in tech history were built on a simple but ruthless strategy: lose money now to win everything later. They deliberately underpriced their services, absorbed massive losses, and focused solely on capturing market share. Profitability was never the short-term goal — dominance was.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*0nCMSFayc2pceBQZj7D6sw.png" /></figure><p>Here’s how long some of tech’s biggest names operated at a loss:</p><ul><li><strong>Amazon</strong>: Lost money for 9 consecutive years. Founded in 1994, it didn’t post its first annual profit until 2003. During those years, Jeff Bezos famously told investors that Amazon was focused on growth, not margins. Wall Street called him crazy — until he wasn’t.</li><li><strong>Uber:</strong> Burned through billions for 14 years before finally hitting the black in 2023. The company subsidized every ride to make it cheaper than taxis, rewriting urban transportation worldwide.</li><li><strong>Tesla: </strong>Stayed in the red for 17 years before its first profitable year in 2020. Elon Musk nearly went bankrupt multiple times, pouring his own money into the company when no one else would.</li><li><strong>Spotify</strong>: Struggled for 18 years to reach full-year profitability. It offered music at almost no cost to build a massive user base, all while hemorrhaging cash on licensing fees.</li><li><strong>Reddit: </strong>Reported its first profitable quarter in Q4 2024–20 years after launching. Two decades of being one of the internet’s most-visited sites, and only now it figured out how to make money.</li></ul><p>The pattern is unmistakable: subsidize the user experience, get everyone hooked, and figure out the money part later.</p><h3><strong>The Trap: What Happens After the Subsidy Phase</strong></h3><p>But here’s the thing nobody likes to talk about — once these companies have you locked in, the experience starts to degrade. Writer Cory Doctorow coined a perfect term for this: “enshittification.” The platform makes things great for users, then gradually shifts to extracting value from them.</p><p>Look at what happened:</p><ul><li><strong>Amazon</strong>: It’s basically a billboard now. According to recent research, if you search for a brand on Amazon, only about 19% of the top results are genuine, organic listings. The remaining 81% of the time, the first thing you see is a paid ad. The platform that was built on “customer obsession” now prioritizes whoever pays the most.</li><li><strong>Instagram</strong>: An estimated 22% of Reels content is now advertising. What started as a photo-sharing app among friends is now a heavily commercialized feed where every fifth piece of content is trying to sell you something.</li><li>These companies spent years and billions making their products indispensable. And once they were, they slowly turned the screws.</li></ul><p><strong>This Time, It’s AI — And It’s Far More Complicated</strong></p><p>Now the same playbook is being applied to artificial intelligence. But this time, the stakes are higher and the economics are even more brutal.</p><p>Consider Google. To stay competitive in the AI race, they are effectively cannibalizing their own core business. For over two decades, Google made money by showing you links and selling ads alongside them. It was one of the highest-margin businesses in history.</p><p>Now, they’re replacing those lucrative search results with AI-generated responses that cost 10 to 20 times more to produce in terms of energy and compute — and they generate no direct ad revenue. Every AI answer that replaces a search result page is potentially a step away from their cash cow.</p><p>Microsoft, Meta, Amazon, and every other major player are in the same boat. They’re spending unprecedented amounts on AI infrastructure, not because it’s profitable today, but because they’re terrified of being left behind.</p><h3><strong>What the AI “Enshittification” Could Look Like</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/640/1*nl-3emh3KdltAaqVwKrrlg.jpeg" /></figure><p>I wouldn’t be surprised if, in a few years, we start seeing things like:</p><ul><li><strong>Product placement in AI answers: </strong>Your AI assistant casually recommending a specific brand — not because it’s the best option, but because that company paid for the mention. Imagine asking “What’s a good laptop for coding?” and getting a suspiciously specific brand recommendation.</li><li><strong>Indexing fees</strong>: If a company doesn’t pay the AI provider’s “indexing fee,” the AI might simply behave as if that company doesn’t exist. Ask for restaurant recommendations and only see the ones that paid to be in the AI’s knowledge base.</li><li><strong>Real-time data paywalls</strong>: Free-tier users get stale, outdated information while the “truth” — real-time, accurate, up-to-the-minute data — sits behind a premium paywall. Want today’s stock prices or weather forecast? That’ll cost extra.</li><li><strong>Sponsored AI models</strong>: Just like YouTube videos have sponsored segments, we might see AI models that are “brought to you by” certain companies, subtly shaping the responses you receive without you even realizing it.</li></ul><h3><strong>The $400 Billion Bet</strong></h3><p>Big Tech collectively spent over $400 billion in 2025 alone on data centers and AI infrastructure. That’s not charity — it’s an investment, and they expect returns. The question isn’t whether they’ll try to recoup that money. The question is how aggressively they’ll do it and how much the user experience will suffer.</p><h3><strong>Enjoy It While It Lasts</strong></h3><p>Right now, we’re living in the AI Subsidy Phase. Venture capitalists and tech giants are effectively paying for us to use supercomputers at the price of a monthly coffee subscription.</p><p>The technology is genuinely incredible — we can generate images, write code, analyze data, translate languages, and have deep conversations with AI systems that would have seemed like science fiction just five years ago.</p><p>This window won’t stay open forever. So use it. Build with it. Learn with it. Create with it.</p><p>Because the meter is running, and eventually, Big Tech will come to collect.</p><p>— — — -</p><p><strong>Sources:</strong></p><p><a href="https://www.momentumcommerce.com/amazon-forcing-search-relevancy-18-of-top-branded-searches-on-amazon-showing-organic-results-first/">Amazon Organic Results (18.7%)</a></p><p><a href="https://www.amraandelma.com/best-instagram-ads-statistics/">Instagram Reels Ad Load (22%)</a></p><p><a href="https://jasonariddell.medium.com/the-hidden-cost-of-information-google-search-vs-chatgpt-31184cdf1582">AI Energy Use (Text vs Search)</a></p><p><a href="https://io-fund.com/ai-stocks/ai-platforms/big-techs-405b-bet">Big Tech CapEx ($405B)</a></p><p>— — — -</p><p><em>Enjoyed the read? Follow me to encourage more content like this!</em></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=468c2638a5da" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[I Read the “System Prompts Leaks” for Claude, Gemini, and ChatGPT. Here Is What I Found.]]></title>
            <link>https://medium.com/@alexefimenko/i-read-the-system-prompts-leaks-for-claude-gemini-and-chatgpt-here-is-what-i-found-340131ab7bb0?source=rss-9f2188764733------2</link>
            <guid isPermaLink="false">https://medium.com/p/340131ab7bb0</guid>
            <dc:creator><![CDATA[Alex Efimenko]]></dc:creator>
            <pubDate>Sat, 31 Jan 2026 00:22:24 GMT</pubDate>
            <atom:updated>2026-01-31T00:22:24.746Z</atom:updated>
            <content:encoded><![CDATA[<p>I recently went through a GitHub repository called <a href="https://github.com/asgeirtj/system_prompts_leaks">system_prompts_leaks </a>that contains the alleged &quot;System Prompts&quot; for <strong>Claude Opus 4.5</strong>, <strong>Gemini 3 Pro</strong>, and <strong>ChatGPT 5.2</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*tUSKssPhsmfW1BER-bFE7A.png" /></figure><p>These files contain the hidden instructions that companies give their AIs before they ever talk to us. Think of it like a manager giving an employee a list of rules on their first day of work.</p><p>These rules show that the three big AIs — <strong>Claude</strong>, <strong>Gemini</strong>, and <strong>ChatGPT</strong> — are being told to behave in completely different ways.</p><p>Here is what the instructions actually say, and what it means for you.</p><blockquote><strong>A quick warning before we dive in:</strong> I cannot confirm that these files are 100% real. They are “leaks” found on the internet, which means they could be outdated, modified, or even convincing fakes.</blockquote><h3>1. ChatGPT 5.2 Thinking: The Nervous Perfectionist</h3><p>OpenAI’s instructions for ChatGPT are surprisingly strict. They read like a teacher correcting a student who makes careless mistakes.</p><p>First, the instructions admit that the AI is bad at math. They explicitly say: <strong>“You nearly always make arithmetic mistakes.”</strong> Because of this, the AI is ordered to calculate math problems step-by-step, instead of just guessing the answer.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*fsKvGoODl50VL6J9DB-v0g.png" /></figure><p>Second, it has a rule about <strong>“checking facts.”</strong> The AI is told to separate facts into two groups:</p><ol><li><strong>Things that stay the same</strong> (like “Water boils at 100 degrees”).</li><li><strong>Things that change</strong> (like “Who is the CEO of Twitter?”).</li></ol><p><strong>“If there is even a small (&gt;10%) chance it has changed… you MUST search the web.”</strong> This introduces the concept of “Temporal Instability.” It shows that the model is being trained to doubt its own memory. It transforms the AI from a “know-it-all” into a cautious researcher that double-checks every fact that isn’t permanent, like the name of a CEO or a software version.</p><p><strong>My Opinion:</strong> This makes ChatGPT the best choice for research. It is the only model that is explicitly trained to doubt itself, which makes it less likely to make things up.</p><h3>2. Gemini 3 Pro: The One That Copies You</h3><p>Google’s instructions for Gemini are all about <strong>fitting in</strong>.</p><p>The main rule here is <strong>“Mirroring.”</strong> The instructions tell Gemini to look at how <em>you</em> write, and then adjust its own style to match yours.</p><ul><li>If you write short, professional sentences, it will do the same.</li><li>If you are casual and friendly, it will loosen up.</li></ul><p>Google also wants Gemini to feel like a helpful assistant, not a complex computer program. The instructions strictly forbid it from using technical words about itself. It isn’t allowed to say “I used an API” (which is a technical term for code talking to code). It has to say “I used an App.”</p><ul><li><strong>My Opinion:</strong> This makes Gemini the best choice for writing emails or creative stories. It doesn’t have a stiff “robot voice” — it tries to sound like you.</li></ul><h3>3. Claude Opus 4.5 : The One That Pushes Back</h3><p>The most interesting instruction for Claude (by Anthropic) is about <strong>honesty</strong>.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*6xhDc1owwzinnaJ9y6Qpng.jpeg" /></figure><p>Most AIs are designed to be polite. If you ask a question based on a lie, they often try to play along to be helpful. Claude is different. Its instructions explicitly tell it <strong>not to be a pushover</strong>.</p><p>The prompt uses a fancy phrase (“avoid epistemic cowardice”), but it just means: <strong>Don’t agree with the user if they are wrong.</strong></p><p>If you try to trick Claude or force it to accept a false fact, it is programmed to stand its ground. It is told to value the truth more than being nice.</p><p><strong>My Opinion:</strong> This makes Claude the best choice if you want to debate a topic or check for holes in your logic. It won’t just tell you what you want to hear.</p><h3>Summary</h3><p>These documents prove that these AIs aren’t just the same tool with a different name.</p><ul><li>Use <strong>Claude</strong> if you want an honest opinion.</li><li>Use <strong>Gemini</strong> if you want a conversation that feels natural.</li><li>Use <strong>ChatGPT</strong> if you need to be sure your facts are right.</li></ul><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=340131ab7bb0" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[10 Chrome Extensions I Use to Improve My Productivity]]></title>
            <link>https://medium.com/@alexefimenko/10-chrome-extensions-i-use-to-double-your-output-66812738491b?source=rss-9f2188764733------2</link>
            <guid isPermaLink="false">https://medium.com/p/66812738491b</guid>
            <category><![CDATA[chrome-extension]]></category>
            <category><![CDATA[chrome]]></category>
            <category><![CDATA[productivity]]></category>
            <category><![CDATA[translation]]></category>
            <category><![CDATA[esl]]></category>
            <dc:creator><![CDATA[Alex Efimenko]]></dc:creator>
            <pubDate>Wed, 28 Jan 2026 20:10:50 GMT</pubDate>
            <atom:updated>2026-01-28T23:14:20.269Z</atom:updated>
            <content:encoded><![CDATA[<h3>1. Text Clarifier AI — The Ultimate AI Reading Assistant &amp; Text Simplifier</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/440/1*BPxjx6Pgnibx9ULcwu2jRw.png" /></figure><p>Stop switching tabs to search for definitions. Text Clarifier AI is better than a standard dictionary — it acts as your personal smart reading companion. Whether you’re reading a complex academic paper, a technical report, or a foreign news article, get instant, context-aware explanations without breaking your flow.</p><p><strong>Key Features:</strong></p><ul><li>Highlight any text to get a simple, easy-to-understand explanation. Unlike standard dictionaries, we analyze the entire paragraph to understand <em>context</em> (e.g., differentiating “bank” in finance vs. geography).</li><li>PDF &amp; Web Support</li><li>Webpages: Highlight text -&gt; Click icon -&gt; Get explanation.</li><li>PDFs: Highlight text -&gt; Right-click -&gt; “Explain with AI”.</li></ul><p>Need more detail? Open the sidebar chat to ask follow-up questions. “Explain it like I’m 5”, “Give me an example”, or “Compare with X”.</p><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2F04shPsPfjhE%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3D04shPsPfjhE&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2F04shPsPfjhE%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="640" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/e3d60e948d30dedbfddee1cd6741b662/href">https://medium.com/media/e3d60e948d30dedbfddee1cd6741b662/href</a></iframe><p>Smart Bookmarks (Personal Knowledge Base) Never forget a new word. Save terms and their explanations to your personal dashboard to review later and build your vocabulary.</p><p>Multilingual Support Get explanations in your native language. We support explanations in:</p><ul><li>English, Spanish, French, German, Portuguese, Italian, Russian</li><li>Chinese, Japanese, Korean, Arabic, Hebrew, Hindi</li><li>Dutch, Polish, Turkish, Ukrainian, Vietnamese</li></ul><p>Perfect for:</p><ul><li>ESL/Language Learners: Master idioms and slang that normal translators miss.</li><li>Students &amp; Researchers: Quickly clarify technical jargon in PDFs.</li><li>Professionals: Breeze through dense industry reports.</li></ul><p><a href="https://chromewebstore.google.com/detail/text-clarifier-ai-explain/hceemboheemopmolkdjmlbjlpnbokhff?authuser=3&amp;hl=en">Link to Chrome Web Store</a></p><h3>2. Raindrop.io (The External Brain)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/331/1*Chk9oVDb4Nzx67ODlV_kbg.png" /></figure><p>Raindrop is a visual database for your internet life. It organizes articles, videos, code snippets, and PDFs in a grid. It saves a permanent copy of the page. You prefer it because it saves the data even if the site goes down.</p><h3>The “Pro” Workflow: The Inbox Zero Method</h3><p>Treat information gathering like email.</p><ol><li><strong>Capture Everything</strong>: Hit the extension icon when you see something interesting. Let it go to “Unsorted”.</li><li><strong>Weekly Review</strong>: Open your “Unsorted” folder every Sunday night.</li><li><strong>Triage</strong>:</li></ol><ul><li><strong>Archive</strong>: File reference material like “CSS Grid Cheatsheet” with tags like #frontend.</li><li><strong>Action</strong>: Move tasks like “Tutorial on Next.js 14” to a “To Learn” collection.</li></ul><p><strong>4. Full-Text Search</strong>: Raindrop indexes the <em>content</em> of the page. You remember a vague phrase from an article you read two years ago. Raindrop finds it.</p><h3>Why It Wins</h3><p>Pinterest lacks technical features. Pocket focuses only on reading. Raindrop handles technical documentation and design inspiration equally well.</p><p><a href="https://chromewebstore.google.com/detail/raindropio/ldgfbffkinooeloadekpmfoklnobpien">Link to Chrome Web Store</a></p><h3>3. OneTab (The RAM Saver)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/401/0*NGWYHDXUuPgBIJ2r" /></figure><p>OneTab is a panic button for tab clutter. Click the icon. It closes all open tabs and lists them on a single page. It reduces Chrome’s memory usage by 95% immediately. Your laptop fan stops spinning.</p><h3>The “Pro” Workflow: Context Switching &amp; Bundling</h3><p>I use OneTab to switch contexts. I work on three projects daily. When I switch from “Coding” to “Writing”, I save my coding tabs.</p><ol><li><strong>The Dump</strong>: Hit OneTab. All coding tabs save to a timestamped list.</li><li><strong>Rename</strong>: Name the group “Feature X Research”.</li><li><strong>Switch</strong>: Open writing tools.</li><li><strong>Restore</strong>: Click “Restore all” on the OneTab group when you return to coding.</li></ol><p>OneTab becomes a session manager. Lock a group to create a permanent “Daily Startup” list.</p><p><a href="https://chromewebstore.google.com/detail/onetab/chphlpgkkbolifaimnlloiipkdnihall">Link to Chrome Web Store</a></p><h3>4. Vimium (The Mouse Killer)</h3><iframe src="https://cdn.embedly.com/widgets/media.html?src=https%3A%2F%2Fwww.youtube.com%2Fembed%2Ft67Sn0RGK54%3Ffeature%3Doembed&amp;display_name=YouTube&amp;url=https%3A%2F%2Fwww.youtube.com%2Fwatch%3Fv%3Dt67Sn0RGK54&amp;image=https%3A%2F%2Fi.ytimg.com%2Fvi%2Ft67Sn0RGK54%2Fhqdefault.jpg&amp;type=text%2Fhtml&amp;schema=youtube" width="854" height="480" frameborder="0" scrolling="no"><a href="https://medium.com/media/cb8d1526ecb34fa8fb52fd7e5a5cb0b1/href">https://medium.com/media/cb8d1526ecb34fa8fb52fd7e5a5cb0b1/href</a></iframe><p>Vimium adds keyboard navigation to the browser. You navigate the internet without a trackpad. Chrome becomes a command-line interface. You click links, scroll, and manage tabs with keys.</p><h3>The “Pro” Workflow: Speed Navigation</h3><p>Press f on any webpage. Yellow letter combinations appear next to every link. Type those letters. The browser clicks the link.</p><p>Memorize these commands:</p><ul><li>j / k: Scroll down / up.</li><li>f: Open link in current tab.</li><li>F: Open link in new tab.</li><li>x: Close current tab.</li><li>t: Create new tab.</li><li>Shift + J / Shift + K: Switch to left or right tab.</li></ul><p><strong>Advanced Tip</strong>: Press Shift + O to open the &quot;Vomnibar&quot;. It searches open tabs, bookmarks, and history simultaneously. It is faster than the search bar.</p><p><a href="https://chromewebstore.google.com/detail/vimium/dbepggeogbaibhgnhhndojpepiihcmeb">Link to Chrome Web Store</a></p><h3>5. Scribe (The Documentation Automator)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/617/1*6Z5IwR4SM7jJNNkIAduoxQ.png" /></figure><p>Scribe generates documentation while you work. Click “Record” and do the task. Scribe records your clicks and keystrokes. Click “Stop”. It generates a guide with screenshots and text instructions. It highlights the buttons you clicked.</p><h3>The “Pro” Workflow: Asynchronous Handover</h3><p>Use this for delegation. Standard Operating Procedures (SOPs) help teams run efficiently.</p><ol><li><strong>Record Once</strong>: Do the task (e.g., “Uploading a blog post”).</li><li><strong>Edit</strong>: Edit the text if Scribe missed a nuance.</li><li><strong>Share</strong>: Scribe generates a link.</li><li><strong>Embed</strong>: Add the Scribe to your Notion docs.</li></ol><p>You never explain the task again. A 20-minute explanation becomes a 20-second link. I use this for server resets and lunch orders.</p><p><a href="https://chromewebstore.google.com/detail/scribe-ai-documentation-s/okfkdaglfjjjfefdcppliegebpoegaii">Link to Chrome Web Store</a></p><h3>6. Dark Reader (The Eye Saver)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/560/1*YWSwwIY5qwvj2Bs-STthXw.png" /></figure><p>Dark Reader forces dark mode on every website. It analyzes page structure and applies a high-contrast dark theme. It keeps images normal but darkens backgrounds.</p><h3>The “Pro” Workflow: Sleep Optimization</h3><p>Use it for health.</p><ol><li><strong>Automation</strong>: Set Dark Reader to turn on after 6:00 PM. This mimics the natural light cycle.</li><li><strong>Sepia Filter</strong>: Increase the “Sepia” filter to 20%. This adds a warm tint that blocks blue light.</li><li><strong>Keyboard Shortcut</strong>: Press Option + Shift + D (Mac) to toggle it. Use this if a site breaks.</li></ol><p>You reduce blue light exposure. You sleep better.</p><p><a href="https://chromewebstore.google.com/detail/dark-reader/eimadpbcbfnmbkopoojfekhnkhdbieeh">Link to Chrome Web Store</a></p><h3>7. Workona (The Project Manager)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/208/1*rBBqhEDQ_uubCZkp2BKZlA.png" /></figure><p>Workona turns your browser into an OS with “Workspaces”. You create a workspace for “Client A” and another for “Client B”. When you switch workspaces, all tabs change. It hides Client A tabs and opens Client B tabs. You separate contexts immediately.</p><h3>The “Pro” Workflow: Resource Integration</h3><p>Combine Workona with Google Drive and Notion. Workona creates a folder for each project. You pin Google Docs, Notion pages, and Figma files to a workspace.</p><ol><li>Create a “Writing” Workspace.</li><li>Pin your Notion Roadmap and Thesaurus.</li><li>Add a “Research” resource section. Open “Writing”. Your roadmap and research tabs open automatically. The environment triggers the habit.</li></ol><p><a href="https://chromewebstore.google.com/detail/tab-manager-by-workona/ailcmbgekjpnablpdkmaaccecekgdhlh">Link to Chrome Web Store</a></p><h3>8. StayFocusd (The Discipline Enforcer)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/539/1*WNZPPTD7hanqkPsmBvZsKg.png" /></figure><p>StayFocusd works on a <em>budget</em> system. You do not block sites completely. You set a budget: “I have 20 minutes of Reddit time today.” Once you use it, the site blocks for the day.</p><h3>The “Pro” Workflow: The Nuclear Option</h3><p>Use the “Nuclear Option” for emergencies. Trigger this if you have a deadline. It blocks everything except your “Allowed List” (e.g., Google Docs, Email) for the specified hours.</p><ul><li>There is no cancel button.</li><li>You cannot uninstall the extension easily.</li><li>It blocks the extensions page. It forces you to work. Use it when you must ship.</li></ul><p><a href="https://chromewebstore.google.com/detail/stayfocusd/laankejkbhbdhmipfmgcngdelahlfoji">Link to Chrome Web Store</a></p><h3>9. Loom (The Meeting Killer)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/218/1*NM_DqOv_5lJYvL8992toig.png" /></figure><p>Loom records your screen and camera simultaneously. It hosts the video and gives you a link. It is faster than typing and clearer than a screenshot. It eliminates “sync” meetings.</p><h3>The “Pro” Workflow: The 2x Code Review</h3><p>Use Loom for Code Reviews. Don’t leave 50 comments on a GitHub PR. Record a 3-minute Loom.</p><ol><li>Walk through the code on screen.</li><li>Point at specific elements.</li><li>Explain <em>why</em> you made the change.</li><li>Send the link. The recipient watches at 2x speed. They get 10 minutes of context in 1.5 minutes. I save hours of meetings this way.</li></ol><p><a href="https://chromewebstore.google.com/detail/loom-%E2%80%93-screen-recorder-s/liecbddmkiiihnedobmlmillhodjkdmb">Link to Chrome Web Store</a></p><h3>10. Print Friendly &amp; PDF (The Cleaner)</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*Swj35ON1JTF39U6k" /></figure><p>Print Friendly strips junk from webpages. It grabs only the content. Delete any paragraph or image you don’t want before saving as PDF. It formats text for reading.</p><h3>The “Pro” Workflow: The Personal E-Book</h3><p>Create “E-books” for weekend reading. I find series of articles on topics like “Advanced TypeScript Patterns”.</p><ol><li>Open each article.</li><li>Use Print Friendly to strip ads.</li><li>Save as clean PDFs.</li><li>Merge them.</li><li>Send the PDF to my Kindle. I read distraction-free on the weekend. This separates collecting information from consuming it.</li></ol><p><a href="https://chromewebstore.google.com/detail/printfriendly-print-pdf-a/ohlencieiipommannpdfcmfdpjjmeolj">Link to Chrome Web Store</a></p><h3>Summary: The Perfect Stack</h3><p>If you install all ten, your browser remembers everything (Raindrop), clarifies text (Text Clarifier AI), and saves memory (OneTab). You navigate fast (Vimium), document work (Scribe), and protect your eyes (Dark Reader). You separate contexts (Workona), focus (StayFocusd), skip meetings (Loom), and read cleanly (Print Friendly).</p><p>Configure them. Learn the hotkeys. Make the browser work for you.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=66812738491b" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[7 Ways to Reduce AI Agent Tokens Consumption]]></title>
            <link>https://medium.com/@alexefimenko/7-ways-to-stop-wasting-money-on-ai-tokens-d15a8e235694?source=rss-9f2188764733------2</link>
            <guid isPermaLink="false">https://medium.com/p/d15a8e235694</guid>
            <category><![CDATA[cursor]]></category>
            <category><![CDATA[claude]]></category>
            <category><![CDATA[vibe-coding]]></category>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[github-copilot]]></category>
            <dc:creator><![CDATA[Alex Efimenko]]></dc:creator>
            <pubDate>Fri, 23 Jan 2026 18:39:00 GMT</pubDate>
            <atom:updated>2026-01-24T16:05:52.050Z</atom:updated>
            <content:encoded><![CDATA[<h3>AI coding tools are great, but most developers use them wrong. Here are practical ways to cut your costs.</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*x8xBx2TXXgJmB9FB7Pzlug.png" /></figure><p>Tools like GitHub Copilot, Claude, Antigravity and Cursor are useful. But they aren’t free. Even if you have a flat-rate subscription, there are hidden limits, and if you pay per token, you can burn through cash fast.</p><p>The problem is that “magic” has a cost. Every letter you send and every letter you get back counts as a “token.”</p><p>I’ve been watching how developers use these tools. Most people are using a firehose when they need a dropper. They send way too much junk data to the AI. This wastes money and actually makes the AI give worse answers.</p><p>Here is what I found that works to keep costs down.</p><h3>1. Close your tabs</h3><p>This is a big one. Tools like Cursor or Copilot often look at your open IDE tabs to understand context. They assume if a tab is open, it’s relevant.</p><p>So if you are working on a frontend component but you have 15 backend files and a massive JSON file open in the background, the AI might read all of them.</p><p>That’s a lot of wasted tokens. If you aren’t working on a file, close the tab. Don’t force the AI to read a novel just to fix a sentence.</p><h3>2. Be specific</h3><p>The most expensive thing you can type is: “Fix this.”</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*9GV8u94WcDdNSgPK3GUm_A.png" /></figure><p>When you do that, the AI has to scan your code to figure out what “this” is, where the bug might be, and what you actually want to happen.</p><p>Instead, say: “<strong>Fix the login logic in </strong><strong>auth.ts.</strong>&quot;</p><p>Tell the AI exactly where to look. It saves the AI from searching, which saves you tokens.</p><h3>3. Batch your messages</h3><p>Chat interfaces look like a conversation, but they aren’t. The AI doesn’t remember what you said five seconds ago.</p><p>To make it <em>look</em> like it remembers, the interface resends your entire chat history every time you type a new message.</p><p>If you send five separate messages:</p><ol><li>“Make it blue.”</li><li>“Actually, darker.”</li><li>“Add padding.”</li><li>“Fix the border.”</li><li>“One more thing…”</li></ol><p>You are paying to re-send the FULL history five times.</p><p>Instead, wait a second. Group your thoughts. Send one message with all five changes.</p><h3>4. Start fresh chats</h3><p>Because of how history works, long chats get expensive. The more you talk, the more text gets sent back and forth with every reply.</p><p>Eventually, the chat gets so long the AI starts “forgetting” the beginning anyway.</p><p>So, start fresh often. Once you solve a specific problem, close the chat. Start a new one for the next task. It keeps the context small and the answers fast.</p><h3>5. Do the easy stuff yourself</h3><p>I see developers using AI to fix typos or add a semicolon.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/936/1*G2Djy6tZBCq5pivlZM0n3A.png" /></figure><p>Using a massive supercomputer to add a bracket is overkill. It’s like taking a plane to go to the grocery store.</p><p>Save the AI for the hard logic or the boilerplate code. If you can fix it in two seconds, just do it yourself.</p><h3>6. Use local tools for formatting</h3><p>AI is bad at strict rules like code formatting. It often messes up indentation, then you have to ask it to fix it, which wastes more tokens.</p><p>Use tools that run on your computer instead. Use Prettier, ESLint, or Biome. They are free, faster, and they get it right every time. Clean your code locally before you ask the AI to look at it.</p><h3>7. Keep your files small</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N6eNWhT1q7olxilFkhb-5w.png" /></figure><p>This is just good advice in general, but it really matters for AI.</p><p>If you have a 3,000-line file, the AI usually has to read the whole thing to understand the context, even if you only want to change one function.</p><p>If you break that code into smaller files, the AI only needs to read the specific file you are working on. It’s cheaper and the AI usually gets less confused.</p><p>To summarize — let’s reduce waste of resource (and money) just by tweaking the tools we use.</p><p>The best Chrome extension for lifelong learners: <a href="https://textclarifier.com/?ref=7ed6efe5-366a-4d6a-a0ef-e30131a1bc0b">https://textclarifier.com</a><br>Use my link and we both get +100 free requests.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=d15a8e235694" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[5 Things that Scare every TypeScript Developer (and how to fix them)]]></title>
            <link>https://medium.com/@alexefimenko/5-things-that-scare-every-typescript-developer-and-how-to-fix-them-6893c3dba2e3?source=rss-9f2188764733------2</link>
            <guid isPermaLink="false">https://medium.com/p/6893c3dba2e3</guid>
            <dc:creator><![CDATA[Alex Efimenko]]></dc:creator>
            <pubDate>Wed, 05 Nov 2025 12:45:35 GMT</pubDate>
            <atom:updated>2025-11-05T12:45:35.569Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*e4Zt-1jAkACh4Yfm6Uke7w.png" /></figure><p>Look, I like TypeScript. You probably do, too. It saves us from so many bugs, makes code easier to read, and stops us from making silly mistakes.</p><p>It’s not always fun. There are a few things that everyone who uses it runs into sooner or later. Let’s talk about them.</p><h3>1. The tsconfig.json File</h3><p>Before you can even write one line of code, you have to deal with this file. tsconfig.json is the giant settings menu for your whole project. It’s super powerful but it can also be a bit overwhelming.</p><p>The problem is that one tiny change in this file can cause hundreds of errors to pop up, or (even worse) make your project stop working.</p><h4>Solution 1: Use a Base Configuration</h4><p>You should <em>never</em> write a tsconfig.json from scratch.</p><ul><li><strong>For Frameworks:</strong> If you use a framework like Next.js, Vite, or SvelteKit, use the tsconfig.json it gives you<strong>.</strong> It will be perfectly configured for that framework&#39;s build system and module needs.</li><li><strong>For Everything Else:</strong> Except for built-in <strong>tsc --init</strong> You can use the @tsconfig/bases library from npm. It provides sensible, pre-made configs for different environments.</li></ul><p>For example, to get a starting config for a Node.js 22 project, you would:</p><ol><li>Run npm install --save-dev @tsconfig/node22</li><li>In yourtsconfig.json, just extend it:</li></ol><pre>{<br>  // This file inherits all the smart defaults from the base<br>  &quot;extends&quot;: &quot;@tsconfig/node18/tsconfig.json&quot;,<br><br>  // Now you only add your *specific* overrides<br>  &quot;compilerOptions&quot;: {<br>    &quot;outDir&quot;: &quot;./dist&quot;<br>  },<br>  &quot;include&quot;: [&quot;src/**/*&quot;]<br>}</pre><h4>Solution 2: Migrate to &quot;strict&quot; Incrementally</h4><p>You found an old project with strict: false. If you turn it on, you get 5,000 errors. The fix is to not turn it all on at once. strict: true is just a bundle of several smaller rules. You can turn them on one by one.</p><ul><li>The best one to start with is noImplicitAny: true. This will help you catch places where TypeScript is inferring the any type for variables, parameters, or return types. `</li><li>The next one is strictNullChecks: true. By default, null and undefined are assignable to all types (e.g., let s: string = null; is legal). This is a primary source of runtime exceptions. When strictNullChecks: true is enabled, null and undefined become their own distinct types, and you will get a type error if you try to use them where a concrete value is expected.</li><li>Another important rule is strictFunctionTypes. It prevents a function with a more specific parameter from being assigned to a function signature expecting a more general parameter. For example, consider a function signature (e: Element) =&gt; void. Without strictFunctionTypes, you could assign a function (e: HTMLElement) =&gt; void to it. This is unsafe, because the original signature allows any Element to be passed, but the new implementation might try to access e.offsetHeight, a property that only exists on HTMLElement. strictFunctionTypes catches this logical error at compile time.</li></ul><h4>External Links</h4><ul><li><a href="https://github.com/tsconfig/bases"><strong>@tsconfig/bases on GitHub</strong></a><strong>:</strong> A collection of base tsconfig.json files to extend from.</li><li><a href="https://www.google.com/search?q=%5Bhttps://www.typescriptlang.org/docs/handbook/modules/moderesolution-entrypoints.html%5D(https://www.typescriptlang.org/docs/handbook/modules/moderesolution-entrypoints.html)"><strong>The </strong></a><a href="https://www.google.com/search?q=%5Bhttps://www.typescriptlang.org/docs/handbook/modules/moderesolution-entrypoints.html%5D(https://www.typescriptlang.org/docs/handbook/modules/moderesolution-entrypoints.html)"><strong>module and </strong></a><a href="https://www.google.com/search?q=%5Bhttps://www.typescriptlang.org/docs/handbook/modules/moderesolution-entrypoints.html%5D(https://www.typescriptlang.org/docs/handbook/modules/moderesolution-entrypoints.html)"><strong>moduleResolution guide</strong></a><strong>:</strong> (Advanced) The official docs on the new &quot;NodeNext&quot; and &quot;Bundler&quot; settings that finally fix module headaches.</li></ul><h3>2. The `any` Type</h3><p>The any type is the “off” switch for TypeScript. When you use it, you’re telling the compiler to skip type checking for that variable. This can be useful in certain situations, but it also means you lose the benefits of TypeScript’s type safety.</p><h4>Solution 1: Use `unknown` instead of `any`</h4><p>unknown is the type-safe version of any. It means &quot;I don&#39;t know what this is,&quot; but unlike itany, it forces you to check what it is before you&#39;re allowed to use it.</p><pre>// THE BAD: &#39;any&#39;<br>function process(data: any) {<br>  console.log(data.name.toUpperCase()); // This can crash at runtime<br>}<br><br>// THE GOOD: &#39;unknown&#39;<br>function processSafe(data: unknown) {<br>  // This line gives a compiler error: &quot;Object is of type &#39;unknown&#39;.&quot;<br>  // console.log(data.name.toUpperCase()); <br>  // You are FORCED to check it first!<br>  if (typeof data === &#39;object&#39; &amp;&amp; data !== null &amp;&amp; &#39;name&#39; in data &amp;&amp; typeof data.name === &#39;string&#39;) {<br>    console.log(data.name.toUpperCase());<br>  }<br>}</pre><h4>Solution 2: Use a Linter to Ban any with linters</h4><p>You can enforce this across your whole team. Use <a href="https://typescript-eslint.io/">ESLint</a>, <a href="https://biomejs.dev/">Biome</a> or <a href="https://github.com/rslint/rslint">rslint</a>.</p><p>For ESLint, my recommendation is to apply the recommended TypeScript ruleset that includes a rule to ban any.</p><pre>npm install --save-dev eslint @eslint/js typescript typescript-eslint</pre><p>In eslint.config.mjs:</p><pre>export default tseslint.config({<br>  rules: {<br>    &quot;@typescript-eslint/no-explicit-any&quot;: &quot;error&quot;<br>  }<br>});</pre><h4>Solution 3: Use Zod for API Data</h4><p>When you fetch data, you get any or unknown. Don&#39;t write 20 if statements (like in Solution 1). Use a library like <strong>Zod</strong> to validate it.</p><p>Zod lets you define a “schema” that both validates your data at runtime <em>and</em> gives you a static TypeScript type.</p><pre>import { z } from &#39;zod&#39;;</pre><pre>// 1. Define a schema for your data<br>const UserSchema = z.object({<br>  id: z.string(),<br>  name: z.string(),<br>  email: z.string().email(),<br>});<br>// 2. Get your static TypeScript type from the schema<br>type User = z.infer&lt;typeof UserSchema&gt;;<br>// 3. Fetch your data and PARSE it<br>async function getUser(id: string): Promise&lt;User&gt; {<br>  const response = await fetch(`/api/user/${id}`);<br>  const data = await response.json(); // This is &#39;unknown&#39;<br>  // This is the magic!<br>  // .parse() checks the data. If it&#39;s wrong, it throws a clear error.<br>  // If it&#39;s right, it returns the data, now fully typed as &#39;User&#39;.<br>  const user = UserSchema.parse(data);<br>  return user;<br>}</pre><h4>External Links</h4><ul><li><strong>The </strong><a href="https://www.typescriptlang.org/docs/handbook/release-notes/typescript-3-0.html#new-unknown-top-type"><strong>unknown</strong></a><strong> type:</strong> Official docs on unknown.</li><li><a href="https://zod.dev/"><strong>Zod (zod.dev)</strong></a><strong>:</strong> The most popular validation library for TypeScript.</li></ul><h3>3. Confusing “Type Gymnastics”</h3><p>Sometimes, you can’t just write a type. You have to make a type that is based<em> </em>on another type.</p><p>This is when you get into weird stuff like infer, extends, and utility types.</p><h4>Solution 1: Use Built-in Utility Types</h4><p>TypeScript comes with dozens of “utility types” that do the most common gymnastics for you. Before you try to write a complex conditional type, check if it’s already built-in.</p><p><a href="https://medium.com/@alexefimenko/7-highly-effective-typescript-utility-types-9770b5360821">7 Highly Effective TypeScript Utility Types</a></p><ul><li>Want the parameters from a function? Use Parameters&lt;T&gt;.</li><li>Want the return type from a function? Use ReturnType&lt;T&gt;.</li><li>Want to make all properties optional? Use Partial&lt;T&gt;.</li><li>Want a type <em>without</em> certain keys? Use Omit&lt;T, &#39;key1&#39; | &#39;key2&#39;&gt;.</li></ul><h4>Solution 2: Use type-fest</h4><p>If you need something more specific, it’s probably in <a href="https://github.com/sindresorhus/type-fest">type-fest</a>. This is the &quot;lodash for types.&quot; It&#39;s a single package with hundreds of battle-tested, pre-made types for every situation.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/544/1*I0KVtaXGaB59Fl1U6ki8XQ.png" /></figure><p>Need the type of a JSON object? JsonValue. Need to get a nested property type? Get&lt;T, &#39;path.to.prop&#39;&gt;.</p><pre>npm install --save-dev type-fest</pre><pre>import { type JsonValue, type Get } from &#39;type-fest&#39;;<br><br>// This is perfectly typed as any valid JSON<br>const myJson: JsonValue = { a: 1, b: [&quot;hello&quot;] };<br>type User = { a: { b: { c: string } } };<br>// This type is &#39;string&#39;<br>type DeepProp = Get&lt;User, &#39;a.b.c&#39;&gt;;</pre><h4>External Links</h4><ul><li><a href="https://www.typescriptlang.org/docs/handbook/utility-types.html"><strong>TypeScript Utility Types</strong></a><strong>:</strong> The official documentation. Bookmark this.</li><li><a href="https://github.com/sindresorhus/type-fest"><strong>type-fest on GitHub</strong></a><strong>:</strong> The “lodash for types” library.</li></ul><h3>4. Using Libraries Made by Other People Without Types</h3><p>Your own code can be perfectly typed. But your project uses dozens of libraries from NPM, and that’s where the problems start.</p><h4>Solution 1: Search for types in the <a href="https://github.com/DefinitelyTyped/DefinitelyTyped">DefinitelyTyped</a> repo</h4><p>This repo allows developers to use existing JavaScript libraries within their TypeScript projects seamlessly, ensuring type safety.</p><p><a href="https://medium.com/@alexefimenko/5-resources-to-become-an-advanced-typescript-developer-daa2238dad11">5 Resources Each TypeScript Developer Should Know About</a></p><h4>Solution 2: Write a Declaration File</h4><p>If you install some-cool-library and TypeScript says Could not find a declaration file..., you can create it.</p><ul><li>Create a new file in your project named function.d.ts (the name doesn&#39;t matter, as long as it ends in .d.ts).</li><li>Add this one line to the file:</li><li>declare module &#39;some-cool-library&#39;;</li><li>That’s it. TypeScript will stop complaining.</li></ul><pre>// In function.d.ts <br>declare module &#39;some-cool-library&#39; {<br>  // Now you get autocomplete and type checking!<br>  export function coolUtility(name: string): boolean;<br>  // You can ignore the other 50 functions in the library<br>}</pre><h3>Solution 2: Use `patch-package` to Fix Bad Types</h3><p>Another solution is to use lthe ibrary<a href="https://www.npmjs.com/package/patch-package">patch-package</a></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/490/0*Z2-S1yO4kvuZnPrG" /></figure><p>It is a tool that lets you make changes directly to files in your node_modules folder, and then it saves those changes as a small &quot;patch file&quot; in your project.</p><ul><li>Run npx patch-package-config</li><li>Go into node_modules/@types/some-library/index.d.ts and fix the type by hand.</li><li>Save the file.</li><li>Run npx patch-package @types/some-library</li><li>This creates a new folder patches/ in your project with your fix.</li><li>Commit this patch file.</li></ul><p>Now, every time anyone runs npm install, patch-package will automatically re-apply your fix to their node_modules.</p><h4>External Links</h4><ul><li><a href="https://www.typescriptlang.org/docs/handbook/declaration-files/introduction.html"><strong>TypeScript Declaration Files (.d.ts) Docs</strong></a><strong>:</strong> The official guide on how declaration files work.</li><li><a href="https://github.com/ds300/patch-package"><strong>patch-package on GitHub</strong></a><strong>:</strong> The tool for fixing broken libraries in node_modules.</li></ul><h3>5. The Terrifying 50-Line Error Message</h3><p>You get a wall-of-text error, and the real problem is impossible to find.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*EC1by8jnnJGZfKab1B1ZJw.png" /></figure><h4>Solution 1: Read the Error From the Bottom Up</h4><p>This is the most common mistake. People read the error from the top down. <strong>The real error is almost always the last line.</strong></p><p>The 49 lines above it are just the “call stack” of <em>why</em> TypeScript was trying to compare those two types.</p><pre>// 49 lines of...<br>Type &#39;A&#39; is not assignable to type &#39;B&#39;.<br>  Type &#39;C&#39; is not assignable to type &#39;D&#39;.<br>    Type &#39;E&#39; is not assignable to &#39;F&#39;...<br>      // ...<br>        // ...<br>          // ...<br>// THE REAL ERROR IS AT THE BOTTOM<br>          Type &#39;string | number&#39; is not assignable to type &#39;string&#39;.<br>            Type &#39;number&#39; is not assignable to type &#39;string&#39;.</pre><p>Just find the <em>last</em> line. It will tell you the simple, fundamental problem.</p><h4>Solution 2: Isolate the Code in the Playground</h4><p>If you’re truly stuck, copy the offending code into the <a href="https://www.typescriptlang.org/play/"><strong>TypeScript Playground</strong></a>. It’s an online editor. Start deleting code from your function, piece by piece. The moment the error disappears, you know that the line you just deleted was the cause.</p><h4>Solution 3: Use the “Total TypeScript” extension</h4><p>There’s a VS Code extension called <strong>Total TypeScript</strong> that translates them into plain, simple English, telling you what’s wrong and how to fix it.</p><h4>External Links</h4><ul><li><a href="https://www.typescriptlang.org/play"><strong>The TypeScript Playground</strong></a><strong>:</strong> The best place to isolate and share TypeScript problems.</li><li><a href="https://www.totaltypescript.com/vscode-extension"><strong>TypeScript Error Translator (VS Code)</strong></a><strong>:</strong> An extension that translates errors into plain English.</li></ul><h3>Conclusion</h3><p>TypeScript is a powerful language, and these frustrations are just signs that you’re starting to work on complex problems. By using the right tools — like base configs, unknown, Zod andpatch-package you can prevent a lot of bugs and make your code more maintainable. Happy coding!</p><blockquote>Enjoyed the read? Hit 👏 like it’s a high-five — to motivate me to bring more stories!</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=6893c3dba2e3" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[n8n Self-Hosting Part 2: Custom Domain and HTTPS Setup with a Reverse Proxy]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@alexefimenko/n8n-self-hosting-custom-domain-and-https-setup-with-a-reverse-proxy-part-2-2d947c1c603e?source=rss-9f2188764733------2"><img src="https://cdn-images-1.medium.com/max/800/1*_BXIr8XSTFM-lsVKilQWLA.gif" width="800"></a></p><p class="medium-feed-snippet">Welcome to Part 2! In Part 1, we set up a basic n8n instance running on our free Google Cloud VM. It works, but it has two major problems:</p><p class="medium-feed-link"><a href="https://medium.com/@alexefimenko/n8n-self-hosting-custom-domain-and-https-setup-with-a-reverse-proxy-part-2-2d947c1c603e?source=rss-9f2188764733------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@alexefimenko/n8n-self-hosting-custom-domain-and-https-setup-with-a-reverse-proxy-part-2-2d947c1c603e?source=rss-9f2188764733------2</link>
            <guid isPermaLink="false">https://medium.com/p/2d947c1c603e</guid>
            <dc:creator><![CDATA[Alex Efimenko]]></dc:creator>
            <pubDate>Sat, 25 Oct 2025 21:24:53 GMT</pubDate>
            <atom:updated>2025-10-26T20:16:32.076Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[How to Deploy n8n with Google Cloud Free Tier (part 1 — without a custom domain)]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@alexefimenko/how-to-deploy-n8n-with-google-cloud-free-tier-part-1-without-a-custom-domain-c1f064264a3f?source=rss-9f2188764733------2"><img src="https://cdn-images-1.medium.com/max/800/1*fi4TZJA89fAkZOfaIo9eTA.gif" width="800"></a></p><p class="medium-feed-snippet">The goal of this guide is to get n8n running as fast as possible. We will access it using the server&#x2019;s direct IP address.</p><p class="medium-feed-link"><a href="https://medium.com/@alexefimenko/how-to-deploy-n8n-with-google-cloud-free-tier-part-1-without-a-custom-domain-c1f064264a3f?source=rss-9f2188764733------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@alexefimenko/how-to-deploy-n8n-with-google-cloud-free-tier-part-1-without-a-custom-domain-c1f064264a3f?source=rss-9f2188764733------2</link>
            <guid isPermaLink="false">https://medium.com/p/c1f064264a3f</guid>
            <dc:creator><![CDATA[Alex Efimenko]]></dc:creator>
            <pubDate>Thu, 23 Oct 2025 23:38:15 GMT</pubDate>
            <atom:updated>2025-10-24T21:51:10.552Z</atom:updated>
        </item>
        <item>
            <title><![CDATA[TypeScript Mapped Types: 7 Examples From Simple to Advanced]]></title>
            <link>https://medium.com/@alexefimenko/typescript-mapped-types-7-examples-from-simple-to-advanced-eaf5c915d433?source=rss-9f2188764733------2</link>
            <guid isPermaLink="false">https://medium.com/p/eaf5c915d433</guid>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[tutorial]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[programming]]></category>
            <category><![CDATA[typescript]]></category>
            <dc:creator><![CDATA[Alex Efimenko]]></dc:creator>
            <pubDate>Tue, 19 Mar 2024 21:44:21 GMT</pubDate>
            <atom:updated>2024-03-20T22:57:38.585Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>Mapped types</strong> are a way to transform the properties of one type into another type. They are similar to array methods like map and filter but for types.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/800/1*3HvaYw18KyS4yt7TyCdXFA.gif" /></figure><p>To understand mapped types, it is helpful to understand the following concepts:</p><ul><li>keyof operator: It is a TypeScript operator that returns a union type of all the property names of a type. For example, keyof { name: string, age: number } returns ’name’ | ‘age’.</li><li>in operator: It is used to iterate over each property of a type. For example, Key in keyof Type iterates over each property of Type.</li><li>as keyword: It is used to assign a new name to a type. For example, Type as NewType assigns Type to NewType.</li><li>never type: It is a type that represents the absence of a value. It is often used in conditional types to filter out certain properties.</li><li>? operator: It is used to make a property optional. For example, Key?: Type makes Key optional.</li><li>readonly modifier: It is used to make a property readonly. For example, readonly Key: Type makes Key readonly.</li><li><strong>Union types</strong>: Union types are a way to combine multiple types into one type. For example, Type1 | Type2 is a union type that can be either Type1 or Type2.</li><li><strong>Utility types</strong>: Utility types are built-in types that provide common transformations on types. For example, Partial&lt;Type&gt; is a utility type that makes all properties of Type optional. We will use Capitalize utility type in the advanced examples.</li><li><strong>Generic types</strong>: Generic types are a way to create a type that depends on another type. For example, Type&lt;T&gt; is a generic type that depends on T.</li></ul><h3>Example 1: Transforming properties of one type into another type (in this case to boolean)</h3><p>Sometimes we want to transform the properties of one type into another type. We can use mapped types to achieve this.</p><p>In the example below, we transform the properties of a type User into a new type UserToBoolean where all properties are of type boolean.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/648/1*gIzlPHXjUQe1gxvg8p5Y8g.png" /><figcaption>Transforming properties of one type into another type</figcaption></figure><p>Key in keyof User iterates over each property of User and creates a new property with the same name but with the type boolean.</p><p>Isn’t is very similar to the map function in JavaScript? =)</p><h3>Example 2: Making properties of type optional</h3><p>Usually, we would use the Partial utility type to make all properties of a type optional. However, we can also use mapped types to achieve the same result.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/694/1*6JaWrVGttHfmnU3v4EOR2w.png" /><figcaption>Making properties of type optional</figcaption></figure><p>The example above is similar to the previous one, but this time we are transforming the properties of User into optional properties.</p><p>We iterate over each property of User and add a ? to make it optional. For the type of the property, we use User[Key] to get the type of the property from User.</p><p><a href="https://medium.com/@alexefimenko/7-highly-effective-typescript-utility-types-9770b5360821">7 Highly Effective TypeScript Utility Types</a></p><p>It is also possible to implement the Partial utility type using generic types:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/870/1*ivjsCID4aAkroAdQrZ746Q.png" /><figcaption>Implementation the Partial utility type using generic types</figcaption></figure><h3>Example 3. Removing optional attributes from type</h3><p>We can use mapped types to make all optional properties of a type required by adding a - before the ?.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/708/1*_ZpK1-LznO1wtVzKsTZNqg.png" /><figcaption>Removing optional attributes from type</figcaption></figure><p>In the example above, we iterate over each property of User and add a - before the ? to make it required. We use User[Key] to get the type of the property from User.</p><h3>Example 4. Making properties of type readonly</h3><p>We can use mapped types to make all properties of a type readonly by adding the readonly modifier before the property name.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/812/1*iu9ces3k0ob5gcaa3d8_Ow.png" /><figcaption>Making properties of type readonly</figcaption></figure><p>Another way to achieve the same result is to use the built-in Readonly utility type.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/738/1*JDJmkcUkdxgoVXlTW4bJ0w.png" /></figure><p>You can implement the Readonly utility type using generic types and mapped types.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/988/1*PQbIbH6aIdIkoQ5xxYd23g.png" /><figcaption>Implement Readonly utility type</figcaption></figure><h3>Example 5. Removing certain properties from type</h3><p>We can use the Omit utility type to remove certain properties from a type. However, we can also use mapped types to achieve the same result.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*rFOcle06fbby0Xel_u0WXQ.png" /><figcaption>Removing certain properties from type</figcaption></figure><p>In the examples above, we used mapped types to transform the properties of one type into another type.</p><h3>Example 6. Creating a type that only includes properties of a certain type</h3><p>We can use conditional types to create a type that only includes properties of a certain type.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iQTWIwSJSlK5HGBaq5klIA.png" /><figcaption>Creating a type that only includes properties of a certain type</figcaption></figure><p>In the example above, we create a new type OnlyStringProperties that includes only properties of Type that are of type string. We use a conditional type to check if Type[Key] is a string and if it is, we include the property in the new type.</p><h3>Example 7. Using template literal types to create new property names</h3><p>Imagine we want to create a new type that includes all properties of a type but with a get prefix and capitalized property names. We can use template literal types to achieve this.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*TUKX1r6YABtPAlNxDuELmw.png" /><figcaption>Using template literal types to create new property names</figcaption></figure><p>In this example string &amp; Key is used to ensure that Key is a string. We then use Capitalize utility type to capitalize the property name and template literal types to create the new property name.</p><p>We can also create similar types for setters but with void return type.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*p33K2asSejGE8iQoQPIkPw.png" /></figure><p>We can then combine the two types to create a type that includes both getters and setters.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*xI04EXMkKaAXxOxk8KbwCg.png" /></figure><p>The GettersAndSetters type is a combination of Getters and Setters types. We use the &amp; operator to combine the two types into one type.</p><p><a href="https://towardsdev.com/typescript-index-signatures-build-type-safe-dynamic-objects-0082dc3372c9">TypeScript Index Signatures: 4 Examples Type-Safe Dynamic Objects</a></p><h3>Conclusion</h3><p>Mapped types are a powerful feature of TypeScript that lets developers create complex type transformations. They provide a way to:</p><ul><li><strong>Transform properties:</strong> Change the types of existing properties within a type.</li><li><strong>Add or remove properties:</strong> Add new properties or filter out existing ones.</li><li><strong>Control optionality and readonly status:</strong> Make properties optional or make them immutable.</li><li><strong>Create dynamic types:</strong> Construct new types using conditional types and template literal types for advanced scenarios (such as generating getters and setters).</li></ul><p>While built-in utility types like Partial, Readonly, and Omit offer convenient shortcuts, mapped types demonstrate the core principles and give you control over your types according to your needs.</p><p>By understanding mapped types and the techniques demonstrated in these examples, you&#39;ll master type manipulation leading to cleaner, more predictable, and maintainable code.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XNYB1mgZWFPPq6F6KnVuGA.png" /><figcaption>Image generated by Foocus</figcaption></figure><p>Enjoyed the read? Hit 👏 like it’s a high-five — to motivate me to bring more stories!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=eaf5c915d433" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Delayed Search Queries in React with Debounce]]></title>
            <description><![CDATA[<div class="medium-feed-item"><p class="medium-feed-image"><a href="https://medium.com/@alexefimenko/efficient-delayed-search-queries-in-react-with-debounce-9ef4476fb6da?source=rss-9f2188764733------2"><img src="https://cdn-images-1.medium.com/max/1000/0*ARlqFoZdonFmMlCA.png" width="1000"></a></p><p class="medium-feed-snippet">In this article, we will look at how to implement debounce in React for efficient delayed search queries. The problem we are trying to&#x2026;</p><p class="medium-feed-link"><a href="https://medium.com/@alexefimenko/efficient-delayed-search-queries-in-react-with-debounce-9ef4476fb6da?source=rss-9f2188764733------2">Continue reading on Medium »</a></p></div>]]></description>
            <link>https://medium.com/@alexefimenko/efficient-delayed-search-queries-in-react-with-debounce-9ef4476fb6da?source=rss-9f2188764733------2</link>
            <guid isPermaLink="false">https://medium.com/p/9ef4476fb6da</guid>
            <category><![CDATA[react]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[typescript]]></category>
            <dc:creator><![CDATA[Alex Efimenko]]></dc:creator>
            <pubDate>Tue, 19 Mar 2024 02:49:34 GMT</pubDate>
            <atom:updated>2024-03-19T16:15:56.972Z</atom:updated>
        </item>
    </channel>
</rss>