Go Back   vb.org Archive > Community Central > vBulletin.org Site Feedback
FAQ Community Calendar Today's Posts Search

Closed Thread
 
Thread Tools Display Modes
  #1  
Old 08-01-2005, 10:05 PM
akanevsky akanevsky is offline
 
Join Date: Apr 2005
Posts: 3,972
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default To enforce a valid coding style in the community!

I have noticed that most of the coders @ vBulletin.org do not follow vBulletin coding standards and / or make a code unnecessarily long with extra queries and other unnecessary stuff like creating code / variables that are already present on a certain vBulletin page... There are only about 4 or 5 coders who follow those standards..

While most of the hacks themselves are great, these coding faults pose security and stability errors, making server load higher than it could be if the code would be optimized. Plus, poorly written code might take more space than an optimized version of the same code.

What I suggest is making a system where we would help people perfect their hacks after which it would be marke as PHP Valid.

It should be no problem for the forum administrators to add a field "QA Verified", editable only by the QA team and the administrators. Once the field is created, allow users to choose from displaying all hacks or only the ones marked as "Containing an optimized PHP".

This way, while the coding style will not be enforced, vB hackers will be encouraged to code properly in order to rate higher and display their hacks better. The best part is, this system is easy to implement (I could help making it), and it would not require immediate validation, which is a plus from the QA team's point of view.


What do ya'll think?

If this works out, I could help creating that system and later be a member of the verification team.
  #2  
Old 08-01-2005, 10:14 PM
Brad Brad is offline
 
Join Date: Nov 2001
Posts: 4,765
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

We already tried this (in a way) with the QA team and it failed. There just aren't enough experanced people with the time to do something like this.

BTW we can't enforce people to code to standard anyway. Take a look at some of the 'experanced' coder's early hacks and you'll see what I mean, everyones ability to code develops over time with the help of others. Enforcing people to code to standard would deny people that option.
  #3  
Old 08-01-2005, 10:24 PM
Revan's Avatar
Revan Revan is offline
 
Join Date: Jan 2004
Location: Norway
Posts: 1,671
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I offer my services as a member of the verification team as well. You remember from the Hack Manual Gen thread that I'm a perfectionist, so I would be one of those 4 or 5 I strive to achieve the standards in terms of coding style, but also actual coding (such as escaping DB values the vB way), templates, phrasing, etc
[/advertising to blag his way into the team]

I would applaud such a change, phpBB does it and it works for them, so why shouldn't it work for us?
Coupled with the Hack Database, this would IMO definetely be a huge step towards a better vBulletin coding community as a whole.

The sceptics might say "we can't force people to code a certain way", and while this is true, I fail to see why us hack installers should be forced to either clean up the code, or slowly watch our vBulletin installation buckle from poorly written hacks just because we desire/require the functionality it provides.
The vBulletin Coding Standards not only produce clean, easy to read/customise coding, it makes debugging easier. Imagine a script where an entire foreach() iteration is written on a single line, cramped together, then a parse error occurs. The line # would be the same, yet users (without syntax highlighting editors) would have to break up the line in order to pinpoint the error.
I fail to see a single good reason why these coding standards should continue being as undervalued as they are.

EDIT:
Quote:
Originally Posted by Brad
BTW we can't enforce people to code to standard anyway. Take a look at some of the 'experanced' coder's early hacks and you'll see what I mean, everyones ability to code develops over time with the help of others. Enforcing people to code to standard would deny people that option.
I disagree.
First of all, the vBulletin Coding Standards are mainly about code formatting. The ability to proper indent code, writing clean code, etc has nothing to do with someone's ability to code. I'm not saying we should get a bunch of Coding Nazis to fine coam each hack making sure they spaced their function arguments properly OR ELSE!!!, but there's a difference between that and some of the manure that Ive seen when looking at hacks.

Oh and just because you tried it before, doesn't mean you don't have new talent to help carry this out NOW. The hack database, as I understand it, was present before. Why not bring back this QA team, at least for a trial run?
The worst thing that can happen is the team being so totally backlogged that they have to give up, at which point the admins can simply disband the team and disable the Moderation (or whatever youll use to delay hack releases), and all is well
  #4  
Old 08-01-2005, 10:39 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's not just a case of having the people willing to do it - If I want to code something that doesn't conform to standards, I will - Whether you choose to use it, or modify it to your own standards is up to you

Enforcing anything regarding code standards etc is wrong and shouldn't become part of vB.org

