Great International Developer Summit (GIDS)

Power and Perils of Vibe Coding - Venkat Subramaniam

56:20 · 21 Apr 2026 – 24 Apr 2026 · YouTube

About this talk

This talk explores the challenges of using AI in software development, emphasizing the importance of maintaining code quality despite the speed advantage that AI can provide. The speaker discusses the historical context of measuring programmer productivity, debunking the myth that faster typing equates to better programming. Through anecdotes and live coding examples, the speaker illustrates how AI-generated code can produce a large volume but often lacks in quality, stressing that programmers must actively review and refine the code produced by AI. The session also covers essential software design principles, such as separation of concerns and the importance of maintaining good coding practices. Ultimately, the speaker advocates for a responsible approach to AI in coding, highlighting the need for critical thinking and regular code reviews to ensure reliability and maintainability.

Full transcript

technical people, right? Who don't write code or may not have written code for a long time, may sit there and think, "Oh my gosh, you can go really fast now. So, we don't need to do much of things. So, they may come to us and say, 'Faster, faster, faster.'" Well, the problem is as a technical person, if you don't have enough to communicate back to them and

say, "Hang on a second. It this is not just about speed." And that's one thing I always emphasize to people. If you drive at breakneck speed, you probably will break your neck. So, keep that in mind. So, when people say go faster, there's consequences to going faster. So, there's no point going fast over the cliff. I was in I was visiting a mountain. We were on the

top of the mountain and the driver said something I would never forget, right? These are phrases that's always great. And the driver on the top of the mountain said, "It's going to take us 2 hours to get down or it will take you 20 seconds to get down. But the choice is yours," he said. Now, that's exactly what this is, right? So, it can take you some

time you go through this or you can go really fast, but the result may not be what you really want. Something to really think about. So, having said that, we are dealing with this deterministic versus non-deterministic in terms of how we proceed. Now, one of the things to keep in mind is the following. It's not about writing code. Let's think about this for a minute. This is

nothing new. But this is something we've been talking for a long time. So, way back in time, I'm talking about 20 years ago, 25 years ago, we were struggling to understand how to measure productivity of programmers. How do you say a programmer is more productive? Well, we can all agree you don't measure the productivity of a programmer at the speed at which they can type. That we

know, right? You don't look at two programmers and say, "This dude can type faster than this dude, so that's a better programmer." Now, keep in mind, you should have noticed me, you've seen me type. I can type really fast. Or as my wife often reminds me, she says, "Venkat, you can type really fast backspaces." So, that doesn't mean I'm very productive, right? I can type and I

have to backspace. I have to type backspace. So, it's not about typing speed. You are not hiring a typist. And there's a story back in time Apple trying to understand how to measure productivity of programmers, and they had, as a lot of organizations go through, at at one point they had a metric that required programmers to report the number of lines of code they wrote. We We

all can know this is stupid, right? But organizations always do stupid things and then they learn from it. So, they wanted people to are writing. And one of the Apple engineers reported that that week he wrote minus 40,000 lines of code because he found a way to remove, delete code, and so his report was, "I wrote minus 40,000 lines of code." The point is, it's not about

how much code you're writing. So, as we know, you never report your productivity by saying, "Let me show you how much code I wrote today." That's a bit dangerous. A A A A novice writes a lot of code. An expert figures out how to not write code and still get the software running, right? You want to be minimalistic. So, if that is true, and it is, then

why would you say, "Oh my gosh, look at this. AI wrote all this code for me." That's not something to celebrate. That is something to be really worried about. Because if using AI you can create a lot of code, is that what you really want? And I will be blunt about it. AI is good about vomiting code. That's what it does. And what happens? You become the

person who has to clean up the vomit eventually. And that's not a good job to be, right? We got to rewrite our description. Hey, what's your title? I'm the janitor of the, you know, AI-generated vomit. Maybe that's what we should write in our resume, right? That you We're a person who cleans up behind this mess. So, yes, it's going to make you go but we need to

understand the consequences of that. Let's talk about that with a little example. So, before we dive in, what are the things you need to know about? The first thing you need to know about is what is good quality versus bad quality. Why does this matter? Because if if something is good quality, you can maintain it. If something is of bad quality, it's harder to maintain it. So,

in general, if somebody is creating a really messy code, you normally work with the person, maybe you educate them a little bit, you train them a little bit, so that they don't create as much bad code, and they move towards creating better quality code. Well, the problem is if you bring somebody who is not knowledgeable and you now tell them use AI to generate code, they don't

