<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:dc="http://purl.org/dc/elements/1.1/">
  <channel>
    <title>DEV Community: Everett Butler</title>
    <description>The latest articles on DEV Community by Everett Butler (@everettbutler).</description>
    <link>https://dev.to/everettbutler</link>
    <image>
      <url>https://media2.dev.to/dynamic/image/width=90,height=90,fit=cover,gravity=auto,format=auto/https:%2F%2Fdev-to-uploads.s3.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F2898598%2F8a71c053-8e33-4a6a-a521-30d107377bb4.png</url>
      <title>DEV Community: Everett Butler</title>
      <link>https://dev.to/everettbutler</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/everettbutler"/>
    <language>en</language>
    <item>
      <title>How AI is Transforming the Code Review Process</title>
      <dc:creator>Everett Butler</dc:creator>
      <pubDate>Wed, 26 Feb 2025 22:23:20 +0000</pubDate>
      <link>https://dev.to/everettbutler/how-ai-is-transforming-the-code-review-process-oao</link>
      <guid>https://dev.to/everettbutler/how-ai-is-transforming-the-code-review-process-oao</guid>
      <description>&lt;p&gt;&lt;u&gt;&lt;a href="https://www.greptile.com" rel="noopener noreferrer"&gt;AI code reviews&lt;/a&gt;&lt;/u&gt; are becoming an essential tool for improving code quality and developer productivity. AI-powered code review is making real progress, helping teams maintain standards and catch issues before they reach production. Beyond just identifying bugs or stylistic inconsistencies, AI code analyzers can analyze patterns, suggest optimizations, and even predict areas of code that may become problematic as a project scales.&lt;/p&gt;

&lt;p&gt;By automating routine tasks, AI for code review frees up developers to focus on more complex and creative aspects of their work. It also facilitates knowledge sharing by providing suggestions based on best practices and extensive training data, making it easier for junior developers to learn and grow. As these tools become more sophisticated, they're not just about catching errors—they're helping teams write cleaner, more efficient, and maintainable code.&lt;/p&gt;

&lt;h2&gt;
  
  
  Traditional Code Review Evolution
&lt;/h2&gt;

&lt;p&gt;Traditional code review processes rely heavily on each code reviewer spending hours scrutinizing pull requests. While human expertise remains invaluable, AI-based code review systems are now augmenting this process, offering benefits that complement human capabilities. By utilizing machine learning models trained on millions of code repositories, AI can quickly identify common patterns, potential bugs, and security vulnerabilities.&lt;/p&gt;

&lt;h2&gt;
  
  
  Modern AI Solutions
&lt;/h2&gt;

&lt;p&gt;Modern AI code analyzers go beyond simple linting and static analysis. When code review AI and AI code analysis tools work together, teams can achieve better results. While reviewing AI code is still a new practice for many teams, the technology has proven its value.&lt;/p&gt;

&lt;p&gt;Key benefits of AI-powered code review include:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;&lt;p&gt;Consistency in enforcing coding standards across large codebases and maintaining quality through automated checks that supplement human code reviewers&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Rapid identification of potential security vulnerabilities through sophisticated pattern matching and contextual analysis of the codebase&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Automated detection of performance issues and optimization opportunities, often catching problems that might be missed in manual reviews&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Intelligent suggestions for code improvements based on best practices learned from analyzing millions of repositories&lt;/p&gt;&lt;/li&gt;
&lt;li&gt;&lt;p&gt;Real-time feedback during development, allowing developers to catch issues before they even reach the formal review stage&lt;/p&gt;&lt;/li&gt;
&lt;/ul&gt;

&lt;h2&gt;
  
  
  Reliability and Effectiveness
&lt;/h2&gt;

&lt;p&gt;The emergence of AI-based code review tools has sparked discussions about their reliability and effectiveness, and while some developers initially expressed skepticism about AI for code review, many teams now consider them to be essential to their workflow. &lt;/p&gt;

&lt;p&gt;The key lies in understanding that AI isn't replacing human reviewers, but rather enhancing their capabilities by handling routine checks. This, in turn, allows human reviewers to focus on higher-level architectural decisions.&lt;/p&gt;

