AI 服務暫時不可用,以下為來源正文,待恢復後補全翻譯。
AI coding tools can generate code quickly, but speed alone does not solve the hardest software engineering problems. Developers still need to provide context, validate results, protect maintainability, and remain accountable for what ships. To learn how experienced developers strike that balance, we spoke with three Java Champions, all with over a decade of experience in using Java. They shared concrete examples of using GitHub Copilot in production and open source, along with the practices they use to turn AI-generated output into reliable software. Here are the tips they shared with us. Vlad Mihalcea GitHub profile: @vladmihalcea How has GitHub Copilot helped you recently? I’ve been using it to analyze, design, and implement various features in both Hypersistence Utils and Hypersistence Optimizer. For example, I’ve been wanting for a long time to develop a web application that provides Optimizer event history so we can see how performance improvement efforts are materializing in application performance. Before AI, I kept postponing this task because it would have taken me weeks to develop. But using Copilot is like having a new team member, so I used it to create an app that will ship in the next version of Hypersistence Optimizer. Instead of weeks, this task took just two days to implement. What’s your typical usage? Are you using GitHub Copilot as an IDE plugin or the GitHub Copilot app? I use GitHub Copilot in IntelliJ IDEA because it’s convenient to run while reviewing source code or during a debug session. It’s very useful as a code assistant, and it helps me speed up both investigations and building prototypes for features that need validation. I still review the plans and the code that is generated by AI since their goal is to improve my productivity, not replace me entirely. While AI provides the right answer in many situations, there are still times when the response is not satisfactory and requires my intervention. Can you share some tips and best practices? For example, which skills are you using? I created my own skills so that whatever text Copilot generates looks like something I wrote by hand. This skill captures my voice from 65 of my published articles, so a draft comes back sounding like my blog instead of like a language model. This is really useful when generating documentation for this project, since it lets the LLM learn from 12 years of blogging and provide examples that follow the same principles, such as expressiveness, testability, and simplicity. Throughout my career as a software engineer, I’ve learned that we spend far more time on code maintenance than on creating it. Therefore, because maintenance and stability are critical for existing products, I developed skills that help AI mimic existing code practices in accordance with the principle of least astonishment. One tip is to change the model type based on the type of operation. For thorough thinking, I use Opus with the 1 million context window and Extra High or Max reasoning. However, for simpler tasks, such as generating reports, release notes, or verifying documentation, I use lighter models that consume fewer tokens. Patrick Baumgartner GitHub profile: @patbaumgartner Your work involves coaching teams. What is your approach? A lot of my work happens while the normal business still has to keep running. You cannot stop everything for six months to “transform.” We usually start by solving immediate problems together, understand where the team currently stands, define where we want to go and how we will know that we are improving, and then move there step by step. Depending on the situation, that can mean Software Craft practices such as TDD, refactoring, continuous delivery and XP; architecture and modularisation with Spring Boot, Spring Modulith; Spring Security; optimising Java and Spring Boot applications for containers; or increasingly, agentic engineering. The important part for me is that I work with the team. We make decisions together. I don’t want a team to become dependent on me. Ideally, after some time they no longer need me except perhaps as a sparring partner. And maybe that explains why I find this new generation of AI tools so interesting: I like working with people, learning, experimenting, and solving problems. AI gives us another very powerful tool for doing exactly that. Can you share a good story about how GitHub Copilot has helped you recently? There are actually three very different examples that changed how I think about working with GitHub Copilot. Let’s start with the first one. One was a migration of around 900 teaching slides across 15 presentations from Reveal.js to Marp. These were not simple slides. Many contain code, animations, and even interactive examples where I can change JavaScript live while teaching. More importantly, the presentations had already been battle-tested with students. The flow worked. Losing one small piece could break the story I use in the classroom. Doing that migration manually would probably have taken me a week or more—and realistically, I might simply have avoided doing it because it was such tedious work. With Copilot, I approached it differently. We first analysed the existing material, defined the target, created a migration plan, established constraints, provided examples, and defined what had to remain intact. Then we worked from the big structural changes down into the details. The really important part was verification. We generated screenshots of the Reveal.js and Marp versions and compared them visually and algorithmically. We built a small application where I could run both slide decks next to each other to verify animations manually. We even compared the generated PDFs. That meant the agent did not just say, “Migration complete.” We had evidence. The entire migration took me roughly eight to ten hours. I still owned the content, the teaching intent, and every meaningful change. Copilot could fix a typo automatically, but if content, versions, dates or meaning changed, that was something we discussed. For me, that experience reinforced an important principle: delegate execution, not responsibility. I own the result. Can you share the second example? A second example came from building a terminal UI application with Tamboui. It initially worked perfectly in Linux under WSL, and I had completely forgotten that somebody might run it directly in Windows CMD or PowerShell. And then a real user did. They discovered that the Enter key was simply ignored in some forms. That is another principle I strongly believe in: ship software early, because you learn from how people actually use it. We used Copilot to turn that feedback into reproducible UI tests. On Linux, Copilot was navigating the application with tmux. Through working with it, I learned about psmux and could execute similar flows in PowerShell. We reproduced the problem, created a local fix, traced the real problem into Tamboui, and I submitted the upstream fix, which was merged. During this work, the test descriptions themselves became too large for the available context. So I asked Copilot to help me redesign the way the tests were represented. Instead of verbose tables containing identifiers, names and repeated descriptions, it proposed a much more compact arrow notation: step → step → input, with additional information only where it was critical. That surprised me. We were not just using AI to execute information; we were working together on how information should be represented for execution. It did not have to be maximally human-friendly. It had to preserve the semantics while being efficient for the agent. How about the third example? The third example is completely different again. Someone close to me needed to practise mathematics, and I thought: why don’t we build a small learning app? It covers addition, subtraction, multiplication, division and division with remainder for grades one through four. But I did not want to build another simple quiz application. Together with Copilot, I researched learning approaches such as spaced repetition, immediate feedback, adaptive difficulty, motivation, cooperative learning and gamification without dark patterns. Interestingly, during that research Copilot challenged one of my original assumptions. I initially wanted the application to be generic for children everywhere. The research led us toward looking at the actual school curriculum instead. I realised that the order in which topics are introduced, the operations and number ranges differ enough that making it “universal” immediately was unnecessary. So we focused on Switzerland first and aligned the progression accordingly. Because Switzerland is multilingual, the application is available in German, French, Italian and English. It also has cooperative and competitive two-player modes, and when someone gets an answer wrong, the application explains one way to solve it and brings similar questions back through spaced repetition. I deliberately chose an architecture without a backend. There is no reason for me to collect children’s personal data on a server, so the data stays on the device and the application can simply be hosted on GitHub Pages. What started as a small experiment is now being used and shared among friends. It accidentally became a little product. That experience showed me another side of Copilot: don’t only use it to implement your solution. Use it as a sparring partner to expand and challenge the solution space before you start building. How do you typically use Copilot? I actually don’t use the classic Copilot autocomplete experience anymore. My work has moved almost completely toward agentic workflows. I use VS Code when I need a tight visual feedback loop—when I want to look closely at documents, code, presentations or intermediate results and adapt the process as I go. For larger execution-oriented tasks, I often work with the coding agent from the terminal. There I am more comfortable delegating a piece of work, letting it execute, and then inspecting the complete result. The interface I choose depends mostly on the feedback loop I need. I also had a fascinating experience using the coding-agent workflow through GitHub while travelling to JavaLand. I had started exploring an idea for a Maven plugin that optimises which Spring Boot auto-configurations are loaded. During roughly a four-hour journey, I was steering the agent from my phone: giving it a task, reviewing what it had done, thinking about the next step, and sending the next instruction. By the time I arrived, I had a working Maven plugin, a CI pipeline, performance tests against a sample application, and reports that could demonstrate whether the optimisation actually worked. That was the first time I had worked that way, and I was amazed that it actually worked. I wasn’t trying to write Java on my phone. I was reviewing, deciding and steering while the agent executed. I also use MCP servers when they give me useful capabilities or context. For example, I have used Context7 for documentation, integrations with my Logseq knowledge base, and I have experimented with an MCP integration for Adobe Premiere Pro. But I don’t use MCP just because I can. If a good CLI exists, I often prefer the CLI because it feels more direct and faster to me. The agent is also not a “junior developer” in my mental model. I think of it much more as a sparring partner. But just like anyone joining a project, it first needs to be brought up to speed. Context is king. Can you share some tips and best practices? The biggest thing I would recommend is: stop one-shot prompting. For anything non-trivial, I want to understand the problem before execution starts. Quite o [truncated for AI cost control]