Preface تمهيد لم يعد الناس غير مبالين عندما أخبرهم أني أكتب برامج مفتوحة المصدر، بل يتسائلون باهتمام "مفتوح المصدر مثل نظام Linux؟". أومئ بالايجاب و أقول "نعم! هذا ما أفعله بالضبط". إنه شيئ جميل أن لا أكون مهمشا بعد الآن. في الماضي كان السؤال التالي المتوقع هو "كيف تجني المال بهذه الطريقة؟" فكنت أجيب بتلخيص لسياسة المصادر المفتوحة بأن مصلحة بعض المنظمات في وجود بعض البرامج وليس بالضرورة أن تكون بمقابل مادي، ما يريدونه هو أن تكون هذه البرامج متوفرة كأدوات بدل سلع. لكن مؤخرا لم يعد السؤال التالي عن المال غالبا. فالوضع التجاري للبرامج مفتوحة المصدر المصطلحين "مفتوح المصدر" و "حر" متطابقان من حيث المعنى في هذا السياق، سأنقاشهما بالتفصيل في فقرة . لم يعد غامضا، و الكثير من غير المبرمجين باتوا يعلمون — أو على الأقل لا يتفاجئون — بأن ثمة أناسا يوظفون لهذا العمل. لكن بات السؤال هو "كيف يمكن أن يكون هذا؟" لم تكن لدي اجابة شافية جاهزة لهذا السؤال، و كلما حاولت جاهدا أن أجد اجابة أدركت كم هو الموضوع معقد. ادارة البرامج الحرة ليس مثل التجارية(تصور كيف يمكن التفاوض باستمرار عن طبيعة المنتج مع مجموعة من المتطوعين أغلبهم لم تقابلهم أبدا!) كما أنه ليس مثل ادارة منظمة غير ربحية تقليدية، و لا حتى مثل ادارة حكومة. و توصلت الى خلاصة أن البرامج الحرة هيشيئ فريد من نوعه. توجد الكثير من الأشياء التي تتشابه معها لكنها لا تتساوى مع أي منها. بل حتى الافتراض بأن البرامج الحرة يمكن ادارتها هو شيئ مستبعد. فيمكن البدء بمشروع مفتوح المصدر و يمكن المشاركة فيه بشكل كبير من أطراف أخرى، لكن ملكيته لا يمكن أن تكون لشخص واحد،و بما أن ثمة أناسا—في أي مكان— مهتمين بمواصلة هذا المشروع فلا يمكن ايقافه بقرار طرف واحد. كل واحد لديه الحق المطلق في المشروع كما أن كل واحد ليس لديه أي حق. و هذه حيوية مثيرة للاهتمام. لهذا السبب أردت تأليف هذا الكتاب. مشاريع البرامج الحرة طورت ثقافة خاصة بها، مبدئها الرئيسي الحرية في جعل البرنامج يفعل أي شيئ أي شخص يريده،هذه الحرية ليست لتشتيت العمل بأن يصبح لكل شخص نسخته الخاصة من الكود، بل تعاون يطغى عليه الحماس. في الواقع، الخبرة في التعاون المشترك هي واحدة من أهم مكتسبات العمل في البرامج الحرة. To manage these projects is to engage in a kind of hypertrophied cooperation, where one's ability not only to work with others but to come up with new ways of working together can result in tangible benefits to the software. This book attempts to describe the techniques by which this may be done. It is by no means complete, but it is at least a beginning. صنع برنامج حر جيد هو هدف نبيل في حد ذاته، و أتمنى أن يجد القراء الذين يبحثون عن كيفية تحقيق هذا الهدف مرادهم في هذا الكتاب. كما أتمنى أيضا أن أوصل الاحساس الممتع النابع من العمل مع فريق من مطوري المصادر المفتوحة و من التفاعل مع المستخدمين بالطريقة المباشرة التي تشجعها المصادر المفتوحة. المشاركة في برنامج حر ناجح هو أمر ممتع، و هذا هو الأساس الذي يحافظ على استمرارية هذا النظام. لمن هذا الكتاب؟ هذا الكتاب موجه الى المطورين و المدراء الذين يخططون لبدء مشروع مفتوح المصدر، أو الذين بدأو بذلك و يريدون معرفة ماذا يجب فعله الآن. كما أن الكتاب مفيد للذين يرغبون في المشاركة في مشاريع مفتوحة المصدر و ليست لديهم خبرة سابقة في هذا المجال. لا يجب أن يكون القارئ مبرمجا، لكن يفضل أن يكون على علم بالمفاهيم الأساسية لهندسة البرامج مثل الشفرة المصدرية، المترجم و patches. لا تشترط خبرة سابقة في البرامج مفتوحة المصدر، سواء كنت مستخدما أو مطورا. بالنسبة للذين عملوا في مشاريع برامج حرة سابقا، قد يجدون بعض الفصول مألوفة و قد يرغبون في تجاهلها. و بما أن احتمالات خبرة القراء شيئ لا يمكن حصره فقد اجتهدت لجعل أسماء الفصول واضحة و ذكر متى يمكن تجاهل الفصل للذين لديهم علم سابق بمحتواه. المصادر غالبية هذا الكتاب مستقاة من عمل خمس سنوات في مشروع Subversion (). Suversion هو مشروع مفتوح المصدر لمراقبة اصدارات الشفرة (source version control) مبرمج من الصفر و يهدف الى تعويض نظام CVS لمراقبة اصدارات الشيفرة و الذي يعتبر الخيار المفضل لمجتمع المصادر المفتوحة. بدأ المشروع في الشركة التي أعمل فيها CollabNet ()، في بداية سنة 2000، و الحمد لله أنّ CollbaNet فهمت جيدا من البداية كيف تديره على أساس مجهود تعاوني مشترك. حصلنا على الكثير من المطورين المتطوعين من البداية; اليوم يوجد 50 و قليل من المطورين في المشروع، قلة منهم يعملون في CollbaNet. Subversion هو مثال جيد من كل النواحي لمشروع مفتوح المصدر، الى درجة أني اعتمدت عليه في الكتاب أكثر مما كنت أتوقع. و هذا يعود في جزء منه الى مسألة توافقية: فكلما احتجت الى ضرب مثال لحالة معينة، يأتي الى ذهني مباشرة مثال من مشروع Subversion، لكنها أيضا مسألة اثبات، فرغم أن مشترك في مشاريع برامج حرة أخرى بدرجات مختلفة، و أعرف أصدقاء مشتركين في العديد من المشاريع الأخرى، الاّ أنه عندما يتعلق الأمر بالتأليف فيجب التثبت من واقعية الحقائق المذكورة. لم أرغب في أن أكتب أمثلة من مشاريع أخرى بالاعتماد على ما أقرأه في أرشيف قائمتهم البريدية. If someone were to trythat with Subversion, I knew, she'd be right about half the time and wrong the other half. So when drawing inspiration or examples from a project with which I didn't have direct experience, I tried to first talk to an informant there, someone I could trust to explain what was really going on. عملت على نظام Subversion طوال الخمس سنين الماضية، لكن اشتركت في 12 برنامج حر آخر. هذه بعض المشاريع التي لها تأثير في هذا الكتاب: مشروع محرر نصوص إيماكس Emacs لنظام GNU في مؤسسة البرامج الحرة Free Software Foundation، حيث أقوم بصيانة بعض الأجزاء الصغيرة. نظام الاصدارات المتزامنة Concurrent Versions System(CVS)، عملت فيه بشكل مكثف في الفترة 1994-1995 مع جيم بلاندي Jim Blandy، لكن اشتراكي فيه متقطع منذ ذلك الوقت. مجموعة البرامج مفتوحة المصدر المعروفة باسم Apache Software Foundation، خصوصا Apach Portable Runtime(APR) و خادم أباتش Apache HTTP Server. حزمة البرامج المكتبية OpenOffice.org، محرك قواعد البيانات Berkeley من شركة Sleepycat، نظام قواعد البيانات MySQL; لم أشترك شخصيا في هذه المشاريع لكن راقبتها و في بعض الحالات تحدثت مع أشخاص عنها. GNU Debugger(GDB)(نفس الشيئ). مشروع Debian (نفس الشيئ). This is not a complete list, of course. Like most open source programmers, I keep loose tabs on many different projects, just to have a sense of the general state of things. I won't name all of them here, but they are mentioned in the text where appropriate. Acknowledgments This book took four times longer to write than I thought it would, and for much of that time felt rather like a grand piano suspended above my head wherever I went. Without help from many people, I would not have been able to complete it while staying sane. Andy Oram, my editor at O'Reilly, was a writer's dream. Aside from knowing the field intimately (he suggested many of the topics), he has the rare gift of knowing what one meant to say and helping one find the right way to say it. It has been an honor to work with him. Thanks also to Chuck Toporek for steering this proposal to Andy right away. Brian Fitzpatrick reviewed almost all of the material as I wrote it, which not only made the book better, but kept me writing when I wanted to be anywhere in the world but in front of the computer. Ben Collins-Sussman and Mike Pilato also checked up on progress, and were always happy to discuss—sometimes at length—whatever topic I was trying to cover that week. They also noticed when I slowed down, and gently nagged when necessary. Thanks, guys. Biella Coleman was writing her dissertation at the same time I was writing this book. She knows what it means to sit down and write every day, and provided an inspiring example as well as a sympathetic ear. She also has a fascinating anthropologist's-eye view of the free software movement, giving both ideas and references that I was able use in the book. Alex Golub—another anthropologist with one foot in the free software world, and also finishing his dissertation at the same time—was exceptionally supportive early on, which helped a great deal. Micah Anderson somehow never seemed too oppressed by his own writing gig, which was inspiring in a sick, envy-generating sort of way, but he was ever ready with friendship, conversation, and (on at least one occasion) technical support. Thanks, Micah! Jon Trowbridge and Sander Striker gave both encouragement and concrete help—their broad experience in free software provided material I couldn't have gotten any other way. Thanks to Greg Stein not only for friendship and well-timed encouragement, but for showing the Subversion project how important regular code review is in building a programming community. Thanks also to Brian Behlendorf, who tactfully drummed into our heads the importance of having discussions publicly; I hope that principle is reflected throughout this book. Thanks to Benjamin "Mako" Hill and Seth Schoen, for various conversations about free software and its politics; to Zack Urlocker and Louis Suarez-Potts for taking time out of their busy schedules to be interviewed; to Shane on the Slashcode list for allowing his post to be quoted; and to Haggen So for his enormously helpful comparison of canned hosting sites. Thanks to Alla Dekhtyar, Polina, and Sonya for their unflagging and patient encouragement. I'm very glad that I will no longer have to end (or rather, try unsuccessfully to end) our evenings early to go home and work on "The Book." Thanks to Jack Repenning for friendship, conversation, and a stubborn refusal to ever accept an easy wrong analysis when a harder right one is available. I hope that some of his long experience with both software development and the software industry rubbed off on this book. CollabNet was exceptionally generous in allowing me a flexible schedule to write, and didn't complain when it went on far longer than originally planned. I don't know all the intricacies of how management arrives at such decisions, but I suspect Sandhya Klute, and later Mahesh Murthy, had something to do with it—my thanks to them both. The entire Subversion development team has been an inspiration for the past five years, and much of what is in this book I learned from working with them. I won't thank them all by name here, because there are too many, but I implore any reader who runs into a Subversion committer to immediately buy that committer the drink of his choice—I certainly plan to. Many times I ranted to Rachel Scollon about the state of the book; she was always willing to listen, and somehow managed to make the problems seem smaller than before we talked. That helped a lot—thanks. Thanks (again) to Noel Taylor, who must surely have wondered why I wanted to write another book given how much I complained the last time, but whose friendship and leadership of Golosá helped keep music and good fellowship in my life even in the busiest times. Thanks also to Matthew Dean and Dorothea Samtleben, friends and long-suffering musical partners, who were very understanding as my excuses for not practicing piled up. Megan Jennings was constantly supportive, and genuinely interested in the topic even though it was unfamiliar to her—a great tonic for an insecure writer. Thanks, pal! I had four knowledgeable and diligent reviewers for this book: Yoav Shapira, Andrew Stellman, Davanum Srinivas, and Ben Hyde. If I had been able to incorporate all of their excellent suggestions, this would be a better book. As it was, time constraints forced me to pick and choose, but the improvements were still significant. Any errors that remain are entirely my own. My parents, Frances and Henry, were wonderfully supportive as always, and as this book is less technical than the previous one, I hope they'll find it somewhat more readable. Finally, I would like to thank the dedicatees, Karen Underhill and Jim Blandy. Karen's friendship and understanding have meant everything to me, not only during the writing of this book but for the last seven years. I simply would not have finished without her help. Likewise for Jim, a true friend and a hacker's hacker, who first taught me about free software, much as a bird might teach an airplane about flying. Disclaimer The thoughts and opinions expressed in this book are my own. They do not necessarily represent the views of CollabNet or of the Subversion project.