I guess one of the things you should have in the beginning is some kind of version control - git, svn, etc. Although version control is not limited to large projects, it will help eliminate the fear of changing something because you are afraid that you might break it. If you follow good branching techniques for managing new features and creating snapshots that you can use as breakpoints, then you have a way to manage deployment versions.
Some other obvious aspects have been mentioned - use proper OOP, keep your code relatively simple and modular so that you donโt get into a mess of nested statements / methods and the like. Focus on developing one function at a time, preferably using version control - use branching and other functions that you can merge into the main branch after it's completed. Correct your mistakes when you receive them, and try to understand why this gives you this error. I saw how people tried to โconvinceโ their way of correction by writing more and more code that does not help at all.
Another thing that comes to mind is to look at some projects on github or elsewhere to find out how people manage their code. There are also podcasts and videos - ruby โโpresentations / podcasts come to mind - this can help with information on how to manage large codebases.
It is difficult to work and think about why your current workflow makes it difficult for you to develop, and then change some of the habits that you have. Good luck.
source share