&lt;h2&gt;
  
  
  Future Outlook
&lt;/h2&gt;

&lt;p&gt;Looking ahead, the role of AI in code review is likely to expand even further, and as models become more sophisticated, we can expect greater accuracy and improved context-aware suggestions. However, the goal isn't to eliminate human oversight–rather, it's to create a more efficient and thorough review process that combines the best of both human expertise and artificial intelligence.&lt;/p&gt;

&lt;h2&gt;
  
  
  Implementation Strategy
&lt;/h2&gt;

&lt;p&gt;As organizations evaluate whether implementing an AI code review tool is worth the investment, they should consider both the immediate and long-term benefits. The initial learning curve and setup time is typically offset by significant improvements in code quality and reduced technical debt.&lt;/p&gt;

&lt;p&gt;Like any new software, successful implementation often requires a balanced approach. Starting with smaller projects and gradually expanding usage allows teams to build confidence in the AI's capabilities, while also fine-tuning its integration into existing workflows.&lt;/p&gt;

&lt;h2&gt;
  
  
  Conclusion
&lt;/h2&gt;

&lt;p&gt;In conclusion, AI code review tools represent a significant advancement in software development practices. When properly implemented, these AI-powered code review solutions serve as valuable allies to human reviewers, helping teams maintain higher code quality standards while improving development velocity. As we continue exploring the possibilities of AI in software development, one thing is clear: the synergy between human expertise and AI assistance is reshaping how we approach code review, with both gaining insights and improving along the way.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>ai</category>
      <category>devrel</category>
    </item>
    <item>
      <title>Code Review Checklist: A Comprehensive Guide</title>
      <dc:creator>Everett Butler</dc:creator>
      <pubDate>Wed, 26 Feb 2025 00:32:51 +0000</pubDate>
      <link>https://dev.to/everettbutler/code-review-checklist-a-comprehensive-guide-cfh</link>
      <guid>https://dev.to/everettbutler/code-review-checklist-a-comprehensive-guide-cfh</guid>
      <description>&lt;p&gt;&lt;u&gt;&lt;a href="https://www.greptile.com/" rel="noopener noreferrer"&gt;Code reviews&lt;/a&gt;&lt;/u&gt; are a crucial part of the software development process. They help maintain code quality, catch bugs early, and facilitate knowledge sharing among team members. This article provides a detailed checklist for conducting effective code reviews, ensuring that your team's code meets high standards of quality, readability, and maintainability.&lt;/p&gt;

&lt;h2&gt;
  
  
  The Code Review Checklist
&lt;/h2&gt;

&lt;h3&gt;
  
  
  1. Code Functionality
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Does the code work as intended?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Give the code a spin and see if it does what it's supposed to. No need to go overboard, just make sure the main features aren't falling flat on their face.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Are all edge cases handled appropriately?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Hunt for those sneaky scenarios that might trip up the code. You know, the weird inputs or boundary conditions that make developers lose sleep. Make sure the code doesn't throw a tantrum when faced with these curveballs.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Are there any logical errors or bugs?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Put on your detective hat and scrutinize the code's logic. Keep an eye out for those pesky off-by-one errors or wonky conditional statements. Don't forget to give any complex algorithms or business logic an extra once-over – that's where the really sneaky bugs like to hide.&lt;/p&gt;

