Graal Forums  

Go Back   Graal Forums > PlayerWorlds > PlayerWorlds Main Forum
FAQ Members List Calendar Today's Posts

Reply
 
Thread Tools Search this Thread Display Modes
  #1  
Old 03-28-2006, 06:54 PM
Andy0687 Andy0687 is offline
Enigma
Join Date: Feb 2002
Posts: 1,072
Andy0687 is on a distinguished road
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?
Reply With Quote
  #2  
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
  #3  
Old 03-29-2006, 01:07 AM
Projectshifter Projectshifter is offline
The David
Projectshifter's Avatar
Join Date: Apr 2002
Location: USA
Posts: 912
Projectshifter is an unknown quantity at this point
Send a message via ICQ to Projectshifter Send a message via AIM to Projectshifter Send a message via MSN to Projectshifter Send a message via Yahoo to Projectshifter
Quote:
Originally Posted by Andy0687
How can styling and readbility be judged?
That's one of the reasons I don't like what is on the wiki right now. You don't get judged on that, but if you can't read it you can't evaluate the script. I have seen too many servers that have scripts that aren't indented at all. It makes it virtually impossible to read, and it isn't the job of the GST to go through and style everything. If someone wants their server up, then they should have no problem styling their scripts, even if it's after the fact and they do it with NC or the offline editor. It's kind of a lesson they need to learn. If you plan to continue coding, regardless of what language, you're not going to be taken seriously if you don't style, no matter how good your stuff is.
__________________
Who has time for life these days?
Reply With Quote
  #4  
Old 03-29-2006, 01:12 AM
napo_p2p napo_p2p is offline
oh snaps
napo_p2p's Avatar
Join Date: Sep 2003
Location: Pismo Beach, California
Posts: 2,118
napo_p2p has a spectacular aura aboutnapo_p2p has a spectacular aura about
Send a message via AIM to napo_p2p Send a message via MSN to napo_p2p
Quote:
Originally Posted by Projectshifter
That's one of the reasons I don't like what is on the wiki right now. You don't get judged on that, but if you can't read it you can't evaluate the script. I have seen too many servers that have scripts that aren't indented at all. It makes it virtually impossible to read, and it isn't the job of the GST to go through and style everything. If someone wants their server up, then they should have no problem styling their scripts, even if it's after the fact and they do it with NC or the offline editor. It's kind of a lesson they need to learn. If you plan to continue coding, regardless of what language, you're not going to be taken seriously if you don't style, no matter how good your stuff is.
I remember a long time ago, I asked Projectshifter to help me with some pickaxe script, but I had it all on one line, and I think it killed him.

But then I used:
with(getplayer(Projectshifter)) {playerhearts += 20;}

So he breathes again.
__________________
Scito hoc super omnia.
Haec vita est tua una sola.
Dum vita superest, utere maxime quoque puncto, momento, et hora quae habes.
Tempus neminem non manet.
Noli manere tempus.
Carpe Diem

Seize the Day.
Reply With Quote
  #5  
Old 03-29-2006, 01:14 AM
Projectshifter Projectshifter is offline
The David
Projectshifter's Avatar
Join Date: Apr 2002
Location: USA
Posts: 912
Projectshifter is an unknown quantity at this point
Send a message via ICQ to Projectshifter Send a message via AIM to Projectshifter Send a message via MSN to Projectshifter Send a message via Yahoo to Projectshifter
Quote:
Originally Posted by napo_p2p
I remember a long time ago, I asked Projectshifter to help me with some pickaxe script, but I had it all on one line, and I think it killed him.

But then I used:
with(getplayer(Projectshifter)) {playerhearts += 20;}

So he breathes again.
I was revived and then promptly arrested for strangling napo and his lack of styling
__________________
Who has time for life these days?
Reply With Quote
Reply


Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT +2. The time now is 07:48 AM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2026, vBulletin Solutions Inc.
Copyright (C) 1998-2019 Toonslab All Rights Reserved.