inherit
143665
wildgoosespeeder wildgoosespeeder wildgoosespeeder
0
Jun 14, 2018 5:59:55 GMT -8
wildgoosespeeder
ProBoards V5 be trippin'. I'm disoriented. :P
4,393
August 2009
wildgoosespeeder
|
Post by wildgoosespeeder on Nov 16, 2010 14:34:30 GMT -8
This applies to codes that use a similar syntax. One thing that drives me nuts are people that code like this using brackets: for(i=0;i<10;i++){ if(i%2==0){ alert("Even"); } else { alert("Odd"); } } I prefer it that the codes were like: for(i=0;i<10;i++) { if(i%2==0) { alert("Even"); } else { alert("Odd"); } }
Another thing that drives me nuts is excessive use of variables. I prefer it that my codes are memory efficient. Example of what I hate: var i=4; var j=45; var k=i*j; document.write(k); I prefer to do that in one line, not four: document.write(4*45);
Another thing that drives me nuts are codes that need a function only once. I understand that functions remove the need to copy and paste the code they contain several times like CrAzY_J's Different On/Off Icons code but there is an example of a code on Studio Zero that does what I hate: Sub-Boards in Board Cell (look at "analyzePage()" and "addListing()" at the very bottom of the code) I only see the words "analyzePage" and "addListing" twice in that code, one for defining the function and another for calling it. I say take the code those functions contain and paste over each corresponding function.
Anyways, what kinds of coding pet peeves do you have?
|
|
inherit
153968
0
Nov 19, 2012 15:03:05 GMT -8
Thesealion
New Phone Who Dis?
4,124
April 2010
joemaggio
|
Post by Thesealion on Nov 16, 2010 14:39:53 GMT -8
I really don't have any...although it is nice when people space properly...
|
|
inherit
143665
wildgoosespeeder wildgoosespeeder wildgoosespeeder
0
Jun 14, 2018 5:59:55 GMT -8
wildgoosespeeder
ProBoards V5 be trippin'. I'm disoriented. :P
4,393
August 2009
wildgoosespeeder
|
Post by wildgoosespeeder on Nov 16, 2010 18:05:12 GMT -8
Sometimes the spacing is from ProBoards trying to not have accessive spacing in posts. Sometimes good, othertimes bad.
|
|
proseth
inherit
-4248639
0
Nov 29, 2024 13:39:15 GMT -8
proseth
0
January 1970
GUEST
|
Post by proseth on Nov 16, 2010 19:36:38 GMT -8
I guess you wouldn't like my coding much then as I do both of the things you pointed out.
#1 I learned JavaScript before any other languages and I just learned to use brackets the first way (the way you dislike). Since then I've learned C++ and if I remember correctly you have to do it the second way or it's incorrect.
#2 I only do for readability purposes. If it's something that other people won't see or that I won't need to decipher later I'll do it your preferred way though.
I dislike when people don't space their coding or when people use spaces rather than tabs for nested blocks of code. I also dislike when large codes have no comments - sure they're not necessary but it makes it easier on the writer and reader. And I dislike when people use // for multi-line comments rather than /* .. */ - it is a habit I've just recently broke myself.
|
|
inherit
143665
wildgoosespeeder wildgoosespeeder wildgoosespeeder
0
Jun 14, 2018 5:59:55 GMT -8
wildgoosespeeder
ProBoards V5 be trippin'. I'm disoriented. :P
4,393
August 2009
wildgoosespeeder
|
Post by wildgoosespeeder on Nov 16, 2010 21:05:53 GMT -8
I just remembered another thing I hate. Modified my first post.
|
|
#00AF33
14306
0
1
Sept 8, 2023 8:54:17 GMT -8
Jordan
What is truth?
11,838
October 2003
jab2
|
Post by Jordan on Nov 17, 2010 1:21:53 GMT -8
This applies to codes that use a similar syntax. One thing that drives me nuts are people that code like this using brackets: for(i=0;i<10;i++){ if(i%2==0){ alert("Even"); } else { alert("Odd"); } } I prefer it that the codes were like: for(i=0;i<10;i++) { if(i%2==0) { alert("Even"); } else { alert("Odd"); } } It's best to get used to it. Whenever you work on any group project such as an open source project you need to follow the style that is being used and both are used frequently. I do prefer the second, however, but I have to code in the first for school since every professor uses a different style on purpose (to get us used to adapting to all the styles). Another thing that drives me nuts are codes that need a function only once. I understand that functions remove the need to copy and paste the code they contain several times like CrAzY_J's Different On/Off Icons code but there is an example of a code on Studio Zero that does what I hate: Sub-Boards in Board Cell (look at "analyzePage()" and "addListing()" at the very bottom of the code) I only see the words "analyzePage" and "addListing" twice in that code, one for defining the function and another for calling it. I say take the code those functions contain and paste over each corresponding function. I would just like to point out that you should hate the first code more than the second because of how terribly inefficient it is. ;P Using functions like in the first code is slow because it has to restart every time. It's better to create an array and then make one pass through the page. As for Chris' code, I don't think it's really that big of a deal. Almost all programming that is done these days is done with procedures/functions etc. It's just how most programmers think, and one function call isn't going to slow anything down. Plus, it allows someone to put that code into a file, cache it, and then call it from the page. I do see your point, but I don't think it's a bad programming practice. I'll add some peeves later.
|
|
inherit
143665
wildgoosespeeder wildgoosespeeder wildgoosespeeder
0
Jun 14, 2018 5:59:55 GMT -8
wildgoosespeeder
ProBoards V5 be trippin'. I'm disoriented. :P
4,393
August 2009
wildgoosespeeder
|
Post by wildgoosespeeder on Nov 17, 2010 11:09:17 GMT -8
I would just like to point out that you should hate the first code more than the second because of how terribly inefficient it is. ;P Using functions like in the first code is slow because it has to restart every time. It's better to create an array and then make one pass through the page. Yup, I hate it...until I tweaked it for my forum. Now I don't hate it as much. ;D Almost all the codes I want for my forum I check for efficiency. If it isn't efficient enough, I tweak it.
|
|
inherit
130228
0
Jul 11, 2024 19:19:59 GMT -8
Charles Stover
1,731
August 2008
gamechief
|
Post by Charles Stover on Nov 17, 2010 15:01:04 GMT -8
I hate brackets for one-line conditionals. for (i=0;i<10;i++) { if (i%2==0) alert("Even"); else alert("Odd"); } I also hate conditions when they can be inline. for (i=0;i<10;i++) alert(i % 2 ? "Odd" : "Even"); EDIT: P.S. space after for and if
|
|
inherit
16846
0
Nov 19, 2012 15:20:20 GMT -8
Chris
3,036
December 2003
cddude
|
Post by Chris on Nov 17, 2010 17:28:08 GMT -8
wild: Hate that style if you wish. It was me trying something new (note the post is 4 years old). It is much more closely related to how people program in Java and other OOP languages though. As for pet peeves I have... nothing off the top of my head.
|
|
inherit
143665
wildgoosespeeder wildgoosespeeder wildgoosespeeder
0
Jun 14, 2018 5:59:55 GMT -8
wildgoosespeeder
ProBoards V5 be trippin'. I'm disoriented. :P
4,393
August 2009
wildgoosespeeder
|
Post by wildgoosespeeder on Nov 17, 2010 18:49:24 GMT -8
I don't hate your code (because I use my modified version of your code on my forum), I just hate the way you coded it.
|
|
inherit
153968
0
Nov 19, 2012 15:03:05 GMT -8
Thesealion
New Phone Who Dis?
4,124
April 2010
joemaggio
|
Post by Thesealion on Nov 17, 2010 20:10:00 GMT -8
In other words you like the code but hate the person...
I really don't like it when people submit codes and don't say what it does....sometimes the name doesn't even hint to what it does and when i was a beginner at coding (not that i am not still) i couldn't recognize hardly anything inside a code to hint as to what it did...
|
|
inherit
97216
0
Nov 26, 2024 13:53:14 GMT -8
Bennett 🚀
Formerly iPokemon.
3,622
January 2007
catattack
iPokemon's Mini-Profile
|
Post by Bennett 🚀 on Nov 17, 2010 20:45:20 GMT -8
I like it when you use the brackets how you did in the first post.. looks nice and orderly.
|
|
inherit
153968
0
Nov 19, 2012 15:03:05 GMT -8
Thesealion
New Phone Who Dis?
4,124
April 2010
joemaggio
|
Post by Thesealion on Nov 17, 2010 20:47:17 GMT -8
I do it both ways...
|
|
inherit
143665
wildgoosespeeder wildgoosespeeder wildgoosespeeder
0
Jun 14, 2018 5:59:55 GMT -8
wildgoosespeeder
ProBoards V5 be trippin'. I'm disoriented. :P
4,393
August 2009
wildgoosespeeder
|
Post by wildgoosespeeder on Nov 19, 2010 15:47:59 GMT -8
In other words you like the code but hate the person...That's a bit of a judgmental conclusion, don't you think? Codes and people are two totally different things. I really don't like it when people submit codes and don't say what it does....sometimes the name doesn't even hint to what it does and when i was a beginner at coding (not that i am not still) i couldn't recognize hardly anything inside a code to hint as to what it did... You don't have to worry about me. I will give a description of what the code will do. If it is unclear in text, I will most likely put a preview image to give you a general idea what my codes after execution will look like.
|
|
Dove
Full Member
I like being different because it's different than not being different.
Posts: 634
inherit
120122
0
Oct 21, 2011 20:31:08 GMT -8
Dove
I like being different because it's different than not being different.
634
February 2008
writer
|
Post by Dove on Nov 19, 2010 16:15:37 GMT -8
I hate when you can't use an html code "assist" and you have to hand-type codes and then you leave out one little bracket, or one tiny apostrophe, and the entire website goes into chaos.
|
|