Satan
  #5  
Old 08-01-2005, 10:41 PM
Erwin's Avatar
Erwin Erwin is offline
 
Join Date: Jan 2002
Posts: 7,604
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

It's a good idea in theory, but in practice, the problems I foresee are:

1. Discourages beginner hackers from releasing hacks.

2. Delays the release of hacks as presumably hacks won't show up until they are approved.

3. Also, what happens if a hack does not pass? Do you remove it, recode it for them, force the author to recode it? What if the author refuses to recode it and wants to have his own style? Do you basically then disallow the release of the hack?

These are things to consider.
  #6  
Old 08-01-2005, 10:47 PM
Adrian Schneider's Avatar
Adrian Schneider Adrian Schneider is offline
 
Join Date: Jul 2004
Posts: 2,528
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Step 1) Rate the Thread

Step 2) Don't install modifications with low ratings.
  #7  
Old 08-01-2005, 10:50 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I see valid points on both sides.
IMHO we can't enforce ppl to stick to certain coding styles, but we can try to encourage them.
Experience seens to be one important thing, so we should try to give newbies as much knowledge as possible.

Maybe smth. like a "quality lable" issued after a Hack has been reviewed would be nice.
This does not have to be mandatory, and thus would not slow down releases etc.
But I think it would encourage ppl. to write well-coded Hacks.

Thread Rating is anonymous and doesn't mean much.
There are Hacks with high ratings which are IMHO terrible (code wise).
  #8  
Old 08-01-2005, 11:25 PM
Dream's Avatar
Dream Dream is offline
 
Join Date: Oct 2001
Posts: 2,251
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

dark visor, you could start with my code, id love to hear some feedback, or with a style guide.
  #9  
Old 08-01-2005, 11:55 PM
Chris M's Avatar
Chris M Chris M is offline
 
Join Date: Dec 2001
Location: Northampton, England
Posts: 6,186
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

But then a Quality Label can be seen as saying that some hacks are better than others, not that their code style is just more in-line with what a group of people think it should be...

Honestly - If a hack is that important to me as it is so good, and the code is poorly done, I re-code it myself - The only people I can see complaining about coding standards are standard fanatics... I'd say over half the people who visit vBulletin.org and install hacks from here rarely care if the code is sloppy - As long as it doesn't bring their site to a halt and does the job they want, they're happy...

It brings into mind the whole catering to the masses arguement - Not many people will care, and those that do take it too far...

While it is good that you are concerned about how code standards drift, merely advising people that their code is sloppy and showing/guiding them how to make it not sloppy will help them become better coders - Slapping a sticker saying "Poor" will defeat the purpose - It will discourage newbies from posting hacks as their coding standards 9 times out of 10 will not be how you fanatics think it should be, and it will also not help them learn - Being told your code sucks and not being told how to make it better is worse than moaning about the code not being up to your standards...

Honestly, all I can see this doing is creating bad feeling, a "division" between coders and eventually tearing a rift in the community...

A few "How-to" guides, helpful suggestions in hack threads and generally aiding the newer (and older) coders (as not everyone is perfect ) on how to make their code better would be the only sensible course of action...

Satan
  #10  
Old 08-01-2005, 11:59 PM
akanevsky akanevsky is offline
 
Join Date: Apr 2005
Posts: 3,972
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

What does "QA" stand for? Quality Assurance?.. I dislike the abbreviation.

Quote:
It discourages beginner hackers from releasing hacks.
I disagree:
  • The vBulletin coding standards are publically available through the official vBulletin manual and are easy to learn. These standards are basically about proper indentation and proper line breaks. Therefore, they take very little time to learn - to me, it took about 10 minutes to read through the standards section and memorize it.
  • Beginner hackers do not generally release long hacks. The QA Team, therefore, could easily fix the first few releases of that beginner, but not allow any more releases after a stated amount if the hacker refuses to comply with the standard.
  • Usually, people hack because they like doing it. If they like doing it, they should be happy to learn how to do what they like more efficiently. If they don't want to learn it - they are not serious about coding and they should not be releasing hacks.

However, this is not likely to work out for the following reasons:
  • Beginner-level hackers would probably pay no attention to the edits made by the QA team, making the QA's efforts pointless.
  • Mass fixing of hacks by the QA Team would take too much time, which most of us don't really have.

