Este tutorial es una adaptación de la charla impartida por Dan Vega en Spring I/O 2025. Puedes ver el video original en: https://www.youtube.com/watch?v=koYCcvPvaY0
As developers, we are constantly seeking ways to enhance our productivity and efficiency. Artificial Intelligence (AI) tools are proving to be transformative in how we approach software development. While some may worry about AI replacing developers, I believe that AI won’t replace developers, but developers who use AI will replace those who don’t. AI can make us more efficient, allowing us to focus on solving problems, creating, and building, rather than the mundane task of typing out code.
AI has brought back the joy of programming for me. It reduces the drudgery of repetitive tasks, enables rapid prototyping, and provides productivity enhancements across various activities like writing, creating videos, coding, and preparing presentations.
The future of software development will undoubtedly see changes, but I don’t share the fear of widespread job replacement. There may be some reimagining of roles, but the need for software developers will likely increase. A human in the loop remains crucial for verification, correction, steering the system, and providing crucial domain and product knowledge. Therefore, I advise programmers to start using AI tools as much as possible, becoming the supervisor of AI and using it like a pair programmer.
As Microsoft CEO Satya Nadella puts it, «I think what AI does quite frankly is reduce the floor and raise the ceiling for all of us.» This means AI makes coding more accessible to beginners («reduce the floor»), allowing them to take an idea and build something, whether it’s a personal project or a tool. It also empowers experienced developers («raise the ceiling») by increasing productivity and enabling them to build more complex things.
I also agree with Steve Wozniak’s perspective: «AI will not replace jobs, but it will change the nature of work. Developers who can adapt and learn new skills will be in high demand.» The ability to adapt and learn is crucial in our ever-evolving industry. As new technologies emerge, we must learn them and adapt to new ways of doing things to remain relevant.
State of AI Adoption
Let’s look at the current state of AI adoption among developers and companies:
- 72% of developers are confident in AI tools. This is noteworthy as it represents real-world experience, not just hype.
- 92% of Fortune 500 companies are using AI technologies. This shows AI is becoming a standard across major enterprises.
- 26% is the average productivity increase with AI coding tools. This finding comes from an MIT study of over 4800 developers from companies like Microsoft and Accenture.
- 75% of developers are currently using or planning to use AI tools. This indicates AI is not just a future potential but a current reality for a large portion of the developer workforce.
These use cases are largely complementing developers rather than replacing them.
How Developers Use AI
Here’s how developers are putting AI to work:
- 85% use AI for Code Generation. This includes everything from completing simple functions and suggesting code blocks to using tools to write entire applications.
- 77% use AI for Research/Learning. This highlights that AI is being used not just for writing code but for understanding and problem-solving.
- 54% use AI for Debugging/Testing. This represents growing trust in AI for quality assurance tasks.
AI Powered Dev Hacks
Here are some tips and tricks I’ve incorporated into my daily workflow, along with some key takeaways. My hope is that you walk away with a few practical tips you can take back to work.
#1 – Learning How to Talk to Robots: Prompt Engineering
Effectively communicating with AI systems is crucial. Whether you’re a complete beginner or an experienced user, mastering how to craft clear, effective prompts will dramatically improve your results.
- Clear communication is key – just like with humans.
- Structure determines success – giving context, examples, and specific instructions.
- Think of it as teaching, not commanding.
A Bad Prompt would be: «Write a blog post about AI». If I asked a colleague this, they’d have many questions: How long should it be? Who is the audience? What is the tone? Do you have a specific topic on AI?
A Good Prompt would be: «Write a technical blog post explaining neural networks to junior developers, focusing on practical examples. Include code samples in Java and keep it under 1,000 words.» This provides much more context and constraints, leading to a better response.
It’s important to remember that prompting is an iterative process. The first time you use a tool like ChatGPT, you might get a bad response because your prompt wasn’t specific enough. You need to refine your prompts over time.
- Iterate & Refine: That’s good, but can you make it more conversational and add a section about…
Save What Works: Keep a collection of your most effective prompts to reuse and adapt. I use Claude’s «projects» feature to save system instructions for different tasks, like generating YouTube video titles and descriptions. This allows me to provide a detailed persona and task definition once and reuse it.
Advanced Prompt Techniques
Structuring your prompts and using specific techniques can further improve results:
- Zero-Shot Prompting: Asking directly without examples. Example: «Analyze the pros and cons of remote work»
- Few-Shot Prompting: Providing examples to guide responses. Example: «Classify these sentences as positive or negative: ‘I love this’ (positive), ‘This is terrible’ (negative). Now classify: ‘The experience was disappointing.’»
- Chain-of-Thought: Requesting step-by-step reasoning. Example: «Think through this problem step by step. If 5 apples cost $2.25, how much would 12 apples cost?»
Organizational Techniques
Using techniques to organize information within your prompts helps the AI understand your request better.
- XML Tags: Using tags to organize information and outputs. Example: «Please categorize this text into sections using
<concept>
,<example>
, and<application>
tags.» This helps break down a long prompt into manageable parts. - Task Decomposition: Breaking complex problems into manageable parts. Example: «First, summarize the key points. Then, identify counterarguments. Finally, synthesize both perspectives.» This gives the system clear, sequential tasks.
#2 – Prompting With Your Voice
Now that we understand that prompt engineering is about being as clear as possible and is an iterative process, typing out long, detailed prompts can be mundane. This is where dictation can be incredibly useful.
On macOS, you can set up a keyboard shortcut for dictation in system settings and use an external microphone for better accuracy. There are also products that do a better job at this. Whisper Flow (https://wispflow.ai/) is one example. It allows effortless voice dictation, faster than typing, with AI commands and auto-edits. It formats everything and puts it together.
Being able to just talk to the large language models is so much easier and helps with the iterative process.
#3 – Learning Software Development
I love learning, almost to a fault. AI has opened up a whole new way of learning for me and for everyone. Here are a couple of examples for junior and senior developers.
Learning With AI – Junior Developers
- Concept Breakdown: Junior developers can use AI to break down complex programming concepts into simpler terms, getting multiple explanations until one clicks. For example: «Explain closures in JavaScript like you’re explaining it to someone who just learned functions» then follow up with «Now explain it with a practical example». This provides both theory and practical examples.
- Understanding Code: Walk me through this code line by line. When getting into a new codebase, especially legacy code, being able to highlight code and ask for an explanation is invaluable. I wish I had this 20 years ago!
- Learning Path Guidance: Ask for personalized learning paths. How would I learn this new thing? Give me some examples. Especially with some of the reasoning models, like OpenAI’s O3, which is good at reasoning and planning, you can ask it to create a particular learning path on a specific topic.
Learning With AI – Senior Developers
- Deep Dives: Senior developers can use AI to quickly understand new technologies or advanced concepts. Examples: «Compare the performance implications of different state management solutions in React» or «Explain the architectural differences between REST and gRPC».
- Pattern Discovery: Show me 3 different ways to implement a rate limiter in a distributed system, with pros and cons of each approach.
- Staying Current: What are the performance benefits of using Virtual Threads in Java? Staying current in our industry is always one of the hardest things. How can I stay current on new things? Using AI to ask these specific questions is a great way to do so.
I don’t know about you, but this is kind of what I feel like on a daily basis now (referencing image of excited developer). If I want to build something, I can. While that’s always been the possibility, in the past, I’d have to ask myself if I wanted to invest the time in learning a new thing just to build the thing I wanted. Sometimes the answer was yes, sometimes it was that’s too much time to invest in something I don’t know if I’m going to use. With AI, I feel really confident that if I wanted to do that next week, I could go ahead and launch something (minus the store stuff). It has brought back a lot of joy for me. Once you know the basics of programming and learn how to effectively communicate with large language models and understand what these different models can do, the sky’s the limit. You can really learn anything, and I think that’s what really excites me about AI.
#4 – Reading Code
Here’s a surprising fact: Many in the industry claim that on average, developers spend roughly 10 times as much time reading code as they do writing it. In other words, for every hour we spend actively typing out code, we spend about 10 hours devoted to understanding, reviewing, or otherwise reading code. That’s crazy, but on par with what I thought. So, we can use AI for code comprehension.
Code Comprehension Strategies using AI
- Paste unfamiliar code and ask:
- «Explain this code’s purpose and main functionality?»
- «What design patterns are being used here?» (Maybe you’re not familiar with design patterns but want to see if they’re used in code you see).
- «What are the key dependencies and data flows?»
- Break down complex functions:
- «Break this function down into logical steps»
- «What are the potential side effects?» (Asking if there are side effects in the code you’re using is another good one).
- Understanding Legacy Code:
- Ask about historical context:
- «What problem was this code likely trying to solve?»
- «Why might the original developer have chosen this approach» (Given the context, it knows the year it was created and what was possible at that time, and it may be able to explain that).
- Identify improvement opportunities:
- «What are the maintainability concerns in this code?» (We know we have some legacy code, but is there a lot of real tech debt here?)
- «How could this be refactored using modern practices?» (You could even take this a step further saying I don’t want to refactor this entire project, but in this particular package, how can I refactor just this code).
- Ask about historical context:
I really like it, obviously for writing code, but also for reading code.
#5 – Documentation
This is kind of one of my go-to use cases for using AI, which is documentation, technical writing, anything that kind of falls into that category.
Code Documentation Generation
- Generating Class/Function/Method documentation. If you go into a codebase and you see these classes are not documented, we don’t have API docs, things like that, AI is great for this. Go in, look at a class, look at a function, look at a method, and get documentation for that. You can do that kind of inline without using one of these like agentic AI systems.
- Explaining complex algorithms and logic flows. So I want to read all the code here and now I want to create some documentation based on that so that the next person that comes along understands what this code is trying to do.
- Creating usage examples and sample code. Really good output for this.
- Documenting API endpoints and parameters.
- Converting documentation from one format to another. So, maybe we have some plain HTML documentation, and we want to just format it into Markdown because we want to include it in some system that’s using Markdown. That’s one great use case: Here’s some HTML, turn it into Markdown.
- Creating new Documentation.
I actually do this a lot. I have a bunch of repos on GitHub because I create a bunch of small demos and I want to put them out into the world, and I don’t want to write documentation for them. But I know that I want if somebody comes to that repo, I want them to know what it is used for and how to get started with it. So, there are a lot of the large language models now, like Google Gemini, Anthropic, I think even OpenAI now does this, you can connect right to a GitHub repo. So, if you have a GitHub repo, you can kind of use that as context, and basically say, «Hey, write me a README file based on all of this code.»
You couldn’t do this before. So, I ended up starting a project on my own to do this, and it was able to basically take all the code, concatenate it into a single file and hand that off to an LLM. That’s kind of what GitIngest does as well. But I don’t think you need to do this as much these days because they have access to GitHub.
(Demonstrates using Claude’s project feature to generate a README from a GitHub repo).
You see now, it is based on what I’ve given it. It’s written an introduction, it said here are your project requirements, here are your dependencies, how to get started, etc., etc. Now, this may not always be the end-all-be-all, this may not be 100%, but this gets me like going really good. I may just go in there and tweak a few things and then send this to GitHub now. This is not something that would have taken me a long time to produce, and now I’m just kind of generating that. And I think for something like a GitHub README, especially for me, like it’s just a demo application, this is a good use case. If this is being used in a more professional setting, an enterprise setting, you’ll definitely want to go through and kind of iterate on that prompt that you’re sending it and also review everything that these large language models are putting out and give that the same review process that you would something else. So, but I think this gets me to a really good point.
#6 – Building Tools
One of the things I love about being a programmer is being able to solve my own problems. One of the ways I can do this is by building tools, and AI has really helped me out in this. Honestly, probably one of my main drivers, like I’m not building something for the world to use, I may just be building something that I want to use. Maybe it turns into something, but this really helps me kind of prototype some tools right away.
I love this quote: «People are tool-builders with an inherent drive to understand and create, which leads to the world getting better for all of us.» – Sam Altman – Three Observations Blog Post (https://blog.samaltman.com/three-observations). I agree with that.
So, what kind of tools can we create?
- CLI tools to streamline workflows. I’ve built a bunch of CLI tools just on my local laptop, and you can use whatever programming language you want, right? Like, I don’t, I don’t use Bash a lot, but if I wanted to write a CLI written in Bash, I feel like I could do so. I can also use something like Spring to, to write some command line tools. Um, but you can go ahead and streamline whatever you’re kind of doing over and over again. Again, I think the, a big thing for me with AI is like, let me think about the things that are day-to-day that I don’t want to be doing, and try, try to offload that to AI so I can focus more on the things I do want to be doing.
- IDE or Text Editor Plugins. If you’ve never written an IDE or a text editor plugin, but you’ve always wanted to, this is a really great opportunity. And I’ll I’ll share an example of that in a second.
- Browser Plugins. Again, I’ve never written a Chrome plugin, I feel like I could do so if I wanted to today.
- Reporting Tools. So, I, I have to, for, for work, I have to kind of report back on some of the content that I’m creating, how many views something got on YouTube or how many thing likes something got, um, that was posted on an article. Whatever, kind of silly, but I have to like collect these metrics, right? So, I wrote, um, some, uh, CLI tools using, uh, things like the YouTube API to be able to connect to YouTube and automatically pull these down, so that I don’t have to go out there and kind of do this like every quarter or so.
- Your Favorite Tool Plugins. This is where it gets fun. So, um, whatever like some of your favorite tools are that you use on a day-to-day basis, maybe you can write plugins for those. And a personal story, I actually did this. So, I don’t know if anybody’s heard of Raycast, but Raycast is kind of a Spotlight replacement for Mac. It allows you to kind of quickly jump to things, so I want to open an app, I want to do some calculation, and it has plugins for everything. Like, hey, I need to copy an emoji, or find a logo for whatever thing that I’m trying to work on, right? There’s all these plugins that, um, that you can, you can plug into Raycast. And I was thinking about it, and I was like, oh, okay, well, we have this Spring Initializr, you can go here, create a new project. You do this within your IDEs, it uses the same kind of API behind the scenes. So, if you’re using like IntelliJ, uh, or Visual Studio Code, or start.spring.io, they’re kind of all using the the same API behind the scenes. So, I started thinking like, could I create an extension for Raycast to do the same thing?
(Demonstrates using a Raycast extension for Spring Initializr).
So, I ended up creating this extension after probably two days, most, actually a couple days, most of it was just trying to get it published on their side. The coding aspect was probably a few hours. So now if you go into Raycast, uh, you can add this from the Raycast store, but if you go to the Spring Initializr, now I can come in here and say, all right, um, I’m creating a Maven project using Java, 3.4.1. I can fill in some metadata about this. We we are going to use Java 24. I can pick out those things and I can fill in some dependencies, so Spring Web, Spring AI, whatever. So, I can fill out some metadata about this. But again, this is a tool that I was able to create in a matter of time instead of having to invest all that time into learning something new. But, I did learn some things about React. I did learn some things about publishing to the Raycast store. So if I want to go ahead and publish another one, I could do so.
#7 – Working With Data
AI is not just for generating content, it is your instant data engineer. You can use it to transform formats, generate code from raw data, clean data sets, build database solutions in minutes instead of hours. These are some really good practical use cases for today, not for tomorrow.
Data Transformation and Analysis
- Transform data between formats (JSON, CSV, XML, etc..) Here’s some JSON, turn that or here’s some XML, turn that into JSON. Right? Here’s a CSV file, turn that into JSON.
- Data to Code (Json Object to Java Record). I have a whole bunch of JSON, maybe I got a JSON response from an API. I want to generate all the code for this. Uh, turn this into a Java Record or a set of Java Records. If it’s a bunch of Java Records, maybe I can say take all of these Java Records, put them in a single class so I can use them at once and give me an example of how to run those. So, pretty cool use case for me.
- Identify and handle missing or invalid data. One of the biggest pains for me is like you get this like large JSON response, and you try to consume it and it’s like, there’s something wrong. And like, what’s wrong? I got to hunt through this. Usually there’s pointers to kind of help you out, but you’re like staring at this code going, I don’t see anything wrong with this. There’s nothing wrong here, right? Feed a bunch of this JSON data and say what is wrong with this data? There’s something missing or some invalid portion of this.
- Suggest optimal data structures based on your use case.
- Write data validation rules and schemas.
- Write SQL queries for complex operations. Here are my tables, write me an optimized query that’s going to go ahead and talk to this and get this particular data set out.
- Design database schemas and table relationships. Hey, here’s some data, write a schema file for me. I don’t want to write that, right?
- Optimizing existing queries for better performance. Hey, I have this query right now, here are the tables, here’s the current, um, performance of that. Yes, you can go into your database tools and ask for an explain and find out what’s going on. Um, or you can do things like, hey, why is this particular SQL, uh, not running, uh, as performant as we think it should be.
- Convert between different SQL dialects (MySQL to PostgreSQL, etc.). I like this too, converting between SQL dialects. So, I have this MySQL schema and I’m moving over to Postgres, just rewrite this in a Postgres dialect, right?
- Generate database migration scripts. A really good use case.
- Write stored procedures and triggers.
#8 – Running Models Locally
I talk a lot about some of the privacy and security concerns with sending all of your data to some of these cloud models, right? There are a lot of pros and benefits to running these models locally.
- Privacy and Data Security: Ensures sensitive data remains within your infrastructure and complies with regulations.
- Performance: Enhances response times and reliability by removing network dependencies. Can be very fast.
- Development and Testing: Facilitates easier debugging and faster development cycles.
- Cost Control: Eliminates unexpected fees and provides predictable computing expenses. Hey, we’re not paying for this because it’s just a model running on our machine.
- Customization: Allows for tailored model versions and integration into local workflows.
So, there are some ways that you can run these on your local machine. There is Ollama (https://ollama.com/). So, if you go out to Ollama, you can download Ollama, and then you can look at some different models that are available and you can run them. Now, when you go into the different models, they will show you how big, how large this model is. Again, be careful, some of them are like 70 billion parameter models that are very big and probably won’t run on your machine, but there are some models that are pretty lightweight that you can run.
So, you can do this in Ollama, and if you run Ollama, you’ll run it from the terminal and ask it a question and interact with the terminal. If you don’t want to interact with the terminal, you can use some other projects out there, one of which is Open WebUI (https://openwebui.com/). So, this will look at what models are running on your local machine and give you kind of that ChatGPT familiar interface to talk to those local models.
There is also Docker Model Runner, which just came out. My screenshot says Docker Desktop for Mac with Apple Silicon, they did release, I believe, a Windows version of this as of a week or two ago. But this just allows you, if you’re using Docker, to say install one of these local models. So, I can go ahead and install one of these models and I can go ahead and start chatting with it right within my terminal.
(Demonstrates running a Docker AI model and interacting with it in the terminal).
Now, I like that I don’t get that latency. I’m not paying anything for this. Now, the models, there are some pros and cons, right? The models that we’re using on our local machines, probably not as great as some of the frontier models out there. But if you just want to like get up and running with something, I think this is a really good approach. And whether we’re using Ollama or, um, Docker Model Runner, to run these models locally, you can use these within something like Spring AI.
(Demonstrates configuring a Spring AI application to use a locally running Ollama model via its API).
Now, obviously, if we were to publish this somewhere, we need to make sure that that URL is something different and a different model running somewhere else. Um, but whether you’re using Ollama, whether you’re using Docker Model Runner to run these models locally, you can use these within something like Spring AI.
#9 – Guiding AI Coding Tools
So, there are a lot of really great AI coding tools out there. I want to give you some tips and tricks on how to get the most out of them, and we’ll wrap it up with an example on kind of how to guide an AI to your desired output.
- You are the Pilot, Not a passenger. You are not just along for this ride to keep clicking yes and hope for the best. You really have to guide it. Again, it comes back to prompt engineering, but it also comes back to your knowledge of whatever you’re working on, your programming knowledge, your, how many years of experience, right? Watch what it’s trying to produce and iterate on that. If it does something wrong, if it writes something you don’t want it to write, say no and start over, right?
- Branch Strategy. Part of that is having a branching strategy. Don’t just go on main and start vibe coding everything that you want. You know, pick out like a small feature that you want to work on, create a branch for that, and then that way if things go south, you can always kind of clean that up from that branch.
- Bugs: AI can and will generate incorrect or inefficient code. We have to remember that.
- Apply the same rigorous testing to AI-generated code as you would your own. I think applying the same rigorous testing to your AI-generated code as the code that you write in-house is very important. This becomes more important to have those processes in place like code reviews. Again, making sure we’re really kind of reviewing what is coming out of these systems for clarity.
- Provide clear, specific, and detailed prompts. Again, clear, specific instructions.
- AI models train on vast datasets, including open-source code with various licenses. Right? Like, some of the times we don’t know this. So, if you are in an enterprise and you can only use code that has a specific license, we need to be sure that, and there’s ways we can kind of, um, provide that as context when we’re generating code.
- Take the time to comprehend why the AI suggested a particular piece of code.
- Understand that AI may use outdated information.
So, I want to show you an example of something I did, uh, in Junie. So, Junie is JetBrains’ kind of AI coding agent. And I asked it to write a service that talked to the JSONPlaceholder service that.
(Demonstrates using Junie to generate code and guiding it through refinements).
There we go, sorry. Um, that talk to some other service and just did a few simple things, right? And so I put in as best as I could, the best prompt I can come up with, and it created a pretty good application. But I found some problems with it, right? Um, actually this wasn’t a record to begin with. Um, the first time I wrote it, it kind of wrote a class, and I said, you know, I prefer immutability, I’d want to use a Java Record where possible. Um, it was using, um, the Rest Template to talk to another service, I wanted it to use the RestClient. Um, the package structure wasn’t what I wanted. Um, so I came back and, um, maybe that one, yeah. Okay, this is that one. So, it has like a a class and uh, package structure that I didn’t like. But with a lot of these coding agents, one thing you can do is kind of guide them to kind of conform to your coding standards, your preferences. So, whether you’re using Cursor or Junie or Windsurf, there’s ways to provide context. And in Junie, you can create a .junie folder and you can give it some guidelines. And so again, these aren’t like really complex guidelines. You could probably get a lot more out of this if you spent some time iterating on this. But, I said, hey, if you’re using Spring Boot, use the latest version. If I ask you to create a project, uh, I want you to prefer a package by feature instead of package by layer. And I gave it some examples. And again, I didn’t write all this, I help I, I asked AI to write a lot of this for me and give it some instructions to do so. So, avoid this, use this. If you’re doing data access, I prefer this. If you are using an HTTP client, I want you to use the RestClient over the Rest Template. Um, if you’re using Java language features, hey, I want to prefer immutability, use a Java Record when you can. I don’t need a class. Um, here are some quick Spring Framework best practices. Here are some things I want in my tests, and here are some general code quality comments. Again, this can be as very specific as you want it to be and usually this is language specific, right? You could have one for like Java, one for Spring, if you’re doing some front-end development in Angular, you could have one for that as well.
So, when you get into start using some of these, uh, AI agents, um, take a look at how they, uh, allow you to add context and take some time to put these guidelines together.
All right, with that, I’ll take some questions.
Anyone?
(Audience member asks a question)
Oh, I got one. So the question is, with these, uh, agentic IDs, can you, uh, choose what model you use? In some cases, yes, in some cases no. So Windsurf and Cursor allow you to pick the model. Junie does not right now, but I’ve heard they are working on plans to do so. Thank you. You’re welcome.
(Applause)
Thank you.