Slide 1

Slide 1 text

Will AI Assistant make developers redundant?

Slide 2

Slide 2 text

AI is everywhere

Slide 3

Slide 3 text

AI at conferences

Slide 4

Slide 4 text

AI in products

Slide 5

Slide 5 text

No content

Slide 6

Slide 6 text

https://x.com/petergyang/status/1793480607198323196

Slide 7

Slide 7 text

https://spectrum.ieee.org/in-2016-microsofts-racist-chatbot-revealed-the-dangers-of-online-conversation

Slide 8

Slide 8 text

No content

Slide 9

Slide 9 text

No content

Slide 10

Slide 10 text

Bold claims

Slide 11

Slide 11 text

It will make us more productive!

Slide 12

Slide 12 text

It will take our jobs!

Slide 13

Slide 13 text

AGI is imminent!

Slide 14

Slide 14 text

No content

Slide 15

Slide 15 text

Will AI take our jobs?

Slide 16

Slide 16 text

Jobs have disappeared before https://hollycummins.com/will-ai-take-our-jobs/

Slide 17

Slide 17 text

The claim that tech will take our jobs is not new

Slide 18

Slide 18 text

• Low-code / no code

Slide 19

Slide 19 text

• Low-code / no code • CASE tools / 4GL

Slide 20

Slide 20 text

• Low-code / no code • CASE tools / 4GL • COBOL

Slide 21

Slide 21 text

Increasing demand for devs https://hollycummins.com/will-ai-take-our-jobs/

Slide 22

Slide 22 text

Jobs will change

Slide 23

Slide 23 text

Does it make us more productive?

Slide 24

Slide 24 text

Productivity https://github.blog/2022-09-07-research-quantifying-github-copilots-impact-on-developer-productivity-and-happiness/

Slide 25

Slide 25 text

Productivity https://github.blog/2023-06-13-survey-reveals-ais-impact-on-the-developer-experience/

Slide 26

Slide 26 text

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

Slide 27

Slide 27 text

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

Slide 28

Slide 28 text

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

Slide 29

Slide 29 text

Productivity boost https://blog.jetbrains.com/ai/2024/04/developers-save-up-to-8-hours-per-week-with-jetbrains-ai-assistant/

Slide 30

Slide 30 text

Time Saved https://blog.jetbrains.com/ai/2024/04/developers-save-up-to-8-hours-per-week-with-jetbrains-ai-assistant/

Slide 31

Slide 31 text

Productivity boost https://blog.jetbrains.com/ai/2024/04/developers-save-up-to-8-hours-per-week-with-jetbrains-ai-assistant/

Slide 32

Slide 32 text

Top 5 Features https://blog.jetbrains.com/ai/2024/04/developers-save-up-to-8-hours-per-week-with-jetbrains-ai-assistant/

Slide 33

Slide 33 text

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/

Slide 34

Slide 34 text

Developer Experience Boost https://blog.jetbrains.com/ai/2024/04/developers-save-up-to-8-hours-per-week-with-jetbrains-ai-assistant/

Slide 35

Slide 35 text

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/

Slide 36

Slide 36 text

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

Slide 37

Slide 37 text

Chat ● LLMs are good at chat 😁 ● We can ● Ask how to do things ● Ask follow up questions

Slide 38

Slide 38 text

Chat ● Integrated into the IDE ● Context aware ● Can call back to the IDE

Slide 39

Slide 39 text

Chat ● Ask about your project

Slide 40

Slide 40 text

Chat ● Ask about your project ● Ask VCS related questions

Slide 41

Slide 41 text

Explain commit(s) ● Summarize changes in commit(s)

Slide 42

Slide 42 text

Chat ● Can add additional context

Slide 43

Slide 43 text

Chat ● Can add additional context ● Tag files, symbols & more

Slide 44

Slide 44 text

Explain code Selected code added to prompt

Slide 45

Slide 45 text

Explain RegExp fragment

Slide 46

Slide 46 text

Explain cron fragment

Slide 47

Slide 47 text

Explain Spring Data QL fragment

