[00:01] very hot topic in the tech space and that is a viral tweet from Uncle Bob, the writer of Clean Code and Clean Architecture, where he claims that he is no longer reading his AI-generated code. Now, I want to unpack what's behind [00:15] this, where this makes sense, and I also want to share my approach to using agents and making sure that the code I produce works and also doing this efficiently. Here's the viral tweet from Uncle Bob, now racking up close to 3 [00:30] million views, and I'm going to first just read through it. So, he says, "I'm significantly older than you." And this is actually a reply to the above use Cloud Code to help me write something, but I just don't feel [00:42] comfortable letting it edit my files. Does anybody else feel the same? If I'm understand it psychologically, if for no other reason. Started programming in 1983. Am I old?" So, to this, Uncle Bob replies, "I'm significantly older than [00:55] you. I started coding in the late '60s. My current strategy, and this is viral, is because he says, "His current strategy is to not read any of the code written by my agents. That's the only way I can take advantage of their [01:08] productivity. What I do instead is to surround the agents with extreme constraints, unit tests, Gherkin tests, QA procedures, quality metrics, mutation testing, test coverage, and a plethora of others. In the end, I have very high [01:20] because they've had to run the gauntlet of all of my constraints and tests. So, discuss, and I know this is going to is that this is where we are directionally going as software [01:34] isn't the future that they were hoping for. So, let's unpack this by writing out the core premise, which basically says that you should not be reading AI-generated code. The reason this ends up being so controversial is partly [01:49] because Uncle Bob said it. A lot of folks have pretty strong feelings for or reasons. Now, I'm not going to go into this. It's completely irrelevant for the discussion I want to have. And that is if this argument even makes sense to [02:03] begin with. Now, there's another popular YouTuber called Fio. He produced an excellent video discussing this, and he basically ranks all code on this spectrum, where at the lower end we've got, let's say, a web app with one user, [02:18] and on the high end we've got something like people die if the code is not how much of the code should you be reading depending on where you are on here, then you should definitely be reading all of your code regardless of [02:33] if it's human written or AI generated. Whereas, if you are somewhere here, then it probably doesn't even matter because if mistakes were made, the impacts are way, I don't intend to cannibalize his entire video. I'm going to actually [02:45] leave a link to it in the description below, and I encourage you to check it interesting points there. Now, where I would place my own code is somewhere on running a SaaS right now called Catabenche, which is a learning platform [02:59] for .NET developers. And although I consider the software mission-critical some parts of the platform, and I don't exactly have one user. I've actually got plenty of users, and the platform is growing daily. But still, nobody is [03:13] actually going to get hurt if the code in the platform is AI-generated and God forbid not read before being pushed to production. Now, how do you actually do this? How do you produce tons of code using AI without producing slop? So, the [03:27] against this is something along the lines of all AI-generated code is slop. Now, the reason I don't agree with this is because that all of the popular AI models that we are using right now were trained on human code. Go figure. So, [03:43] from this we could extrapolate that all human code is also slop, right? Because the AI doesn't really have an ability to produce new code. It only generates things it already saw and that were part of its training. So, I don't really [03:57] agree with this, but we can definitely say that some human-written code is slop and that might also imply that some AI-generated code is slop. How much that matters is again going to depend which type of application you are building. [04:09] Let's say that you are open-minded and that you actually want to explore this idea. How do you take AI-generated code, regardless of how it was produced, let's say cloud code or codex or any other agent that you could be using, how do [04:23] you take this code and validate that it is correct without having to actually read it? You have to do some sort of verification and fundamentally these are things that we've always done to make sure our code works correctly, right? [04:36] So, we've got things like manual QA. You open up the app, you test it and you validate that it works correctly. In fact, we've got a role called a QA engineer whose sole job is to validate that the code that you produce works [04:49] correctly or in other words, the application works as was intended when requirements were defined. Then another thing you can do is write tests and you can write a lot of this. So, we've got unit tests, we've got integration tests, [05:01] we've got architecture tests, which are really proving valuable with AI generating a lot of the code. It's now harder for the agents to break the architecture that you put in place because you can encode it behind a set [05:13] this, you can do a lot of interesting things. For example, you can have skills that tell the agent how to verify the code that it produces. You can build custom debuggers. You can add harnesses to ensure that whatever code you produce [05:27] works correctly. You can write tools to help you validate the functionality of your application. You can do mutation testing. You can also use code coverage. Although it's not a metric for code quality or correctness, it still helps [05:39] you measure how much of your application is actually covered by your tests and can focus your agents on to write more tests. Now, the really interesting thing is that, let's say you generate a given number of code measured in lines of [05:54] code, however many this is. What you now have the ability to do with AI and have the ability to do with AI and agents is generate a lot of additional code that validates the application code. So, basically, you write more code [06:07] to validate the application code that you generated, and this could be any outlined here. You can tell it to do manual QA. You can tell it to write more tests. You can generate skills that are going to verify that your code is [06:20] around the entire process of producing code that can help you verify the code as it's being generated. When you think about it, this is essentially how software engineering as an industry has functioned for many years, except [06:34] instead of using AI to generate code, we were using humans to generate the code, more or less the same. There were QA engineers, we would write tests ourselves to verify the code. And after all of that is said and done, humans [06:47] still produce slop. So, now the equation has shifted, and you as an engineer may no longer be responsible for writing, or let's say generating, the majority of the code in production code bases. And a lot of people have a problem with that [07:00] because they've centered their identity around writing code, where the code itself is only an artifact that gets you from point A to point B. I'm not saying that code isn't important, but from a business perspective, code is only one [07:13] combination of things, and essentially, whatever is the functionality that a given business provides that produces the actual value. Code is there to facilitate the value creation, and you [07:25] can still do the value creation part even without handwriting all of the code and using AI agents to produce the code. I'm going to wrap it up here, and I'd how you feel about all of this, and where you see our industry headed in the [07:39] coming years. And I promise to make a separate video discussing more in-depth we assume that agents are going to generate the majority of the code going forward. And that begs the question, what our role is going to be as [07:52] developers. And my overall opinion is that future is very bright if you are a software engineer, where I'm stressing the engineer part. If you want to see what my AI agent workflow looks like, I talked about it in-depth in this video [08:04] here, which you can take a look next. And then see how you could apply that to some side project that you're working on, or maybe even in your production this video, go ahead and smash the like [08:17] button. Thanks a lot for watching, and until next time, stay awesome.