have the ability to measure the quality of the code being generated. In which case, now they have helped you to create even worse code over time. Maybe there's a time in the distant future, right? This can happen. Maybe in a time in a distant future, you don't have to look at code at all. Raise your hand if you read binaries. Not a single person, right? We don't

read binary. Well, compilers generate binary and we don't have to read it. But, compilers are deterministic. That's the first thing. Compilers have taken the time to get really good. AI maybe gets there one day. And if it does get there one day, we don't have to worry about any of these. AI can take your description, generate your binary, you never have to look at it. And then

your description changes, your specification changes, you regenerate your binary and you're done. We're not there yet. So, in the interim, we do have to look at the code that AI is generating. Which means you probably have to maintain it. So, what do we do to get the the most out of it? Let's talk about it and see what are the things we can do to get better

at it. So, let's talk about live coding here. And and to live code, you can use different tools and I'm not here to tell you what tool to use. It's entirely up to you what kind of tools you want to use. But, I'm going to go here to a directory and and play with a few different examples of live coding and then see where we can go.

So, I really don't have anything in this directory, right? It's pretty empty Uh, you can see. So, I'm going to create a little example of a game of Wordle, right? So, I'm going to describe a few things I want to create and see what it can do to create this application. So, let's create a directory. We'll call it Wordle and I want to provide a bit of

a description as to what I want to create in this case. So, let's go over to the directory where I have this site a file. So, let's call this specification. Let's take a look at this. So, I wrote a little bit of a description here, if you will. So, I've said, "The game of Wordle is a single-player game. The program selects a word of length five and

lets the user guess it. The game starts with a grid Anybody who plays Wordle here?" Oh, wow, that's quite a crowd. That's great. So, so, that's my ritual every day, right? Play Wordle one you know, at the end of the day just to kind of, you know, see how you know, I can still be awake at the you know, late time of the day. So, the game

starts with a grid of six rows where each row contains five boxes, one per letter of the word the user enters. If the user guesses a letter in the right direction in the right position, a color code the letters background as green. If the letter is present but in the wrong position, color code the background as yellow. Otherwise, gray for the letters background. Somebody describing what this

is supposed to do. If a user enters an incorrect spelling, do not consider the word. You can check if the spelling of the word is correct using the service at that particular location. It takes the word as a guess as a query string, for example, and then the URL where you can go do the spell check. Allow the user to play at most six times. If If

user wins the first time, display wood. If it is, you know, second time, a third time, blah blah blah. So, we're describing more of those messages. And select a random word from a file named words.txt. Create 100 random five-letter words in the file for a starter, and then make the application a desktop application written using Java and JavaFX. You can change the technology whatever you want to

do, right? So, that's pretty much the description. So, I wrote a little bit of build. And so, how do you get to this point? Some people say you can use AI to write those descriptions. Writing those descriptions. Go for it. Knock yourselves out if you want to, right? So, you can interact with AI, give it enough information, you can ask it to generate specifications. You can even

ask it to say, "I'm planning on using this AI tool to do my coding. Can you generate specifications that will help to drive that?" And you may get a little bit of more thorough specification you can eventually provide to the tool. So, so right there is a specification I have in here, as you can see. And I'm going to just move this into the Wordle directory. Let's

go here. And and I'm going to simply use Claude here for now. And and so, what am I going to say to Claude? So, I'm going to say to Claude, you know, "Create a program for the specification in you know, in the specification.txt, right?" So, so I'm asking it to I'm going to make sure the file name is correct. My memory is pretty weak. As you can

see in here, so I want to see if I gave that name properly. So, under the Wordle, yeah, specification.txt. That's what I've called it. Great. So, create a program for the application and right? So, so I'm going to provide that and ask it to execute it. So, that way I don't have to be feeding that into the prompt here. We got a file, ask it to create

the application. if you ask me what is it going to produce? good heavens, I have no clue because it's non-deterministic, right? It depends on the cloud cover how it's going to do, right? So, it could produce just about anything it's going to produce. I cannot tell you for a guarantee. We're going to take a look at it, right? And see what it does and based on that

we can, you know, see where we want to go with it. So, it's going to produce that particular output. We'll come back and talk about more things we can do on top of it. We're just taking a look at creating the code for that specification. So, one of the first things to think about is a common complaint I hear from people today is that AI is too

slow. Now, we're forgetting the fact that it's writing code within minutes that we take weeks to write, but yet we find it's too slow. That's just us, right? We are impatient set of humans. Anything that takes a little bit of time, we are like, "Oh my gosh, I got to go get a cup of coffee right now, right?" So, we are that impatient about it. Sure, it's

