I wanted to learn how the CodeMirror editor works,...
# of-ai
e
I wanted to learn how the CodeMirror editor works, so I asked GitHub Copilot's agent mode to build a little app that uses it for me. We had a back-and-forth where I pointed out the bugs I've seen in the UI and then it fixed it. But all this took place without me having to look at the actual code, so I don't really feel like I learned anything from this experience. That makes me wonder - do people here use these tools for learning, and if so, how?
m
by looking at the working code and taking what I need 🙂
e
That's how these AI tools learn too!!
It's kind of the best I've got so far - either asking it for code samples or skipping the middle man and just looking through the source code for various projects to see what makes them tick. But I do wonder if there are better ways to do this.
i
I haven't found agents to be a net positive use of time or energy in the handful of times I've tried them.
j
I don't start by asking it for code, I ask it to explain the behaviour I don't understand, then I guess how I could correct it, and have it judge my guess. When it thinks I understand, I ask it for code. I review the code for parts I don't understand, and ask how those parts work. Then I run the code and debug it in the same way. I find it much more efficient for learning new tools than anything else I've done.
w
I've been trying to get Cursor to do useful things. A good example came up the other week...
When I update! an AssignmentStageRoundBid can the price for the option be nil? The code here handles the case, but my real question is whether any callers can pass a prices hash with a nil price for some id. Please look into it.
I know checking this is both straightforward and a little tedious: so worthy question for the agent. It replied with code snippets that prove the point (and some that are beside the point) but it helped.