WCJ Expeditions

Speed up with Generative AI

July 15, 2023
Dev Blog

Using AI to assist in Coding

Using GitHub Copilot was useful enough that I plan to keep paying for the $10 monthly fee and keep using it for other side projects. One thing I didn't try was writing a code comment to see how that affects Copilots suggestions. This video is an interesting one to see the basic use of suggestions based on comments provided.

Using ChatGPT is a much more streamlined experiences when compared to my past developer experiences to get basic how to information, obtain code boilerplate, or help in troubleshooting a code bug or configuration issue. In the past it was all google search hunting hoping to find a stackoverflow, online blog, or online doc reference to provide support. Now that approach feels like using a wood axe in Minecraft instead of diamond pick axe to chop trees.

The thing in common between Google Searching and ChatGPTis both need a well crafted input (search for Google / prompt for ChatGPT) to get the right output. There are lots of people out there trying to make a buck off teaching people how to write effective prompts in these pioneer days of generative AI. My advice is don't fall for those scams. It's all natural language and the main thing to remember is your giving a simulated human intelligence inputs to give you a good response. I have found success with prompts like this:

  • "I want you to act as a software engineer. Please teach me the basics of React"

  • "I want you to act as a software engineer. Please update the provided typescript code and explain it to resolve the provided warning. Code: <Insert Code> Warning: <Insert Warning>

If you stay on one chat window session you don't have to keep writing out "I want you to ast as a Software Engineer."

Using AI to write Blog Content

I used a combination of ChatGPT and Bearly to generate drafts of most blog posts (not this one). Bearly costs money real quick so I didn't get much use out of it other than giving suggestions on the post headline. ChatGPT was pretty good at giving a great place to start. You have to help tell it what tone you want as it's natural language can use big words that just don't get used often in the real world. Tell it to use high school level english and set a tone of {serious, funny, witty, playful, etc} and it does better. The context inputs I would give ChatGPT is basically key notes of what I wanted to cover. Much like you would do if you had a professional writer on your team for writing speeches or articles. That staff writer would typically just get a list of notes and key themes from you and they do the rest for you to get the first draft done. The difference is AI will give you that draft in seconds instead of hours or days.

It was good approach that got me over that dread of writing that would stop me in the past from ever starting. I do not like to write as a hobby and dread that feeling of 'writer's block' when trying to convey something complex in writing. ChatGPT helps get over that hump and I was able to write most blog posts in under 30 minutes.

A key point is use it for initial outlines and drafts of the writing. You still need to make it your own and avoid that temptation of simply copy/paste the AI's work. It is far from something that would be in your voice. Who knows - overtime as the AI tools get better it could learn enough about your writing style, tone, and such that it becomes an extension of your like a full on ghost writer or always with you staff writer would.