I’m writing an application in WinForms c# that is over 90k lines big. I am not very experienced coder and after some lines of code (depending if it’s something new or something I’ve done before a lot of times) i start my project with F5 in Visual Studio to verify that the things I’ve done work as i wanted it to.
For example:
if data from SQL gets populated in ListView correctly
if sorting ListView works as expected (newly integrated feature)
If docx generating works and the docx is created with proper formatting
If counting is done right
Is this the proper way of doing it? Or are there better ways? For now starting up my app is like 5-10 seconds so it’s not a big deal, but maybe there’s a better way then doing it the way I do it.
I am coding this app alone on one computer.
Given the size of the codebase it sounds like don’t have the ability to completely restart from scratch to restructure the code.
If you were at the start then I would advise you to use Test Driven Development (TDD), and to make sure that you keep the user interface code as separate as possible from the rest of your code, as it is notoriously difficult to test in an automated fashion. I woudl still advise you do some reading about TDD, and also about User Interface Design Patterns
It sounds like what you want however is a way to go forwards with an existing body of code though, which I am going to assume is not structured in a way that is amenable to Automated Testing, as this seems unlikely from what you have said.
In this scenario, you are probably doing the right thing. It is certainly important to keep the length of time between you adding a feature and testing a feature short, as keeping this feedback loop short will make it easier to check that your code does what you expect it to do since you wont have forgotten what you were trying to achieve when you test it.
If you find that you are wasting a lot of time compiling and loading your app try and bunch related changes together particularly when doing simple changes. This should help you to get the balance correct.
Although I am assuming you cannot make wholesale changes to existing code, something you may be able to do is to write new code in a more testable way, and write unit tests for those, but you will have to weigh up the cost of having code which ends up with a number of different coding styles against having one coherent style.