a little Sometimes it takes a minute, sometimes it takes 5 minutes, sometimes it could take 10 minutes. Who knows how it's how long it's going to take to create it, but eventually it's going to come back and produce things for you and show what it's creating. Now, once it creates the code, um you want to be able to execute the code and there are certain assumptions it's

going to make. Um if you don't say what language to use, a lot of AI tools assume it's Python only because a lot of people using the tool we're creating Python code. So, it's just based on what it's doing. But, having said that, keep in mind AI is an inference engine. It's not an intelligence engine. So, it's purely an inference. So, what does it do? It has

looked at a lot of code and a lot of data, and it infers based on that and creates stuff based on that inference. So, as a as a smart person, you will apply your wisdom and knowledge together. Uh AI has no wisdom in that context. It just purely looks at all this data and creates stuff based on and produces things. That's all it's going to do. This

is taking a little longer here. Maybe the internet connection is a little slower right now than than other times, but but it's running for 2 minutes 43 seconds already and still thinking. Now, let me talk about some of the observations I have made in the past going through this route. I'm going to let this finish, we'll we'll take a look at it. But, some of the observations

I've looked at in the past is uh people could immediately blame you saying, "Well, you didn't do enough." And and maybe so, right? But, what did I do? I just gave a minimum description for the product and said, "Create it." I told it what language I want to use and and what you know, library to use. Um you could also go through and ask the question, "What

would be a good language to create for this? What kind of application would be create useful to create for this?" You could be asking those questions. But, what I've observed in the past is that if you don't guide it towards what it should create, it doesn't always take the time to create good quality code. Now, let's step back for something fundamental, right? I'm not going to put

you on the spot, but but I just want to kind of think a uh beyond this. We asked it to create um Java application using Java effects. Only bad answers, not good answers from you, right? I want bad answers from you. What would be a terrible way to write this application? Only bad answers. Don't tell me what's good, tell me what's bad. Thank you. A single file.

Who said that? Thank you. A single file, right? Just one file. What does that one file contain? Everything. Right? It contains everything. What's What's wrong with that single file? What's good about single file? It's a single file. You open one place and everything is there. What's wrong with it? You open a file and everything is there, right? So, a change is hard, right? What would you say

if somebody is mixing It's ready. Let's go ask it to generate I'm just say go for it. So, what would mixes GUI and logic together in one place? What would you say? Is that a good code or a bad code? A bad code, right? What is the concern? Thank you. What is the concern? Why is it bad? Oh, is that Thank you. No separation of concern. These

are the fundamentals of software development, isn't it? So, you talk about separation of concern. It is not cohesive. It's got too much coupling. And when you have to make a change, you have to spend more time making that change. You could say, but what if we make AI make the change? Great. But when AI makes the change, if it doesn't work, who's going to look at it?

So, until AI gets mature enough, we have to never look at it. It's still our responsibility to look at it, right? So, So, essentially, this is something for us to really think about as well. How would we approach it becomes a concern. Now, in this case, I didn't ask it to create a, you know, build a tool. Uh it's probably going to create and use a build

tool. We'll see what it does. You can see it created a file with 100 words that I asked it to create as well. So, you can see 19 more lines. All these words are, uh you know, random five-letter words it's creating. So, it's following the instructions we give. And when it's done, right, we may look at it and say, "Yep, it is really beautiful." or whatever that

we may identify and we can look at. So, while it's creating that, let's kind of sneak in and take a look at it, right? So, if I look at the source file, let's take a look at what it's creating right in So, uh it's still working, In all fairness, it is still working. Uh but, uh it says, "Do you want to proceed?" Let's go Oh, it's See,

it created a Maven file as well. And uh you know, it says, "Cooking." I'm not a fan of the word cooking because I don't know if it's going to taste well if it's cooking, right? So, that's kind of scary. But anyway, it finishes all of that. It tells you a few things it's creating. Obviously, take the time to read it. And and it's done. But let's take

a look at what it created, right? So, if I go back here and and take a what's being created, let's let's take a look at uh this one here. And uh here is the source. Under the source, you have Java and you can see that file. So, how many files did it create? One file. Did somebody say it's bad if it creates one file? So, that's what

it did, right? And of course, people will tell you, "Well, it's your fault because you didn't tell it what to do." Uh but, if you hire a person, and if that person creates one file, what would you do with that person? I would walk with that person to the parking lot, Because this is a basic education. Do not create one file that contains everything. Would you agree?

