View Single Post
  #11  
Old 03-28-2006, 09:41 PM
Skyld Skyld is offline
Script-fu
Skyld's Avatar
Join Date: Jan 2002
Location: United Kingdom
Posts: 3,914
Skyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud ofSkyld has much to be proud of
Send a message via AIM to Skyld
Quote:
Originally Posted by Andy0687
How can styling and readbility be judged?

I dont get the basis for doing that, if the scripts work and are not computer intensive, who cares who can read it, chances are everyone on the server has an idea what is going on, and thats all that is importaint. Right?
Styling and readability can easily be judged on whether the script's structure is immediately obvious when you open a script.
For example, a script like this...
PHP Code:
function oncreated()
{if (
this.foo==this.bar)
{
this.something=somethingelse;
this.otherFunction();}

... is much less readable than:
PHP Code:
function onCreated()
{
  if (
this.foo == this.bar)
  {
    
this.something this.somethingelse;
  }

... especially with longer scripts.

If you have to sit and think out the structure of a script, i.e. how many code blocks you've ventured into at a given point and for what conditions, then it's badly structured.
__________________
Skyld

Last edited by Skyld; 03-29-2006 at 12:47 AM.. Reason: Better?
Reply With Quote