PyWeek - Idea: python game code swap
Reading some people's PyWeek code, I realized I could give them suggestions on how to improve it, and I'm sure someone reading my code could do the same as well. I'm not talking about "best practices" like scalability, docstrings, and unit tests - these things understandably go out the window during PyWeek. I'm talking about avoiding doing things the hard way. Suggestions that would save time during PyWeek and make your code more usable/reliable/readable/efficient to boot. Things like:- a set would be better here than a list
- you've basically implemented itertools.product from scratch
- caching these images would speed things up a lot
So I'm proposing a "code swap", where we write a small game and send it to each other for feedback on the code itself. I'm thinking something like 500 lines of code, depending on your coding style. You'd get maybe a week to write it, so there's not much pressure, and you'd be expected to put some effort into making your code comprehensible. If you think your PyWeek game is coded well, you could also submit that.
This wouldn't be a contest, just a feedback session, but hopefully we could apply lessons learned to PyWeek. Would anybody be interested?
— Cosmologicon on 2011/10/10 17:22
Comments: (log in to comment)

By tnelsond on 2011/10/11 17:36:
Hey I like this. Or maybe we could make a new compo where every day or two you switch code with someone and work on their code. Lol. It would be hillarious!By DR0ID on 2011/10/11 17:52:
I like the idea, but I admit I have barely looked at other peoples code. Maybe I should peek more often into the sources.By tnelsond on 2011/10/11 20:16:
Who's with me? Let's start a new code switching game making compo. People will practice writing readable code and will practice reading (and writing) other people's code. I don't know how something like that would be judged (probably doesn't need to), but it'd be fun and interesting.By gcewing on 2011/10/11 22:26:
Sounds interesting. Maybe instead of multiple games being swapped, there could be just one game that circulates among the participants. It would be a little like the game where you pass a story around and everyone adds a bit to it.By tnelsond on 2011/10/11 23:35:
Or better yet, you start out with one game and it branches off into a 100. For example, person A starts the game, person B and person C both fork it and work on it a little. E and F fork B, and G and H fork C, etc.By tnelsond on 2011/10/12 00:42:
Oh and back to your original question Cosmologicon, yes I'd be interested in a code-swap feedback session.By Hugoagogo on 2011/10/12 21:24:
Yea i would be up for it, mabey with a version of my code though that i have cleaned up a bit after pyweekBy Cosmologicon on 2011/10/13 04:16:
Sounds like there's enough interest to at least try it out, and enough concerns that we should treat this as pretty experimental. Here's my first draft of the guidelines. Let me know what you think:The purpose of this code swap is to give and receive feedback on your python code, to help us become better at writing PyWeek games. This is very informal but hopefully we'll get something useful out of it.
Submission guidelines:
"Judging" guidelines:
Game guidelines: