My experiences with Cursor for creating applications

Peter:

Hello, everybody, and welcome to another episode of the UI Buzz podcast. I'm your host, Peter Willam, and you can find me and this podcast at Peter Witham dot com. In this episode, I am gonna talk about my experiences using Cursor, the IDE that you may be familiar with or at least heard of if you're a developer of any kind. It's, based on Visual Studio Code, and on top of that, they've put a whole bunch of super smart AI, and I wanted to put it through its paces. So let's go ahead and get into this.

Peter:

As I mentioned, basically, it's Visual Studio Code. So if you're familiar with that application, you're gonna be very familiar with Cursor. Now what they did is they took it, they made some changes, and over the top, they built this super smart AI system that I really wanted to try out. So I did this over a couple of live streams, and I'll put links in the show notes. And I did mention this on my Compile Swift podcast, but I felt that it deserved an audience here beyond the Swift and Apple platforms because it really applies to anybody who's a developer using any languages, basically.

Peter:

So I took an approach of 2 different things that I wanted to try. Now the first thing was my number one rule, I am gonna let the software do everything. I am not gonna intervene even if I think it's going down the wrong track or something like that. I wanted to see if I left it to its own devices and just followed its instructions, how well it would do. So the first project that I decided was to go with one that I already knew how to do, which was create a React based application with a database back end and Tailwind CSS.

Peter:

Now nothing particularly super special there, but I wanted it to be a fair test and I wanted to pick something that I felt, you know, folks would use this tool for and maybe they know how to do this or maybe they didn't know anything about these languages and these tools and they wanted to create a web application. So I thought it was a fair test. So what you do is when you open up the application, you get basically an empty screen like you would with a Visual Studio Code. But on the side, you get this chat window, and this is key to the whole process. Now in the chat window, what I did, I described basically what I wanted to build.

Peter:

So it went along the lines of this. I want to build a web based application using React, MySQL, Tailwind CSS, TypeScript, and Node. And that was the extent of defining the technologies. I then went on to say, I want this application to have a user account management system where a user can register, log in, see their profile, change their password, and log out. That's a very standard thing and I thought, well, you know, let's give it a fair chance here.

Peter:

Right? So this was the first round and and after that I hit return. It goes away and thinks about it for about a minute, maybe even less than that. It was pretty fast and I had it set to use Claude, 3.5, if I remember rightly. And it comes back with a series of tasks.

Peter:

It basically explains everything to you as you are about to perform the task. So at the beginning it said, okay, I think you're gonna need, you know, a database with some with a table. You're gonna need these various screens, and here's how we go about this. So naturally, I just went through and followed the tasks. Basically, you can hit a play button on each of the tasks and it's gonna show you in the main editor window what it's about to do.

Peter:

And you can either accept that or whatever you want to do. Right? Make changes. But in this case, for my test, I just accepted it every time. It went through and created a whole series of typescript files.

Peter:

It created a basic React application. It created a basic model. It then said, okay, we need to hook this up to MySQL. Now, a quick note here. The only two things I did ahead of time, which I think, you know, would be sort of common sense, is to install Node and to install MySQL.

Peter:

That's the only two tasks I did before opening up Cursive. So it went ahead and it showed me and it said, okay. And I think you're gonna need a SQL statement to create a table with the various properties. And again, I just tell it go ahead and do it. It runs all of these in the terminal.

Peter:

I allow it to go through and create the files. And then, of course, it says you're gonna want to do an NPM install. I tell it to go ahead and run that. I didn't specify NPM or yarn or barn or any of those. I just let it decide for itself.

Peter:

Now at the end of this, it had performed a lot of tasks, created a lot of files. But to me, I knew that it was on the right track because I've done this before and so I knew we're in with a pretty good chance here. I did hit one problem, which was of my own doing, which is I forgot to set up a password on MySQL because it was a fresh install. So I went ahead and did that. And then I basically tell it, okay.