&lt;h3&gt;
  
  
  2. Code Design and Architecture
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Does the code adhere to SOLID principles?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Check if the code follows &lt;a href="https://stackify.com/solid-design-principles/" rel="noopener noreferrer"&gt;Single Responsibility&lt;/a&gt;, &lt;a href="https://www.freecodecamp.org/news/open-closed-principle-solid-architecture-concept-explained/" rel="noopener noreferrer"&gt;Open-Closed&lt;/a&gt;, &lt;a href="https://en.wikipedia.org/wiki/Liskov_substitution_principle" rel="noopener noreferrer"&gt;Liskov Substitution&lt;/a&gt;, &lt;a href="https://stackify.com/interface-segregation-principle/" rel="noopener noreferrer"&gt;Interface Segregation&lt;/a&gt;, and &lt;a href="https://principles.dev/p/dependency-inversion-principle/" rel="noopener noreferrer"&gt;Dependency Inversion&lt;/a&gt; principles. Look for classes with clear, focused responsibilities and interfaces that allow for easy extension without modification.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is the code modular and reusable?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Evaluate whether components can be easily reused in different contexts. Look for well-defined interfaces, minimal coupling between modules, and functions that perform specific, self-contained tasks.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Are there any superfluous dependencies?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Identify any unnecessary libraries or modules that could be removed without affecting functionality. Consider if simpler alternatives or built-in language features could replace complex dependencies.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Does the code align with the system's overall architecture?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Ensure the new code fits seamlessly into the existing system design. Check for consistency in patterns, naming conventions, and architectural decisions across the codebase.&lt;/p&gt;

&lt;h3&gt;
  
  
  3. Code Readability and Maintainability
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Is the code clear and concise?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Give the code a quick read-through. If you find yourself scratching your head or re-reading lines, that's a red flag. Look for overly complex structures or convoluted logic that could be simplified.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Do the names make sense?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Check if variables and functions are named in a way that actually tells you what they do. No need for a dissertation in each name, but "x" probably isn't cutting it either.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Are comments pulling their weight?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Comments should add value, not state the obvious. Look for explanations of tricky bits, business logic, or why a particular approach was chosen. If a comment is just repeating what the code already says, it's probably not needed.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Are the brain-benders explained?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For any particularly complex algorithms or processes, make sure there's some explanation. This could be in comments, documentation, or even a link to a relevant article or paper. Future you (and your teammates) will thank you.&lt;/p&gt;

&lt;h3&gt;
  
  
  4. Performance and Efficiency
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Is the code a speed demon or a slowpoke?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Keep an eye out for performance bottlenecks that might make your code crawl. Look for inefficient loops, unnecessary database calls, or anything else that might make your users tap their feet impatiently.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Is the code a memory hog?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Check if the code is using memory efficiently. Are there any massive arrays or objects that could be trimmed down? Make sure you're not keeping data around longer than necessary.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Are we using the right tools for the job?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Take a look at the data structures and algorithms in use. Are they the best fit for the task at hand? Sometimes, swapping out a linear search for a hash table can make all the difference in the world.&lt;/p&gt;

&lt;h3&gt;
  
  
  5. Security
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Is this code Fort Knox or a welcome mat for hackers?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Keep an eye out for common security pitfalls. Check if user input is treated like a potential troublemaker (because it is) and properly sanitized. Make sure sensitive data isn't just hanging out in plain sight – we're not running a public library here.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Are we playing it safe with user input?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Validate and sanitize user input like you're a paranoid bouncer at an exclusive club. SQL injection, XSS, and their nasty friends should be persona non grata in your code.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Are secrets actually secret?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Ensure passwords, API keys, and other sensitive data are locked down tighter than a drum. No hardcoding secrets in plain text, and definitely no accidental commits of .env files. Think "secret agent", not "open book".&lt;/p&gt;

&lt;h3&gt;
  
  
  6. Error Handling and Logging
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Is the code ready for Murphy's Law?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Check if errors are handled with the grace of a cat landing on its feet. We're not aiming for "it works on my machine" here. Look for try-catch blocks that actually do something useful, and make sure errors aren't just swept under the rug.&lt;/p&gt;

&lt;p&gt;&lt;strong&gt;Can we play detective if things go south?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Make sure there's enough breadcrumbs (aka logs) for future you to figure out what went wrong. But don't go overboard – we're not writing a novel here. Look for strategic log placement that'll help diagnose issues without drowning you in a sea of useless information.&lt;/p&gt;

