<?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 Onadi Kahandawa on Medium]]></title>
        <description><![CDATA[Stories by Onadi Kahandawa on Medium]]></description>
        <link>https://medium.com/@onadikahandawa?source=rss-af3f843cee37------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/proxy/1*TGH72Nnw24QL3iV9IOm4VA.png</url>
            <title>Stories by Onadi Kahandawa on Medium</title>
            <link>https://medium.com/@onadikahandawa?source=rss-af3f843cee37------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Mon, 30 Nov 2026 15:31:25 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@onadikahandawa/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 IDE Isn’t Guessing. It Understands Your Code.]]></title>
            <link>https://medium.com/sliit-foss/your-ide-isnt-guessing-it-understands-your-code-2099179ad641?source=rss-af3f843cee37------2</link>
            <guid isPermaLink="false">https://medium.com/p/2099179ad641</guid>
            <category><![CDATA[abstract-syntax-tree]]></category>
            <category><![CDATA[lexical-analysis]]></category>
            <category><![CDATA[ide]]></category>
            <category><![CDATA[autocomplete]]></category>
            <dc:creator><![CDATA[Onadi Kahandawa]]></dc:creator>
            <pubDate>Mon, 21 Sep 2026 17:17:54 GMT</pubDate>
            <atom:updated>2026-09-21T17:19:31.827Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/963/1*7O1hKHSydQ2BRqDDP7eTxA.png" /></figure><p>Assume you’re writing a Java class called Student.</p><p>You add a few attributes:</p><pre>class Student {<br>private String name;<br>private int age;<br>private double gpa;<br>}</pre><p>Then you decide to add a method. You type:</p><pre>public</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*b7Gi2ZwkNWKjiaeDsacItg.png" /></figure><p><strong>(One quick note:</strong> I’m using Java examples, but these ideas aren’t specific to Java or one particular IDE. The exact implementation varies, but the general concepts apply across many languages and development tools.)</p><p>And before you’ve even finished writing the method, your IDE starts giving you suggestions completing the declaration.</p><p>You pick a suggestion, keep writing and move on.</p><p>At first, I never really thought much about it. It’s just autocomplete, right? It saves a few keystrokes and lets you write code a little faster. But then I started wondering,</p><p><strong>How does it know?</strong></p><p>How does it know what’s already in my class? How does it know which methods and fields are relevant?</p><p>And it gets even more interesting when you create an object:</p><pre>Student student = new Student();<br>student.</pre><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Q3lROwbacFnJySPxDwCQlA.png" /></figure><p>The moment you type that dot, your IDE immediately shows you the methods and fields available to Student.</p><p>So your IDE isn’t simply guessing the next word you’re going to type.</p><p><strong>It is actually understanding your code.</strong></p><p>So how does it actually do that?</p><p>Let’s look at what’s happening behind that little autocomplete box while you type.</p><h3><strong>First, It Needs to Break Your Code Apart</strong></h3><p>Before the IDE can understand what your code means, it first needs to break it into smaller pieces.</p><p>Take this line:</p><pre>Student student = new Student();</pre><p>It might look like one simple statement to us, but the IDE can break it down into smaller pieces called <strong>tokens</strong>:</p><p><strong>Student</strong> | <strong>student</strong> | <strong>=</strong> | <strong>new</strong> | <strong>Student</strong> | <strong>(</strong> | <strong>)</strong> | <strong>;</strong></p><p>Each token has a different role in the Java language.</p><p><strong>Student</strong> appears in the type position of the declaration<br> <strong>student</strong> is the variable being declared<br> = is an operator.<br> <strong>new</strong> is a Java keyword.<br> <strong>(, ) </strong>and <strong>;</strong> are separators.</p><blockquote>The process of converting a sequence of source characters into tokens is called <strong>lexical analysis</strong> or <strong>tokenization</strong>.</blockquote><p>But knowing the individual tokens isn’t enough. The IDE still needs to understand how they fit together.</p><h3><strong>From Tokens to Structure: Parsing</strong></h3><p>Consider the same line again:</p><pre>Student student = new Student();</pre><p>Knowing that <strong>Student, student, = </strong>and <strong>new</strong> are individual tokens doesn’t tell the IDE the whole story.</p><p>The IDE now has to work out what role each token plays in the statement.</p><ul><li>Student appears in the type position of the declaration</li><li>student is the variable being declared</li><li>= represents assignment</li><li>new Student() creates the object used to initialize the variable</li></ul><p>This is where <strong>parsing</strong> comes in.</p><blockquote>Parsing is the process of analyzing a sequence of tokens according to the <strong>grammar of the programming language</strong> and determining how those tokens form valid language constructs.</blockquote><p>The result is a structured representation of the code, commonly represented as an <strong>Abstract Syntax Tree (AST)</strong>.</p><p>You can think of it roughly like this:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*Uz2ze1kpIJND4i6TeHxIcQ.png" /></figure><p>The actual structure is more detailed than this, but this simplified version shows the main idea:</p><p><strong>The code is no longer a sequence of characters. It has a structure that it can work with.</strong></p><h3><strong>AST — Turning Code Into a Structure the IDE Can Work With</strong></h3><blockquote>An <strong>Abstract Syntax Tree</strong> is a tree-shaped representation of the syntactic structure of a program.</blockquote><p>Instead of storing:</p><pre>Student student = new Student();</pre><p>as one flat sequence, the AST represents the relationships between the different parts of the statement.</p><p>For example:</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/561/1*ojTMky4iPaT8p85rk7Z64Q.png" /></figure><p>The AST abstracts away some of the surface-level syntax and focuses on the structure and roles of the code. This makes it easier for language tools to work with the program structure.</p><p>The IDE can use this program structure for things such as code completion, error detection, refactoring, formatting, and code navigation.</p><p>But there is an important limitation:</p><p><strong>An AST tells the IDE how the code is structured, but it doesn’t by itself tell the IDE what every name refers to.</strong></p><p>For that, the IDE needs additional semantic information. This is where <strong>symbols and symbol tables</strong> become important.</p><h3><strong>Symbols and Symbol Tables: What Do They Mean?</strong></h3><p>Imagine your project contains dozens of classes.</p><p>You might have:</p><p>Student, Teacher, Course, Department, University</p><p>When the IDE sees:</p><p><strong>Student</strong></p><p>it needs to determine which declaration that name refers to.</p><p>And when it sees:</p><pre>Student student = new Student();</pre><p>it needs to keep track of the fact that student is a variable whose type is Student.</p><p>At this point, the IDE also needs to keep track of what those names represent.</p><blockquote><strong>A symbol represents a named program entity that the language tooling needs to keep track </strong>of, such as a:</blockquote><ul><li>class</li><li>method</li><li>field</li><li>local variable</li><li>parameter</li></ul><blockquote>A <strong>symbol table</strong> is a data structure used to associate names with information about the program entities they represent.</blockquote><p>This is where the distinction between <strong>syntax</strong> and <strong>semantics</strong> becomes important.</p><p>The AST describes the structure of the code.</p><p>The symbol information helps describe <strong>what those names actually refer to</strong>.</p><h3><strong>Name Resolution and Type Resolution</strong></h3><p>Once the IDE has symbols, it still needs to connect names to the correct declarations.</p><p>This process is called <strong>name resolution</strong>.</p><blockquote>Name resolution is essentially the process of determining:</blockquote><blockquote><strong>Which declaration does this particular name refer to?</strong></blockquote><p>For example:</p><p><strong>student</strong></p><p>could refer to a local variable, a field, or something else depending on the context.</p><p>Once that reference is resolved, its associated type can be determined as well.</p><p>In our example:</p><pre>Student student = new Student();</pre><p>the IDE can conceptually resolve:</p><p>student</p><p>↓</p><p>variable declaration</p><p>↓</p><p>type = Student</p><blockquote>This is related to <strong>type resolution</strong>, where the language tooling determines the type associated with a name or expression.</blockquote><p>So when we write:</p><p><strong>student.</strong></p><p>the IDE can reason about it as:</p><p>What is student?</p><p>↓</p><p>A variable</p><p>↓</p><p>What is its type?</p><p>↓</p><p>Student</p><p>↓</p><p>What members does Student have?</p><p>Now we can see why those earlier steps matter.</p><p>The tokens helped identify the pieces.</p><p>The AST helped identify their structure.</p><p>The symbol information helped connect names to declarations.</p><p>Name and type resolution helped the IDE determine what student actually represents.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*gLNa5BhWK4kMqlWT0LGeNg.png" /></figure><h3><strong>Indexing: How Does It Find Everything So Quickly?</strong></h3><blockquote><strong>IDEs commonly maintain indexes of project information.</strong></blockquote><p>The IDE can keep track of things like:</p><p>Class → declaration/location</p><p>Method → declaration/location</p><p>Field → declaration/location</p><p>Symbol → references/usages</p><p>So when you ask it to find Student, or jump to getName(), it can use this information instead of searching through the project from scratch every time.</p><p>This is one reason features such as <strong>Go to Definition</strong>, <strong>Find Usages</strong> and <strong>autocomplete</strong> can feel almost instant.</p><p>A lot of the information has already been processed and made available for quick lookup.</p><h3><strong>Static Analysis: The IDE is Checking Your Code Too</strong></h3><p>Your IDE isn’t only helping you write code. It’s also checking whether the code you’re writing makes sense.</p><p>For example:</p><p>int age = “hello”;</p><p>You haven’t compiled or run the program.</p><p>However, your IDE can immediately tell you that something is wrong because it can analyze the code and compare the types involved.</p><p>This is an example of <strong>static analysis</strong> — analyzing code without executing it.</p><blockquote><strong>Static analysis can use information from structures such as the AST, symbol information, types, and other forms of program representation to look for potential problems.</strong></blockquote><p>It can identify things such as:</p><ul><li>type mismatches</li><li>unreachable code</li><li>unused variables</li><li>invalid references</li><li>other potential problems</li></ul><p>And this analysis also contributes to code assistance.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*-x3enetdnptwhtYLO236JQ.png" /></figure><h3><strong>Autocomplete: What Is Actually Happening?</strong></h3><p>Conceptually, the process looks something like this:</p><p>student.</p><p>↓</p><p>Resolve “student”</p><p>↓</p><p>Find its declaration</p><p>↓</p><p>Determine its type</p><p>↓</p><p>Student</p><p>↓</p><p>Find available members</p><p>↓</p><p>Check what is accessible</p><p>↓</p><p>Filter/rank relevant suggestions</p><p>↓</p><p>Show relevant suggestions</p><p>To build that list, the IDE can use information such as:</p><ul><li>methods</li><li>fields</li><li>types</li><li>visibility</li><li>method signatures</li><li>relationships to other types</li></ul><p>So autocomplete isn’t simply predicting what text might come next. It’s using information about the program itself.</p><h3><strong>Putting it all together</strong></h3><figure><img alt="" src="https://cdn-images-1.medium.com/max/975/1*wMTuZfulnukL6ElRygzW2Q.png" /></figure><p>All of this happens while you’re typing, often within a fraction of a second. And that’s why autocomplete can feel almost instant.</p><p>So, the next time your IDE suggests something before you’ve finished typing, take a second to think about what’s actually happening behind the screen.</p><p>That autocomplete box is what we see.</p><p>But what’s interesting is everything that happens behind it.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=2099179ad641" width="1" height="1" alt=""><hr><p><a href="https://medium.com/sliit-foss/your-ide-isnt-guessing-it-understands-your-code-2099179ad641">Your IDE Isn’t Guessing. It Understands Your Code.</a> was originally published in <a href="https://medium.com/sliit-foss">SLIIT FOSS Community</a> on Medium, where people are continuing the conversation by highlighting and responding to this story.</p>]]></content:encoded>
        </item>
    </channel>
</rss>