40 seconds of AI-enhanced coding

  Рет қаралды 8,920

Henrik Kniberg

Henrik Kniberg

Жыл бұрын

40 seconds of AI-enhanced coding with github copilot. A simple demo of what AI-assisted coding looks like in practice.
This example wasn't rocket science, coding this manually would have taken a few minutes, or longer with bugs. But the time savings add up fast.
I often use GPT 4 to write unit tests or assist with more complex code. It usually does a great job, but even when it fails and the code doesn't work it serves as good scaffolding and sometimes as educational material (like for example I learned how to do mocking in typescript). Copilot works for simpler things, is right at your fingertips, no copy-paste, but can only add code, not change/remove code.
GPT4 + Copilot are great complement to each other. Major productivity booster.
• 40 seconds of AI-enhan...

Пікірлер: 16
@NotGeri
@NotGeri Жыл бұрын
Definitely a game changer for speed and productivity for people who know how to use it, just as you showcased. I fear a lot of people misuse it and think it can write everything on its own instead of being an actual 'copilot'
@sebastianjost
@sebastianjost Жыл бұрын
I'd say it's a copilot that's still in training. Very good for some things, but doesn't quite see the bigger picture yet. Hopefully Copilot X will be better in that regard.
@catabc-rd8dy
@catabc-rd8dy Жыл бұрын
It's great to see a developer interact with his fanbase. I've been watching all your videos. The one where you explain how to code terrain was awesome.
@NeunEinser
@NeunEinser Жыл бұрын
It's super useful, my job changed to be more of a code reviewer of the stuff copilot generated. Often, I'm still thinking of how I want to write the code, then the copilot suggestion comes in, and it looks generally good for the most part. It even remembers constants from other methods and how you have called a method before.
@studywithme_0402
@studywithme_0402 2 ай бұрын
This is incredible
@broorb4104
@broorb4104 Жыл бұрын
okay that’s actually cool
@mob6245
@mob6245 Жыл бұрын
Incredible
Жыл бұрын
I don't know the context of this code, but I would guess that maybe a third could better be trivialised by not requiring such verbose code (whether that's a weakness of Java or of some library or of the code base). That would also help with reading code, which is often what developers spend more time on anyway. But the rest seems really cool! For helping to read, maybe there could be AI-created warnings when the comments seem to contradict what the code says, then devs could often just read the comments and skip reading the actual code. And of course it would have to be paired with writing good comments.
@AgentM124
@AgentM124 Жыл бұрын
So, should I also trust AI to write unit tests for the code it generated? Or will it be biased to wrap the test to succeed around the method? Or should I first let it generate some unit tests for a hypothetical function with certain requirements. And then let it generate that function?
@sebastianjost
@sebastianjost Жыл бұрын
Depends on the function. TLDR: three tiers of capabilities below help decide whether to generate code, then always read it yourself. 1. Copilot is very good at doing very common tasks, writing boilerplate code and filling in documentation for function parameters or adding a single line of code. 2. More complex tasks like writing a full function, function description or very task-specific lines are quite unreliable. In those cases filling out some comments for the rough structure often helps. 3. Letting Copilot write entire classes or any project with more than 100 lines at once without extra help is pretty much impossible. In tier 1 and 2, letting Copilot generate code is usually helpful. If it's not right the first time, you can try helping a little to figure out a solution together. Especially with tier 2 problems, you always need to check what it generated. There are often mistakes. Sometimes they're easy to fix, sometimes it's going in a complete wrong direction. In tier 3, letting it generate code is mostly a waste of time. Either write it yourself, find code online or ask GPT-4.
@henrikkniberg
@henrikkniberg Жыл бұрын
I often use GPT 4 to write unit tests or assist with more complex code. It usually does a great job, but even when it fails and the code doesn't work it serves as good scaffolding and sometimes as educational material (like for example I learned how to do mocking in typescript). Copilot works for simpler things, is right at your fingertips, no copy-paste, but can only add code, not change/remove code. GPT4 + Copilot are great complement to each other.
@Philip-du9uc
@Philip-du9uc 10 ай бұрын
will ai help in the coding of minecraft updates? its not perfect sure but it can make the process alot easier
@trollconfiavel
@trollconfiavel Жыл бұрын
Holy mother
@jammertoonsaj
@jammertoonsaj Жыл бұрын
Holy cow
@Ozskylevrai
@Ozskylevrai Жыл бұрын
Ayo you're back. Do some minecraft
@RohanSlazar
@RohanSlazar 11 ай бұрын
He's no longer working at Mojang, sadly :'(
Generative AI in a Nutshell - how to survive and thrive in the age of AI
17:57
Minecraft terrain generation in a nutshell
25:49
Henrik Kniberg
Рет қаралды 146 М.
Which one of them is cooler?😎 @potapova_blog
00:45
Filaretiki
Рет қаралды 6 МЛН
How to bring sweets anywhere 😋🍰🍫
00:32
TooTool
Рет қаралды 44 МЛН
Каха инструкция по шашлыку
01:00
К-Media
Рет қаралды 8 МЛН
Masterclass: AI-driven Development for Programmers
8:49
Fireship
Рет қаралды 1,1 МЛН
OpenAI Function Calling - Connect AI to the Internet
9:04
SerpApi, LLC
Рет қаралды 4,3 М.
Master the Perfect ChatGPT Prompt Formula (in just 8 minutes)!
8:30
Live demo of GPT-4o coding assistant and desktop app
3:37
OpenAI
Рет қаралды 371 М.
Torvalds Speaks: Impact of Artificial Intelligence on Programming
5:05
Mastery Learning
Рет қаралды 761 М.
Introducing Kim, your genius AI colleague (part 1)
9:14
Henrik Kniberg
Рет қаралды 7 М.
Minecraft 1.18 experimental snapshot
6:52
Henrik Kniberg
Рет қаралды 100 М.
I Asked GPT-4 To Refactor My Legacy Codebase
12:39
Nick Chapsas
Рет қаралды 348 М.
Bidash - Dorama
3:25
BIDASH
Рет қаралды 153 М.
DAKELOT - ROZALINA [M/V]
3:15
DAKELOT
Рет қаралды 153 М.
Төреғали Төреәлі & Есен Жүсіпов - Таңғажайып
2:51
Adil - Серенада | Official Music Video
2:50
Adil
Рет қаралды 317 М.
Ozoda - JAVOHIR ( Official Music Video )
6:37
Ozoda
Рет қаралды 1,1 МЛН
Қанат Ерлан - Сағынамын | Lyric Video
2:13
Қанат Ерлан
Рет қаралды 1,1 МЛН