This was a great talk where Malcolm Tredinnick spelled out what he’s looking for in Django patches and what to avoid if you don’t want your patch tossed out. Although his talk was targeting the Django project, he really dispensed good advice for anyone maintaining software regardless of project, language or platform. The room was completely packed! All of the chairs and couches we’re filled and people were sitting on the floor and standing at the sides of the room.
You’re doing it wrong if:
• the word “print” is in your patch
• you don’t have a test (fail before, pass afterwards)
• you think “PEP 8″ is an energy drink (PEP 8 is the style guide for python)
∘ make your patch look like django style code
Create patches by running diff from the top of the repository to get all changes. The svn add command works locally even if you don’t have rights to commit to the repository so files you add will be added to the patch.
“Code style is opinionated and yours doesn’t matter!”
What he’s saying here makes sense in any open source project. There’s a style defined and you should not deviate from it no matter how much you like your own special coding habits. You might get away with minute changes, but don’t push it.
“Read the contributing document.”
This seems to be simple and common sense. Skipping over information someone has left for you is a recipe for confusion.
Some tips given on comments:
• comments should last
• comments should be correct
• comments should explain they “why”, we can already read the how in the code.
Some general tips:
• Fix problems and not symptoms!
• Research is not a four letter word.
• The crowd is smarter than you
And what I believe was his last advice for the talk (at least I stopped taking notes after this) was to contribute and keep contributing. Even when your patches don’t get in, don’t get discouraged.
It was a good talk and the first time I had heard Malcolm speak. He was very informative and encouraging. Overall I liked it and it was one of my favorite talks besides James Bennett and Cal Henderson.