ID:2116827
Jul 15 2016, 10:13 pm
|
|
Hey guys I've been programming for a few months and as I zoom around the forum, mostly the Developer Help section, I notice some people reply to others post saying that their code is jumbled, unorganized, or is hard to look at. I am not trying to say that these replies are mean or anything, just that I do not understand what makes codes and such unorganized so that I don't end up screwing everything up in the long run. I know don't do stupid things like have all your procs, verbs, and variables in on DM. or other things that make sense, but I want to know if it would be smart to have sections of types of variables separated by ///////. Is there a such thing has to many folders and when it comes to verbs how could I separate that. Most of the time I see people saying the unorganized codes are like NPC coding where they have the A.I attacks and procs. I would like to say that I am not copying those examples and are trying to do my best with organization, but need helpful tips from experienced people. I also would love to not have to rearrange or decipher any codes months from now regretting where I put what.
|
Copyright © 2024 BYOND Software.
All rights reserved.
Some other practices that can make your code harder to read:
But in short, what's important is to do what makes your work space comfortable for you, because after all, you'll likely be working with the code the most.
I personally long-type my code and remain descriptive at all times. If I cannot look at something and easily determine its orientation, then I was not descriptive enough. This ensures that any amount of time could pass and I can say "Oh, this has to do with this!" at a glance.
Also, I wouldn't say there is a such thing as too many folders, but your project structure should make some logical sense. Finding your balance is what counts. Let me show you how I currently organize my project: