I have an app I wrote about 10 years ago in asp.net MVC that is currently in production. I’d like to rewrite it using a more modern tech stack. Has anyone done something similar using Cursor? If so, what are some gotchas I should look out for? What do you think the best way to tackle this would be?
Similar boat… I’ve got a .NET program written back in like 2009 that our senior dev created and I am the only user of. (It assists in creating map files for our video game.)
Since I’m the only user and getting time from our senior dev is tough, I decided to hack in some features I’d been wanting for a while.
I’m an old school “script kiddie” who looks at people who can actually code like rockstars (the mid-90s were a wild time to be a punk teenager on AOL!) but I managed to pick up enough along the way to be… well in this boat I suppose. That being said, I am not a professional software developer so this is like the blind leading the blind in some ways. Hopefully some more experienced people will weigh in on all the things I’m doing wrong and help us both out!
I fork the project: I sort of understand the project… as in what it does and how the finished product works, but I have no earthly clue how the inner workings function. (This is all programmed in C# which I have no ability to write.)
So the first thing I do is, I use some of the free models to start producing tons and tons and tons of documentation. Create a docs folder and then I have it go through all of the important files in the project which are unfortunately 2000 line behemoths.
Cursor infuriates me because it will read the first 200 lines of the file and be like oh I totally get it! (when in fact there’s another 1800 lines that it is blissfully ignorant of!) so for files that are huge I have it write a documentation file explaining the structure of the file. This helps a lot later when the agent knows what to do, but has no clue where to find the code and searching the first 200 lines of each file doesn’t help! That’s definitely fine on smaller projects that I work on, but here it’s a huge blind spot. I’ve been looking at all the other various ways to get the agent trained on your code base, but I haven’t figured out and implemented a good one yet beyond writing human readable documentation… which is kind of fine because I, the human, totally need it!
Once I got all the documentation together and read it I was reasonably satisfied that I understood the project well enough to boss the agent around…
My two main goals for this were relieving the amount of manual work that I need to do in the creation of the map. Normally, I do about 2000-3000 individual clicks to put down XY coordinates to carefully trace the borders of a map from an image file. I decided I’m going to ditch the trace and just import a GeoJSON of the area that I want to draw instead. A shockingly short time later, it worked! What would have normally taken me many hours of manual work is suddenly output in a few seconds.
Currently working out some debugging specific to our final usage, but pretty damned impressed.
Later, I hacked in a 90s WareZ style splash screen complete with funky ASCII art too, just for fun.
This depends more on the programming language than on the app being 10years old.
In some programming languages and frameworks you have tools to rewrite programmatically the app into latest version step by step.
Otherwise you have to see what parts apply, make a bridge version that uses previous code with new framework and then adjust remaining parts.
Altarntively we create parallel apps with new version rewrite and switch over when enough has been moved over.