Constructors. That’s literally what seems to be associated with our titles as web professionals. Mine, also – if anything.
And as such, we’re meant to build things. On the outside, the clients love seeing things planted and blossom. Yet if we, the developers, rip it apart: the fighter pilot/poker snub/veterans come out. We comment, ridicule, suggestions, praise, and everything in the form of communication. The critique. Especially when the project is at a toss off stage.
Even before then, the developers are meant to make the very barebones make sense, irregardless of whatever level or standard. Clear naming conventions. Well indented code. Things like that. It’s really important to make meaningful comments and other items of note inorder to keep balance and sense within the realm of the code because of
random occurrences, such as updates that need to be done. These little steps here will help us make a little bit more sense with our coding.
Proper Use Of Indentation
Just a good way to organize your condition statements and other gangs of functions, conditional statements, and other items of note. It just helps keep the code clean and reading won’t be such a problem. Won’t kill you to doing so.
Use proper naming conventions:
This pretty much goes without saying. Better to have a .article_div than a .big_center_thing anytime. Especially in both CSS and Javascript. In JS, I’m usually the..
[itemtype]_[whatitis]
…just to make sure that I remember what goes in. It’s also useful for debugging. Leave the mysterious names for your social aliases. For instance:
var array_choices = [];
I’ll have a list of choices to make in the item. Has to be done this way because I’ll be using an array to iterate through several decisions to use for a user to choose from.
Proper Commenting
Always leave proper comments during your coding in anything that you do. There’s no telling what could happen down the line. Better to prepare for the worst than expect the best. Be descriptive as possible. One line should do it.
/* This is where I’ll be making an alert */
alert();
Sure it’s a dirty job to make things that make sense, but with these tips, there will be LESS confusion on the follow through. Who knows? you might EVEN save lives and not pull off dangerous maneuvers, Maverick.
Make Things Make Sense