<?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: Stephen Bobick</title>
    <description>The latest articles on DEV Community by Stephen Bobick (@sbobick).</description>
    <link>https://dev.to/sbobick</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.us-east-2.amazonaws.com%2Fuploads%2Fuser%2Fprofile_image%2F4281313%2Fb2a4fae7-58b9-4fcf-ba66-f5bbd69eb111.jpg</url>
      <title>DEV Community: Stephen Bobick</title>
      <link>https://dev.to/sbobick</link>
    </image>
    <atom:link rel="self" type="application/rss+xml" href="https://dev.to/feed/sbobick"/>
    <language>en</language>
    <item>
      <title>"Understanding the Code AI Writes: Lessons from Compilers, ORMs, and Rails"</title>
      <dc:creator>Stephen Bobick</dc:creator>
      <pubDate>Thu, 03 Dec 2026 19:50:59 +0000</pubDate>
      <link>https://dev.to/sbobick/understanding-the-code-ai-writes-lessons-from-compilers-orms-and-rails-d65</link>
      <guid>https://dev.to/sbobick/understanding-the-code-ai-writes-lessons-from-compilers-orms-and-rails-d65</guid>
      <description>&lt;p&gt;&lt;em&gt;&lt;a href="https://stephenbobick.com/blog/understanding-the-code-ai-writes/" rel="noopener noreferrer"&gt;Originally published at stephenbobick.com&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

&lt;h2&gt;
  
  
  Context
&lt;/h2&gt;

&lt;p&gt;With the ever increasing use of AI to generate code, the question of codebase understandability has come front and center in&lt;br&gt;
the software development community - from teams and managers to online communities and more.  I see this in a historical perspective as &lt;br&gt;
the latest in a long history of paradigm shifts, of which I've lived through many.  I've come to the conclusion that AI-generated code doesn't &lt;br&gt;
remove the need to understand code. It moves where that understanding is needed.&lt;/p&gt;

&lt;h2&gt;
  
  
  Compilers Hid the Machine. Do LLMs Hide the Code?
&lt;/h2&gt;

&lt;p&gt;In college I took the usual courses in Computer Science required at the time, including ones that covered instruction sets, machine programming,&lt;br&gt;
assembly language, compiler construction, and programming languages (procedural, object-oriented, logical, functional).  There was definitely some&lt;br&gt;
value in learning to code "the hard way" to understand what is actually going on under the covers - to a point.  The higher-level languages added &lt;br&gt;
richer expressivity to abstract away the repeating lower-level coding patterns.  Sometimes this was at the cost of performance, and sometimes certain &lt;br&gt;
things became a lot more difficult than they should be (e.g. printing output in the functional language Miranda).  It strikes me that generative AI offers a similar &lt;br&gt;
improvement in richness of expressivity.  Instead of worrying about declaring variables, structuring code, getting syntax right, garbage collection,&lt;br&gt;
variable naming conflicts and so on, the focus is on writing instructions in plain natural language and letting the LLM do the translation, much like&lt;br&gt;
compilers do for high-level languages translating to machine language or byte code. Code is precise: it expresses flow control, state, and computation, its &lt;br&gt;
rules are enforced, and a compiler or runtime translates it mechanically.  Now we don't write in code, we describe what code should do and the LLM translates &lt;br&gt;
that to code.&lt;/p&gt;

&lt;p&gt;In the former world, we rarely needed to understand the machine language (or byte code) generated by a compiler (JVM).  Mainly this understanding was&lt;br&gt;
only required if you were doing things like writing a compiler.  The question now is how much of the code do we need to understand versus the natural&lt;br&gt;
language instruction?  I would argue with existing tooling it's a mixed bag.  If you generate code that has a bug, or is missing a user story, how do &lt;br&gt;
you figure that out?  Generative AI works from what you tell it, and the more specific the instructions, the better the outcome will be.  It can quickly be &lt;br&gt;
used to iterate from a relatively loose specification to a more specific one that approaches what you actually want.  But this requires understanding &lt;br&gt;
the output at each exploratory iteration.  There is one fundamental difference. A compiler is deterministic and rigorously specified, so the same &lt;br&gt;
source always yields the same output. An LLM isn't rigorously specified and won't reliably give you the same output twice, which means its output has to be reviewed.&lt;/p&gt;

&lt;h2&gt;
  
  
  What ORMs Taught Me About Abstraction
&lt;/h2&gt;

