Tonight I gave ChatGPT a coding challenge.
I needed some Python code that takes a datetime string variable, adds 2 seconds to it, then returns the new variable as a string.
See the results in the thread below 👇
I've been learning and using Python for a few years now. I'm not passionate about it, it's just something I have to do in my 9-5.
It took me about 20 minutes from start to finish to come up with this working code.
ChatGPT?
~15 seconds to write a prompt.
The code is more succinct and Pythonic than what I originally wrote 🤯
The question now becomes...
Is this a good thing? AI gave me a better solution 20x faster than I could do it in.
I think AI is going to be a fantastic copilot for developers, authors, and creators in general. Don't trust it 100%, but use it to your advantage.
For the coders out there, you might've noticed that the ChatGPT solution wouldn't actually work.
You need to remove the Z from the datetime string for it to be a valid isoformat string. Then I need to add it back in at the end.
AI should be your copilot, not the one in charge.