So, now you have to tell it, "Oh, by the way, don't create one file. Apply separation of concern." And to me, like, duh, that's 101. Why would you do it any other way, right? So, that's something to think about. But, here is the problem. If you write code, and and if you don't have the ability to think about separation of concern, and you're this person who's like,

"Faster. I all care about is speed." Then you probably will take the garbage it produces and keep moving, and then leave behind something that others will have a hard time understanding, right? Anyway, we'll come back to that in just a minute. So, let's go back here and say Maven, and in this case, JavaFX run, I'm going to ask it to So, it's firing up. That's a good

news. It's It's building the code, and it's running it. And hey, look at that. That's That's the Wordle, right? That's pretty impressive, you could say, right? So, I'm going to say, uh candy, and ask it to execute it, and it says, "A is in the wrong position, and the other letters don't even exist over here, right? So, we could try uh different things in here. So, what

if I try a different word? I can ask it, and it says A is in the right position, the other things are not. So, we'll we'll try uh avert, right? We'll try another word and see where it goes. And oh, that's still there. But, it's doing something. That's good. What if I do that and ask it to run? And not a valid word. So, the last time

I tried, it didn't do So, the last time I tried, it had a bug in it. So, if I enter a wrong spelling, it would still go through the validation. And that was a bug in the previous version. This time, it didn't have the bug. But, that again is the inconsistency, right? Nondeterminism. So, I can't run this code twice and show you the exact same problems it

has. One day, it creates code with bugs. Another Another day, it creates code with a different bug. We haven't just discovered it yet. And And that is one of the problems to think about. But, the question right now is I'm going to just go ahead and turn off the Wi-Fi right now. And And I I I know turned it off. I'm going to go back here and

enter some text over here, right? Let's go ahead and enter it. So, that one, and I hit the return. What happened? It's like, "Oh, you don't have an inter- internet connection." That's a good spelling, then. That's a feature, right? I mean, you call it a feature, you're That's the easiest way to fix it. Is there a bug? Oh, it's a feature, right? So, that's a bug. And

now we have to, you know, debug that. Or you can tell AI, "Hey, if there's no internet connection, then go back and tell me that there's no connection rather than just accepting it as a is as a you know right response. But we still have to think through those things and say, "Hmm, what is it going to do?" Like I said the last time it was giving

me wrong spelling. It would just go through and this time it doesn't check for connectivity, right? So if I turned off the connection, it didn't tell me, "Hey, you don't have connectivity so I'm not able to fulfill this request." And it didn't tell me that there's an issue with it. So that is something to think about. You have to go through it, right? Now, having said that,

let's go back here and look at the code it generated. So when you look at the code it generated, what does this have? It contains everything as you can see. So when you look at this function, I want you to look at this function. Are you ready? So here we go. What do you think of that function? It's great quality, ship it. Is that what you're going

to say? Too long. So one of the principles I like to follow is the SLAP principle. SLAP stands for single level of abstraction. So I don't want functions to be small or big. I want functions to focus on one detail, one level of abstraction. Why? Because that makes it easier to maintain the code as well. So what should we do if you're going to be writing these?

Second thing, what do you think of single letter variable names? And suddenly the code may end up using too many single letter variables like R and C and it may become really confusing as time goes on as well. And so, in this case, if you don't know anything about JavaFX, and if you have to read this code and maintain it, how hard or easy it's going to

be? Some there are some good things also, right? Let's give credit where it is needed. It is using the pattern matching switch. Hey, that's pretty nice. It's is using the more modern feature of the language. I like that. Uh except that it's not uh you know, foo, maybe I mistyped it in my specification rather than few a a few, but essentially you can kind of go through

that. And what about the code that's going to talk to the uh web you know, web um uh URL for spelling? So, you can see how it it is embedded within but what happens if it couldn't uh return true, fail open if network is unavailable? How convenient. So, it just decided, ah, if you're not able to communicate, it's going to be true. Uh maybe it should have

asked you, right? Hey, what should I do if the communication is not there? Uh is it uh better to fail as a as a incorrect spelling, pop up a error message, or to accept true? What's a safe default? So, you got to do a bit more debugging as So, what can we do uh to move forward from here? So, it looked at the code that God generated,

but we can we have to do better. So, what can we do to fix it? So, couple of things. Let's go back here to the code. And one of the things I would recommend uh while you're dealing with the code like this you want to commit more frequently. So, if you commit something, you it's easier for you to do a diff, and you can see what the

