How I Use ChatGPT as a Software Engineer

#1 My New Rubber Ducky

ChatGPT is my new and improved version of the programmer’s iconic rubber duck. I talk through things with ChatGPT and it gives me its opinions – which are often very helpful. My ChatGPT rubber ducky helps me:

  1. Test my assumptions
  2. Debug and understand errors
  3. Discuss high-level architectural pros and cons

Examples:

Test my assumptions

Full conversation: https://chat.openai.com/share/86d12fdc-2695-44b9-988e-db0f7a96c16c

Full conversation: https://chat.openai.com/share/f03b80a8-75e0-45c4-8deb-7e69f53dc807

Full conversation: https://chat.openai.com/share/1b1742ce-56ff-48bc-8798-4396f4016d28

Debug and understand errors

Full conversation: https://chat.openai.com/share/32a0b87a-b211-4c2c-bb1e-0ebdd7b299c3

Discuss high-level architectural pros and cons

Full conversation: https://chat.openai.com/share/af14bd35-eea9-409d-a8e1-05deb6b0c88a

#2 Refactor

I have been consistently impressed with ChatGPT’s ability to refactor functions, classes, or entire files of code into cleaner, more human-readable code (I know, ironic 😆). Just make sure you continue to write unit tests for your code to mitigate bugs with the refactored code.

Examples:

Full conversation: https://chat.openai.com/share/8707b5fd-5c2e-4903-b510-907ee607deb8

Full conversation: https://chat.openai.com/share/773d74a1-4eea-4ba0-b23a-705ac3dfe5bd

Full conversation: https://chat.openai.com/share/e9d80261-3dd7-499a-b581-3d3bea73729f

#3 Gimme Dat Boilerplate Code

ChatGPT’s ability to generate boilerplate code for any given language, framework, library, SDK, API, etc is incredibly useful. It won’t fit your needs exactly, but it’s a great starting point.

Examples:

Full conversation: https://chat.openai.com/share/62f4b46c-845a-4914-ac65-f4314ac5a1c4

Full conversation: https://chat.openai.com/share/e76d9652-6e54-448e-b653-c3f322186cfe

Full conversation: https://chat.openai.com/share/6801f62a-2847-42b5-9c47-2b77f1baf353

#4 Teach Me

With a sizable chunk of the internet’s important information aggregated into the mind of ChatGPT, learning from it is a big opportunity.

The challenge now becomes coming up with the correct prompt/question to generate the answer you’re looking for. It’s handy that ChatGPT remembers context of the current conversation so you can ask follow up questions when necessary.

Examples:

Full conversation: https://chat.openai.com/share/ee20c841-6f53-47db-9fb7-d8e0c98878a6

Full conversation: https://chat.openai.com/share/f4552013-4824-42b0-894e-d4fd69cadb1c

Full conversation: https://chat.openai.com/share/3109f74f-0c3c-45e7-b4e1-d897aa7310ad

Full conversation: https://chat.openai.com/share/e8d6f84f-0e09-43a5-a445-7ec64bf7dbc3

Full conversation: https://chat.openai.com/share/f5ce0c0a-56bd-427a-8f5c-8ee3788658ae

What about other AI tools?

  • GitHub CoPilot
    • I tried the 1 month free trial and wasn’t impressed enough pay the $10/month subscription fee. In my opinion, it was a little too eager and distracting when giving me suggestions.
  • Google’s Bard AI
    • I use this when I need information that is more current than September 2021 (ChatGPT’s cut-off date on it’s training data).
  • Bing’s AI Assistant
    • Same use as above. I’ll often compare the answers of a prompt from multiple AIs.

Conclusion

AI tools are helpful for a software engineer 🙂.

Leave a comment