<?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 Virajkudar on Medium]]></title>
        <description><![CDATA[Stories by Virajkudar on Medium]]></description>
        <link>https://medium.com/@virajkudar19?source=rss-cc6fe85ba891------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/0*Gm4_xBelnETi0chT</url>
            <title>Stories by Virajkudar on Medium</title>
            <link>https://medium.com/@virajkudar19?source=rss-cc6fe85ba891------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 23 Nov 2026 22:55:26 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@virajkudar19/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[3 Things Every Developer Should Know About Strings]]></title>
            <link>https://medium.com/@virajkudar19/3-things-every-developer-should-know-about-strings-761639c0b804?source=rss-cc6fe85ba891------2</link>
            <guid isPermaLink="false">https://medium.com/p/761639c0b804</guid>
            <dc:creator><![CDATA[Virajkudar]]></dc:creator>
            <pubDate>Tue, 01 Sep 2026 06:16:03 GMT</pubDate>
            <atom:updated>2026-09-01T06:16:03.908Z</atom:updated>
            <content:encoded><![CDATA[<p>Whether you are writing a quick script or building a web app, you use strings every day. But beneath a simple &quot;Hello World&quot;, text handling in software is surprisingly complex.</p><p>Here are three quick principles every developer should know to write faster, cleaner code.</p><h3>1. Strings Are Just Bytes + Encoding</h3><p>Computers only store binary data (0s and 1s). A string is simply an array of raw bytes mapped to human-readable characters using an encoding system.</p><ul><li><strong>Unicode:</strong> Assigns every letter, character, and emoji a unique ID number.</li><li><strong>UTF-8:</strong> Translates those IDs into binary. Standard ASCII letters take <strong>1 byte</strong>, but complex emojis can take up to <strong>4 bytes</strong>.</li></ul><blockquote><strong><em>Takeaway:</em></strong><em> Never assume </em><em>string.length equals the visible character count. Emojis and special symbols take up multiple bytes!</em></blockquote><h3>2. The Immutability Trap</h3><p>In popular languages like <strong>Python, JavaScript, and Java</strong>, strings are <strong>immutable</strong> — they cannot be changed in memory after they are created.</p><p>Appending text to a string inside a loop creates a brand-new memory allocation on every single iteration:</p><p>Python</p><pre># SLOW: O(N²) time &amp; high memory usage<br>text = &quot;&quot;<br>for item in item_list:<br>    text += item </pre><pre># FAST: O(N) performance using list join<br>text = &quot;&quot;.join(item_list)</pre><h3>3. String Interning Makes Code Faster</h3><p>Because strings are used constantly, language engines optimize them using <strong>String Interning</strong>.</p><p>When two variables hold the exact same hardcoded text (like &quot;hello&quot;), the runtime often stores only one copy in a shared <strong>String Pool</strong>. Both variables point to the same memory location, allowing the engine to compare text almost instantly.</p><p>Strings aren’t just simple text — they are dynamic structures. Avoid string concatenation loops and keep encoding in mind to make your apps faster and more memory-efficient!</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=761639c0b804" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>