differences are and you can say wait this is what you're changing is that acceptable so that becomes a bit easier to see the changes making rather than saying well it made a bunch of change it made a bunch of change again I have no clue what it did you will get a bit more control if you're able to do it so the first recommendation I have is

if you're white coding take the time to review what it is generating if you don't look at the code and you're just like gosh it created something I'm good I'm going to keep moving forward you're setting your yourself for a bigger failure when it doesn't work how do you deal with especially if you put this out and your users are saying well duh if the connectivity is

not there it is doing this why would you that reflects on you because your users are not going to be sympathetic to you because you're using AI in fact it's quite the opposite right gosh you're using AI but can't you just take the time to figure out what it's doing so at the end of the day if you're using AI or not you still are responsible for

what you create so my question always is would you sign your name on this and and be proud about what you develop right so imagine always that the users of your product know where you are living they know your street address and the apartment number and and imagine they know where to find you and write code like they know and and that is something to think about

right because if you don't care about it then we no longer are professionals we're just bunch of people throwing things together we don't care about what we do I don't think we can't come this far to lose our professionalism that way right something okay so we we created that I'm going to go back here and I'm going to save this away just for a minute for our

purpose. So, so I'm going to go back here and we'll say this is step one, right? So, step one, I'm going to just move the Wordle to a step one. So, let's go to the Wordle again and what am I going to do? I'm going to go to Claude and say, you know, uh in the you know, code uh that you generated So, we'll say generated. Uh

we'll say there is a network uh failure, you could say, right? Uh to talk to the uh spell check service, then pop up a message uh you know, uh instead of assuming the uh is correct, right? So, you can ask it to make the changes. But, once you know where the problem is, you could ask it to go back and modify the you know, code and provide

you a a a a change, in effect. So, this is where again I would say, right? Uh the amazing power of the tool is where it's able to go through the code, analyze it, figure out what the change is. So, it's far from being perfect, but it's enormously powerful. And this is the ambivalence you have to keep fighting back and forth is that it's it's powerful, but

not very uh you know, deterministic and predictable. So, what did it do? Notice it says check spelling is false and then it says if there's a network error, then show a temporary message and return. And then if it's invalid, not a valid word, and return. So, it's able to implement that feature in there and I'm going to go ahead and save that away, and then we can

run it and see if that does that properly, and we can, you know, examine it, but at least knowing what it's doing, you could you could provide that and get some a little bit more help in doing it. So, so what does that mean? Uh what it means is you have to take the time to uh check these and verify, that becomes your uh responsibility, if you

will. Uh let's take a look at this real quick, uh and it goes through that, and and let's take a look at what it did, so let's go ahead and fire it up right now, and and run, in this case, the uh code, and uh going back here, uh let's give it a try. Let's Let's see if it comes up. Okay, here we are. So, enter that,

and that's a wrong spelling. It It better tell us not a valid word. That's pretty good. And I turn off the Wi-Fi, and I'm going to go back here and try that again, and hit return. Network error, please try again. So, yeah, not bad, right? So, we found the problem, we asked it to fix it, and and it's telling us what's happening, so that's that's good. You

can review the code again, and take a look at it, and and see if it's able to do the job. But, you can say, "But, I need a lot better than this, right?" So, what can we do? Let me save this away as step two, and uh go ahead and put the Wordle in here in here into step two, we'll come back to that. So, how can

we improve this journey a lot better? Uh let's step back and see what we can do, right? So, here is my step three I want to implement to get better at it. So, one of the first things you want to do when you work with AI, you want to be able to teach it a few things that are a way you want confirm to your application standards.

Uh, this is evolving as we speak. So, a few months ago, if you're using Copilot, you could create a file uh, which was called as Copilot-instructions.md. So, the Copilot-instructions.md is a file that would be read by Copilot and it would follow your recommendations in generating code. Now, of course, things change change quite often in this field right now as we know. Now, we talk about skills. So,

what's a skill? Uh, a skill can be uh, different uh, recommendations and different conventions you like to follow for various scenarios. So, you can create very many different number of skills. There are global skills and there are local skills. A global skill is what you apply for any project you work on. A local skill is what you apply for that specific project. Depending on which which project

you are, you know, working on, you may have a variation. For example, in my case, I'm a consultant, so I work with multiple clients and when I work with one client, I may use a certain skill which is very specific to what their expectations are. When I switch to a different project or a different client, I may use a different skill as well. One of the things

