aider/examples
Paul Gauthier 7b4c9079c3 copy
2023-05-14 14:24:27 -07:00
..
2048-game.md copy 2023-05-14 07:12:01 -07:00
complex-change.md copy 2023-05-13 12:54:52 -07:00
css-exercises.md copy 2023-05-13 12:50:05 -07:00
hello-world-flask.md Creating empty file 2023-05-14 09:09:37 -07:00
pong.md copy 2023-05-13 15:27:03 -07:00
README.md copy 2023-05-14 14:24:27 -07:00
semantic-search-replace.md copy 2023-05-13 12:52:29 -07:00
update-docs.md copy 2023-05-13 12:54:20 -07:00

What's it like to code with gpt-4?

Below are some chat transcripts showing what it's like to code with the help of GPT-4. They were recorded using the aider command line tool. In the chats, you'll see a varity of coding tasks like generating new code, editing existing code, debugging, exploring unfamiliar code, etc. It's worth noting that:

  • Each time GPT-4 suggests a code change, aider automatically applies it to the source files.
  • After applying edits, aider commits them to git with a senisble commit message.
  • aider will note whenever a source file is added to the chat session. Once added, these files are available for review and editing by GPT-4. The user adds files either via the command line or the in-chat /add command. Sometimes GPT-4 asks to see specific files, and aider adds them to the chat after the user approves.

Chat transcripts of coding sessions with gpt-4

  • Hello World Flask App: Creating a simple Flask app with various endpoints, such as adding two numbers and calculating the Fibonacci sequence.

  • Pong Game with Pygame: Creating a simple Pong game using the Pygame library, with customizations for paddle size and color, and ball speed adjustments.

  • 2048 Game Modification: Exploring and modifying an open-source javascript 2048 game codebase, including adding randomness to the scoring system.

  • Complex Multi-file Change with Debugging: A complex code change involving multiple source files and debugging.

  • Semantic Search & Replace: Updating a collection of function calls, which requires dealing with various formatting and semantic differences in the various function call sites.

  • CSS Exercise: Animation Dropdown Menu: A small CSS exercise involving adding animation to a dropdown menu.

  • Automatically Update Docs: Automatically updating documentation based on the latest version of the main() function in the code.

Transcript formatting

Output from the aider tool is shown in a blockquote like this.

> The user's chat messages are bold and shown on a prompt line like this. They contain they user's change requests, clarifications, etc.

Responses from GPT-4 are in a plain font like this, and often include colorized "edit blocks" that specify edits to the code. Here's a sample edit block that switches from printing "hello" to "goodbye":

hello.py
<<<<<<< ORIGINAL
print("hello")
=======
print("goodbye")
>>>>>>> UPDATED