&lt;p&gt;That need to review the output brings me to the common complaint of "AI slop".  I'm reminded of the days when object-relational mapping &lt;br&gt;
frameworks were born.  Prior to them, a well-rounded backend developer needed to understand a lot about SQL and fundamentals of relational databases.&lt;br&gt;
I recall fondly learning about all the various techniques for ensuring data integrity and performance - referential integrity constraints, check constraints,&lt;br&gt;
triggers, transactional isolation, DDL, third normal form, and so on.  It was useful to have to learn how all this worked "the hard way" - just like it was&lt;br&gt;
to code in assembly language and write a machine language generator for a compiler.  Once object-relational tools came on the scene, it was a welcome relief!&lt;br&gt;
Now instead of writing brittle SQL that would break across schema changes, we could tackle the object-relational impedance mismatch problem with a more natural&lt;br&gt;
and expressive syntactic sugar (first XML, then annotations).  SQL now moved to the framework.  &lt;/p&gt;

&lt;p&gt;I noticed that I had a distinct advantage using the new technology because I had done it the hard way, and knew how the underlying systems actually worked.  By contrast,&lt;br&gt;
those who jumped straight to, say, Hibernate struggled.  I often heard "Hibernate sucks" - usually with complaints about how it didn't do what the developer &lt;br&gt;
thought, but this usually came from not understanding what was happening under the covers.  It seems we have a similar potential here with generative AI.&lt;br&gt;
If you don't keep on top of what the tool is doing, you will get frustrated.  Moreover, your product's quality&lt;br&gt;
and operational posture will likely suffer.  If you rely on trial and error until something seems okay, without understanding why, it isn't good enough.&lt;/p&gt;

&lt;h2&gt;
  
  
  Another Lesson from Web App Prototyping Frameworks
&lt;/h2&gt;

&lt;p&gt;I'm similarly reminded of struggles folks had with Ruby on Rails (or Groovy on Grails).  These frameworks were designed to leverage convention over configuration &lt;br&gt;
and mapping database entities to working prototypes quickly.  Starting from code, generating tables, then generating web pages to perform&lt;br&gt;
CRUD operations was the norm, and done too quickly just led to problems.  Teams would ship generated scaffolding as production code.  I recall a project I worked on&lt;br&gt;
where the team relied on Groovy on Grails to generate about 100 tables&lt;br&gt;
and 100 interfaces to edit them.  Users had a horrible time creating records in a certain order (child first, then parent), linking them, etc, all because &lt;br&gt;
the team implemented a naive quick and dirty prototype.  Use cases (user stories) were done backwards - from the interfaces, rather than the correct way - from user-centric&lt;br&gt;
meaningful workflows.  The result was angry users and pretty terrible code to maintain.  The key missing point was that these frameworks were never intended to be run blindly&lt;br&gt;
to create prototypes that immediately became production code.  The prototypes needed to be iterated over and refined into user-friendly interfaces that map to user stories - &lt;br&gt;
increments of functionality that provide value to a user.  The tool in the hands of someone using it carelessly produced slop.&lt;/p&gt;

&lt;h2&gt;
  
  
  Summary
&lt;/h2&gt;

&lt;p&gt;There is a trap in new, powerful, expressive tools.  The more powerful and expressive the tool, the more damage can be done by using it carelessly.  A powerful tool needs&lt;br&gt;
to be used by a craftsperson who wields it masterfully.  This requires understanding of what the tool does for you (so you don't have to), as well as what it is doing, and where&lt;br&gt;
you need to make sure it's doing what you expect.  This applies to generative AI.  &lt;/p&gt;

&lt;h2&gt;
  
  
  What I'd Do About It
&lt;/h2&gt;

&lt;p&gt;Leaders should encourage their teams to be craftspeople who understand the tools they are using and the output those tools produce, and uphold best practices.  For AI-generated code, that can mean:&lt;/p&gt;

&lt;ul&gt;
&lt;li&gt;Code reviews that treat generated code like any other code&lt;/li&gt;
&lt;li&gt;Tests that act as an executable specification&lt;/li&gt;
&lt;li&gt;Engineers who can explain what they merge&lt;/li&gt;
&lt;li&gt;Prompts treated like specs&lt;/li&gt;
&lt;/ul&gt;




&lt;p&gt;&lt;em&gt;Stephen Bobick is an engineering leader with over 15 years of management experience and over 15 years of hands-on software development. Connect with him on &lt;a href="https://www.linkedin.com/in/stephen-bobick" rel="noopener noreferrer"&gt;LinkedIn&lt;/a&gt; | &lt;a href="https://stephenbobick.com/blog" rel="noopener noreferrer"&gt;More writing&lt;/a&gt;&lt;/em&gt;&lt;/p&gt;

</description>
      <category>ai</category>
      <category>softwareengineering</category>
      <category>management</category>
      <category>programming</category>
    </item>
  </channel>
</rss>