I like about this is the skills are entered into a a special directory structure, but that is committed into your Git repository. So, what's the benefit? The benefit is once you commit to the Git repository, anybody on your team gets access to the same files. So, this gives a nice way for us to maintain some consistency across the project. So, I um, you know, edit a skill

file, I commit the file into the Git repository, you do a pull, well, when you generate code or go back and alter the code, it's going to use those skills that's been created, and we as a team agree upon that skill, and we can maintain it. But, here's something you can do also in the skill files, you can also create a skill file that is specific to

you as well. Some Some of the times you may be really picky about a certain way, others may not care about it. So, you can write a skill file says, you know, if I am this particular new user, then I want you to do these extra things for me, and in that case it may apply that only for you, but not for others. So, you can create

a few things. So, what I'm going to do here in this is I'm going to create a Wordle directory, as you can imagine. I'm in the Wordle directory. I'm going to bring in here the step, let's say, two Wordle specification. So, I got the specification file, but I'm going to create right here a dot cloud directory. So, within the cloud directory, I'm going to create a directory

called skills, and within the skills, I'm going to say a coding, let's say, uh conventions, right? Or we can say, you know, a clean a code conventions, right? Or or practices, how about that, right? Practices dot m practices is the directory. Under that, we we can create a file. So, I just created a directory called clean code practices. And under this directory dot cloud, you know, I

have to tell you that I'm not a fan of a dot file uh directory name, because when you do a LS, it doesn't show. So, it's easy to miss. But, on the other hand, if you're looking for a skill file, you know it's going to be in a dot directory, and you can go find it. Oh, a real quick note. Uh if you're using Copilot, uh Copilot

not only uses Copilot skills, they also look for Claude skills as well. So, if you're doing Claude and you're doing Copilot, the good news is, you can just write the Claude uh skill files, and Copilot also uses that. So, that's a little bit of a benefit, if you So, here I'm going to say uh skill.md. So, you can create multiple directories, and in these directories, you can

put your skill file that you want to use, uh and you can create multiple of these, if you will. So, what do I want to say in this skill file? So, in the skill file, I'm going to say a name, and this name is going to be uh this particular name that we created, right, under the Claude directory. Clean code practices is the name that you're going

to provide for me. Is the name you're going to provide. So, so that's going to be that that particular name that you're going to provide. That's my name of this file. Description. What are we going to say here? Some description you want to create, right? Use these uh practices when uh generating uh you know, Java code, or whatever that you want to specify. That makes sense. You

can specify those in here. So, then you can provide some uh instructions for it to use. So, what are the instructions? So, we can say follow these uh you know, steps when you could specify uh what it needs to do. So, when, you know, writing code, right? So, so when uh writing uh Java code, uh you know, uh and so, you can say, for example, you could

specify certain details, right? So, uh you know, you care about uh code quality and follow the uh solid principles. And I would be specific here. Uh avoid mutation where possible, right? I could say, uh do not use single You could say uh letter, right? Uh variable, uh you could say uh names except for uh well-known uh loop uh index, right? Uh in indices. Uh and then you

could specify maybe here uh give uh good names for parameters, uh even for uh lambda expression uh parameters. Because if you don't say it, you know, what the name is going to be? X, right? So, because that's what most people did, it's going to follow the same garbage. That's what That's what it's going to do. And then you can say, avoid long functions or methods. Uh you

know, instead, apply the SLAP, uh you know, or decompose method pattern. So, you can specify a certain number of things. Uh you know, follow, uh you know, good uh you could separation of concern. Uh keep the logic uh separated from GUI. Uh but I would say this is a set of things you can start really writing. So, one of the things I often do is I see

AI do something absolutely stupid. And immediately my skill gets updated, right? I'm like, I saw you do that. Don't do it anymore. So, you can keep adding those. Uh if you were in the keynote earlier, um that um Cassandra and uh Steven were giving, you probably noticed uh she showed two pieces of code, if you will. One was doing sorted and calling the function. The other was

saying object.sorted. Does anyone know the difference between the two? Why I would rather do the first and not the second in Python? Can you Can you guess? That's right. The sorted function follows immutability. The sorted function on the object mutates the object. This is one of the things I care about a lot when I look at code. And often when I do code reviews, I tell my

programmers, "Why are you mutating that collection? Don't use the sort on it. Use the sorted function instead." These are subtle things, but once you identify this, you can put that in your skill and say, "Favor immutability, right?" So, avoid mutation where possible. I would modify that to saying over here, pardon me. I would say, "Favor immutability." Uh you know, where uh possible, right? So, so you can

