{"id":1898,"date":"2025-11-06T11:36:41","date_gmt":"2025-11-06T18:36:41","guid":{"rendered":"http:\/\/10kdev.net\/?p=1898"},"modified":"2025-11-06T11:46:55","modified_gmt":"2025-11-06T18:46:55","slug":"ai-on-legacy-code-requires-real-coders-these-days","status":"publish","type":"post","link":"http:\/\/10kdev.net\/?p=1898","title":{"rendered":"AI with Legacy Code Requires Real Coders These Days"},"content":{"rendered":"\n<p><\/p>\n\n\n\n<p>Here&#8217;s a good use case as to why developers are needed to monitor code generated by AI.<\/p>\n\n\n\n<p>Using Amazon Q, I set up a project that is a 100% unit test project to be 100% AI generated, for another barely tested project.  (More about this later; was not a smooth creation.) This is grails &#8212; and I wanted to use its modularity to separate out the tests to isolate them as I finish them up before moving into the target project.<\/p>\n\n\n\n<p>Running a few tests, I noted the same failure &#8212; a missing property.  I dug into the classes the tests were calling and couldn&#8217;t find any reference to (in this case) log property.<\/p>\n\n\n\n<p>Below is my querying of Q:<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><a href=\"http:\/\/10kdev.net\/wp-content\/uploads\/2025\/11\/image-1.png\"><img decoding=\"async\" loading=\"lazy\" width=\"1024\" height=\"441\" src=\"http:\/\/10kdev.net\/wp-content\/uploads\/2025\/11\/image-1-1024x441.png\" alt=\"\" class=\"wp-image-1900\" srcset=\"http:\/\/10kdev.net\/wp-content\/uploads\/2025\/11\/image-1-1024x441.png 1024w, http:\/\/10kdev.net\/wp-content\/uploads\/2025\/11\/image-1-300x129.png 300w, http:\/\/10kdev.net\/wp-content\/uploads\/2025\/11\/image-1-768x331.png 768w, http:\/\/10kdev.net\/wp-content\/uploads\/2025\/11\/image-1.png 1191w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/a><\/figure>\n\n\n\n<p>Basically Q had made an assumption about the project setup, didn&#8217;t even check the class for reference of an annotation, but still made the test.<\/p>\n\n\n\n<p>I&#8217;ve noticed this kind of behavior especially when I give Q a large task (create 50 test cases) vs small (create 2 test cases).  There might be something in the algorithm to save time, credits, whatever and you get incorrect extrapolations causing errors in the code.<\/p>\n\n\n\n<p>This exact reason is why a lot of my current team will not use Q on legacy code: it might do a refactor if you aren&#8217;t paying attention, it might produce bogus code, or might make a code assumption.  <\/p>\n\n\n\n<blockquote class=\"wp-block-quote\">\n<p><strong>The amount of time to figure out and correct AI issues in code can easily exceed just writing the<\/strong> <strong>code<\/strong> <strong>itself.<\/strong><\/p>\n\n\n\n<p>If any more proof needed that real coders are different than AI code generator, this is SonarQube&#8217;s current price list:<\/p>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/10kdev.net\/wp-content\/uploads\/2025\/11\/image-2.png\"><img decoding=\"async\" loading=\"lazy\" width=\"828\" height=\"757\" src=\"http:\/\/10kdev.net\/wp-content\/uploads\/2025\/11\/image-2.png\" alt=\"\" class=\"wp-image-1903\" srcset=\"http:\/\/10kdev.net\/wp-content\/uploads\/2025\/11\/image-2.png 828w, http:\/\/10kdev.net\/wp-content\/uploads\/2025\/11\/image-2-300x274.png 300w, http:\/\/10kdev.net\/wp-content\/uploads\/2025\/11\/image-2-768x702.png 768w\" sizes=\"(max-width: 828px) 100vw, 828px\" \/><\/a><\/figure>\n<\/blockquote>\n\n\n\n<figure class=\"wp-block-image size-full\"><a href=\"http:\/\/10kdev.net\/wp-content\/uploads\/2025\/11\/image-3.png\"><img decoding=\"async\" loading=\"lazy\" width=\"362\" height=\"105\" src=\"http:\/\/10kdev.net\/wp-content\/uploads\/2025\/11\/image-3.png\" alt=\"\" class=\"wp-image-1904\" srcset=\"http:\/\/10kdev.net\/wp-content\/uploads\/2025\/11\/image-3.png 362w, http:\/\/10kdev.net\/wp-content\/uploads\/2025\/11\/image-3-300x87.png 300w\" sizes=\"(max-width: 362px) 100vw, 362px\" \/><\/a><\/figure>\n\n\n\n<p>Note that there are AI code options: detect AI code, AI code assurance, and AI code fixing.  The code assurance has me doubtful in that popup description, but I&#8217;ll test it at some point.  I think part of the detection happens when commits are marked by say a GitHub Copilot or Q generator, which would be easier than detecting from code.<\/p>\n\n\n\n<p>But the point being &#8212; the difference between human generated code and AI generated code is being recognized by the industry.<\/p>\n\n\n\n<p>Also, kind of chuckling &#8212; if you&#8217;ve ever  used IntelliJ&#8217;s markers @formatter:off\/@formatter:on (usually for SQL in my experience), we&#8217;ll probably start seeing more markups to indicate areas of legacy, human, and AI code areas.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Here&#8217;s a good use case as to why developers are needed to monitor code generated by AI. Using Amazon Q, I set up a project that is a 100% unit test project to be 100% AI generated, for another barely tested project. (More about this later; was not a smooth creation.) This is grails &#8212; [&hellip;]<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[97],"tags":[],"_links":{"self":[{"href":"http:\/\/10kdev.net\/index.php?rest_route=\/wp\/v2\/posts\/1898"}],"collection":[{"href":"http:\/\/10kdev.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/10kdev.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/10kdev.net\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/10kdev.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=1898"}],"version-history":[{"count":3,"href":"http:\/\/10kdev.net\/index.php?rest_route=\/wp\/v2\/posts\/1898\/revisions"}],"predecessor-version":[{"id":1906,"href":"http:\/\/10kdev.net\/index.php?rest_route=\/wp\/v2\/posts\/1898\/revisions\/1906"}],"wp:attachment":[{"href":"http:\/\/10kdev.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=1898"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/10kdev.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=1898"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/10kdev.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=1898"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}