Next Generation Emulation banner

Good organizing practices?

1011 Views 4 Replies 5 Participants Last post by  fried_egg
I've been contemplating for the past month or so about brushing off my college Java textbooks and maybe make another attempt before my 2+ year old knowledge of Java completely turns into mush (since I have no intent of going back to school anytime soon).

I made an attempt during my college years of creating a program out of hobby. It was called XL-Updater. All it was was a simple update checker for one of my favorite engine mod out there....D2X-XL. Basically, all it did was run the game with a command-line argument, terminate the game, read the version number out of the text file it would create, and check that version number with the latest version on the website. I posted a early release on the D2X-XL forums, and I never updated it since.

I made silly mistakes such as never commenting my code. When it came to working with some "bug reports," I was completely dumbfounded on where to look because the only code comments I had were in my head :p

Dumb decisions aside, I was planning my latest attempt to create a program that will backup PC game saves/profiles (I just lost my CoD4 profile because I forgot to copy it before I formatted :p )

I'm just curious on what tools are out there now that would help me with managing source code. And I guess a few organizing tips won't hurt, either :rolleyes:
1 - 5 of 5 Posts
i use tortoiseSVN and create a private repository for my source code versioning.

basically you 'commit' your code to a repository (can be a local one on your hdd, or you can use sites like googlecode)
then for every commit it tracks your changes, and you can revert back if necessary to previous versions of your code; or you can just look at all your commits to see what you were doing.

its also a nice backup incase you totally screw up your code.


anyways that's what i use ^^
i also don't comment too much of my code unless its something important i'm going to forget.

i don't like seeing too much comments on the main code itself since it gets in the way; and you can't really see what the actual code is doing, but instead see all these comments (which might not even be what the code is actually doing).

with c++ apps, i usually do alot of comments on the .h file, and then the implementations in the .cpp file just have very few comments.
See less See more
Yeah, that's what I do myself. Commenting on the h files and leaving the cpp clean except for tricky/hard to understand optimizations/plain hacks I have to do. :p

SVN is probably the easiest to set up repository tool out there. You can set up your own server, or try one of the free ones out there (xp-dev is decent). There's also mercury which is gaining momentum but I haven't used it. Eclipse also comes with an internal repository system that creates a backup everytime you save. That always helps.
here are some tips that I learned when I am programming at school:
1. Comment on top regarding the general purpose of this particular code
2. comment every function (just a sentence summarization)
3. Comment each loop (It is very hard to run loops in your head when you are halfway through a 5000 line source code)
4. use emacs(linux) or notepad++ (win) and auto-align all of your code

To be honest, I don't comment on any code that I wrote until I start writing codes for professors and during my Internship workterm since I won't be the one to maintain them. ;)
1 - 5 of 5 Posts
This is an older thread, you may not receive a response, and could be reviving an old thread. Please consider creating a new thread.
Top