&lt;h3&gt;
  
  
  7. Testing
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Are the new features battle-tested?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Check if there are unit tests covering the fresh code. No need to test every single line, but key functionality should have some automated safeguards. Bonus points if the tests are actually readable and maintainable! &lt;strong&gt;Are we ready for the unexpected?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Check if the tests are covering those sneaky edge cases and "what if everything goes wrong" scenarios. We're not just testing the happy path here – we want to make sure our code can handle curveballs without breaking a sweat. &lt;strong&gt;Are we testing the big picture?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;For features that span multiple components or systems, look for integration tests. These catch issues that unit tests might miss, like when your perfectly good functions decide to have a disagreement party when working together.&lt;/p&gt;

&lt;h3&gt;
  
  
  8. Documentation
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Is the code telling its story well?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Check if the code has enough helpful comments without turning into a novel. New APIs should have clear documentation – think "helpful tour guide" rather than "cryptic riddle". And don't forget to give the README some love if you've added anything noteworthy!&lt;/p&gt;

&lt;h3&gt;
  
  
  9. Coding Standards and Best Practices
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Is the code playing by our rules?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Check if the code is following our team's style guide. We're not looking for rebellion here – consistency is key. Also, keep an eye out for any language-specific no-nos. We want our code to be on its best behavior, using all the cool features and idioms of the language without falling into common traps.&lt;/p&gt;

&lt;h3&gt;
  
  
  10. Version Control
&lt;/h3&gt;

&lt;p&gt;&lt;strong&gt;Are we telling a good story with our commits?&lt;/strong&gt;&lt;/p&gt;

&lt;p&gt;Check if those commit messages actually explain what changed and why. No "fixed stuff" or "updated things" allowed – we're not writing mystery novels here. Also, make sure the branch names aren't a wild west of random words. And hey, while you're at it, keep an eye out for any sneaky merge conflicts trying to crash the party.&lt;/p&gt;

&lt;h3&gt;
  
  
  GitHub Pull Request Template
&lt;/h3&gt;

&lt;p&gt;Here's a &lt;u&gt;&lt;a href="https://www.greptile.com/docs/apps/code-review" rel="noopener noreferrer"&gt;GitHub Pull Request&lt;/a&gt;&lt;/u&gt; template that incorporates the key points from our code review checklist. You can use this as a starting point and customize it to fit your team's specific needs:&lt;br&gt;
&lt;/p&gt;

&lt;div class="highlight js-code-highlight"&gt;
&lt;pre class="highlight plaintext"&gt;&lt;code&gt;### Description

[Provide a brief description of the changes in this PR]

### Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update

### Checklist:

#### 1. Code Quality and Readability

- [ ] Is the code clean, well-organized, and easy to understand?
- [ ] Are variable and function names descriptive and following naming conventions?
- [ ] Is there any unnecessary complexity or redundancy that can be simplified?

#### 2. Functionality

- [ ] Does the code accomplish what it's supposed to do?
- [ ] Are there any logical errors or edge cases not accounted for?
- [ ] Is there appropriate error handling and validation?

#### 3. Performance

- [ ] Are there any potential performance bottlenecks?
- [ ] Is resource usage (memory, CPU, network, etc.) optimized?
- [ ] Are database queries efficient (if applicable)?

#### 4. Scalability

- [ ] Will this code work well as the system grows?
- [ ] Are there any hard-coded limits that might cause issues in the future?

#### 5. Security

- [ ] Is user input properly validated and sanitized?
- [ ] Are there any potential security vulnerabilities?
- [ ] Are secrets and sensitive data properly protected?

#### 6. Error Handling and Logging

- [ ] Are errors handled gracefully and informatively?
- [ ] Is there appropriate logging for debugging and monitoring?

#### 7. Testing

- [ ] Are there unit tests for new functionality?

### Description

[Provide a brief description of the changes in this PR]

### Type of change

- [ ] Bug fix (non-breaking change which fixes an issue)
- [ ] New feature (non-breaking change which adds functionality)
- [ ] Breaking change (fix or feature that would cause existing functionality to not work as expected)
- [ ] This change requires a documentation update

### Checklist:

#### 1. Code Quality and Readability

- [ ] Is the code clean, well-organized, and easy to understand?
- [ ] Are variable and function names descriptive and following naming conventions?
- [ ] Is there any unnecessary complexity or redundancy that can be simplified?

