+ 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

19th May 2017, 12:50 AM
김정제(Legacy)
김정제(Legacy) - avatar
26 Réponses
+ 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 --------------------------------
19th May 2017, 9:53 AM
Maz
Maz - avatar
+ 11
16
19th May 2017, 11:46 AM
Hatsy Rei
Hatsy Rei - avatar
+ 9
@Maz Wow your comment is so clear Thanks!
19th May 2017, 10:00 AM
김정제(Legacy)
김정제(Legacy) - avatar
+ 9
@Siddharth Saraf @zak @COMPL3X @Hasty Rei Thank you for your participation! @COMPL3X Are you use 5Spaces for Indentation? How unique!
19th May 2017, 12:50 PM
김정제(Legacy)
김정제(Legacy) - avatar
+ 9
@Askam ostraca Yes you're right. It's hard do keep line length < 80 Thank you for participation!
20th May 2017, 10:10 AM
김정제(Legacy)
김정제(Legacy) - avatar
+ 8
@bayoishola20 Wow very similar to me! What is not your style?
19th May 2017, 2:59 AM
김정제(Legacy)
김정제(Legacy) - avatar
+ 8
@Rose sevenyears Good! I think declare variables on top is clear
19th May 2017, 9:44 AM
김정제(Legacy)
김정제(Legacy) - avatar
+ 8
@ArtemisAthena456 What are your "Never-do" coding style? ex. i never use regex...
19th May 2017, 9:46 AM
김정제(Legacy)
김정제(Legacy) - avatar
+ 8
@Legacy, 7 & 8
19th May 2017, 3:39 PM
@bayoishola20
+ 7
@김정훈 Your style is similar to me
19th May 2017, 12:55 AM
김정제(Legacy)
김정제(Legacy) - avatar
+ 7
@Krishna Teja Yeluripati Do you follow Naming Conventions? Sometimes I spend more than 20minutes to name variables... naming is hardest thing in coding
19th May 2017, 2:40 AM
김정제(Legacy)
김정제(Legacy) - avatar
+ 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.
19th May 2017, 9:14 AM
김정제(Legacy)
김정제(Legacy) - avatar
+ 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
19th May 2017, 9:37 AM
김정제(Legacy)
김정제(Legacy) - avatar
+ 7
a little different😎
19th May 2017, 9:43 AM
Art456
Art456 - avatar
+ 5
@Legacy : Sometimes.
19th May 2017, 2:41 AM
Krishna Teja Yeluripati
Krishna Teja Yeluripati - avatar
+ 4
I scored a 14.
19th May 2017, 2:38 AM
Krishna Teja Yeluripati
Krishna Teja Yeluripati - avatar
+ 4
Score: 16
19th May 2017, 2:54 AM
@bayoishola20
+ 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
19th May 2017, 12:45 PM
Complex
Complex - avatar
+ 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 --------------------------------
19th May 2017, 12:22 PM
Siddharth Saraf
+ 2
@Legacy Thanks! :) 4 spaces wasn't enough for me
19th May 2017, 1:02 PM
Complex
Complex - avatar