-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Simplify Python Code #698
Simplify Python Code #698
Conversation
print_with_tab / print_with_whitespace is trivial with Python string formatting and was mostly used in only 2 lines.
dddb254
to
b3aa8ff
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It looks to me like this mainly is about coding-conventions. I personally would feel pissed if someone would re-format my code without any written coding-convention. I would prefer if we would leave code-style to the person who took the time to implement a game!?
Could you please be more specific / give an example what you mean? I've changed a lot in this PR:
I know that some people have strong feelings about coding style changes, but I don't really understand that. It's a community project. If people wan't to keep their style, they can do that in their repository. I think a maintainer should strive for a consistent coding style that makes it easy for others to understand + change code in a project, especially when there are likely many beginners looking at it. If we make a "who wrote it, owns it" policy, we essentially have one owner per file. That would make changes like #699 impossible. |
Thanks for all your useful contributions! Why not do them in a seperate merge-requests? It's always hard to discuss these massive changes!
That is not my intention! Any useful change should be done! That's why I personally think open repositories with multiple contributors should stick to the following rules:
But to be honest, I don't care that much about python. I guess it's for other people to decide! |
Ah, I see! I can understand that. I think a core point to recognize is who originally did the work of porting the implementation of a game to the specific language. I see that most (all?) people put themselves somewhere in the file. I thought that would be enough for recognizing / honoring the work that initial contributor put in it. I see several ways a contribution is honored / recognized
Sadly, that doesn't always help. The only way I see to ensure that renaming doesn't drop the git history is to make two commits: (1) renaming (2) adjusting the contents. Especially when I squash commits /
I feel like those two are really hard to judge in many cases. As an example: You could argue that the changes I made in https://github.com/coding-horror/basic-computer-games/pull/696/files were not necessary. You could also say that those are just coding style changes - in the end, the program does the same thing (same user input/random state leads to same output of the program). However, I would argue that the PR improved the code quite a bit. It would also not be something that can be enforced using bots, as such structural changes are way too complex for bots. |
Btw: I think Python has less extreme linters for enforcing small rules than JS has. But I'm working on that part with my plugin |
I think as long as the initial contributor is honored, perhaps in the comments of the program, that's best? It's always visible in Git history at least? |
Also @mojoaxel and @MartinThoma could you email me your postal addresses? I wanted to mail you a little something in the postal mail to thank you for the time you are contributing to this project! 💌 |
Simplify Python Code
Another bigger one, fixing many tiny issues (and a few bugs)