logo

NJP

Now on Now: Discover the future of coding developer potential with GenAI

Unknown source · May 12, 2024 · video

- My name is Ashish Sethi, and I'm a director for Platform Innovation and Enablement team. And I've been a part of this mission movement of developer experience internally within ServiceNow for more than a year now. And I'm joined by my wonderful colleague. - Hello everyone, Renjith Ramachandran, principal architect from the Platform Innovation and Enablement group. - Thank you. So pretty crisp, straightforward agenda. What is developer productivity? What does it mean for us internally within ServiceNow? And then what are typical developer workflows? What do we go around? And what did we do for our developers to boost their productivity, to make their life better, and to build applications code in the platform smoother? And then of course, no session is complete without some capability dev live demos, which we are gonna show to you. So we thought hard on why this is a good problem to solve. Should we focus on this problem, or should we not focus on this problem? When we embarked on this journey, we internally thought we have, you know, dealt into customer experience, we have thought about employee experience, how to streamline that. Why not developer experience? Because all these applications and code, which is built on the platform, is driven by our developers. And internally within digital technology, which is the IT arm of ServiceNow, we have more than 400-plus developers and 50-plus instances all across. So pretty large and complex environment internally. And our surveys, which we conduct regularly, indicated that our developers were facing challenges, onboarding applications, building code on the platform, all those things were there. And then we came across a statement from McKinsey that if you have the right upskills and you provide the right tools to your developers, you can really build a world-class engineering team, power excellence. And then we went on this mission for improving developer experience around a year back. And of course, you know, you must have seen in Bill's keynote and then later on Johnson, everybody came, how we are and why we are excited about GenAI whether it's developer persona, whether it's an employee persona, whether it's an agent persona. We have gained a lot of productivity implementing these internally within ServiceNow as well. And today's session is gonna be focused on the developer persona. What does it mean and what kind of benefits or productivity gains we have seen internally. Okay, so what does developer productivity mean? Basically in simple terms, it means removing any blockers, impediments which come in the way of delivering smooth delivery of software on the platform. That is exactly what they were. And then there are multiple frameworks around it, the DORA metrics, the space framework metrics which calculate things at multiple levels. And Ranjit has worked with lot of developers on the ground. And Ranjit, you were telling me that you have some good example- - Yeah. - Of live showcasing that. - Yeah, yeah. Thanks Ashish. So whenever like my managers including Ashish asked me like why developer productivity is important, right? I try to give them some examples so they understand. So can you go to the next slide please? - Okay. - So look at Ashish, the year 2000 and 2023. So many things have changed, you know, other than other than the hair, everything has changed. So now let's go to the next slide please. Now look at this developer experience here. Like you have a code editor here in 2000, year 2000 and you have the one from 2023. Not a lot of things have changed, right? I kind of feel that the developers are left behind in all the changes that's happening. The same kind of view and same kind of, yeah, editor and things like that. So that's where the developer productivity comes in. You'll see a lot of demos in the session where we'll show you like what are the things that we have changed and what we are trying to do. So we looked at the workflows, whichever developers were going through, what goes in the day of a life of a developer, how do they start their day? What things are important for them? How do you make sure that you make them realize that this is the utmost important task for their day and other tasks can be deprioritized and handled later in the day as well. So what we did was we divided our developer experience into three streams. One is enable, which means if a developer is supporting an HRSD or a customer service management domain or a FSM domain, do they have the right skillset, right certification, right domain knowledge. But that's your enable stream. And second is your simplifi stream, which means the processes which developers follow to onboard applications, the DevOps pipeline, how their applications get promoted from one environment to another, how to streamline and smoothen that experience. And the third is equip. What kind of tools do you provide to your developers? What kind of technology they have available to write code on the platform, to build applications to make sure they can detect issues with the applications early in the cycle itself. And that is what is gonna be the focus today around the equip branch, where we'll showcase you multiple tools, tools around that. So these are the five next gen experience tool, which we're gonna be talking about today and will have demos around each of them. Gimme a show of hands. How many have you used ChatGPT to get some answers or even text to code? There you go. Many of you are. So this was our, you know, first use case and the most popular one, which we saw text to code, which means you give a simple text and then the code gets generated out of it. And we also faltered in the beginning because we launched it through multiple AI models and our initial response from our developers was not that great. They were getting confused on which LLM to use. And then we had streamlined this to now LLM which is of our own internal LLM. And after that our developers engaged better, the response time was also better and acceptance rate also went up, which means whatever code was getting generated, a lot of acceptance rate around that. And we realized that engaging with your community or stakeholders early in the cycle is important. And now LLM worked in this case because it had the ServiceNow contacts, it had, it knew what exactly business functions, what exactly methods, what script includes are already existing on the platform and it could respond accordingly. Ranjit, can we see this in action? - Yep. Sure. Alright, for the demo we'll open up a simple script here, right? So just like how we are working day to day, and if you not use this before, all you have to do is like go in and type your requirement as a comment. So in this case, let's say that you wanna write a function to query incidents for example. So you just write them in a simple text. Yeah. And wait a couple of seconds. The system will automatically trigger the prompt and it will try to generate the code for you like you see here. Alright, so it's generated the courier a lot. The feedback that we got from our developers was that, yeah, this is good, but I don't write my comments first. I write the code first and comments come next, right? So that's where the second side of it comes, where you're like, you just type in, let's say you're typing in the code just like how you do and you wait for a couple of seconds, it'll try to predict the code for you. So if you see here it is saying you okay, you probably need an encoded query here and it can be added, you know it, it'll suggest a code for you in line so you can use it, you can update it and you can move forward with your day. - And Ranjit, the auto complete. I think that is where a lot of acceptance has been there. I think you have to wait for a few seconds that is get turned automatically or something has to be done on the platform for that? - Right. In the first version of this one when we released it, you have to trigger the prompt using a shortcut. Now you can, the auto complete is available, it is not on by default. So it's a simple setting. So you download the app, set the auto complete to on, so then it starts working like this. Like you know, like seeing it here. So as we got our developers more and more engaged, we realized there are a lot of situations where our developers are not writing code from scratch every day, right? There's already a lot of existing codes, a lot of existing applications written on the platform and they are modifying it, understanding what the application does in the backend. And this gave birth to our code explain and auto description, which means that whatever code is already there, 100, 200, even 500 lines of code, you can simply click a button and get an entire explanation of it. Apart from explanation, it understands the ServiceNow context. So it gives you details on APIs if they're there, the table names and all those things. So you get an entire summary of it without going through the 500 lines of code and the work which was being done in like 30 minutes. It could take a matter of five, 10 minutes to understand the entire piece of code. So that really helped our developers that they, when they were modifying or adding functionality to the existing applications, this came in very handy. Let's see how this looks in action. - Sure. So similar script. So see how it works. Yeah, I have a script open here, it's a very simple one. So for me to understand how this particular script works, there's no comments at all in the script. All of us have seen scripts like this quite a lot. So we have given an option for the developer to just go and click on a button called code explain. Now what happens is it tries to understand the whole script for you and then try to generate an explanation for you. So if you see here, it gives a nice crisp, short summary of what that script does. And then if you want to go into the weeds, you have the detailed explanation in the bottom where you can go in and see, as Ashish mentioned, it'll give you like what are the APIs you used, what are the table names, what are the function names and things like that that you can use. We also collect feedback from the developer to make sure that we constantly hear from them. So you can like it, dislike it, give your comments and whatnot and you're done. Now the second thing is like you always open scripts that are like hundreds of lines of code. So you don't need to do the whole thing, you can just select that particular piece. Like you see in this example where you select a block of code and click on the button. Now it's only going to explain that particular piece for you, not the whole script. So it's a lot more easier for you to like understand the puzzles. Yeah, see here it's like a lot more simple. The last one is auto description. You see this particular script, the name and the description is the same, like people just copy paste the name and description. So auto description is just an extension of code explain the system sees that oh the description is this and this is incomplete or doesn't make sense. So it gives you a simple prompt in the top saying that, do you want to auto-populate the description? You say yes, it will generate a simple short summary for you of what that script does. And then you can just click on a button and the description is populated for you. So next time you come in you have the description already filled in, you can always refresh it. You have the option to refresh it if you're changing the code again as well. So if somebody has done a shoddy job, they have not written the code and somebody wants to understand and so they can use very well code, explain oral descriptions all available at the click of a button within the platform in scripted itself. So then we conducted a survey, as I mentioned, our developers started getting engaged more and more and then we realized that code comment is one thing, which majority of the developers you know don't like to do it. They just wanna write the code and be done with it. And then we thought, why not have that code comment feature itself? Which means that you select a piece of code, you can click on a button and it'll automatically insert the comments at appropriate places. Or you have the entire 500 lines of code and you can click a button and it'll give you comments on all the code. So both the options are available. What you see on the screen is there, it's a comparison on the left hand side you see a code without the comments on the right hand side, all the comments are inserted. And then you can pick and choose and decide where do you actually want the comments to be in the script. And Ranjit will walk us through this as well. - Yep, similar example, same time of script opened up here, no comments here whatsoever. So the the way is very same or very similar to how you did for Code Explain. Click on, click a button, it will try to generate comments for the whole script for you. So give it a couple of seconds. All right, so now we see the comments are generated, you get a nice side by side view of what are the comments added. It does not touch your code, only the comments are added. You get a nice comparison view. You can update it in the same view if you want. If you wanna change anything, you can change. Otherwise you can just go and apply and, and it will be applied. The same thing again if you wanted to apply it only for a block. So in this I'm selecting a function and I'm clicking on code comments only for that particular function. So it's faster in this case it's smaller. So it goes and applies the comments only for that particular thing. Now it's a lot more comments here and you can, as I mentioned, you can go ahead and update it according to the wish and and apply it. - And many of these things which you're seeing this has come to a perfection stage after one year of work. So we did a lot of, you know, work with our developers, try to understand their pain points, they give us a lot of feedback and that that is how we reach the stage. And the last one, and this is around on our DevX tool set, is around code refactor. We realize that there is already a lot of code written. I'm sure a lot of you're already existing customers of ours. There is already a lot of code written. Sometimes you know, not using the latest JavaScript library. Sometimes the performance of the platform is not there because there are multiple calls within the functions and so on and so forth. And then we also read in McKinsey that while text to code has a potential of saving around 35 to 45% of developer productivity, the code refactor has a potential to save around 20 to 30% of a developer productivity. So this was the next target of ours after that, which means that it checks your existing code and you can see that if there is a performance issue, you can select the code, click on the performance, Code Refactor, it'll automatically refactor your existing code. It could be use of debug statements, use of latest JavaScript libraries and so on and so forth. So you can refactor and make your existing code better as well within these simple clicks as well. And let's see this how it works in the system. - All right? Okay, same script for one last time I promise. So go ahead and select the piece of code that you wanted to refactor. So refactoring the whole script is not practical. All of us know. So I'm selecting that particular function and I click on the code refactor that you see on the top. Now for in the interest of time, I'll select the simplest of all using meaningful variable names, right? So I select that particular option and I ask GenAI to give me better options, right? So it checks that and it finds the culprit there. GR is used quite a lot, which is not recommended. It gives a nice naming there for me. Very low risk change but looks a lot better in the script, right? And if you're happy with it, you go ahead and apply it. And I also wanted to add that it's just not for you to like look at an existing code and change it. Our developers are also using this kind of like a peer reviewer. So you have written a script, you can ask GenAI okay, how do you think my script is, right? And it will maybe give you some suggestions based on that. So that is also a use case that we think the Code Refactor can really help. - Okay? And some talk about the numbers. Around 90% time the Code Explain and Code Comment. There is positive feedback. Developers see whatever output is getting generated, they're happy with that. And when it comes to text to code, almost 50%, you can see 48% to be precise. The generated code is accepted by our developers. Some, some exciting numbers there. Some key takeaways. So these GenAI power tools elevate developer experience by multifold. Obviously they have these tools disposable. So whatever use case is there, they can use these tools easily on the platform within native view. Start small. When I say start small, I say that because you cannot have all these use cases going for our developers. Whatever case makes more sense for you, that is the one you should go with. And the last one is GenAI is obviously a productivity booster, no doubt about that. But you have to be careful, you have to make sure we watch the output and then take actions accordingly. In the interest of time, we'll take any questions on the side. Thank you for your time.

View original source

https://players.brightcove.net/5703385908001/zKNjJ2k2DM_default/index.html?videoId=ref:SES1415-K24