<?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 Oğuz Çolak on Medium]]></title>
        <description><![CDATA[Stories by Oğuz Çolak on Medium]]></description>
        <link>https://medium.com/@oguzcolak2000?source=rss-95d174f58fa4------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*nA5l1jiFgtzR9BTKkTnqtg.jpeg</url>
            <title>Stories by Oğuz Çolak on Medium</title>
            <link>https://medium.com/@oguzcolak2000?source=rss-95d174f58fa4------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Sat, 05 Dec 2026 00:18:56 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@oguzcolak2000/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[Mastering Claude Code: Inside Tips from Its Creator]]></title>
            <link>https://medium.com/@oguzcolak2000/mastering-claude-code-inside-tips-from-its-creator-393397ee9acf?source=rss-95d174f58fa4------2</link>
            <guid isPermaLink="false">https://medium.com/p/393397ee9acf</guid>
            <category><![CDATA[claude]]></category>
            <category><![CDATA[web-development]]></category>
            <category><![CDATA[software-development]]></category>
            <category><![CDATA[ai-tools]]></category>
            <category><![CDATA[ai]]></category>
            <dc:creator><![CDATA[Oğuz Çolak]]></dc:creator>
            <pubDate>Sun, 04 Jan 2026 22:24:22 GMT</pubDate>
            <atom:updated>2026-01-04T22:27:00.729Z</atom:updated>
            <content:encoded><![CDATA[<p><em>How Boris Cherny and the Anthropic team use Claude Code to build Claude Code itself</em></p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*egBgi02h99P_yUs8aSxAPg.png" /></figure><p>When the person who <em>built</em> a developer tool shows how they actually use it, it’s worth paying attention.</p><p>Boris Cherny — the creator of Claude Code — recently shared his personal workflow, and what stands out isn’t flashy hacks or deep customization. It’s something far more interesting: a calm, intentional use of the tool exactly as it was designed.</p><p>Here’s the surprising part. Cherny doesn’t rely on heavy configuration or complex tweaks. Instead, he leans into Claude Code’s defaults and uses them in smart, scalable ways that compound over time.</p><p>In this article, we’ll break down his approach into clear, practical patterns — ideas you can apply immediately, whether you’re just getting started with Claude Code or already using it daily.</p><h3>1) Run Multiple Claudes in Parallel</h3><p>Cherny runs 5 instances of Claude Code locally in numbered terminal tabs, plus 5-10 more sessions on claude.ai/code simultaneously. He seamlessly hands off sessions between local and web using the &amp; operator, and even starts sessions from his iPhone throughout the day.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*DGcz5uHHX1ockr4gM7a30A.jpeg" /></figure><p><strong>Why this matters:</strong> AI-assisted development isn’t sequential — it’s parallel. While one Claude handles refactoring, another can be analyzing logs, and a third can be drafting documentation. System notifications alert him when any instance needs input, preventing context-switching overhead.</p><p><strong>Your action:</strong> Start with 2–3 parallel sessions for different aspects of your project. You’ll quickly find the rhythm that works for your workflow.</p><h3>2) Always Use Opus 4.5 with Thinking</h3><p>Despite being larger and slower than Sonnet, Cherny exclusively uses Opus 4.5 with thinking enabled for coding tasks.</p><p>His reasoning cuts through the speed-versus-quality debate: “You have to steer it less and it’s better at tool use, so it’s almost always faster than using a smaller model in the end.”</p><p><strong>The math:</strong> A model that gets it right the first time beats a faster model that requires three iterations. Quality compounds.</p><h3>3) Maintain a Living CLAUDE.md File</h3><p>The Claude Code team maintains a single CLAUDE.md file checked into git. Every time Claude makes a mistake, they document it so the AI learns to avoid that pattern next time.</p><p><strong>The genius here:</strong> This creates institutional knowledge that compounds over time. Every developer on the team contributes, turning debugging into permanent improvements.</p><p><strong>Implementation:</strong></p><pre># CLAUDE.md<br><br>## Code Style<br>- Never use `any` types in TypeScript without explicit justification<br>- Prefer functional React components over class components<br><br>## Common Mistakes<br>- Don&#39;t modify state directly in React—always use setState<br>- Check for null/undefined before accessing nested properties</pre><p>During code review, Cherny’s team tags @.claude on PRs to add learnings directly to CLAUDE.md via the GitHub Action. This is &quot;Compounding Engineering&quot;—each fix teaches the AI permanently.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*XpbPAFm4SSKF9dENFr31NA.jpeg" /></figure><h3>4) Start Every Session in Plan Mode</h3><p>Most sessions begin in Plan mode (shift+tab twice). Cherny iterates on the plan with Claude until it&#39;s solid, then switches to auto-accept edits mode.</p><p><strong>Why:</strong> A good plan enables one-shot execution. Rushing into code without planning leads to multiple revision cycles.</p><p><strong>Pattern:</strong></p><ol><li>Describe your goal</li><li>Review Claude’s plan</li><li>Refine until the approach is clear</li><li>Switch to auto-accept and let Claude execute</li></ol><figure><img alt="" src="https://cdn-images-1.medium.com/max/896/1*pXrKQGD95fkJYNngPJf81A.jpeg" /></figure><h3>5) Automate Inner Loops with Slash Commands</h3><p>For any workflow repeated multiple times daily, Cherny creates a slash command. These live in .claude/commands/ and are version-controlled.</p><p>His /commit-push-pr command runs dozens of times per day and uses inline bash to pre-compute git status and other context, minimizing back-and-forth with the model.</p><p><strong>Example structure:</strong></p><pre># .claude/commands/commit-push-pr<br><br># Pre-compute git context to avoid model round-trips<br>GIT_STATUS=$(git status --short)<br>BRANCH=$(git branch --show-current)<br><br># Your command logic here</pre><p><strong>Benefit:</strong> Slash commands make workflows reproducible and allow Claude itself to invoke them during autonomous work.</p><h3>6) Deploy Specialized Subagents</h3><p>Cherny uses subagents for common PR workflows:</p><ul><li>code-simplifier: Cleans up code after implementation</li><li>verify-app: Runs comprehensive end-to-end tests</li></ul><p>Think of subagents as specialized team members, each expert in one domain. They automate the repetitive quality checks you’d otherwise do manually.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/462/1*rbFT5CbqE8Sk34axbrw2FA.jpeg" /></figure><h3>7) Use Hooks for Automatic Formatting</h3><p>A PostToolUse hook automatically formats Claude’s code after each edit. While Claude generates well-formatted code 90% of the time, the hook handles the final 10%, preventing CI failures.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/926/1*XZLYkNnm68jjeczwvB5oQg.jpeg" /></figure><h3>8) Smart Permission Management</h3><p>Instead of bypassing Claude Code’s safety system with --dangerously-skip-permissions, Boris Cherny takes a more intentional approach to permissions.</p><p>He explicitly <strong>pre-approves commands that are known to be safe</strong> using the /permissions feature. These permissions are saved in a .claude/settings.json file and committed to the repository, which means the <strong>entire team benefits from the same trusted setup</strong>.</p><p>In practice, this does three important things:</p><ul><li>Claude can run common, low-risk commands without repeatedly asking for approval</li><li>Developers avoid the friction of constant permission prompts</li><li>Security is preserved, because only explicitly allowed commands can run automatically</li></ul><p>The key idea is balance. You don’t disable safety checks entirely. You <strong>teach the tool what “safe” looks like for your project</strong>, and let it move faster within those boundaries.</p><p>This approach scales especially well in team environments, where consistency and security matter just as much as speed.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/930/1*WvEV5VQ0ErjxsqbwjKs2eg.jpeg" /></figure><h3>9) Integrate Your Entire Toolchain</h3><p>Claude Code uses Slack (via MCP server), BigQuery CLI, Sentry, and other tools directly. The team’s .mcp.json configuration is version-controlled so everyone has the same capabilities.</p><p><strong>Vision:</strong> Claude isn’t just a code assistant — it’s a full development team member that can search Slack threads, query analytics, and pull error logs autonomously.</p><h3>10) Enable Autonomous Long-Running Tasks</h3><p>For tasks that take a long time to complete, Boris Cherny sets things up so Claude can work <strong>independently</strong>, without needing constant human input.</p><p>He uses three main strategies:</p><ol><li><strong>Background self-verification</strong><br> Claude is instructed to review and verify its own work using a background agent once the task finishes. This acts as an automated second pass for quality and correctness.</li><li><strong>Agent Stop hooks for reliable checks</strong><br> Stop hooks are used to trigger verification automatically when an agent finishes running. This makes the process predictable and repeatable, rather than relying on manual review.</li><li><strong>The ralph-wiggum plugin for supervision</strong><br> This plugin adds lightweight oversight, helping monitor or sanity-check long-running tasks without interrupting them.</li></ol><p>To prevent permission prompts from slowing things down, Cherny runs these tasks inside a <strong>sandboxed environment</strong> and enables --permission-mode=dontAsk. This allows Claude to execute approved actions freely during the session, while keeping risk contained.</p><p>The result: Claude can “cook” uninterrupted on complex, long-running work — with safeguards in place to review the output when it’s done.</p><h3>The Most Important Tip: Give Claude a Verification Loop</h3><p>“Give Claude a way to verify its work. If Claude has that feedback loop, it will 2–3x the quality of the final result.”</p><p>For claude.ai/code itself, Claude tests every change using the Chrome extension — opening a browser, testing the UI, and iterating until both code and UX are solid.</p><p><strong>Verification varies by domain:</strong></p><ul><li>Backend: Run test suites</li><li>Frontend: Browser automation with visual verification</li><li>Mobile: Simulator testing</li><li>CLI tools: Integration tests with real commands</li></ul><p><strong>Investment required:</strong> Make verification rock-solid. This is where quality compounds.</p><h3>The Bigger Picture</h3><p>What makes Cherny’s approach powerful isn’t any single technique — it’s the system. Each practice reinforces the others:</p><ul><li>Parallel sessions increase throughput</li><li>CLAUDE.md accumulates wisdom</li><li>Slash commands codify best practices</li><li>Verification loops ensure quality</li><li>The team shares everything via git</li></ul><p>This is development infrastructure, not just tooling. Cherny has built a environment where AI assistance gets stronger with every PR, every mistake documented, every command created.</p><p><em>Want to dive deeper? Check out the </em><a href="https://code.claude.com/docs"><em>Claude Code documentation</em></a><em> for implementation details on slash commands, subagents, hooks, and MCP integrations.</em></p><p><strong>What’s your Claude Code workflow?</strong> Share your tips in the responses — the best practices are still being written.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=393397ee9acf" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ JavaScript Engine vs Runtime: What Every Developer Should Know]]></title>
            <link>https://medium.com/@oguzcolak2000/javascript-engine-vs-runtime-what-every-developer-should-know-581e0d4f2f44?source=rss-95d174f58fa4------2</link>
            <guid isPermaLink="false">https://medium.com/p/581e0d4f2f44</guid>
            <dc:creator><![CDATA[Oğuz Çolak]]></dc:creator>
            <pubDate>Wed, 06 Aug 2025 11:16:06 GMT</pubDate>
            <atom:updated>2025-08-06T11:16:26.248Z</atom:updated>
            <content:encoded><![CDATA[<p>Understanding how JavaScript code is executed under the hood can level up your development skills in surprising way. So let’s dive into the mysterious world of JavaScript engines and runtimes — and how your code becomes blazing fast.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*jN0FyVdl74UQi7cMI-ddXg.png" /></figure><h3>🧠 What is a JavaScript Engine?</h3><p>A JavaScript engine is simply a program that executes JavaScript code. Every browser has its own engine:</p><ul><li><strong>Chrome &amp; Node.js:</strong> V8 (by Google)</li><li><strong>Firefox:</strong> SpiderMonkey</li><li><strong>Safari:</strong> JavaScriptCore (also known as Nitro)</li><li><strong>Edge:</strong> Chakra (deprecated, now uses V8 via Chromium)</li></ul><p>Among these, Google’s <strong>V8 engine</strong> is arguably the most famous, not just because of Chrome, but because it powers <strong>Node.js</strong> — allowing JavaScript to run on the server.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*ZqjgQGV9i81s_MLSw--LYQ.jpeg" /></figure><h3>🛠 Key Components of a JavaScript Engine</h3><p>Every JavaScript engine includes two essential parts:</p><ul><li><strong>1- Call Stack</strong><br> This is where the code is actually executed. It keeps track of function calls and executes them using <em>execution contexts</em>.</li><li><strong>2 - Heap</strong><br> An unstructured memory area where objects are stored during runtime.</li></ul><h3>🧾 From Code to Execution: Compilation vs Interpretation</h3><p>To understand JavaScript execution, let’s go back to some basic computer science.</p><p>Computers only understand machine code — binary (0s and 1s). So how do we get from JavaScript to machine code?</p><p>There are two approaches:</p><h3>🏗 Compilation</h3><ul><li>The entire source code is converted to machine code <em>ahead of time</em>.</li><li>This machine code is saved as a portable file (like .exe) and run later.</li></ul><h3>📜 Interpretation</h3><ul><li>The interpreter reads and executes code <strong>line by line</strong>.</li><li>No portable file is produced, and execution happens immediately.</li></ul><h3>⚡ The Best of Both Worlds: Just-In-Time (JIT) Compilation</h3><p>JavaScript used to be interpreted — making it slow. But with modern apps like Google Maps or Figma, speed is everything.</p><p>Today’s engines (like V8) use <strong>JIT compilation</strong>, a hybrid method:</p><ul><li>JavaScript code is parsed into an <strong>Abstract Syntax Tree (AST)</strong>.</li><li>The AST is compiled to <strong>machine code</strong>.</li><li>Machine code is <strong>executed immediately</strong> (no waiting).</li></ul><p>The clever part? V8 first compiles an <strong>unoptimized version</strong> of your code to get things running quickly. Then, as the app runs, it silently <strong>recompiles optimized versions</strong> in the background. This is how modern JavaScript becomes lightning-fast.</p><h3>🌳 Parsing &amp; the AST: How Code Gets Understood</h3><p>Before the JavaScript engine can run your code, it first needs to <strong>understand</strong> it. This is where <strong>parsing</strong> comes in.</p><h3>🛠 What is Parsing?</h3><p><strong>Parsing</strong> is the process of reading your code and breaking it down into smaller, meaningful parts — like:</p><ul><li>Keywords (const, function, etc.)</li><li>Variable names</li><li>Operators (=, +, etc.)</li><li>Values (23, &quot;hello&quot;, etc.)</li></ul><p>Once these pieces are identified, the engine organizes them into a structured format called the <strong>Abstract Syntax Tree</strong> — or <strong>AST</strong> for short.</p><h3>🌳 What is an AST?</h3><p>Think of the <strong>AST</strong> as a <strong>map of your code’s structure</strong> — a kind of tree diagram that shows what your code does and how each part relates to the others.</p><p>For example, this line of code:</p><pre>const x = 23</pre><p>Would be broken down by the engine like this:</p><ul><li>It’s a <strong>variable declaration</strong></li><li>The type is const</li><li>The variable’s name is x</li><li>Its assigned value is 23</li></ul><pre>VariableDeclaration (type: const)<br>├── VariableDeclarator<br>│   ├── Identifier (name: x)<br>│   └── Literal (value: 23)</pre><p>All of this information is stored in the <strong>AST</strong>, which the engine will use in the next steps to compile and execute the code.</p><h3>❗️Important Note</h3><p>The <strong>AST has nothing to do with the DOM</strong>.<br> Although both use the word “tree,” the AST is only used <strong>inside the JavaScript engine</strong> to understand and process your code — it’s never exposed to your application or the browser UI.</p><h3>⚙️ What is a JavaScript Runtime?</h3><p>A <strong>JavaScript Runtime</strong> is the environment where <strong>JavaScript code is executed</strong>. It provides everything the JavaScript engine needs to run your code — plus extra tools and APIs that are <strong>not part of the core JavaScript language</strong> itself. Think of a JavasScript runtime as a container. It includes:</p><ul><li>The <strong>JavaScript engine</strong></li><li>Access to <strong>Web APIs</strong> (e.g., DOM, console.log, setTimeout)</li><li>A <strong>Callback Queue</strong></li><li>The <strong>Event Loop</strong></li></ul><h3>🧩 Web APIs</h3><p>Web APIs aren’t part of JavaScript itself — they are provided by the <strong>browser</strong> (or the host environment). These include:</p><ul><li>DOM manipulation</li><li>setTimeout()</li><li>fetch()</li><li>console.log()</li></ul><p>JavaScript <strong>accesses these APIs</strong> via the global window object in the browser.</p><h3>🔄 The Event Loop: JavaScript’s Magic Trick</h3><p>JavaScript is <strong>single-threaded</strong>, but still manages to be asynchronous. That’s thanks to the <strong>event loop</strong>.</p><p>Here’s what happens when, say, you click a button:</p><ol><li>The event triggers and a <strong>callback function</strong> is added to the <strong>Callback Queue</strong>.</li><li>The <strong>Event Loop</strong> constantly checks:</li></ol><ul><li>“Is the call stack empty?”</li><li>If yes → it moves the callback into the <strong>Call Stack</strong> to be executed.</li></ul><p>This model ensures non-blocking behavior and is central to how JavaScript handles concurrency.</p><h3>🖥 What About Node.js?</h3><p>Node.js is a <strong>JavaScript runtime outside the browser</strong>. Since there’s no browser, Node.js provides its <strong>own set of APIs</strong>, written in C++:</p><ul><li>File system access</li><li>Networking</li><li>Streams</li><li>Child processes</li></ul><p>It also uses a <strong>thread pool</strong> for non-blocking I/O operations and is powered by the <strong>same V8 engine</strong> as Chrome.</p><h3>🧭 Final Thoughts</h3><p>Understanding the JavaScript engine and runtime helps you write better code, debug smarter, and build faster apps. It gives you the <strong>mental model</strong> for how your code is processed — from typing it into your editor to seeing it run in the browser.</p><blockquote><em>Next up: We’ll explore the </em><strong><em>Call Stack</em></strong><em> and dig even deeper into the </em><strong><em>Event Loop</em></strong><em> — the heartbeat of JavaScript’s concurrency model.</em></blockquote><p>If you enjoyed this breakdown, follow me on Medium for more deep dives into JavaScript internals, frontend architecture, and performance tips.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=581e0d4f2f44" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ A High-Level Overview of JavaScript: The Big Picture Before the Details]]></title>
            <link>https://medium.com/@oguzcolak2000/a-high-level-overview-of-javascript-the-big-picture-before-the-details-c58f961e039e?source=rss-95d174f58fa4------2</link>
            <guid isPermaLink="false">https://medium.com/p/c58f961e039e</guid>
            <category><![CDATA[event-loop]]></category>
            <category><![CDATA[typescript]]></category>
            <category><![CDATA[single-threaded]]></category>
            <category><![CDATA[javscript]]></category>
            <category><![CDATA[overview]]></category>
            <dc:creator><![CDATA[Oğuz Çolak]]></dc:creator>
            <pubDate>Sun, 20 Jul 2025 16:18:39 GMT</pubDate>
            <atom:updated>2025-07-20T16:18:39.851Z</atom:updated>
            <content:encoded><![CDATA[<p>When you’re just starting out with JavaScript, it can feel like you’re staring at a mountain of concepts — functions, objects, the event loop, prototypes, just-in-time compilation… and that’s just scratching the surface.</p><p>So before diving deep, let’s take a step back and zoom out.</p><p>Here’s a high-level overview of JavaScript — a map to guide you through the jungle before we start exploring the individual paths.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*KGwT2fpoDmWkSysM2hppUg.png" /></figure><h3><strong>💡 What Even Is JavaScript?</strong></h3><p>You may have heard this before:</p><blockquote><em>“JavaScript is a high-level, object-oriented, multi-paradigm programming language.”</em></blockquote><p>And sure, that’s true. But if we’re being honest — that’s just the tip of the iceberg.</p><p>Let’s supercharge that definition:</p><blockquote><em>JavaScript is a </em><strong><em>high-level</em></strong><em>, </em><strong><em>prototype-based</em></strong><em>, </em><strong><em>object-oriented</em></strong><em>, </em><strong><em>multi-paradigm</em></strong><em>, </em><strong><em>interpreted or just-in-time compiled</em></strong><em>, </em><strong><em>dynamically typed</em></strong><em>, </em><strong><em>single-threaded</em></strong><em>, </em><strong><em>garbage-collected</em></strong><em> programming language with </em><strong><em>first-class functions</em></strong><em> and a </em><strong><em>non-blocking event loop concurrency model</em></strong><em>.</em></blockquote><p>😅 Sounds like a joke, right?</p><p>Well… it kind of is — but it’s also your first glimpse into the full power of JavaScript. And once we <em>unpack</em> each of those terms, you’ll start to see just how capable and flexible this language really is.</p><h3>🧠 1. High-Level Language</h3><p>In low-level languages like C, you’re responsible for managing memory manually — allocating and freeing it as you go. That gives you more control, but it’s also error-prone and complex.</p><p>JavaScript, on the other hand, is <strong>high-level</strong> — it handles memory and CPU management for you through <strong>abstractions</strong>. You can focus on writing logic, not worrying about hardware details.</p><p>But that convenience comes at a cost: JavaScript isn’t as fast as low-level languages — and that’s okay. It’s designed for flexibility and developer experience.</p><h3>🧹 2. Garbage Collection</h3><p>JavaScript has a built-in feature called <strong>garbage collection</strong>, which automatically manages the memory your program uses.</p><p>Here’s how it works: when you create variables or objects, they take up space in your computer’s memory. But if you’re no longer using those variables or objects, they just sit there, wasting memory.</p><p>That’s where the <strong>garbage collector</strong> comes in. It’s like an invisible cleaning crew running in the background, constantly checking for things that are no longer needed — and removing them from memory.</p><p>You don’t have to do anything yourself — JavaScript takes care of it for you. This helps your programs run more efficiently without you having to worry about manual memory cleanup.</p><p>Pretty cool, right?</p><h3>🛠️ 3. Interpreted or Just-in-Time (JIT) Compiled</h3><p>JavaScript code runs inside engines like <strong>V8</strong> (used by Chrome and Node.js), and those engines don’t understand your console.log(&quot;hello&quot;) natively.</p><p>Your code needs to be <strong>translated to machine code</strong>, aka 0s and 1s.</p><p>This translation can happen either through <strong>interpretation</strong> (line by line) or <strong>just-in-time compilation</strong> (compiling while running), making JavaScript fast and flexible.</p><h3>🎭 4. Multi-Paradigm</h3><p>JavaScript doesn’t limit you to one style of programming. It supports:</p><ul><li><strong>Procedural programming</strong> (straightforward code flow)</li><li><strong>Object-oriented programming</strong> (organizing code with objects and classes)</li><li><strong>Functional programming</strong> (treating functions as first-class citizens)</li></ul><p>You can write in any (or all) of these paradigms. Few languages offer this kind of flexibility.</p><h3>🧬 5. Prototype-Based Object Orientation</h3><p>In JavaScript, objects inherit behavior via <strong>prototypes</strong>, not classical classes (though ES6 classes are syntactic sugar over prototypes).</p><p>Ever wonder why arrays have a .push() method?</p><p>It’s because every array inherits from a shared <strong>Array prototype</strong> — a blueprint object that holds common functionality.</p><p>One of the most important things to know is this: behind every object in JavaScript is another object it inherits from. That’s the <strong>prototype chain</strong>.</p><h3>🔁 6. First-Class Functions</h3><p>In JavaScript, functions are <em>first-class citizens</em>.</p><p>This means:</p><ul><li>You can pass functions into other functions.</li><li>You can return functions from functions.</li><li>You can assign functions to variables.</li></ul><p>This is what makes features like <strong>event listeners</strong>, <strong>callbacks</strong>, and <strong>functional programming</strong> possible. Powerful stuff.</p><pre>button.addEventListener(&#39;click&#39;, closeModal);</pre><p>Here, you’re treating closeModal like a variable — and JavaScript is cool with that.</p><h3>🔄 7. Dynamically Typed</h3><p>JavaScript is <strong>dynamically typed</strong>, meaning variables don’t have fixed types.</p><pre>let age = 30;<br>age = &quot;thirty&quot;; // totally allowed</pre><p>This makes coding faster, but it also increases the risk of bugs. For stricter control, many developers use <strong>TypeScript</strong>, a superset of JavaScript with static typing.</p><h3>🧵 8. Single-Threaded</h3><p>JavaScript operates on a<strong><em> single thread</em></strong>, meaning it can handle only one task at a time. Unlike multi-threaded languages that can run several tasks in parallel across different threads, JavaScript processes tasks sequentially within a single call stack. This call stack follows the Last In, First Out (LIFO) principle — functions are pushed onto the stack as they are called and popped off in reverse order once execution finishes.</p><p>Despite being single-threaded, JavaScript remains efficient and capable of managing multiple tasks. This is thanks to its support for asynchronous, non-blocking operations, which allow it to perform tasks like I/O or network requests without freezing the main execution flow.</p><h3>🌀 9. Non-Blocking Event Loop</h3><p>So, how does JavaScript handle <strong>asynchronous tasks</strong> like fetching data without freezing everything?</p><p>That’s where the <strong>event loop</strong> comes in.</p><p>It offloads long-running tasks (like network requests or timers) to the browser or Node.js, and when they’re ready, it puts them back into the main thread to be executed.</p><p>That’s how JavaScript remains <strong>non-blocking</strong>, even though it’s single-threaded.</p><h3>🎯 Final Thoughts</h3><p>Phew — that was a lot. But don’t worry if some of these concepts still feel abstract or overwhelming. You’ll see them again (and again) throughout your journey with JavaScript.</p><p>What matters most right now is the <strong>big picture</strong>:<br> JavaScript is versatile, powerful, and flexible — and you’ll have a lot of fun mastering it.</p><p><em>🔥 Buckle up. This is just the beginning of the ride.</em></p><p>If you enjoyed this overview, follow me for more deep dives into JavaScript fundamentals and beyond. 💻</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=c58f961e039e" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[ Understanding Type Conversion and Type Coercion in JavaScript — Without Losing Your Mind]]></title>
            <link>https://medium.com/@oguzcolak2000/understanding-type-conversion-and-type-coercion-in-javascript-without-losing-your-mind-7dbeb6b7a94f?source=rss-95d174f58fa4------2</link>
            <guid isPermaLink="false">https://medium.com/p/7dbeb6b7a94f</guid>
            <category><![CDATA[front-end-development]]></category>
            <category><![CDATA[javascript-type-coercion]]></category>
            <category><![CDATA[javascript]]></category>
            <category><![CDATA[type-casting]]></category>
            <category><![CDATA[type]]></category>
            <dc:creator><![CDATA[Oğuz Çolak]]></dc:creator>
            <pubDate>Tue, 15 Jul 2025 21:08:33 GMT</pubDate>
            <atom:updated>2025-07-15T21:08:33.287Z</atom:updated>
            <content:encoded><![CDATA[<h3>💡 Understanding Type Conversion and Type Coercion in JavaScript — Without Losing Your Mind</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Y1I1Ie4blZdlhhCxBH8mVg.png" /></figure><p>If you’ve been working with JavaScript for a while (or even just started), you’ve probably stumbled upon one of those quirky bugs where things don’t behave <em>quite</em> like you expected. Ever tried adding a number to a string and gotten a strange result? Yeah, we’ve all been there.</p><p>Let’s talk about <strong>type conversion</strong> and <strong>type coercion</strong> — two concepts that seem similar but are fundamentally different, and they’re the reason for some of JavaScript’s most confusing behavior.</p><h3>🧠 A Quick Story</h3><p>When I first started learning JavaScript, I built this small birthday calculator where users could input their birth year, and it would tell them how old they’d be in 18 years.</p><p>So I had something like:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*2f4rYZv1WUuX1Y8QPcmpDA.png" /></figure><p>Wait… what?</p><p>I was expecting 2009, but instead, I got this <strong>string concat soup</strong>. That was my first lesson in JavaScript’s type system.</p><p>Let’s break it down together.</p><h3>🔁 Type Conversion (Explicit)</h3><p><strong>Type Conversion</strong> (also called “type casting”) is when <em>you </em>convert a value from one type to another <strong>explicitly</strong>.</p><p>In my case, I realized that &#39;1991&#39; is a string, and adding a number to a string just concatenates it.</p><h3>🧪 Fixing the bug:</h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*3w13L0kW4aySYiH7Fb8lpA.png" /></figure><p>Boom! 🎯</p><p>Here, I used the Number() function to convert the string &#39;1991&#39; into the number 1991. Now, 1991 + 18 gives us the correct result.</p><h3>😵 But wait — isn’t inputYear still a string?</h3><p>Yup. The original variable inputYear is untouched:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1008/1*3IMJ0Eq62tp6LflE8gK-7A.png" /></figure><p>We didn’t change the original variable, just passed it through Number() in that moment.</p><h3>💥 What If Conversion Fails?</h3><p>Now, what happens if we try to convert something that’s not convertible?</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/908/1*vuCEEpABBbHmd1b_1uTyaA.png" /></figure><p>NaN stands for <strong>Not a Number</strong>, but ironically:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/878/1*5ToNEmmoLv1-EU195tQruQ.png" /></figure><p>😂 Yeah. JavaScript never fails to surprise.</p><p>So just remember: NaN basically means “this value couldn’t be converted into a number.”</p><h3>🔄 You Can Also Convert to String</h3><p>Although not as common, you can also convert numbers (or other types) to strings:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/996/1*Mu6knsd-eIfJQkbHAH1CFA.png" /></figure><p>Just don’t forget the capital S in String() — it matters!</p><h3>✅ And Yes, You Can Convert to Boolean</h3><p>JavaScript allows you to convert values to:</p><ul><li>Number</li><li>String</li><li>Boolean</li></ul><p>We’ll get deeper into Boolean conversions (like truthy/falsy values) another time, but here’s a sneak peek:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/962/1*rF1Wzxn-YqJu-nvPZ3LMpw.png" /></figure><h3>🤖 Type Coercion (Implicit)</h3><p>Here comes the <strong>magic</strong>. Type coercion is when <strong>JavaScript automatically</strong> converts types <strong>behind the scenes</strong> so that an operation can proceed.</p><p>Let’s revisit our earlier example, but flip the scenario:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/978/1*00XB_lF6Gx_LsnjfA78uzg.png" /></figure><p>Here, the number 23 is automatically converted into a string. Why? Because of the <strong>+ operator</strong>, which <strong>prefers strings</strong> when at least one operand is a string.</p><h3>😵 But Not All Operators Behave the Same</h3><p>Let’s test a few:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/860/1*1NHpg_nkG5wv9mIUEILX1g.png" /></figure><p>Here, <strong>-, </strong><strong>*, and </strong><strong>/</strong> force JavaScript to coerce values into numbers — <strong>not</strong> strings.</p><p>But try this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/792/1*wKzd9qv2Beeuneg4FeyGLw.png" /></figure><p>+ goes string-mode again.</p><p>Rule of thumb:</p><ul><li>+ coerces to string (if any operand is a string)</li><li>-, *, / coerce to numbers</li></ul><h3>🎲 Let’s Play: Guess the Output</h3><p>Here’s a fun one:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/810/1*p2hXM5CU9YZdPdlY9RdKIA.png" /></figure><p><strong>Answer: </strong><strong>10</strong></p><p>Breakdown:</p><ol><li>&#39;1&#39; + 1 → &#39;11&#39; (string)</li><li>&#39;11&#39; - 1 → 11 - 1 → 10</li></ol><p>Yep — JavaScript’s coercion engine works like this all the time.</p><p>🧪 One More for Fun</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/894/1*yKvR_Q0xFngK6MH5KsLsxQ.png" /></figure><p>Breakdown:</p><ul><li>2 + 3 + 4 → 9 (all numbers)</li><li>9 + &#39;5&#39; → &#39;95&#39; (number + string = string)</li></ul><h3>🧹 Final thoughts from a dev who got burned</h3><p>I used to hate type coercion. I’d wrap everything in Number() or String() just to be safe. But over time, I learned to <strong>understand the rules</strong> and now I actually <em>like</em> it.</p><p>You just gotta respect the game.</p><p>If you know what JavaScript is going to do, coercion lets you write <strong>less code</strong>, and in some cases, cleaner code.</p><p>That said: if you’re working on a team — <strong>be clear</strong>. Implicit coercion can make your code unreadable if overused or used carelessly.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=7dbeb6b7a94f" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>