Why sending patches back is so important


Published on

Published in: Technology
  • Be the first to comment

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide

Why sending patches back is so important

  1. 1. Why sending patches back to upstream is so important. If you’re working with open source software. Macpaul Lin 2011/Dec/09
  2. 2. This slide is made for you, and for your BOSS. 這個投影片是讓你拿去給老闆看的
  3. 3. We often made our products based on open source software. 公司經常會叫你 偷開放原始碼的軟體來做產品
  4. 4. These software are usually need to be modified to adapt into the products. 但是這些軟體不改 通常沒辦法直接拿來用
  5. 5. Open source software indeed helped us to develop products. 用開放原始碼的軟體開發產品, 的確很快也很有幫助, 也不用花錢買軟體來改。
  6. 6. But the realistic is… 但事實是…
  7. 7. You will have problem on compatible and upgrade issues between different versions. 你會在不同的版本之間, 碰到相容性和升級的問題。
  8. 8. If you started from tarball, upgrade will be almost impossible because you have to compare each file and directory. 如果你從下載的 tarball 開始做你的產品, 那軟體升級就會幾乎不可能, 因為你必須比對每一個檔案或每一個目錄。
  9. 9. You will still also have lot of testing work to do… 更別說你還要做各種大量的測試…
  10. 10. So, you will restart the work every time when a new project kick off. 而且你每次都得重複一次這樣的工作 Download Tarball and Unpack Compare Bugfix, feature and Upgrade Release Integrate and Test
  11. 11. No, actually you won’t get those components be upgraded if they should be upgraded… Like most WiFi devices shipped nowadays are still using u-boot 1.0.0 (2003) and busybox 1.0.0 (2004). 不,你不會想去碰那些該升級的部份的 例如:至今仍有很多剛出貨的無線產品, 仍在使用 2003 年的 u-boot 或 2004 年的 busybox
  12. 12. There is still hope. 還好我們(這些工程師)都還沒掛
  13. 13. Thanks version control, for example, if you’re using git, you just need to do “git rebase” to apply all the patches. 感謝有人發明了版本管理, 例如,如果你用 git , 你只需要下 git rebase , 就可以把所有的 patch 掛上來。
  14. 14. But we still have problem even we used version control. 即使我們用了版本管理工具, 還是會碰到問題
  15. 15. Upgrade Process of Integrating Open Source Software 整合開放原始碼軟體的升級過程 Developing Release Developing Release You Download The Release Integrating, Bug fix. Download Release Integration Problem.
  16. 16. The only way to do upgrade is to reorganize your patches to fit the new release. 升級的唯一方法, 就是把這些補丁拆掉再重組, 以相容新版的軟體。
  17. 17. To fix a “single” patch usually takes 10 minutes to 2 hours and even longer; if your patch is fortunately really beautiful. 修理一個補丁通常要花上 10 分鐘到 2 小時, 或者更長的時間; 那是在你運氣很好, 補丁都寫得的很漂亮的狀況下, 也要這麼多時間。
  18. 18. Think about it: If you didn’t submit these patches (bugfix and features) back to upstream, what will you get? 試想:如果你不把這些補丁(包括錯誤修正和新功能)送回去上游,你會得到怎樣的結果?
  19. 19. Finally you will get a vicious circle each time when you need to do upgrade, because you have to fix each accumulated patch. 所以每次升級,你就得把累積的補丁逐一修正, 最後掉進惡性循環,不會有空做真正該做的事情。 Official Software Maintained Patches keeps growing
  20. 20. Then you will need days to weeks to do upgrade. 然後你就需要花上好幾天, 甚至數週的時間來做升級, 而不能做別的事情。
  21. 21. Is it your life now? 你是不是已經被一堆補丁壓垮了?
  22. 22. Why not send your patches back? You can maintain less modifications. You’ll be free to do more creative things. 把補丁送回去吧! 這樣你可以少些負擔。 然後你就可以有自由的身心靈 來做更多有創意的事情。
  23. 23. Other people will help you to maintain bugfixs, give you suggestion, to avoid you use the wrong method to develop the software. 世界上其他厲害的工程師會一起幫你維護程式,給你意見,然後避免你用錯的方法,甚至老舊的觀念來寫程式。
  24. 24. The above sounds great, but don’t forget, the basic work is to organize the patch simple and clear as possible. 以上聽起來或許很不錯, 但是別忘了,基本功很重要, 必須把每一個補丁, 寫得盡可能簡單又清楚。
  25. 25. If you and your boss still didn’t understand this, show the following slide to him. 講了這麼多, 如果你和你的老闆, 還是聽不懂這到底是怎麼一回事, 給他看最後的這張投影片。
  26. 26. The feature of your product, this should be located at an intersection.
  27. 27. 你家的產品應該長得這樣 他應該落在某一個交集區之內
  28. 28. Send your patches back, this will let your work easier and get better results from now on. 把你的補丁都送回去吧, 這會讓你的工作變得簡單些, 而且得到更好得產出。
  29. 29. Any comment and suggestion is welcome. We can make this world better just start from our working environment. You can use this slides freely. macpaul gmail.com 歡迎給予任何的建議 我們可以從改善工作環境開始, 讓世界變得更好 請隨意使用這份投影片 @