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

Closed Thread
 
Thread Tools Display Modes
  #111  
Old 08-02-2005, 12:15 PM
akanevsky akanevsky is offline
 
Join Date: Apr 2005
Posts: 3,972
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
"SELECT * FROM " . TABLE_PREFIX . "user WHERE userid = '$bbuserinfo[userid]'"
"SELECT * FROM " . TABLE_PREFIX . "user WHERE userid = $bbuserinfo[userid]"
"SELECT * FROM " . TABLE_PREFIX . "user WHERE userid = ".$bbuserinfo['userid']
I'd say, the one that takes the least space.
However, every one of these would do, even though I personally prefer the first and second ways of doing it. They are neater than the third one. The third way of doing it often ends up in parse error because you accidentally forgot to put a closing ' " ', or because you put an extra concatenation symbol...

It doesn't have to be so sophisticated... All the three ways would count as the right ways to do it.

Quote:
you shouldn't encapulate numbers but at the same time
SQL Query: (how to run queries)


"SELECT * FROM " . TABLE_PREFIX . "user WHERE userid = " . intval($bbuserinfo[userid]) . ""

would probably be the stardard set for a gold-star according to this thread
This is an intended exaggeration... Why do you imply that I would intval() something that is already an integer???

Quote:
my bad you just said you weren't the idea leader thus that really held no weight, unless i decided so, ok bu
Shut the f*ck up and stop trying to say that I said what I didn't say. Thanks.
  #112  
Old 08-02-2005, 12:20 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Boofo
And we all know Kirby's hacks work right the first time, huh, buddy?
No they don't, and I never said they do.
Just wanted to point out that it is possible, although I guess nobody would ever even think of proofing their Code.
This is only being done for really important software like some parts or Aircraft Firmware.
  #113  
Old 08-02-2005, 12:20 PM
Christine's Avatar
Christine Christine is offline
 
Join Date: Oct 2001
Location: PA
Posts: 472
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by sabret00the
i do wonder though, for all the people looking to take those elevated positions, how often are you found in the PHP forum helping out the coders who are begging for help?
Given the tone of how some of these suggestions are being presented, I would recommend that *IF* anything like this is ever implemented, nomination to the "QA" team be based on their activities/helpfulness in the Help Me Finish forum (assuming one is opened for 3.5).

As a new coder (who is not afraid to ask for help), I can assure you that I will gladly take the assistance/advice of someone posting to help me LONG before someone cutting my head off so that their ego is satisfied (again, reference TONE).

Carry on.

  #114  
Old 08-02-2005, 12:20 PM
sabret00the's Avatar
sabret00the sabret00the is offline
 
Join Date: Jan 2003
Location: London
Posts: 5,268
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dark Visor
Shut the f*ck up and stop trying to say that I said what I didn't say. Thanks.
Wow you seem to be getting a bit stressed there, you might wanna reel in that temper just a little bit, i mean after all asking to judge peoples hacks and you can't even muster up the people skills to last a debate on the concept, ouch, this site would really be going down hill.
  #115  
Old 08-02-2005, 12:23 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by calorie
Code:
"SELECT * FROM " . TABLE_PREFIX . "user WHERE userid = '$bbuserinfo[userid]'"
"SELECT * FROM " . TABLE_PREFIX . "user WHERE userid = $bbuserinfo[userid]"
"SELECT * FROM " . TABLE_PREFIX . "user WHERE userid = ".$bbuserinfo['userid']
So which of those is, erm, best?
The 2nd one complies with vBulletin coding standards.
  #116  
Old 08-02-2005, 12:24 PM
The Geek's Avatar
The Geek The Geek is offline
 
Join Date: Sep 2003
Location: Behind you
Posts: 2,779
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

This is getting seriously moronic.

If there is a security fault... Mark it.
If there are ways to improve the efficiency... suggest it.
If you dont like the code style...go make your own.