#### 2. Functionality

- [ ] Does the code accomplish what it's supposed to do?
- [ ] Are there any logical errors or edge cases not accounted for?
- [ ] Is there appropriate error handling and validation?

#### 3. Performance

- [ ] Are there any potential performance bottlenecks?
- [ ] Is resource usage (memory, CPU, network, etc.) optimized?
- [ ] Are database queries efficient (if applicable)?

#### 4. Scalability

- [ ] Will this code work well as the system grows?
- [ ] Are there any hard-coded limits that might cause issues in the future?

#### 5. Security

- [ ] Is user input properly validated and sanitized?
- [ ] Are there any potential security vulnerabilities?
- [ ] Are secrets and sensitive data properly protected?

#### 6. Error Handling and Logging

- [ ] Are errors handled gracefully and informatively?
- [ ] Is there appropriate logging for debugging and monitoring?

#### 7. Testing

- [ ] Are there unit tests for new functionality?
- [ ] Do tests cover edge cases and potential failure scenarios?
- [ ] Are there integration tests for features spanning multiple components?

#### 8. Documentation

- [ ] Is the code adequately commented?
- [ ] Is there clear documentation for new APIs or significant changes?
- [ ] Has the README been updated if necessary?

#### 9. Coding Standards and Best Practices

- [ ] Does the code follow our team's style guide and best practices?
- [ ] Are language-specific idioms and features used appropriately?

#### 10. Version Control

- [ ] Are commit messages clear and descriptive?
- [ ] Is the branch named appropriately?
- [ ] Have any merge conflicts been resolved?

### Additional Notes

[Any additional information that might be helpful for reviewers]
&lt;/code&gt;&lt;/pre&gt;

&lt;/div&gt;



&lt;h3&gt;
  
  
  YMMV
&lt;/h3&gt;

&lt;p&gt;Remember, while this checklist provides a solid foundation for code reviews, it's not exhaustive. Each PR may require unique considerations based on its context. Use this as a guide, but don't hesitate to explore beyond these points if needed. The goal is thorough, insightful reviews that contribute to code quality and project success.&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
    </item>
    <item>
      <title>AI is better at writing code than reading code. Here’s why.</title>
      <dc:creator>Everett Butler</dc:creator>
      <pubDate>Wed, 26 Feb 2025 00:22:36 +0000</pubDate>
      <link>https://dev.to/everettbutler/ai-is-better-at-writing-code-than-reading-code-heres-why-2nm1</link>
      <guid>https://dev.to/everettbutler/ai-is-better-at-writing-code-than-reading-code-heres-why-2nm1</guid>
      <description>&lt;p&gt;The advice I give to everyone starting college is to take one programming class. Not because everyone should know how to code, though it doesn’t hurt, but because learning to program teaches you how to think. It forces you to examine the flow of logic inside your brain that leads you to each one of your judgments and conclusions, and by giving you the vocabulary to talk about how computers think, it inadvertently gives you the vocabulary and frameworks to express how you think. Recursion, iteration, conditional branching, how some thoughts in your head are in memory, and others are in storage and more.&lt;/p&gt;

&lt;p&gt;Sometimes I find myself examining this advice. If the way computers think is so similar to how people think, what makes code so hard to read?&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Is Code So Hard to Read?
&lt;/h3&gt;

&lt;p&gt;I think there are 2 reasons.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Unintuitive Nature of Directory Structure
&lt;/h3&gt;

&lt;p&gt;A functionally identical web app written in MERN will have a completely different looking directory structure written in Next.JS. These are both Javascript codebases for an identical piece of software. However, where external API calls get made, where backend logic is executed, and where HTML components are generated is completely different. Given a codebase, I couldn’t tell you where certain functionality is without some fumble-y searching.&lt;/p&gt;

&lt;h3&gt;
  
  
  The Interconnected Web of Large Codebases
&lt;/h3&gt;

