Raised This Month: $51 Target: $400
 12% 

[DEBATE] Hawk552 vs SnoW


Post New Thread Reply   
 
Thread Tools Display Modes
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 10-14-2009 , 11:01   Re: Blocking Buy Commands (Basic)
Reply With Quote #11

Quote:
Originally Posted by Hawk552 View Post
Clearly, the first one does. Thus, if you cannot justify the extra work, using semicolons is inefficient. Multiply this by a few hundred times for any reasonable plugin, or a few thousand times for any big one, and you have a massive inefficiency problem here which is significantly bigger than the arguably inefficient explicit initialization of looping variables and iterators.
I'd never give a large value for the matter how much it takes to type the code, but how readable it is and how it obviously works as executed. Your comparison isn't fair at all since semicolons can't obviously be compared straight to initialization.
Quote:
Originally Posted by Hawk552 View Post
All action requires a reason or it is irrational. The readability was not my point in the first place; I was just stating that it's not as readable as you think in response to your claim that it looks nicer.
Semicolons really even make it look nicer, like in your phrase the text would look more silly without a simple cute semicolon there. ( Not that I actually used them in real text )
Quote:
Originally Posted by Hawk552 View Post
As for the initialization, I already explained that it can be more readable (although I don't do it) since it's clearly stating what a variable will contain without implying it and without costing any extra resources or introducing backwards compatibility problems.
I don't still believe in that. You'd have to be pretty beginner if it helps you. It's just like adding an extra comment about a thing that should be obvious and in known.
PHP Code:
new ivar 0//Hello there, I'm not a function but a variable! 
Quote:
Originally Posted by Hawk552 View Post
That is terrible programming and is one of the first things that they teach you not to do in computer science/programming/electrical/whatever 101.

I mean, we can detag floats like this to use them as integers:
...
You just made my code look much nicer by providing such horrible code.
Quote:
Originally Posted by Hawk552 View Post
...
Giving variables long names is also nothing like using semicolons; it again provides useful information that you won't find on first glance without it. So no, what you're saying is not what I believe.
I never said semicolons did give you a bigger add to readability than using descriptive variable names or anything else. Just that they do, so when they both bring readability I think it's just fine to compare them. Much better than comparing to initialization.
SnoW is offline
Send a message via MSN to SnoW
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 10-14-2009 , 11:32   Re: Blocking Buy Commands (Basic)
Reply With Quote #12

Quote:
Originally Posted by SnoW View Post
I'd never give a large value for the matter how much it takes to type the code, but how readable it is and how it obviously works as executed. Your comparison isn't fair at all since semicolons can't obviously be compared straight to initialization.
My point was not how inefficient it is as I can't be arsed with actually looking into it. All I'm saying is that it is undeniable that you are doing extra work. The reality is that, even in practice, the use of semicolons requires an extra keystroke for each expression, while initialization requires between two and four extra keystrokes depending on your style. If you conservatively estimate that a loop will be in a plugin every 50 lines and your style requires four keystrokes for loop initialization, then your use of semicolons is roughly ten times more inefficient (note that I was being very generous to you in every regard, so in practice it's probably much higher).

Quote:
Originally Posted by SnoW View Post
Semicolons really even make it look nicer, like in your phrase the text would look more silly without a simple cute semicolon there. ( Not that I actually used them in real text )
Relevant!

Quote:
Originally Posted by SnoW View Post
I don't still believe in that. You'd have to be pretty beginner if it helps you. It's just like adding an extra comment about a thing that should be obvious and in known.
PHP Code:
new ivar 0//Hello there, I'm not a function but a variable! 
Sure, but you'd also have to be a pretty big idiot to not know where the line ends, even if you've never seen a programming language in your life.

Quote:
Originally Posted by SnoW View Post
You just made my code look much nicer by providing such horrible code.
... that was sort of my point, or at least to show that they're both horrible.

Quote:
Originally Posted by SnoW View Post
I never said semicolons did give you a bigger add to readability than using descriptive variable names or anything else.
*Blinks* Really? Then what's this?

Quote:
Originally Posted by SnoW View Post
If you assign the var, other people don't get any readability, but they can actually get confused that the assigning isn't only possible but must be done.
There's no real problem here or either a solution to this, it's all about opinions.
When using semicolons the code isn't only much more clear and readable [emphasis added], but also the horrible thing that you are somehow limited to invisible lines is gone. When you see in chars where the statements end and the code can be even in one line I can't do anything but use semicolons.
Anyway,

Quote:
Originally Posted by SnoW View Post
Just that they do, so when they both bring readability I think it's just fine to compare them. Much better than comparing to initialization.
I don't understand what you're saying. It sounds like you basically said "that's not what I said, but now I am saying it".

Regardless, I don't see why we can't compare the use of semicolons to unnecessary zeroing of iterators. Both are inefficient, but one is much more inefficient than the other.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
SnoW
Veteran Member
Join Date: Oct 2008
Location: Finland WisdomNuggets: 8
Old 10-14-2009 , 12:06   Re: Blocking Buy Commands (Basic)
Reply With Quote #13

Quote:
Originally Posted by Hawk552 View Post
My point was not how inefficient it is as I can't be arsed with actually looking into it. All I'm saying is that it is undeniable that you are doing extra work. The reality is that, even in practice, the use of semicolons requires an extra keystroke for each expression, while initialization requires between two and four extra keystrokes depending on your style. If you conservatively estimate that a loop will be in a plugin every 50 lines and your style requires four keystrokes for loop initialization, then your use of semicolons is roughly ten times more inefficient (note that I was being very generous to you in every regard, so in practice it's probably much higher).
What I meant was that you can't compare them like that, because they bring readability where they are used. Semicolon bring readability where it's used which is the whole code when used properly. Then initilazition brings it in this case only to a little loop, which I still think it doesn't. So it doesn't matter anything which one takes more work per part of code, plugin or what ever you are refering to, when the more work part would bring so much many times more readability. Let's do my comparison:
Iinitialization takes " = 0" which is 4 chars and semicolon one char. Now even this is way too friendly I'm ready to say that initialization brings two times more readability. The semicolons win still 2 : 1.
Quote:
Originally Posted by Hawk552 View Post
Sure, but you'd also have to be a pretty big idiot to not know where the line ends, even if you've never seen a programming language in your life.
Well the programs usually display the line changes pretty well I guess, you've some kind of point there.
Quote:
Originally Posted by Hawk552 View Post
*Blinks* Really? Then what's this?
I probably didn't express it enough well. What I meant was ( when you started talking how much readability global var and other naming brings ) I never said semicolons would bring more readability than var naming, but that semicolons do some and like that those are perfect to compare or at least on the better side to compare between each other.
Quote:
Originally Posted by Hawk552 View Post
Regardless, I don't see why we can't compare the use of semicolons to unnecessary zeroing of iterators. Both are inefficient, but one is much more inefficient than the other.
We could, just that for my opinion they differ so much, when other brings readability other doesn't. Also I proved wrong your unfair comparison in the beginning of my post.

Last edited by SnoW; 10-14-2009 at 12:10.
SnoW is offline
Send a message via MSN to SnoW
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-14-2009 , 12:14   Re: [DEBATE] Hawk552 vs SnoW
Reply With Quote #14

Boring~
__________________
Arkshine is offline
xbatista
Veteran Member
Join Date: Mar 2008
Location: Lithuania
Old 10-14-2009 , 12:18   Re: [DEBATE] Hawk552 vs SnoW
Reply With Quote #15

kill each other
__________________
xbatista is offline
Send a message via Skype™ to xbatista
Old 10-14-2009, 12:33
Hawk552
This message has been deleted by Hawk552.
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 10-14-2009 , 12:45   Re: [DEBATE] Hawk552 vs SnoW
Reply With Quote #16

I'm lazy to read all this, what are you talking about?
__________________
xPaw is offline
Javivi
AlliedModders Donor
Join Date: Dec 2008
Old 10-14-2009 , 12:48   Re: [DEBATE] Hawk552 vs SnoW
Reply With Quote #17

Quote:
Originally Posted by xPaw View Post
I'm lazy to read all this, what are you talking about?
They are talking about hamsters (?)
__________________
Javivi is offline
Hawk552
AMX Mod X Moderator
Join Date: Aug 2005
Old 10-14-2009 , 12:52   Re: [DEBATE] Hawk552 vs SnoW
Reply With Quote #18

Quote:
Originally Posted by xPaw View Post
I'm lazy to read all this, what are you talking about?
To summarize this thread:

  • The original argument was over whether or not initializing variables to zero explicitly is "bad practice". I claimed that it's definitely not but is arguably inefficient/unnecessary.
  • I made a stab at his programming style because he claimed that this initialization was a relic from Java, to which I replied that he was using semicolons unnecessary (another Java/C/C++ concept), so he was holding a double-standard.
  • It then turned into whether or not the use of semicolons actually is useful. I think (?) he has accepted that it isn't.
  • We are now arguing over the relative inefficiency of the use of semicolons vs. the unnecessary initialization of loop iterators. I'm arguing that neither is useful, so if you look at it objectively, the use of semicolons is far more inefficient because of how often it shows up in the average script. He is arguing that both are useful, but semicolons are far less expensive labor-wise and are ultimately worth using. His logic is extremely flawed, though, and I'm going to pick it apart completely in his next post.
__________________
Hawk552 is offline
Send a message via AIM to Hawk552
xPaw
Retired AMX Mod X Moderator
Join Date: Jul 2008
Old 10-14-2009 , 12:55   Re: [DEBATE] Hawk552 vs SnoW
Reply With Quote #19

I was lazy to read your post, its so booring
__________________
xPaw is offline
Arkshine
AMX Mod X Plugin Approver
Join Date: Oct 2005
Old 10-14-2009 , 12:56   Re: [DEBATE] Hawk552 vs SnoW
Reply With Quote #20

I like semicolons, I'm feeling lost without that. *cry*
__________________
Arkshine is offline
Old 10-14-2009, 12:57
SnoW
This message has been deleted by Hawk552.
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 -4. The time now is 10:44.


Powered by vBulletin®
Copyright ©2000 - 2024, vBulletin Solutions, Inc.
Theme made by Freecode