0

Какие правила хорошего тона разработчика? What are the rules/ manners of a good developer?

(Python)

13th Jul 2018, 6:19 AM
Kate App
Kate App - avatar
7 Respostas
13th Jul 2018, 8:57 AM
NezhnyjVampir
+ 2
Good question. I try not to make too many sweeping remarks about code structure other than please indent (use white space to improve readability -- I won't get into the tabs vs spaces debate). Organized teams will have some sort of style guide to let you know what they expect (for example, naming conventions for variables or classes/ids). We all hope our design choices get better over time. I like seeing lots of comments. I tend toward commenting too much for my own code and I try to trim down and polish up my comments before submitting my work. Just be cognizant of what comments will be seen by the team only and what comments will be public-facing once everything is pushed to production. Just for a fun story, I heard a rumor once that someone named all the error codes in a particular government code base after Star Wars characters. While very entertaining, it was fairly unhelpful when it came to actually figuring out what the errors meant. ☺
13th Jul 2018, 8:18 AM
Janning⭐
Janning⭐ - avatar
+ 1
I think articulating well in your code and pull/merge requests is generally good for both record keeping and communicating with the team. In addition to that, it's nice to be conscientious and respectful of other programmers' code. If you are going to do something that will affect their part of the code base, it's nice to let them know before you do something that might break their code. Also, if something was working before, and you broke it, it's okay to ask for help, but not very nice to make your teammates fix your code for you by assigning them the task.
13th Jul 2018, 7:39 AM
Janning⭐
Janning⭐ - avatar
+ 1
Nice style guide! They totally went there with the tabs and spaces. 😂
13th Jul 2018, 9:01 AM
Janning⭐
Janning⭐ - avatar
0
Janning⭐ and what about code structure and comments? I heard that it is better to insert many comments, is it true?)
13th Jul 2018, 8:06 AM
Kate App
Kate App - avatar
0
Janning⭐ nice))))
13th Jul 2018, 8:23 AM
Kate App
Kate App - avatar
0
Thanks! ☺👍
13th Jul 2018, 8:24 AM
Janning⭐
Janning⭐ - avatar