ChatGPT is wild.

This week I played with it (more than I should have). I had it:

  • Create songs
  • Design game worlds
  • Suggest messaging for homepage and sales page copy
  • Explore the topic of gamification and game-based learning
  • Create a weird epic fan fic starring two friends
  • Create 6-panel comic dialog about developer marketing I might turn into a thing

These were more for fun but I also actually tried using it for some things related to DevEd.

I had it write code for me.

A shiver just went down my spine.

BUT I think it's cool – do I want to sit and make boilerplate code for ideas I have? Not really. ChatGPT could take my ideas and turn them into idiomatic code quickly which is especially useful in course design.

For my upcoming Pluralsight course on React debugging I am designing a companion app that is used in the demos to "catch bugs" – like literally, that's the theme. Instead of a cart, you have a bug net. Instead of typical products you have insects and insect gear, all themed around a specific type of scenario.

For example, I had ChatGPT spit out some scenario code for React code that would generate a TypeError. It spit out a plain-old component. I then prompted it to add the flavor:

Make the component into an insect name that starts with an "e".

I had already designed a bunch of scenarios and it takes longer than you think to find good insect names – yet ChatGPT had it covered and made it into an Earwig component!

I subsequently asked it to make the example more and more complex, eventually having it create a state machine with useReducer.

The code it eventually made won't be a straight copy/paste into the course but I'm really impressed by its capabilities. For another thread, it was able to generate idiomatic code that used our open source game engine for a game idea I had. 🤯

If you want to reduce the time it takes to create examples, add flavor, or concoct a simple narrative around the learning you're designing you could play with ChatGPT and see what it can do for you – maybe it'll give you some ideas.

Have a lovely day,
Kamran

PS. If you want to share snippets, check out ShareGPT.com

Using ChatGPT to create code samples

Want devs to love your product?

Hi 👋 I'm Kamran. I'm a consulting developer educator who can help your DevRel team increase adoption with better docs, samples, and courseware.
jamie@example.com
Sign up