Slide 48

Slide 48 text

Code generation is important
 —

Slide 49

Slide 49 text

Code completion ● Auto completion while typing ● with syntax highlighting

Slide 50

Slide 50 text

Code completion Cloud completion Local completion

Slide 51

Slide 51 text

Code completion macOS Windows / Linux Accept suggestion ⇥ TAB Accept line ⌘→ END Accept word ⌥→ Ctrl+→ ● Change the key used to accept suggestion

Slide 52

Slide 52 text

Code completion ● Shortcut for auto completion

Slide 53

Slide 53 text

Code completion ● Shortcut to generate code ● According to your prompt

Slide 54

Slide 54 text

Code completion ● Generate code in editor ● Can add a follow-up message

Slide 55

Slide 55 text

Code completion ● Note: Might need small fixes ● (Alt+Enter is your friend)

Slide 56

Slide 56 text

AI Actions Generate Code...

Slide 57

Slide 57 text

AI Actions Generate Code...

Slide 58

Slide 58 text

AI Actions From Generate menu

Slide 59

Slide 59 text

Generate commit message ● In the commit tool window ● According to default prompt

Slide 60

Slide 60 text

Customize commit message generation

Slide 61

Slide 61 text

Customize commit message generation

Slide 62

Slide 62 text

Improve commit message ● Only for commits you haven't pushed!

Slide 63

Slide 63 text

Find problems

Slide 64

Slide 64 text

Find problems In commit

Slide 65

Slide 65 text

Main point

Slide 66

Slide 66 text

Photography EV = Exposure value t = Exposure time N = Focal number = focal lenght / diameter of aperture EV = log2 N2 t

Slide 67

Slide 67 text

Photography ● Let's assume we have some code ● The code is not perfect

Slide 68

Slide 68 text

Photography ● Explain code

Slide 69

Slide 69 text

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

Slide 70

Slide 70 text

Photography ● Rename method ev to exposure

Slide 71

Slide 71 text

Photography ● Let's ask again ● We can use specific instructions...

Slide 72

Slide 72 text

Photography ● Side note: options to use the code

Slide 73

Slide 73 text

Photography ... or use predefined prompt: • Suggest Refactoring

Slide 74

Slide 74 text

Photography Side note: options to use the code, includes Show Diff

Slide 75

Slide 75 text

Photography

Slide 76

Slide 76 text

Photography ● Note this refactor includes renaming ● Can also use Refactor > Rename ● (especially if variables are used outside this file)

Slide 77

Slide 77 text

Photography ● Ask for real world scenarios ● (Prompt engineering is a thing)

Slide 78

Slide 78 text

Photography ● Convert to JUnit 5 tests ● with expressive names

Slide 79

Slide 79 text

Photography ● including exceptions and edge cases ● (Unlike some developers...)

Slide 80

Slide 80 text

Photography ● Might need some small fixes ● Add JUnit 5

Slide 81

Slide 81 text

Photography ● Might need some small fixes ● Add JUnit 5 ● Import statements

Slide 82

Slide 82 text

Photography ● The numbers don't add up

Slide 83

Slide 83 text

Photography Large Language Models ... are not good at math https://www.youtube.com/watch?v=0xENpeGTEZ0

Slide 84

Slide 84 text

Photography ● Get real world data ● Talk to some users

Slide 85

Slide 85 text

Photography ● AI Actions > Generate unit tests

Slide 86

Slide 86 text

Photography ● Tests generated in existing test file or new file

Slide 87

Slide 87 text

Photography ● Add additional specifications...

Slide 88

Slide 88 text

Photography ... for better results

Slide 89

Slide 89 text

Photography These tests also fail.. (Remember: LLMs are not good at math)

Slide 90

Slide 90 text

Photography But are generated in the right place

Slide 91

Slide 91 text

Photography ● You can specify how to generate unit tests ● Customize prompt in Settings: ● Tools > AI Assistant > Prompt Library

Slide 92

Slide 92 text

Resolve merge conflicts
 —

Slide 93

