why sending patches back is so important

29
Why sending patches back to upstream is so important. If you’re working with open source software. Macpaul Lin 2011/Dec/09

Upload: macpaul-lin

Post on 25-Dec-2014

3.304 views

Category:

Technology


4 download

DESCRIPTION

 

TRANSCRIPT

Page 1: Why sending patches back is so important

Why sending patches back to upstream is so important.

If you’re working with open source software.

Macpaul Lin

2011/Dec/09

Page 2: Why sending patches back is so important

This slide is made for you,and for your BOSS.

這個投影片是讓你拿去給老闆看的

Page 3: Why sending patches back is so important

We often made our products based on open source software.

公司經常會叫你偷開放原始碼的軟體來做產品

Page 4: Why sending patches back is so important

These software are usually needto be modified to adapt into

the products.但是這些軟體不改

通常沒辦法直接拿來用

Page 5: Why sending patches back is so important

Open source software indeed helped us to develop

products.用開放原始碼的軟體開發產品,

的確很快也很有幫助,也不用花錢買軟體來改。

Page 6: Why sending patches back is so important

But the realistic is…

但事實是…

Page 7: Why sending patches back is so important

You will have problem on compatible and upgrade issues

between different versions.你會在不同的版本之間,

碰到相容性和升級的問題。

Page 8: Why sending patches back is so important

If you started from tarball,upgrade will be almost impossible be

cause you have to compareeach file and directory.

如果你從下載的 tarball 開始做你的產品,那軟體升級就會幾乎不可能,

因為你必須比對每一個檔案或每一個目錄。

Page 9: Why sending patches back is so important

You will still also have lot of testing work to do…

更別說你還要做各種大量的測試…

Page 10: Why sending patches back is so important

DownloadTarball

andUnpack

CompareBugfix, feature

andUpgrade

Release

IntegrateandTest

So, you will restart the work every time when a new project kick off.

而且你每次都得重複一次這樣的工作

Page 11: Why sending patches back is so important

No, actually you won’t get those components be upgraded if they should be upgrad

ed…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

Page 12: Why sending patches back is so important

There is still hope.還好我們(這些工程師)都還沒掛

Page 13: Why sending patches back is so important

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 掛上來。

Page 14: Why sending patches back is so important

But we still have problem even we used version control.

即使我們用了版本管理工具,還是會碰到問題

Page 15: Why sending patches back is so important

Upgrade Process of IntegratingOpen Source Software

整合開放原始碼軟體的升級過程

Developing Release Developing Release

You DownloadThe Release

Integrating,Bug fix.

DownloadRelease

IntegrationProblem.

Page 16: Why sending patches back is so important

The only way to do upgrade is to reorganize your patches to fit the

new release.升級的唯一方法,

就是把這些補丁拆掉再重組,以相容新版的軟體。

Page 17: Why sending patches back is so important

To fix a “single” patch usually takes 10 minutes to 2 hours and even

longer; if your patch is fortunately really beautiful.

修理一個補丁通常要花上 10 分鐘到 2 小時,或者更長的時間;

那是在你運氣很好,補丁都寫得的很漂亮的狀況下,

也要這麼多時間。

Page 18: Why sending patches back is so important

Think about it:If you didn’t submit these patches (bugfix and features) back to upstream,

what will you get?試想:如果你不把這些補丁(包括錯誤修正和新功能)送回去上游,

你會得到怎樣的結果?

Page 19: Why sending patches back is so important

Finally you will get a vicious circle each timewhen you need to do upgrade,

because you have to fix each accumulated patch.所以每次升級,你就得把累積的補丁逐一修正,

最後掉進惡性循環,不會有空做真正該做的事情。

Official Software Maintained Patches keeps growing

Page 20: Why sending patches back is so important

Then you will need days to weeks to do upgrade.

然後你就需要花上好幾天,甚至數週的時間來做升級,

而不能做別的事情。

Page 21: Why sending patches back is so important

Is it your life now?你是不是已經被一堆補丁壓垮了?

Page 22: Why sending patches back is so important

Why not send your patches back?You can maintain less modifications.

You’ll be free to do more creative things.

把補丁送回去吧!這樣你可以少些負擔。

然後你就可以有自由的身心靈來做更多有創意的事情。

Page 23: Why sending patches back is so important

Other people will help you to maintain bugfixs, give you suggestion, to avoid you use the wrong

method to develop the software.

世界上其他厲害的工程師會一起幫你維護程式,給你意見,然後避免你用錯的

方法,甚至老舊的觀念來寫程式。

Page 24: Why sending patches back is so important

The above sounds great,but don’t forget,

the basic work is to organize the patch simple and clear as possible.

以上聽起來或許很不錯,但是別忘了,基本功很重要,

必須把每一個補丁,寫得盡可能簡單又清楚。

Page 25: Why sending patches back is so important

If you and your boss still didn’t understand this, show the

following slide to him.講了這麼多,

如果你和你的老闆,還是聽不懂這到底是怎麼一回事,

給他看最後的這張投影片。

Page 26: Why sending patches back is so important

The feature of your product,this should be located at an intersection.

Page 27: Why sending patches back is so important

你家的產品應該長得這樣他應該落在某一個交集區之內

Page 28: Why sending patches back is so important

Send your patches back,this will let your work easier and get better results from now on.

把你的補丁都送回去吧,這會讓你的工作變得簡單些,

而且得到更好得產出。

Page 29: Why sending patches back is so important

Any comment and suggestion is welcome.We can make this world better just start from ou

r working environment.You can use this slides freely.

macpaul gmail.com歡迎給予任何的建議

我們可以從改善工作環境開始,讓世界變得更好

請隨意使用這份投影片

@