Peter:

It says, let's run the application. So there's 2 parts. There's the server side. Right? A node based server.

Peter:

And then there's the client side. So you run NPM start in both of those. And they fire up in the web browser. And lo and behold, it just it wasn't the previous name because I hadn't done any design, but these screens were functional. I could register a user account with an email and a password, which is what I specified at the beginning.

Peter:

I forgot to mention that. I then went in and logged in and, you know, I did the usual checks. Right? I tried the wrong login and sure enough it said, nope. Not gonna let you in.

Peter:

I put the correct login in and it went ahead and went to the profile page where I could reset my password, update my password, usual things. Right? Everything just worked. I was super impressed with this. Right?

Peter:

Again, it was all in TypeScript and, you know, I was very happy with it. I didn't bother to make the design any prettier. It was not part of the idea of this test. So that took, I think that was about an hour, if I remember rightly. Because I was doing this on a livestream, so of course there was lots of discussion and I was explaining to the audience and the chat room what I was doing and some thoughts and everything else.

Peter:

So it probably took slightly less than an hour an hour to get to that point from nothing, which I think is impressive. Now again, yes, there is nothing there you couldn't do by hand if you knew how to do it. But I think it's pretty confident I'm pretty confident in saying it would have taken an hour to do it all by hand rather than just letting the machine do these things for me and and make all the appropriate choices. I then went ahead and wanted to add a feature where I could record a new screen where I could add a new record, where I would put a name, a URL, and a note field. Kind of like a simple bookmark process.

Peter:

And again, it goes through and the beauty of this is it analyzes all of the code in your project. Not just any one file or tell you how to create this feature and let you figure it out. It actually figures out for you how to integrate this into all of your existing code. And it did it beautifully, I gotta say. It updated a bunch of things.

Peter:

Of course, at the end, it included some new packages. So I had to do an npm install and of course it told me to do that. Went ahead and did it. Ran it. Again, super impressed with how well it did all of this.

Peter:

And again explaining all the instructions, all the changes it was going to make. So an important thing here is this is a fantastic learning tool. If you are wanting to learn to do something with a new language or something like that, this is a great way of discovering how to do something practical and have it explained to you as you go. So that was the React version and like I say it gets a passing grade there. No problem at all.

Peter:

Very impressed. And I expected that in many ways. I thought there would be more problems. And it's worth noting that anytime you do have a problem, like I had the password problem, you can just tell it in the chat box, look, this is the error I'm getting. And again, it's going to analyse all the code in your project, and sure enough, every time it was like, oh, yeah, I see the problem.

Peter:

It's very friendly. It literally does say things like I see the problem and tells you how to fix them and makes recommendations. And if those don't work, you can tell it again, it'll try a different way and you can keep doing the process. Now for the next project, I want you to really step up the challenge here. And this will be of interest to Apple developers.

Peter:

I wanted it to create a Swift UI based application. So I wanted to create the same style of app as I did with the React one so that I could, you know, compare them. Right? So again, started up a new project. Now in this case, it's worth noting, cursor doesn't know what Xcode is.

Peter:

Okay? An Xcode project. I created an empty SwiftUI Xcode project and specifying that I was going to use Swift data on the back end. Okay? And then I point cursor at that location where I've created the project so it can put the files in.

Peter:

And so in the chat box, I create a new application and I say I want to create a SwiftUI based iOS application using Swift data. I want to be able to, again, same thing, right? Create records with a URL and a notes field and so on. I didn't bother so much with the login system on this one because different. Right?

Peter:

It's on my device or on your device. So you're already logged into your phone. But the point being is that I wanted it to have the same features. So went ahead and did that. Again, it went through, thought about it.

Peter:

It created a whole series of SwiftUI files. It created the models that I needed, and it also gave me instructions like, hey, this is gonna use Swift data and those kind of things. And I went ahead and run the application. And sure enough, to my absolute surprise, I have to be honest, it just worked. I was blown away.