&lt;p&gt;If you as a developer look at a self-standing script, assuming it is in a language you are familiar with, you are pretty likely to be able to decipher what it does. It isn’t really the code itself that is hard to understand but rather the codebase. When there are hundreds of scripts that are interdependent, it is hard to decipher what each script, module or package does. This is unless, of course, it’s well documented.&lt;/p&gt;

&lt;h3&gt;
  
  
  Documentation and the Knowledge Gap
&lt;/h3&gt;

&lt;p&gt;The biggest problem with docs, naturally, is that no one wants to write them. However, let’s put that aside for a second and consider if docs are even the right way to approach learning a new codebase.&lt;/p&gt;

&lt;p&gt;Docs, when done right, are an exhaustive explanation of the code’s functionality and its components. The biggest problem with docs then is actually that they are the same no matter who is looking at them. Consider a Next.JS app that lets users chat with one another. A developer familiar with Next.JS but not with chat programs will have a very different set of gaps than a chat developer who has only ever worked with PHP.&lt;/p&gt;

&lt;p&gt;The solution to this is usually subject-matter experts. If you’re being onboarded onto a new codebase at your job, you should set up a meeting with a senior dev that knows their way around the code. Of course that means waiting till their next calendar availability and then taking up an hour of their day. It will likely be great though, you tell them what you know and they fill in the gaps.&lt;/p&gt;

&lt;p&gt;At Greptile, our challenge is to teach an AI a codebase so they can be that senior dev, except available 24/7 and at a dramatically lower cost/hour.&lt;/p&gt;

&lt;h3&gt;
  
  
  How to Make an AI an Expert on a Codebase
&lt;/h3&gt;

&lt;p&gt;Working with LLMs is an unrelenting struggle against the context window. OpenAI's GPT-3.5 caps out at 16,000 tokens, not nearly enough to have an LLM store the entirety of a codebase in its context and answer your questions.&lt;/p&gt;

&lt;p&gt;Interestingly, human beings also don’t have the required memory to store an entire codebase. So we start with a human senior dev would answer a question like “Where is the auth functionality and how does it work?”&lt;/p&gt;

&lt;p&gt;The dev likely has a mental map of the codebase and a general idea of where things are.&lt;/p&gt;

&lt;p&gt;They will load this map into their “memory”.&lt;/p&gt;

&lt;p&gt;They likely remember an overview of what certain key files do, so they load that into their “memory”.&lt;/p&gt;

&lt;p&gt;Now if they have the codebase open, they can reference specific files to synthesize their answer.&lt;/p&gt;

&lt;p&gt;Ultimately, the secret to giving LLMs the ability to synthesize relevant answers from corpora of data is to be extremely deliberate about what goes into their inference context. This is not new information. People have been using embeddings in vector databases and using nearest neighbor search to synthesize context for months now. What we have found is that this is far from a trivial problem when it comes to large codebases.&lt;/p&gt;

&lt;h3&gt;
  
  
  Why Is It Specifically Hard to Do This with Codebases?
&lt;/h3&gt;

&lt;p&gt;Codebases are non-linear, and unlike how we approached them earlier, they are also not trees. What they are a directed acyclic graphs where each node is a class or function. Each edge is a connection where A() calls B() or C inherits D and so on. By extension, to vectorize a codebase, this graph needs to be implemented, and semantically searchable. Not just that, every update to a node needs to be propagated one layer out, so it’s immediate neighbor.&lt;/p&gt;

&lt;h3&gt;
  
  
  Conclusion
&lt;/h3&gt;

&lt;p&gt;These are my thoughts on why the problem of code semantic search is so hard. It is the exact problem I'm working to solve at Greptile.&lt;/p&gt;

&lt;p&gt;Greptile is free to use for public repos &amp;lt;10 MB.&lt;/p&gt;

&lt;p&gt;You can check it out here: &lt;a href="https://www.greptile.com/" rel="noopener noreferrer"&gt;https://www.greptile.com/&lt;/a&gt;&lt;/p&gt;

&lt;p&gt;Thank you for reading!&lt;/p&gt;

</description>
      <category>webdev</category>
      <category>programming</category>
      <category>ai</category>
      <category>beginners</category>
    </item>
  </channel>
</rss>
