Michael McGreal

Michael McGreal

Learning a new language with chatGPT

I had an idea for a git-to-article program that would generate an article from git .diff files and their commit messages, and display them in a vertical timeline altrnating between the commit message and the stylized code diff.

After an MVP using github rest API (and their oktokit js client), I realized that it would be more efficient to run CLI commands on the local git repository. This had numerous other benefits too.

I am sufficient in the terminal, but this project pushed the boundaries. ChatGPT was making headlines, so I decided to ask it some simple questions.

It introduced me to https://stedolan.github.io/jq/ which has a similar feeling of javascript in the terminal! I.e. mapping over data.

The most interesting part about learning like this was that each chaptGPT answer revealed some new syntax or a different way to achieve the same result.

Often, the code was buggy, but by simply introducing me to the syntax, I was able to find the related methods in jq documentation. Then, the documentaiton introduced me to another related features.

It was a reverse way of learning, and I loved it.

screenshot of a text conversation with chatGPT