Peter:

I really thought SwiftUI and in particular Swift Data being as new as they are, this would cause a problem. And it didn't for the initial project. Now, that's the short version. Right? It just all just worked.

Peter:

It was fantastic. There was some problems along the way that I'm gonna say were user error because I it was putting files in the wrong folder. I think that was my fault, but I just had to move the files to the correct source folder in the application and away it went. Now, there was a complication when I wanted to add a new feature and and this is where things started to go wrong. But again, I think it's interesting, but I think it's a mixture of not planning it correctly and perhaps it needs to progress a little before I can figure this out.

Peter:

Because I tried to add a new feature which required adding a new model, some new entities to the Swift data, and things like that. And it got as I did all this, it created the UI and everything just beautifully, but it started to have some problems with the types, the custom types, which if you're an Apple developer, you'll be familiar with this with Swift. But it got caught in a loop. And this is where, as I was saying, I started to have a conversation with it about the errors. And it did its very best to analyze all the files and fix them.

Peter:

And at first it was doing okay. But eventually we got stuck in this loop of doom, where I felt like it was doing one fix over the top of another fix that then broke the previous one, and it just got stuck in a loop. So at that point it failed. And by failed, I mean we tried for 30, 40 minutes on the live stream to get this thing working without me helping it. Eventually I did try to help it out, but it really didn't help it solve the problem.

Peter:

So that part of it failed. But I think it's worth noting that again maybe a bit of forward planning and a little bit of future development from the LLMs and that on the background, maybe things will get better. Right? It's fair to say, because I've seen other folks, other friends do this and it worked for them. So I do believe it's capable of it.

Peter:

So I'm gonna give it a passing grade. The upshot of all this is, I'm very super impressed with Cursor. And I think it would serve to be a fantastic tool. And all of these AI tools like this, if you as a developer use them as a context to do all of the mundane tasks for you. And basically maybe have it create the shell of things that we all do these things every time, right?

Peter:

A 100 different ways, all projects and things. If you have it do all of that for you, to basically get you to the part where you need to do the specialized part, I think it's going to work out. It's going to save you a massive amount of time and over time I think it will get better at analyzing problems and solving them and recognizing and learning from these situations. So I think it's very much a call worth looking at. I do want to mention that at least as of the time of this recording, I believe I was using the free plan, which is like a 2 week evaluation, which is all I needed for these streams, and to do these tests.

Peter:

But it's only something like $20 a month for a developer for unlimited calls, which if you think about it, that is insanely good, right? If I can trim off hours and hours of development every project, every week, every month, whatever it may be, that is easily worth $20. My time costs way more than that and I'm sure yours does too as a developer. And so therefore this is a no brainer in my opinion if you need a tool like this. And like I say use it in the context, right, as an assistant rather than just let it do its thing because you can intervene at any time and change these things.

Peter:

And because you can have it analyze every file in the project, every time you want to do something or ask it a question, it's a pretty safe bet that it's gonna pick up on the manual changes that you do because it did when I did them. So I wanted to put that out there this week and share this with you because it really has been quite an eye opener for me. Not that I didn't doubt the power of these AI tools, but I underestimated their ability to adapt to these technologies and especially adding features and evaluating the work that's already there, be it work that the machine created or work that I created, and to make recommendations and improvement. I would like to do some future testing, where I use these kind of tools to refactor existing code created manually and see how that works. I think that's gonna be very interesting.

Peter:

But I'd love to hear your thoughts on this. If you wanna come on the show and talk about this and discuss this, I'd love that too. Reach out to me. Right? Go to peterwitham.com/contact.

Peter:

You can reach out to me there. Let's get a conversation going. But I hope this gives you all something to think about. If you wanna try Cursor, just go to cursor.com and download it. Give it a go.

Peter:

See what you think. That's it, folks. Speak to you in the next

My experiences with Cursor for creating applications
Broadcast by