start augmenting these kinds of recommendations. The benefit here is your code generator would then fall more for the sorted method than call the sort method because you told it not to do. So, so these are the things. Like I said, uh anytime I find things that are not pleasant, I immediately will go and add a skill to say, "Don't do this because it makes me angry, right?"

So, so basically to move it towards a direction Excuse me, that you feel is is much better uh for it to follow. So, we we did that. So, let's go back here. We have the specification and we have the clean code uh practices here as well. So, now let's go to Claude right now. And in here, if you notice, you we are asking for all the skills.

You know, it can load it up automatically. And if it doesn't, that's fine. Just ask it to pull it in into the context. So, it says, uh got it for Java code in this session. I'll follow these practices. Pardon me. Uh solid principle throughout immutability preferred over mutation, blah blah blah. It is just going through that, right? So, now I say, create a program for the given

in the uh specification.txt file. So, so now that I wrote that skill, I'm asking it to go generate that. Uh 2 hours later, this should be done, and we can take a look at it again, right? But the point really is, take the time to guide it. But, let's get back for a minute. You can use AI, you still need to be knowledgeable. Right? So, if people

are telling you, "Ooh, I can use AI. I don't need to know anything anymore." My recommendation, run as fast as you can away from them. You don't want to be in their blast radius. That's the key. Because if people think that they don't have to think anymore, that's dangerous. One of the things I ask you to think about really well. People come to me and say, "You

don't understand, Venkat. We can use AI and create stuff so fast, we no longer need to know anything." My question I ask people is one single thing. And I want to really take the time to answer this one question. And the question I want you to ask and the question I want you to ask your team, your company, and everybody involved is one single question. And that

is, what is the cost of failure? And I want this question to be answered before we do anything more. What's the If what I do has little consequence in terms of failure, if the cost is minimum, it doesn't matter. Because let's say I'm creating a little There's no money involved and it's just a fun game. And if the game doesn't work really well, what was your cost?

People are going to curse. So, the cost is be a few more curses, right? People are like, "This fool wrote this. It doesn't even work properly." if the failure is going to result in a financial loss, what what do you what do you do about? What if it is going to ship the wrong product to the wrong address? What is the cost of that failure? What if

it you can remove that because I'm a professional. I know timekeeping. Thank you. So, essentially, the idea here is if you are creating something and if the consequence of that is it it charges people the wrong money for their interest mortgage rate. What is going to be the consequence? So, I want to ask the question, what's the cost of failure? So, the cost of failure is more,

you need to be more rigor be more rigorous. If the cost of failure is less, you could be less rigorous. So, it's important to really ask the question, what's the cost of failure? So, if I'm just absolutely just coding things and moving forward, but I don't take the time to answer that question, what's the cost of failure, then I could be setting the organization, the team for

a bigger failure, and that could be very expensive later on. I'll give you an example of this. I had a client who called me up and said, "Uh we need to make these changes. Can you come and help us?" And I'm I'm not exaggerating to you. This is a true story. And I asked them, "Can you tell me what how much money are you spending on this?"

And and the response was, "Oh, I can tell you that easily. We're spending a million dollars a year on this." And I told them, "With all respect, don't change anything." And they're like, "Are you serious?" I said, "I'm being respectful here, so don't get me wrong. But I'm walking on the road, and I open my wallet, and a dollar bill flies away, I'm not going to run

behind it. Because the value of a dollar is very little for me these days in in where I am in my life. My dollar bill is your million dollar for a company as large as yours. So, just like I won't run behind a dollar, you don't have to run behind a million. Don't worry about it. Just waste a million, be happy, don't change anything, you're good." And

the person listening said, "Okay, you almost convinced me. But let me tell you the real reason we want to make the change." I'm like, "Yeah, that's great. Now we can talk about what it is." And they said they have a lawsuit pending on them. The CEO of the company is on their neck asking them to fix things. And the problem right now is not money anymore, it's

their reputation. And so, that is the cost of failure for them. The cost of failure of for them was not a million dollars, it was the reputation of their company because they've been dragged into the court of law. So, the question is you need to really understand what's the cost of failure. So, going back to this, you you know, don't ask again for this blah blah blah,

let me just say go finish it. And let's see what it is that it created this time in terms of what it generated, right? So, let's see if it did any better now that we told it the do's and don'ts and if it's able to create a better set of code. But the moral of the story is that you need to really be able to direct it