Quote:
It delays the release of hacks as presumably hacks won't show up until they are approved.
You are right - they won't show up until they are approved. However, this doesn't really matter. The time coders and end-users waste to solve installation problems that are occuring to unexperienced installation performers will be much longer than the time required to write a valid hack once and for all as well as the time required to install a valid hack without later problems.

Based on above + plus KirbyDE's post, I am rethinking the effectiveness of the above method... However, I'd like to propose another plan, which I am sure can act as a compromisse between the two sides:

On vBulletin.org, hacks have many custom fields ("Installer Included", "Support Provided", etc). It should be no problem for the forum administrators to add a field "QA Verified", editable only by the QA team and the administrators. Once the field is created, make the board display only the Verified hacks by default, with an option to display a complete list of hacks (both verified and non-verified). The option should be visualized as a link in every forum, and it should create a session variable (not a cookie), that would keep the setting as is until the user leaves the forum. Once he\she comes back, it will once again set to only display Verified hacks.

This way, it will feel like that the Verified hacks are positioned above non-verified hacks. While the coding style will not be enforced, vB hackers will be encouraged to code properly in order to rate higher and display their hacks better. The best part is, this system is easy to implement (I could help making it), and it would not require immediate validation, which is a plus from the QA team's point of view.

Let's have a trial run of this sytem!
Closed Thread


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. The time now is 12:04 PM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2024, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.05646 seconds
  • Memory Usage 2,270KB
  • Queries Executed 11 (?)
More Information
Template Usage:
  • (1)SHOWTHREAD
  • (1)ad_footer_end
  • (1)ad_footer_start
  • (1)ad_header_end
  • (1)ad_header_logo
  • (1)ad_navbar_below
  • (1)ad_showthread_beforeqr
  • (1)ad_showthread_firstpost
  • (1)ad_showthread_firstpost_sig
  • (1)ad_showthread_firstpost_start
  • (3)bbcode_quote
  • (1)footer
  • (1)forumjump
  • (1)forumrules
  • (1)gobutton
  • (1)header
  • (1)headinclude
  • (1)navbar
  • (3)navbar_link
  • (120)option
  • (1)pagenav
  • (1)pagenav_curpage
  • (2)pagenav_pagelink
  • (1)pagenav_pagelinkrel
  • (10)post_thanks_box
  • (10)post_thanks_button
  • (1)post_thanks_javascript
  • (1)post_thanks_navbar_search
  • (10)post_thanks_postbit_info
  • (10)postbit
  • (10)postbit_onlinestatus
  • (10)postbit_wrapper
  • (1)spacer_close
  • (1)spacer_open
  • (1)tagbit_wrapper 

Phrase Groups Available:
  • global
  • inlinemod
  • postbit
  • posting
  • reputationlevel
  • showthread
Included Files:
  • ./showthread.php
  • ./global.php
  • ./includes/init.php
  • ./includes/class_core.php
  • ./includes/config.php
  • ./includes/functions.php
  • ./includes/class_hook.php
  • ./includes/modsystem_functions.php
  • ./includes/functions_bigthree.php
  • ./includes/class_postbit.php
  • ./includes/class_bbcode.php
  • ./includes/functions_reputation.php
  • ./includes/functions_post_thanks.php 

Hooks Called:
  • init_startup
  • init_startup_session_setup_start
  • init_startup_session_setup_complete
  • cache_permissions
  • fetch_threadinfo_query
  • fetch_threadinfo
  • fetch_foruminfo
  • style_fetch
  • cache_templates
  • global_start
  • parse_templates
  • global_setup_complete
  • showthread_start
  • showthread_getinfo
  • forumjump
  • showthread_post_start
  • showthread_query_postids
  • showthread_query
  • bbcode_fetch_tags
  • bbcode_create
  • showthread_postbit_create
  • postbit_factory
  • postbit_display_start
  • post_thanks_function_post_thanks_off_start
  • post_thanks_function_post_thanks_off_end
  • post_thanks_function_fetch_thanks_start
  • post_thanks_function_fetch_thanks_end
  • post_thanks_function_thanked_already_start
  • post_thanks_function_thanked_already_end
  • fetch_musername
  • postbit_imicons
  • bbcode_parse_start
  • bbcode_parse_complete_precache
  • bbcode_parse_complete
  • postbit_display_complete
  • post_thanks_function_can_thank_this_post_start
  • pagenav_page
  • pagenav_complete
  • tag_fetchbit_complete
  • forumrules
  • navbits
  • navbits_complete
  • showthread_complete