Game Discussion > General Discussion & Download

Coding Quote

(1/2) > >>

NuMysterio:
I know little about coding, but I came across this statement from this blog and figured it might be relevant for those of you plugging away at this game:


--- Quote ---Crack open your current project. Now, delete as much stuff as you can and still have it work. Done? Okay, now toss out more, because I know that your first pass was too timid. Pretend that you’re paying cash for every line of code. If your project incorporates code by other people, wade into their stuff, too. You’ll be amazed how much can come out.

Don’t leave unused code hanging around because it might be useful someday. If it’s not being used right now, remove it, because even just sitting there it’s costing you. It costs to compile (you have to fix build breaks in stuff you’re not even using), it costs to ignore it in searches, and the chances are pretty good that if you do go to use it someday, you’ll have to debug it, which is really expensive.

It’s tremendously freeing to zap the fat in a system, and after a while it’s addictive. Read all code with an eye towards “What is superfluous?” and you’ll be amazed at how much unused, half-written and buggy crap there is in loose in the world, and how much better off we are without it.
--- End quote ---

necno:
lol, thats actually starting to happen anyway. I think 1.30 will be alot cleaner and functional. Already many bugs have been squashed.

delta224:
As one of the coders, all I have to say is this, Do not reinvent the wheel, this causes so many errors.  The heap corruption error was a result of reinventing the wheel.  If the standard library already does what you need it to do, use it.  The code will be cleaner and there will be less errors down the road.
 
Necro, for C++ this is one of the best references on its standard library I have found online http://www.cplusplus.com/reference/ to the point I have the site bookmarked.

DocClox:
Yeah. One of the things I really want to do is go through and replace all those hand rolled linked lists with std::vector or std::dequeue. It'll clean things up a lot, and eliminate a lot of potential errors

delta224:
I will help you with that DocClox.

Navigation

[0] Message Index

[#] Next page

Go to full version