+ 10
I want to compare my coding style with yours!
Please let me know your result~ Score: 2-Always, 1-Sometimes, 0-Never ---------- 1. Use 4Spaces For Indentation 2. Declare Variables On Top 3. Use 1Space Around Math Operator(+, -, ร...) and Curly Brackets 4. Follow Naming Convention 5. Use RegExp 6. Use Ternary Operator(?:) 7. Don't Use Eval 8. Use Random Function 9. Use ; On End 10. Each Line Length < 80 ----------- Result Sum = x; x >= 18; Are You Me ? 15 <= x < 18; Very Similar! 5 <= x < 15; A Little Different x < 5; Quiet Different
26 Answers
+ 14
1 - Four Spaces Indentation โ
2 - Variable Top โฐ
3 - Space Around Math Operator โ
4 - Follow naming convention โฐ
5 - RegExp โ
6 - Ternary Operator โ
7 - Don't use Eval โ
8 - Random Function โฐ
9 - Semicolon On End โฐ
10 - Line Length < 80 โฐ
SCORE = 11
--------------------------------
โ = YES
โ = NEVER
โฐ = SOMETIMES
--------------------------------
+ 11
16
+ 9
@Maz
Wow your comment is so clear
Thanks!
+ 9
@Siddharth Saraf @zak @COMPL3X @Hasty Rei
Thank you for your participation!
@COMPL3X
Are you use 5Spaces for Indentation?
How unique!
+ 9
@Askam ostraca
Yes you're right. It's hard do keep line length < 80
Thank you for participation!
+ 8
@bayoishola20
Wow very similar to me!
What is not your style?
+ 8
@Rose sevenyears
Good!
I think declare variables on top is clear
+ 8
@ArtemisAthena456
What are your "Never-do" coding style?
ex. i never use regex...
+ 8
@Legacy, 7 & 8
+ 7
@๊น์ ํ
Your style is similar to me
+ 7
@Krishna Teja Yeluripati
Do you follow Naming Conventions?
Sometimes I spend more than 20minutes to name variables...
naming is hardest thing in coding
+ 7
@Rose Sevenyears
Oh No...
My sample...
It looks like completely broken...
I wrote it on my tablet.
Maybe it is window size ratio problem.
+ 7
@Rose Sevenyears
Maybe your right. I use tablet's own font.
Anyway, following my intention.
https://raw.githubusercontent.com/Legacy-K/Common/master/Indentation
+ 7
a little different๐
+ 5
@Legacy : Sometimes.
+ 4
I scored a 14.
+ 4
Score: 16
+ 3
Err...
1: 4 Spaces Identation: Nope, 5 spaces here
2: Declare variables on top: Yes, but there are times where I declare it anywhere
3: Space around math operator: Yes, it makes me uncomfortable if I dont put one.
4: Following naming convention: Is it the variable naming? Cause mine is like: dude, x, y, z, bob, david, input, user, dog, cat, pat, mat, twat(sorry)
5: Use RegEx, I dont use built in RegEx, I make mine in functions
6: Use ternary operator: Yes but I dont know if Rust has one
7: Dont use eval: Theres no function for that in Rust and its lazy so nahh
8: Use random function: Yeah
9: Use ; on end: Yep
10: Each line length < 80: Yes mines an average of 30-50 characters
+ 2
1 - Four Spaces Indentation โ
2 - Variable Top โฐ
3 - Space Around Math Operator โ
4 - Follow naming convention โฐ
5 - RegExp โ
6 - Ternary Operator โ
7 - Don't use Eval โ
8 - Random Function โ
9 - Semicolon On End โ
10 - Line Length < 80 โฐ
SCORE = 11
--------------------------------
โ = YES
โ = NEVER
โฐ = SOMETIMES
--------------------------------
+ 2
@Legacy Thanks! :) 4 spaces wasn't enough for me