Who really cares if the style isnt standard? Who is really going to open the code up and say 'damn, I wish I would have known this didnt use the coding standards before I installed it!'.

If the validators are so hot at writing code their time would be better spent writing it and not grading others.

I would opt out of the system just to spite - but thats the kind of lame coder I am
  #117  
Old 08-02-2005, 12:25 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dark Visor
Come on, what kind of language is that... You are a moderator. Set a good example...
I just wanted to see if I could bypass the censorship for that word. And crapola sounded too kiddie-like.
  #118  
Old 08-02-2005, 12:28 PM
Andreas's Avatar
Andreas Andreas is offline
 
Join Date: Jan 2004
Location: Germany
Posts: 6,863
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

I think "Coding Style" (eg. indention etc.) isn't thaaat important.
Of course it makes reading/debugging the code easier if it is "clean", however you could always prettyprint it?
  #119  
Old 08-02-2005, 12:29 PM
akanevsky akanevsky is offline
 
Join Date: Apr 2005
Posts: 3,972
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
No they don't, and I never said they do.
Just wanted to point out that it is possible, although I guess nobody would ever even think of proofing their Code.
This is only being done for really important software like some parts or Aircraft Firmware.
Good point. Less important software we can always debug later... If there is a need for it.

Quote:
As a new coder (who is not afraid to ask for help), I can assure you that I will gladly take the assistance/advice of someone posting to help me LONG before someone cutting my head off so that their ego is satisfied (again, reference TONE).
Hey, where'd you get head cutting part from? :P

Quote:
Wow you seem to be getting a bit stressed there, you might wanna reel in that temper just a little bit, i mean after all asking to judge peoples hacks and you can't even muster up the people skills to last a debate on the concept, ouch, this site would really be going down hill.
You see, anybody would get annoyed when someone "glues" irrelevant pieces of text together and waves them in front of your nose. You are wrong though, I am not getting stressed out. Now as I said, shut the f*ck up. Thanks.

Quote:
The 2nd one complies with vBulletin coding standards.
Good, the we use the 2nd one.

Quote:
Who is really going to open the code up and say 'damn, I wish I would have known this didnt use the coding standards before I installed it!'.
The coders will. I'd like you to recall the coding style of vBulletin 2 and compare it with vBulletin 3. Which one is easier to modify? This:

PHP Code:
        if ($a) {
            while (
$b $c)
                {
            echo 
"!!!!!";    }
    }
                else { print 
"yo";
    } 
or this

PHP Code:
if ($a
 {
     while (
$b $c)
     {
         echo 
"!!!!!";
     }
 }
 else
 {
     print 
"yo";
 } 
There you go.
  #120  
Old 08-02-2005, 12:30 PM
Boofo's Avatar
Boofo Boofo is offline
 
Join Date: Mar 2002
Location: Des Moines, IA (USA)
Posts: 15,776
Благодарил(а): 0 раз(а)
Поблагодарили: 0 раз(а) в 0 сообщениях
Default

Quote:
Originally Posted by Dark Visor
I didn't test much of Kirby's hacks, but if you see some of mine you will see that they work right from the first install... Unless there are some addons on requests that I implement...
I was only kidding Kirby in that remark. Kirby does excellent work and his stuff always works. But to say that every hack/mod you do ALWAYS works the first time, is not only arrogant, but false. If it hasn't happened yet, it will, you can be sure.

Quote:
Exactly. As I stated in that same post you just quoted, there would be no stickers on the non-passed posts... You just skipped over it, huh? Way to go, buddy.
Putting stickers (labels) on passed ones is the same as putting a fail sticker on one that doesn't pass. You are still labeling, no matter how you look at it.
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 11:27 AM.


Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information
  • Page Generation 0.07422 seconds
  • Memory Usage 2,276KB
  • 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
  • (1)bbcode_code
  • (2)bbcode_php
  • (15)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
  • (4)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