because that's your responsibility and you need to be able to maintain these things as well. Okay. So, let's quickly take a look at it and and see what it's producing and and and it's walking through and oh, there's an Again, I'm not saying this is great. I'm not saying this is bad, but it's different, right? Because it's creating an interface and it's doing it. So, one of

the things I found it to be interesting as well is that you generate the code and you can ask AI to evaluate the quality of the code it generates as well. Sometimes it's easier to use a different model for verifying, too, and that can give you a bit of a feedback. And and even the same model, it can tell you this is wrong and you're like, you

know it's wrong, why did you create it? Well, that's because it's like two parts of the system running through it and and it depends on what it what's creating it, right? So, if I go back here and take a look at what was created this time around, let's see what it did and you can see here uh I'm not again saying this is better or worse, but

that's a lot of file it created and you can see a word selector. It separated the UI into two separate files, so there's a grid pane uh with a Wordle grid and you can see that being created right there. You can evaluate that. You can see a letter box, which is a label. Those are the parts of the UI, a word selector, a word controller, a spell

checker, and a message provider, and a letter. So, what did I learn from this exercise? I learned that my skill has to evolve again, right? So, I'm going to go back to the skills and in this time I'm going to say, uh, you know, keep the design uh, design, uh, you could say minimalistic, right? Uh, while, uh, you know, keeping good separation of concern. So, it doesn't

mean, uh, it's got to create a hundred files. So, that's something you need to ask it to balance out. And then you can reiterate it over it and and and deal Maybe one more thing you need to really do and that's also critical. Right? Uh, when generating code, you know, this is something I would say that I don't need to say, but you do. But in all

fairness, this is also what something you don't need to tell programmers, but you often have to do, right? It's only a fair game. So, when generating code, uh, you also, uh, write a unit test. You could say, write unit tests, uh, using JUnit 6. Uh, you know, also, uh, create automated uh, integration, uh, you could say, right? Uh, tests, uh, where possible. So, you can include some

of those recommendations as well. And and you're like, gosh, why would you create code without any test? So, go ahead and create those tests, but don't assume those tests are going to be good. You still have to review them as well, so that you know that those are of good quality and you can create them. But But the essence here really is because you are knowledgeable, you

are able to create better code with AI compared to they're still using AI to generate code. I think that's where the distinction is. So, when somebody tells you that they can create code faster, the answer is is it true though? So, iterate over it. Ask it to re-evaluate your design. Ask it to comment on the quality of design. Let's Let's go back here for a minute, right?

uh Claude, you know, uh can you uh you know, comment on the quality of the uh of the code in this project and suggest improvements to make. So, you can You may have certain ideas already. That's great. Jot down your ideas on a piece of paper. And then go ask AI to evaluate the quality and tell what can be improved. So, you can see if your ideas

match with what AI says. You may notice you have certain ideas that AI doesn't uh uh say. You may also notice on fairness, AI says a few things you didn't really identify. Again, doesn't mean they are right or wrong, but these are ideas to consider, right? And you can And you can look at it. So, in this case, you can see that it's running through them. And

uh then you can look at the list of things it says and you can determine if you want to take any of those ideas. And if you feel like some of them is a good thing, you can ask it to improve that design right away. So, the benefit is you don't have to be the typist anymore. But you still have to be the person in control. So,

you're not relinquishing your control. You're relinquishing your mundane act of typing. And to me, in all honesty, the part I enjoy about programming is not the physical act of typing the code. The part of programming I enjoy is conceptualizing things, to be able to analyze, to be able to think about the quality of the design, and to think about the problem I'm I'm trying to solve, and

to see if it what I'm doing is relevant, and to bring them in as well. So, couple of things to summarize this, if you will. The first thing is we talked about about how to cope with the risk. Critical thinking is absolutely essential. This is to me one of the biggest risk. If people don't have critical thinking, we're in a dangerous situation. So, we need to keep

asking the question. So, continue to learn, and continue to excel on the foundations, and have extensive test on your code, and review every piece of code that is Use different models to review. I mentioned this earlier, right? And consider the cost of failure for what you're doing as well. And imagine the user knows your address, as I mentioned earlier. And run quality tools on your system as

And use CI to check the quality. And finally, I want to talk about a shift in what we are doing. And the shift really is the following, if you will. And the shift is that we went from, you know, a norm, a old norm, to a new norm, if you will. And that is the old norm used to be that trust, but verify the new norm don't

try trust and verify the heck out of it and and that is something that's responsibility is on us because we have to be responsible for what we deliver we cannot shift that responsibility to others hope that was useful thank you