Results 1 to 1 of 1
  1. #1
    The affiliate formerly known as ojmoo
    Join Date
    January 18th, 2005
    Posts
    1,466
    Best time saving device: Code using best practices
    I just had to make another major change to my site and it was pretty simple because the original code was clean. Sometimes when you build your site your code is a little out there because you don't know exactly what you want or you hit a problem and add a fix. But I'm telling you, go back later, I don't care how long it takes and fix up the code.

    Change hard coding to soft coding (i.e. use a variable instead of an actual value). Get all your indentions straight. If the same piece of code is needed in multiple places, create a function, etc. Function needed for several files, put it in its one file and import it. It might be a pain, but believe me in the long run you will save lots of time.

    This sort of goes against the adage if it ain't broke don't fix it, and sometimes it is frustrating because you screw up working code, DO IT ANYWAY.

    You probably will be cursing me as you fix up the working code, but once its done and months go by you'll see I am right.

    P.S.
    I have found good code is very self explanitory even without alot of comments. Son don't forget to use variable which make sense :-)
    Expert who says Moo

    a.k.a. OJMOO

    Cow Dance



  2. Newsletter Signup

+ Reply to Thread

Similar Threads

  1. Daylight Saving Time Spring Forward Sunday
    By Trust in forum Virtual Family and Off-Topic
    Replies: 19
    Last Post: March 7th, 2008, 10:31 PM
  2. Time-saving hotlink login URLs
    By Azam in forum Midnight Cafe'
    Replies: 1
    Last Post: March 27th, 2007, 01:47 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •