Jump to content

Personal developing rules?


Marc

Recommended Posts

Do you have any personal rules when developing software? Not rules that are imposed by anyone but rules that you specifically tend to follow?

 

 

A few I have for myself

  1. Commenting code - I always comment every function, procedure, class with what it is intended to do.
  2. Back End - I always tend to code the back end of my software before even looking at the front end. I dont actually know why I do this, its just what I tend to do
  3. When coding an addon for another peice of software, I always prefix my variables, functions, classes etc with the name of the addon (or some abbreviation of) as it makes it easier to track problems.

 

So what about you?

Link to comment
Share on other sites

I code like this:

$blah = SOMETHING;
if ($blah == SOMETHING_ELSE) {
   tab_indent('like so','see?');
   $i = 0;
   while ($i++<10) {
       // TODO
   }
}

I like to write a framework of sorts before doing the front-end and stuff. I also build functions as I need them, I don't go around adding pointless crap if I'll never use it. Saves work time and CPU time.

Link to comment
Share on other sites

For me personally I follow this mantra:

 

 

 

Always imagine the solution first, write it down on paper (the design). Then code it.

 

So very true .......80/20 rule in action which can go either way. You can either have 80% of the time designing and 20% of the time coding, or the other way around. However that way is certainly more sensible, time saving, and makes for a more stable product in the end.

Link to comment
Share on other sites

I used to work for a CMM level 5 company where we had to follow some tough coding standards. We were expected to code with proper naming conventions for functions and files, use comments withing code, include proper formatting and even leave certain number of lines between different modules. I follow the same structure when I code even though I don't work for that company anymore. It makes coding more efficient and easy to maintain even though it takes some time to train your mind to code in that way.

Link to comment
Share on other sites

  • 6 months later...

I love writing down the big steps needed - and if possible the flow of the code before I actually start it. Once I start, I ensure that most of it is properly commented and indented. Later when the site is done with, I try to remove the line breaks, white spaces etc from the files to save some bytes.

 

Also, today, since CSS3 is in, I have almost stopped using images for decorating the site - like for rollovers, menubars etc - but the ones which are needed, remain.

Link to comment
Share on other sites

  • 2 weeks later...

I have a kind of framework that I work in, and I try to code things so that I can add to my overall functionality. So, for example, if you hired me to code a validation system, I would code it so that it could easily be reused in other projects. It would be able to be dropped into anything else I work on, without any errors or conflicts. Everything fits into the bigger picture.

 

I'm not a commenter either, I rarely use them. I mostly code by myself, so nobody needs to decipher what I've done, and I can figure it out within a few minutes, so no need for them, in my eyes.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...