Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Will AI Assistant Make Developers Redundant (De...

Will AI Assistant Make Developers Redundant (Devoxx)

IntelliJ IDEA already had plenty of smart features to make developers' lives easier: code completion, tool integration and more.

Now with JetBrains AI Assistant you have the power of LLMs right inside your IDE. Let's take a look at how the knowledge your IDE has about your project combines with the power of LLMs to enhance your coding workflow. We’ll look at what JetBrains AI Assistant can do for you, and what it can’t (yet?).

Will AI Assistant make developers redundant? Come and find out.

Marit van Dijk

October 11, 2024
Tweet

More Decks by Marit van Dijk

Other Decks in Programming

Transcript

  1. Productivity "Based on data from 250K+ developers in our global

    community, developers code 52 minutes per day — about 4 hours and 21 minutes during a normal workweek from Monday to Friday." "Code time is defined as time spent actively writing or editing code in an editor or IDE." https://www.software.com/reports/code-time-report
  2. Understanding code "developers on average spend as much as 58%

    of their time comprehending existing source code" ~ Felienne Hermans, The Programmer's Brain https://www.felienne.com/book
  3. Understanding and maintaining “The majority of a developer’s time isn't

    writing but understanding and maintaining existing code.“ https://codescene.com/hubfs/whitepapers/Refactoring-vs-Refuctoring-Advancing-the-state-of-AI-automated-code-improvements.pdf
  4. Top 5 Features Personal observation: This does not include generating

    code! https://blog.jetbrains.com/ai/2024/04/developers-save-up-to-8-hours-per-week-with-jetbrains-ai-assistant/
  5. Our approach to building AI Assistant into our products has

    been focused on two main aspects: 1. Weaving the AI assistance into the core IDE user workflows. 2. Building AI features that are deeply infused with an understanding of your code and its context, which has always been a strong suit of JetBrains IDEs. JetBrains AI Assistant https://blog.jetbrains.com/blog/2023/12/06/introducing-jetbrains-ai-and-the-in-ide-ai-assistant/
  6. Generate and improve commit messages, explain commit(s), resolve merge conflicts

    Continue prompting, add context & commands Generate, explain, refactor code, write tests & documentation Ask questions, edit & save prompts, see context, use code Explain runtime errors, write commands in new terminal Get help with SQL queries in console
  7. Chat • LLMs are good at chat 😁 • We

    can • Ask how to do things • Ask follow up questions
  8. Code completion macOS Windows / Linux Accept suggestion ⇥ TAB

    Accept line ⌘→ END Accept word ⌥→ Ctrl+→ • Change the key used to accept suggestion
  9. Photography EV = Exposure value t = Exposure time N

    = Focal number = focal lenght / diameter of aperture EV = log2 N2 t
  10. Photography • Integrated into the IDE • Can use it

    from the editor; no tool-switching • But doesn't always get the context • Let's give it a hint
  11. Photography • Note this refactor includes renaming • Can also

    use Refactor > Rename • (especially if variables are used outside this file)
  12. Photography Large Language Models ... are not good at math

    https://www.youtube.com/watch?v=0xENpeGTEZ0
  13. Photography • You can specify how to generate unit tests

    • Customize prompt in Settings: • Tools > AI Assistant > Prompt Library
  14. Use AI Assistant in the New Terminal • Ask AI

    Assistant to generate command
  15. Use AI Assistant in the New Terminal • Ask AI

    Assistant to generate command
  16. Use AI Assistant in the New Terminal • Ask AI

    Assistant to generate command • And run the command
  17. Use AI Assistant to generate queries • Attach database schema

    • Might still need small fixes • IntelliJ IDEA has DB support
  18. AI Assistant • Can save time • Boilerplate code /

    typing • Tasks we don't like to do • Understanding existing code!
  19. Real world use case "I definitely saved some time here,

    probably 10–20 minutes." "The whole task took about 35 minutes, including creating a YouTrack issue and taking the screenshots for this blogpost. Not bad!" https://blog.jetbrains.com/idea/2023/12/java-inspection-with-ai-assistant/
  20. Some caveats "The main problem I see for these kinds

    of tasks is that AI cannot learn (yet)." "When AI is able to accumulate and use project-specific knowledge, it will become way more useful." https://blog.jetbrains.com/idea/2023/12/java-inspection-with-ai-assistant/
  21. Secure code • Be critical in evaluating the AI assistants

    suggestions • Use additional tools and techniques to verify the code
  22. Code quality • Code churn • Code smells https://arxiv.org/abs/2304.10778 &

    https://www.gitclear.com/coding_on_copilot_data_shows_ais_downward_pressure_on_code_quality
  23. Automation bias "Automation bias is the propensity for humans to

    favor suggestions from automated decision-making systems and to ignore contradictory information made without automation, even if it is correct." https://en.wikipedia.org/wiki/Automation_bias
  24. Preventing hallucinations "removes hallucinations from the candidates suggested by LLMs,

    then further enhances and ranks suggestions based on static analysis techniques from program slicing, and finally leverages the IDE to execute refactorings correctly." https://arxiv.org/pdf/2401.15298
  25. Does AI replace developers? • Produce more code faster ->

    more code to maintain • Scanning tools / good dev practices more important than ever!
  26. Does AI replace developers? • Produce more code faster ->

    more code to maintain • Scanning tools / good dev practices more important than ever! • Our skillset might change; we need to adapt