![]() |
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. |
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. |
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:
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 :) |
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 |
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. |
Step 1) Rate the Thread
Step 2) Don't install modifications with low ratings. |
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). |
dark visor, you could start with my code, id love to hear some feedback, or with a style guide.
|
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 :p) on how to make their code better would be the only sensible course of action... Satan |
What does "QA" stand for? Quality Assurance?.. I dislike the abbreviation.
Quote:
However, this is not likely to work out for the following reasons:
Quote:
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! |
Maybe a forum where experienced coders can help answer coding standard questions for others? Thay way no one would fell slighted or small or discouraged for not knowing the standard and having it pointed out to then in public (ie, label/rating system).
Just an idea. ;) |
Quote:
Satan |
One thing to note is that different styles are not always wrong. For example Dark, you went around to many of my mods today making code change suggestions. In many cases, it was a matter of personal style.
My style, except for when I get lazy, was ingrained in me while working at software companies where maintainable, understandable code takes precedence over optimized code. So, while your one-line replacements for my code blocks are appropriate style, they aren't what I'm going for. My goal is to write code so readable that I stop getting silly requests for minor tweaks. I am working toward instructional and idiot-proof when I post here. The way I see it, the people who need highly optimized one-liners are people who know how to do it themselves or who aren't trolling around for free code mods here ;) Also, mods posted here generally tend to be refined over time. Right now, we are in pre-release stages of Vbulletin. Everybody is upgrading over and over again. The emphasis right now is to get the functionality we had before the upgrade and get it fast and bug-free. THEN, we can add features and code refinements. |
Quote:
Satan |
Quote:
Quote:
Quote:
Quote:
Quote:
Quote:
However, I'd like to point out that in one of those three posts I pointed out how to remove three (!!) unnecessary queries from the hack. These unnecessary queries are exactly what I'd like to try to avoid. Quote:
-- P.S. Hellsatan, please do not quote whole posts, ok? You are making the thread cluttered and hard to read. Please edit your posts and remove the quotes. Thanks. |
Quote:
|
Quote:
|
Quote:
Labels are wrong, no matter how they are worded... It brings large sites to a halt - Small sites remain unaffected - Owners of Large sites would usually have the common sense to check the code and optimise it themselves - Assuming they don't, they can usually afford to have someone do that for them - Either way, your arguement is based on a minority of forums having issues with sloppy code... That is not a division - It is a status - It is like Moderator and Admin - Your user title depicts how many hacks you have released and how many installs they have recieved - If someone were to release the same amount of hacks as me which had a similar number of installs, that would gain them my user title... The difference between my title and forcing coding standards is that my way the person doesn't have the pressure of fighting against the stigma of it not being optimised to your liking... If I release a sloppy coded hack, I don't want to have to justify that my hack may be great, but the majority of users will ignore it because they interpret the code as "Invalid" or "Poor" or "It Sucks" or any other way you want to flower it about... As for everyone installing: That is what the "send update" feature is for - To alert users to new and/or improved versions of hacks... Satan |
Quote:
|
Quote:
Satan |
Quote:
A majority of sites do not conform with XHTML1.1/CSS. Therefore, they do not validate to be "Valid XHTML" or "Valid CSS". Presence or absence of those labels on a certain site does not mark the content of that site as being of a "1st or 2nd sort". It just identifies the site as being or not being standards-compliant. There are plenty of sites with a cool content but with a poor code. Same here: "PHP Valid" would identify a hack as being standards-compliant (for those who are interested), while saying nothing about the usefullness of the hack and/or about the author himself. What it would say, however, is that time has been taken to create a neat code. It would also allow the interested end-users to see the list of PHP Valid hacks. Quote:
|
I would much rather see peer support and friendly help than a standards committee. When you drop by my threads and make an improvement suggestion, I consider that team-work and community spirit.
If you form a committee that slaps labels on stuff, it would have a negative connotation to me. Let's look at WHY people release code here. I release code for three primary reasons. 1. I've done the work anyway, might as well share. 2. I'm giving back because others have helped me 3. I am looking for others to contribute and improve upon my original concept. People use the code in different ways or dream up different features. Sometimes, that makes the code more robust and I benefit from the ideas of others. BUT there are huge downsides to releasing here as well. We get a lot of people who don't read even the very first post of the thread and then ask the same question over and over. We get people who don't follow install instructions and then yell "bug!". We get people who get ticked off when we don't make all kinds of goofy changes to the code that would benefit nobody but the person who is getting ticked off. This place needs to be fun and sociable if anybody is going to stick around. Yes, let's improve the code. We can all learn from each other. But, lets do it in a less judgemental way. Amy |
Quote:
I am addressing your points, you are merely not looking correctly - Perhaps if you respected me as someone who might have a valid arguement, then you might find those miraculous responses that so far have eluded you... However, since this is a response to you similar to my previous ones, I doubt you will register this either:rolleyes: There is a difference between XHTML/CSS standards and PHP standards - PHP code being sloppy or invalid does not create rendering issues (unless you use HTML within PHP which is on most counts evil and stupid) in different browsers - You are also talking as if the World Wide Web Consortium and Jelsoft are equal in status - They are not... Jelsoft are great, but compared to the W3C they are mere specks on the map... By stating "PHP Valid" as a tag for a QA approved hack, you are therefore implying that the others are not valid - Therefore it is not impertinent to this discussion... "QA Approved" would imply that the others hacks are bad, incorrect or buggy... Whatever your status/label/ideal you put to it, there will always be the misconception that those without the status are wrong, bad or not worth looking at, three big and important misconceptions... This charter is a load of rubbish - They are guidelines - A charter implies law, as in you must code to this standard... Jelsoft are not PHP - PHP is far bigger than Jelsoft, and you going around tooting Jelsoft's horn and proclaiming they are this, that and the other doesn't make their coding guidelines law, nor does it mean that we have to abide by them... If you create this QA team, you are going to lose members, and you are going to looe hacks - People will not want to make the hacks to these standards because they are being forced to, and they do not want to have a label stuck on it because someone else is fanatical enough to want a certain standard of code... And in a final response to your first statement - I will reply to this thread until it is closed voicing my opinions - You cannot and will not silence me, nor will you try and control what I post, where I post or how I post - Do not annoy me with your arrogance and mightier-than-thou attitude - This isn't a highschool playground, so you don't have to big yourself up and act all like you own me... Satan |
amikhar, you are basically correct.
However, I cannot recall - when did I say that the "comittee" is not willing to give others to suggestions? Once the hack is published, we will give people suggestions on how to imporve their codes. Once the codes are perfected, they will be marked as "PHP Valid". This is still a team effort, isn't it? People do not read instructions only because those instructions are poorly formatted and/or badly organized. Sometimes it takes a lot of energy just to read one post of instructions, because it is all messed up. Hack Manual Generator, by the way, was an attempt to solve this. I'd like to note that it was a successful attempt. Because of a good first post organization, my hack threads rarely contain "bug!" exclamations and/or questions about something that was already explicitly stated in the first post. Which is also true about threads of other coders, who took their time to write a neatly organized instructions post. Now, about the more social way: nobody is going to learn unless they have a motivation to do so. In this case, the motivation would be the QA Team and its "PHP Valid" label. Which shouldn't necessarily stick out, it could be just a small label... For those who are interested. |
Quote:
People will learn if you guide them - People will learn to get HOTM - People will learn to get a popular hack - People will learn to get a name for themselves... People here are learning all the time - All you are attempting to do is stop them doing so by removing their choice in how to learn, by forcing them to do it one way... Satan |
But I own you! You are mine to do with as I wish! ;)
|
Quote:
Satan |
Quote:
|
Quote:
At the end of the day we are best off leaving them to their own devices - If they ask for help, you try and give it - Give them How-tos to read, sources to look at, but at the end of the day leave it there :) Re-code sloppy code you don't like to suit your own needs, and be done with it :) Satan |
Quote:
Of course, if you suspect me of not respecting you, there are probably some reasons which I don't know about. And you know better ;) Quote:
Quote:
Quote:
I already said that there would be no enforcement: "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." In other words, the QA guys would help the coder to perfect the code, after which the hack would be marked as "validated"... Quote:
|
Quote:
What you are muttering about respect, I'm unsure - The message I am getting disrespects me - It disrespects my standpoint which is shared by others and it is at some points almost offensive... It does not always create high server load - With multiple queries its not a case of a standard - Simply tell the user the information is already loaded and that their queries are not needed... Jelsoft's guidelines should not be - PHP is not exclusive for Jelsoft - You are treating it as if it is or should be... Whatever happens, it will cause more problems than it's worth - The only ones who are going to moan about standards are those who can already sort the problem out themselves, but cannot be bothered, but expect others to do it for them when they may not know how... Satan |
Quote:
|
Let's get one thing straight - there's a huge difference between:
1. Badly written code AND 2. Well-written code that looks bad In case 1, the code is badly written so that there are more queries, it is inefficient etc. In case 2, the code works well, but just looks bad - ie. it's not formatted nicely in separate lines with comments. If we are talking about case 1, I say, go for it, try to optimize badly written code. If we are talking about case 2, then I would say that is up to individual preference - for example, if and when I release a hack, it's because I've usually written it for my own site, so I'm not going to waste too much time formatting it "to look nice". So let's decide - are we talking about function or about "looks". :) |
But even functionally bad code shouldn't be a hinderance to a newbie. Teaching him how to do it right is altogether different than chastising him in public with some sort of label. That will turn some otherwise good coders off from trying to learn and make it better.
|
You are forgetting possibility 3 (or 1b): Badly written code that cause either security holes or make your board disfunction to some degree.
|
Quote:
i honestly dont see it benefiting either... as someone who is just beggining to learn all this doesnt really care about neat code.. they want to learn how to code.. and so with time theyll learn, hopefully. i cant see it benefitting the community because like Satan, Amy and Boofo have previously stated this will more likely create a rift in the community between coders. so i say No to QA just my 1/2 a cent |
As a member who's only released a couple of hacks and is still a "beginner" in terms of coding for the uses of others, I know that if someone were to come along and either label my hack "inefficient", "poorly written", or "not quality assured" I probably wouldn't bother to even consider releasing hacks later down the line.
If you come across a hack that is so poor that it would harm the function of the forum, I think you should simply try and help the user who released it. Instead of "This hack is not quality assured and therefore is garbage", say "Well, around [this block], you could minimize the number of queries by doing [this]..." and the response you would receieve would most likely a thank-you. This idea comes across as egotistical and sounds to me like a way to rub skill in the face of somebody who's still learning. |
Quote:
Second, grouping me with Satan defiantely makes me never want to release another hack/mod. ;) |
Quote:
|
See what I mean, sketch42? LOL
|
All times are GMT. The time now is 02:14 PM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|