Pairing with GPT-4
GPT-4 can be helpful for beginner and senior Ruby developers, but it does have limitations. It won't write all of your software for you, but it will point you in a useful direction, especially if you prefer learning by doing.
Let's look at how well GPT-4 pairing works by picking an easy, but less well known project with some edge cases: downloading a RubyGem, parsing the docs via YARN, and dumping them into a Sqlite database.
The Initial Prompt
Create a Ruby script for me that downloads a RubyGem, parses the docs via YARD, and dumps them into a Sqlite database that's named
#{gem-name}-#{gem-version}.db
. The database should also include information from the Gem spec.
GPT-4 usually starts…