5 comments

[ 7.1 ms ] story [ 28.8 ms ] thread
Python is a really flexible language, and there are tons of right -- and wrong ways -- to accomplish any task.

BadPython is a fun, collaborative way to see and share snippets of python code, vote on whether it's actually bad, and hopefully learn how _not_ to write python.

Perhaps add "why this is bad" explanations as well as "how to fix it / do it better". put those on the page with a hide/unhide button.
Thanks for the feedback! I wanted to urge users to submit "here's how I'd do it" instead of commenting, i.e. show don't tell

But I think you're right that a comments section is more usable/useful.

One of the examples was simply "using globals" ... gloabls aren't universally bad because they're globals, they're bad for most situations because of $(long list of common reasons).

When they're useful they're so useful as to be a vital feature of the language, that's needed even when it can lead to misuse or common footgun scars.

Good software design / good use of a language is one thing; getting things done sometimes requires the programming equivalent of a dirty limerick.

While I appreciate the feedback, the goal of the site is to "crowdsource" the snippets, i.e. they are all user submitted, and then the public votes on whether it is "bad" or "not so bad".