First: Thank you! I'm glad my advice is helping! =)
Second: the issue you described impacts EVERYBODY. (I'm doing this right now instead of working on my game...*whistles*)
There is a saying in game dev: "When you are 90% done, you only have the last 90% to go!" Making a game functional (you can play it under OPTIMAL circumstances) is very different from making a game usable (your entire audience can play it under most circumstances). I think the shift from functional to usable is where a lot of motivation for game dev goes in the trash. For many, they feel the "fun" parts are now done. Few people are as motivated to do bug fixes and menus as they are making cool game mechanics.
Also, while hindsight is 20/20 and it is always easier to do something a second time, there is a time and place to redo/rewrite/restructure code. (I've worked as a code optimizer, so I really get this impulse.) The important thing is to determine if the effort to "redo" something is going to make the rest of your project go smoother (or make important improvements to your project's file size/frame rate) or is it just an impulse based on a lack of confidence in your dev ability. If the former, it may be worth the effort to rework as much as is necessary. If the later, well...
The best thing you can do is create a milestone schedule for yourself and try to stick to that. This will keep you focused on what you NEED to get done. If you determine that redoing your code *is* necessary, then you can budget this in to your schedule. Sometimes seeing how much time you have to add to your schedule is enough to discourage yourself from doing it unnecessarily.
I've heard some indies talk about different ways to motivate themselves through the "slog" of completing a big game project. Some rely on encouragement from friends or other devs. Some use a personal reward/punishment system. (I once heard of a dev writing a substantial donation check to a group he loathed - I think the KKK - and giving it to his friend with instructions to mail the check if he hadn't completed his game by a certain deadline.) Less drastically, I've heard of indies setting up press-related events as motivation to meet a deadline. Others simply challenge themselves to meet arbitrary milestone deadlines. I've also heard of devs rewarding themselves with purchases they want. What motivates you, personally, is a very individual thing.
Please let me know if you want more info or were looking for something different.
Viewing post in Ask a Professional Game Developer
"settings milestones in order to keep you going" was exactly what I was looking for. In the past I have slapped everything into a trello board and called it a day, but for my next project I think I'm going to take advantage of hacknplan's time metrics to plan things out based on time, and in short sprints. Thanks you so much for the response!
Hope you have a great day, and great jam if you're participating :)