AI Assistants - Kent Dodds, "Ai assistants are a force multiplier"

"Ai assistants are a force multiplier" "Learn how to use efficiently"

I watched Kents Epic dev course (15 mini videos) on how to use AI in your workflow. These are my notes.

Customize your AI assistants.

  • the more AI assistants know about you the better
  • chatGpt 4 allows you set "custom instructions", which Kent uses to tell his role (web developer), frameworks & languages used (e.g. remix, typescript), some prettier rules, works on a mac, uses vscode etc.
    • unfortunately this is a chatGpt 4.0 feature (I don't see in 3.5), but I asked chatGpt about it and it recommended you could start the conversation by providing this as context information and provide detailed instructions 
    • you can also tell chaGpt how to respond e.g. "terse", "casual", "call me Denis", "consider new technologies and contrarian ideas", "be accurate and thorough" etc.
  • I tried Kents query in 3.5 and it provided a better answer than 4.0 imo "as a web developer how do I convert a form into FormData" (better in that it provided more code...but maybe that was because Kent configured his to "treat me as an expert" and this the AI provided less details?)

Making technical decisions with AI
  • using an AI assistant can help you think through problems
  • e.g. "please argue both sides of the cuid versus uuid debate"
  • Kent provided a less clear cut more detailed use case where he had a detailed conversation with the AI. Spend time going back and forth
  • "a rubber duck which talks back" when making a decision between options

Exploring unfamiliar topics
  • instead of googling something, why not try chatGpt instead

AI Assistants in editor
  • tabnine and cody (sourcegraph) are AI assistance which have been around a while but Kent uses copilot and likes it (and recommends)
  • copilot uses open tabs to understand context, so have relevant code files open
  • in copilot can open chat request with Cmd + I and edit the same chat request text multiple times to refine the request
  • can select specific code, hit Cmd + I and have the AI focus on that code only e.g. select some code and ask AI to write test for it
  • make it feel like a chat, like someone you're pairing with, conversational
  • when writing tests with AI, make sure it fails as expected (as well as passes)
AI assistants are great at creating fake data. Kent showed a conversation where he refined the test data and improved it. Does creating fake data "all the time"

Simplify api interactions. Write fetch code.

Understand code. Kent typically uses AI assistant to understand code rather than humans these days. AI assistants are really good at helping understand code
  • Kent selected code and then asked copilot to explain
Understanding API Documentation
  • Kent selected some code to reports Sentry errors and then asked copilot to explain how to filter out browser plugin errors

Debugging errors by asking to explain error messages

Simplify, refine, write SQL queries. Understand syntax.

Can use AI to write commit messages. Switched to Source Control view which shows diff changes and btn to commit. Also has an AI btn to generate a commit message. Kent: "I do occasionally use to write commit messages"

Understand and respond to Social media (e.g. X). Kent uses to understand and write.


Some take aways for me:

  • can edit the same chat request text multiple times to refine the request
    • chat back and forth, keep iterating and refine
  • select code and hit Cmd + I
  • custom instructions in chatGpt4
  • established codebases typically have foundational code for tasks like fetching and a set way of using it, using AI to generate fetch code is often not be very useful imo (because it's already simplified)
  • oh yah, don't trust its answers always, do verify


Comments

Popular posts from this blog

deep dive into Material UI TextField built by mui

angular js protractor e2e cheatsheet

react-router v6.4+ loaders, actions, forms and more