I spent a couple of days putting together a JSON text editor in a modal dialog for a project I'm working on. I'm combining the Ace editor with the Bootstrap toolkit. I've used both components before, but never together. And they're always a bit tricky to get working because I'm impatient and the docs are spread out, and there are different versions. It's all kind of a mess, so you just get it working and move on, never quite sure why it works, and I rarely end up with reusable code. But it's certainly a lot better than starting from scratch, which basically is impossible, given the depth of the two components. After spinning my wheels a bit, I did what I always do in 2024, I turned to ChatGPT, outlined the problem, and asked if it knew of any sample code, which it proceeded to write for me, in about two seconds (not kidding about that). I copied their code and pasted it into my editor and ran it. It worked. Then I went through a number of iterations, restructuring the code to meet my needs, each time checking with ChatGPT, asking what it thought of my code. And of course there were problems, for example at one point there were two vertical scrollbars, and each time we worked together to figure out the problem and the fix. In the end, I have a solid editor that works exactly as I want it to, and best of all, I understand how it works. Here's the transcript of the work I did with it, over more than 24 hours, a few different sessions. #
A bit of philosophy. People say these things aren't intelligent, but seriously, if I can engage with it as if it were intelligent, far more intelligent in ways than I am, what's the difference between that and actually being intelligent? I know from a lifetime of dealing with supposedly intelligent humans, and being one myself, how rarely we focus on the idea that the person we're conversing with has an inner life that's vastly different from ours and no less complex, and contradictory. We tend to think of others as being like us, or like someone who raised us. Always in a movie, never in the moment. So why is it interesting that ChatGPT is a machine? These are questions thinkers and writers have been pondering for decades if not centuries, but -- now we're living it. I'm so happy to have made it this far! An amazing experience, so much learning in so little time. I don't understand how people can sit on the sidelines and not want to be the first to try all this stuff out, to be part of its evolution. I feel so lucky. #