So, recently I've pretty much restarted on my IDE project. This got me thinking about restarting on other projects. Some reflections and tips about restarting projects:
Don't
Let's face it. It is a boring task. You have something working and you destroy it. Work on getting your game to work. What is a game if there are no mechanics?
And Optimizing?
Optimizing is also a waste of time. Don’t do it unless you either see lag or you’re already finished with your game, with the latter always being a priority over the former. Some programmers focus too much on getting things perfect. It’s funny, because these are also the programmers that have never finished anything (myself included). It’s a trap, do not fall into it. Also, be careful of early optimizations.
What About Organizing?
Organizing is indeed another time waster, and should not be done unless you are working with a team. It works as long as you know where everything is and you do not need to move stuff around if so.
What To Do If I Do Rewrite?
There are a few times where a rewrite is useful. Try to keep as much old stuff as possible. Rewrite around everything. DO NOT delete anything. Just make classes that serve to replace existing ones and slowly give them new functionality.
Anyway, I hope this small blog helps anyone, especially with F4D currently going on. I am forced to rewrite because I had to change a major class because of my plugin framework (should have done research on that earlier). I’ve fallen a victim to rewriting in all my projects. Remember, chaos is expected, this is the law of entropy. If you’ve dealt with the chaos before attempting to rewrite, you can surely deal with it some more.
Well, yes, that's what optimisation means. I'm saying I don't know if it is smaller, since relational operators are ultimately implemented using bitwise operators anyway (at least that's what I'm guessing cos that's the only thing that makes sense)
I'm wondering this because I'm programming a game boy, if you're programming game maker you don't need to give the tiniest shitI suppose this is what all that fancy stuff like profiling is for.Yeah for the most part I just make sure I'm programming in the elegant way and not the dumb way eg using objects the way you're meant to use objects: using polymorphism and not having massive switch statements everywhere. Optimality makes no odds for most things
CyrusRoberto: I wasn't referring to every situation. I was merely stating that unless it limits it (as you pointed out) the general idea is that it runs faster by eliminating steps and/or makes the source code shorter (to make the file smaller). In toast's case. "If (x&0x8000)" is better.
However, inline functions aren't shorter. They just copy and paste code, but I think to be fair, we are not talking about preprocessor commands.(BTW, optimization can also refer to how easy it is to work with the code.)I'll agree that focusing on formal optimization, and over-organizing small projects, can lead to the death of a project (Or the extremely slow development/death/stagnation of the project).
However, I do recommend something called logical optimization. Make careful decisions about the system you're creating from the beginning, so you don't get bottlenecks later on down the line.On the topic of organization… don't play pretend. Playing corporate manager is fun until you realize how little you actually end up doing. This directed towards organization of your 'team'. If you're working alone, as you say, it's pointless.On the other hand, making sure your code is organized in some manner is damned well important. This covers basic things like file/class naming, consistent naming conventions, etc.Also, having a little schedule is good, especially if you're working on a long term project. Make it a loose one; just committing to working a few minutes a day on a project is going to get you further than procrastinating over it and doing perhaps a few minutes a week. Either way, this sort of thing scales. Larger projects require more optimization, more organization, better management. Smaller projects, not so much. If you're having to restart your project, you have to ask yourself why. What happened to the project that forced you to begin again.too many comments, dr;
Its a good idea to start over if you want to reorganize and optimize in some way. Keep the old stuff, and copy and paste the good stuff over in the right way. And rewrite the stuff that is bad.Starting over takes a considerably less amount of time than it did before when you were working through the problem.