Debian Codegraph @

pypy/doc/dev_method.rst

raw
1 Distributed and agile development in PyPy
2 =========================================
3
4 .. note::
5 This page describes the mode of development that precedes the current models
6 of Open Source development. While people are welcome to join our (now yearly)
7 sprints, we encourage engagement via the GitHub repo at
8 https://github.com/pypy/pypy/. Issues can be filed and discussed in the
9 `issue tracker`_ and we welcome `pull requests`_.
10
11 .. _`issue tracker`: https://github.com/pypy/pypy/issues/
12 .. _`pull requests`: https://github.com/pypy/pypy/pulls/
13
14 PyPy isn't just about producing code - it's also about how we produce code.
15 The challenges of coordinating work within a community and making sure it is
16 fused together with the parts of the project that is EU funded are tricky
17 indeed. Our aim is of course to make sure that the communities way of working
18 is disturbed as little as possible and that contributing to PyPy still feels
19 fun and interesting (;-) but also to try to show to the EU as well as other
20 funded projects that open source ideas, tools and methods are really good ways
21 of running development projects. So the way PyPy as a project is being run -
22 distributed and agile - is something we think might be of use to other open
23 source development projects and commercial projects.
24
25 Main methods for achieving this is:
26
27 * Sprint driven development
28 * Sync meetings
29
30 Main tools for achieving this is:
31
32 * py.test - automated testing
33 * Git - version control
34 * Transparent communication and documentation (mailinglists, IRC, tutorials
35 etc etc)
36
37
38 Sprint driven development:
39 --------------------------
40
41 What is a sprint and why are we sprinting?
42
43 Originally the sprint methodology used in the Python community grew from
44 practices within Zope3 development. The definition of a sprint is "two-day or
45 three-day focused development session, in which developers pair off together
46 in a room and focus on building a particular subsystem".
47
48 Other typical sprint factors:
49
50 * no more than 10 people (although other projects as well as PyPy haven been
51 noted to have more than that. This is the recommendation and it is
52 probably based on the idea of having a critical mass of people who can
53 interact/communicate and work without adding the need for more than just
54 the absolute necessary coordination time. The sprints during 2005 and 2006 have
55 been having ca 13-14 people per sprint, the highest number of participants
56 during a PyPy sprint has been 24 developers)
57
58 * a coach (the coach is the "manager" of the sprint, he/she sets the goals,
59 prepares, leads and coordinate the work and track progress and makes this
60 visible for the team. Important to note here - PyPy have never had coaches
61 in our sprints. Instead we hold short status meetings in the whole group,
62 decisions are made in the same way. So far this have worked well and we
63 still have been able to achieve tremendous results under stressed
64 conditions, releases and such like. What we do have is a local organizer,
65 often a developer living in the area and one more developer who prepares
66 and organizes sprint. They do not "manage" the sprint when its started -
67 their role is more of the logistic nature. This doesn't mean that we won't
68 have use for the coach technique or something similar in the future).
69
70 * only coding (this is a tough one. There have been projects who have used
71 the sprinting method to just visionalize och gather input. PyPy have had a
72 similar brainstorming start up sprint. So far though this is the official
73 line although again, if you visit a PyPy sprint we are doing quite a lot
74 of other small activities in subgroups as well - planning sprints,
75 documentation, coordinating our EU deliverables and evaluation etc. But
76 don't worry - our main focus is programming ;-)
77
78 * using XP techniques (mainly pairprogramming and unit testing - PyPy is
79 leaning heavily on these aspects). Pairing up core developers with people
80 with different levels of knowledge of the codebase have had the results
81 that people can quite quickly get started and join in the development.
82 Many of our participants (new to the project and the codebase) have
83 expressed how pairprogramming in combination with working on the automated
84 tests have been a great way of getting started. This is of course also a
85 dilemma because our core developers might have to pair up to solve some
86 extra hairy problems which affects the structure and effect of the other
87 pairs.
88
89 It is a method that fits distributed teams well because it gets the team
90 focused around clear (and challenging) goals while working collaborative
91 (pairprogramming, status meeting, discussions etc) as well as accelerated
92 (short increments and tasks, "doing" and testing instead of long start ups of
93 planning and requirement gathering). This means that most of the time a sprint
94 is a great way of getting results, but also to get new people acquainted with
95 the codebase. It is also a great method for dissemination and learning within
96 the team because of the pairprogramming.
97
98 If sprinting is combined with actually moving around and having the sprint
99 close to the different active developer groups in the community as well as
100 during conferences like PyCon and EuroPython, the team will have an easier
101 task of recruiting new talents to the team. It also vitalizes the community
102 and increases the contact between the different Python implementation
103 projects.
104
105 As always with methodologies you have to adapt them to fit your project (and
106 not the other way around which is much too common). The PyPy team have been
107 sprinting since early 2003 and have done 22 sprints so far, 19 in Europe, 2
108 in the USA and 1 in Asia. Certain practices have proven to be more successful within this
109 team and those are the one we are summarizing here.
110
111
112 How is it done?
113 ~~~~~~~~~~~~~~~
114
115 There are several aspects of a sprint. In the PyPy team we focus on:
116 1. Content (goal)
117 2. Venue
118 3. Information
119 4. Process
120
121 1. Content (goal) is discussed on mailinglists (pypy-dev) and on IRC ca one
122 month before the event. Beforehand we have some rough plans called "between
123 sprints" and the sprintplan is based on the status of those issues but also
124 with a focus on upcoming releases and deliverables. Usually its the core
125 developers who does this but the transparency and participation have
126 increased since we started with our weekly "pypy-sync meetings" on IRC. The
127 sync meetings in combination with a rough in between planning makes it
128 easier for other developer to follow the progress and thus participating in
129 setting goals for the upcoming sprints.
130
131 The goal needs to be challenging or it won't rally the full effort of the
132 team, but it must not be unrealistic as that tends to be very frustrating
133 and dissatisfying. It is also very important to take into account the
134 participants when you set the goal for the sprint. If the sprint takes place
135 connected to a conference (or similar open events) the goals for the actual
136 coding progress should be set lower (or handled in another way) and focus
137 should shift to dissemination and getting new/interested people to a
138 certain understanding of the PyPy codebase. Setting the right goal and
139 making sure this is a shared one is important because it helps the
140 participants coming in with somewhat similar expectations ;-)
141
142 2. Venue - in the PyPy project we have a rough view on where we are sprinting
143 a few months ahead. No detailed plans have been made that far in
144 advance. Knowing the dates and the venue makes flight bookings easier ;-)
145 The venue is much more important than one would think. We need to have a
146 somewhat comfortable environment to work in (where up to 15 people can sit
147 and work), this means tables and chairs, light and electricity outlets. Is
148 it a venue needing access cards so that only one person is allowed to open?
149 How long can you stay - 24 hours per day or does the landlord want the team
150 evacuated by 23:00? These are important questions that can gravely affect
151 the "feel and atmosphere" of the sprint as well as the desired results!
152
153 Also, somewhat close to low cost places to eat and accommodate
154 participants. Facilities for making tea/coffee as well as some kind of
155 refrigerator for storing food. A permanent Internet connection is a must -
156 has the venue were the sprint is planned to be weird rules for access to
157 their network etc etc?
158
159 Whiteboards are useful tools and good to have. Beamers (PyPy jargon for a projector)
160 are very useful for the status meetings and should be available, at least 1. The
161 project also owns one beamer - specifically for sprint purposes.
162
163 The person making sure that the requirements for a good sprint venue is
164 being met should therefore have very good local connections or, preferably
165 live there.
166
167 3. Information - discussions about content and goals (pre announcements) are
168 usually carried out on pypy-dev (mailinglist/IRC). All other info is
169 distributed via email on pypy-sprint mailinglist and as web pages on
170 codespeak. When dates, venue and content is fully decided a sprint
171 announcement is being made and sent out to pypy-dev and pypy-sprint as well
172 as more general purpose mailing lists like comp.lang.python and updated on
173 codespeak - this happens 2-4 weeks before the sprint. It's important that
174 the sprint announcements points to information about local transportation
175 (to the country and to the city and to the venue), currency issues, food
176 and restaurants etc. There are also webpages in which people announce when
177 they will arrive and where they are accommodated.
178
179 The planning text for the sprint is updated up till the sprint and is then
180 used during the status meetings and between to track work. After the sprint
181 (or even better: in between so that the memory is fresh) a sprint report is
182 written by one of the developers and updated to codespeak, this is a kind
183 of summary of the entire sprint and it tells of the work done and the
184 people involved.
185
186 One very important strategy when planning the venue is cost
187 efficiency. Keeping accommodation and food/travel costs as low as possible
188 makes sure that more people can afford to visit or join the sprint
189 fully. The partially EU funded parts of the project do have a so called sprint budget
190 which we use to try to help developers to participate in our sprints
191 (travel expenses and accommodation) and because most of the funding is so
192 called matched funding we pay for most of our expenses in our own
193 organizations and companies anyway.
194
195
196 4. Process - a typical PyPy sprint is 7 days with a break day in the
197 middle. Usually sprinters show up the day before the sprint starts. The
198 first day has a start up meeting, with tutorials if there are participants
199 new to the project or if some new tool or feature have been implemented. A
200 short presentation of the participants and their background and
201 expectations is also good to do. Unfortunately there is always time spent
202 the first day, mostly in the morning when people arrive to get the internet
203 and server infrastructure up and running. That is why we are, through
204 :ref:`documentation <getting-started-index>`, trying to get participants to
205 set up the tools and configurations needed before they arrive to the sprint.
206
207 Approximate hours being held are 10-17, but people tend to stay longer to
208 code during the evenings. A short status meeting starts up the day and work
209 is "paired" out according to need and wishes. The PyPy sprints are
210 developer and group driven, because we have no "coach" our status meetings
211 are very much group discussion while notes are taken and our planning texts
212 are updated. Also - the sprint is done (planned and executed) within the
213 developer group together with someone acquainted with the local region
214 (often a developer living there). So within the team there is no one
215 formally responsible for the sprints.
216
217 Suggestions for off hours activities and social events for the break day is
218 a good way of emphasizing how important it is to take breaks - some
219 pointers in that direction from the local organizer is good.
220
221 At the end of the sprint we do a technical summary (did we achieve the
222 goals/content), what should be a rough focus for the work until the next
223 sprint and the sprint wheel starts rolling again ;-) An important aspect is
224 also to evaluate the sprint with the participants. Mostly this is done via
225 emailed questions after the sprint, it could also be done as a short group
226 evaluation as well. The reason for evaluating is of course to get feedback
227 and to make sure that we are not missing opportunities to make our sprints
228 even more efficient and enjoyable.
229
230 The main challenge of our sprint process is the fact that people show up
231 at different dates and leave at different dates. That affects the shared
232 introduction (goals/content, tutorials, presentations etc) and also the
233 closure - the technical summary etc. Here we are still struggling to find
234 some middle ground - thus increases the importance of feedback.
235
236
237 Can I join in?
238 ~~~~~~~~~~~~~~
239
240 Of course. Just follow the work on pypy-dev and if you specifically are
241 interested in information about our sprints - subscribe to
242 [email protected] and read the news on codespeak for announcements etc.
243
244 If you think we should sprint in your town - send us an email - we are very
245 interested in using sprints as away of making contact with active developers
246 (Python/compiler design etc)!