Slide 93 text

Resolve merge conflicts

Slide 94

Slide 94 text

Resolve merge conflicts

Slide 95

Slide 95 text

New Terminal ● Currently in beta ● Enable in Settings > Tools > Terminal

Slide 96

Slide 96 text

Use AI Assistant in the New Terminal ● Ask AI Assistant to generate command

Slide 97

Slide 97 text

Use AI Assistant in the New Terminal ● Ask AI Assistant to generate command

Slide 98

Slide 98 text

Use AI Assistant in the New Terminal ● Ask AI Assistant to generate command ● And run the command

Slide 99

Slide 99 text

Use AI Assistant to generate queries

Slide 100

Slide 100 text

Use AI Assistant to generate queries

Slide 101

Slide 101 text

Use AI Assistant to generate queries

Slide 102

Slide 102 text

Use AI Assistant to generate queries

Slide 103

Slide 103 text

Use AI Assistant to generate queries ● Attach database schema ● Might still need small fixes ● IntelliJ IDEA has DB support

Slide 104

Slide 104 text

Use AI Assistant to generate queries

Slide 105

Slide 105 text

AI Assistant ● Can save time ● Boilerplate code / typing ● Tasks we don't like to do ● Understanding existing code!

Slide 106

Slide 106 text

Real world use case https://blog.jetbrains.com/idea/2023/12/java-inspection-with-ai-assistant/

Slide 107

Slide 107 text

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/

Slide 108

Slide 108 text

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/

Slide 109

Slide 109 text

Challenges https://www.jetbrains.com/guide/ai/links/critical-thinking-in-an-ai-powered-world/

Slide 110

Slide 110 text

Challenges: Maths ● Computers are good at maths ● LLMs are good at language

Slide 111

Slide 111 text

Challenge: Timeliness ● Cutoff date ● Suggestions may be (out)dated ● Be mindful when using latest tech!

Slide 112

Slide 112 text

Secure code https://www.jetbrains.com/guide/ai/links/critical-thinking-in-an-ai-powered-world/

Slide 113

Slide 113 text

Secure code ● Be critical in evaluating the AI assistants suggestions ● Use additional tools and techniques to verify the code

Slide 114

Slide 114 text

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

Slide 115

Slide 115 text

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

Slide 116

Slide 116 text

Hallucinations https://www.ibm.com/topics/ai-hallucinations

Slide 117

Slide 117 text

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

Slide 118

Slide 118 text

Privacy "But we can't send data to the cloud"

Slide 119

Slide 119 text

https://www.jetbrains.com/ai/enterprise/ JetBrains AI Enterprise
 —

Slide 120

Slide 120 text

https://www.jetbrains.com/ai/enterprise/ JetBrains AI Enterprise
 —

Slide 121

Slide 121 text

Full line code completion Runs locally! https://www.youtube.com/watch?v=DLBiJ5kYUFg

Slide 122

Slide 122 text

Does it make us more productive?

Slide 123

Slide 123 text

Jobs will change

Slide 124

Slide 124 text

Changes https://x.com/karpathy/status/1617979122625712128

Slide 125

Slide 125 text

Changes (EAP) https://x.com/hszanowski/status/1834175128000688280

Slide 126

Slide 126 text

To reiterate Make sure you understand the code (an) AI Assistant gives you!

Slide 127

Slide 127 text

Does AI replace developers? • Produce more code faster

Slide 128

Slide 128 text

Does AI replace developers? • Produce more code faster -> more code to maintain

Slide 129

Slide 129 text

https://x.com/karpathy/status/1617979122625712128

Slide 130

Slide 130 text

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

Slide 131

Slide 131 text

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

Slide 132

Slide 132 text

Does AI replace developers? • TL;DR: No

Slide 133

Slide 133 text

Does AI replace developers? • TL;DR: No • or at least, not yet (?)

Slide 134

Slide 134 text

Slides & more https://maritvandijk.com/presentations/ai-assistant-developers/

Slide 135

Slide 135 text

https://www.jetbrains.com/guide/ai/