AI is every where now. 500 billion dollars in proposed investment over the next ten year and the hype bros saying that AGI will be here any minute now.
For general purpose learning, I think it’s pretty good if you know what questions to ask. For learning a new programming language or framework though I think it’s a terrible idea.
If I had ChatGPT or Github Copliot at my disposal back when I first started my first professional programming gig I would have most assuredly used it… to my detriment. When I didn’t know something I had to struggle through it, learn it, and finally comprehend it. I was also lucky to have a great mentor, Robby Russell, who I harangued constantly with questions starting with “I have a question…” and he answered with enough information to stop me from drowning but didn’t outright rescue me and give me the answer.
ChatGPT and other tools like it would have given me the answer wholesale and I probably wouldn’t have learned a damn thing. It’s like memorizing the answers to a mathematics test without actually understanding how it all actually works. Code generation tools like Github Copilot and Cursor make that even worse.
I’ll give ya’ll an example. I’m gonna write something and see if you can prevent yourselves from thinking about it. Pink elephants. You thought of a pink elephant, didn’t you? It’s hard not to. Unless you have Aphantasia you likely pictured it in your mind’s eye.
It’s the same thing with code generation. I can create a new Ruby file called, idk, something like messaging_service.rb
, open it in my code editor and start writing “c” just to have it autocomplete with something like the following:
class MessagingService
def initialize(input:)
@input = input
end
def input=(input)
@input = input
end
def input
@input
end
end
Which is fine I supposed but it’s actually not idiomatic Ruby. There is no reason to have setter and getter methods when I can just put attr_accessor :input
at the top of the class. So now whatever was in my mind before I started typing was replaced with that “pink elephant” as it were (and it’s not the best Ruby code). If I was learning a new language like Go or Kotlin it would likely do the same thing and pollute my thinking with whatever it thought was the best thing (which is sometimes wrong).
Code generation tools are great when you have knowledge of the language or framework. It can save you tons of time writing boilerplate code so that you can get to something more interesting. For learning, I think I’ll pass for now thanks.