軟件工程師採用新技術的正確方式

{"type":"doc","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","marks":[{"type":"strong"}],"text":"本文最初發佈於telerik.com網站,經原作者授權由InfoQ中文站翻譯並分享。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"2015年,我帶領一支工程團隊爲大學生構建了一個Web應用程序。由於錄取工作已於5月結束,因此我們只有3個月的時間爲每年8月的流量暴漲做好準備。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"第一年我們只有幾千個用戶,所以沒有人擔心擴展問題。我們使用了"},{"type":"link","attrs":{"href":"https:\/\/www.infoq.cn\/article\/Yco7SjgoASyUmtwGQaGT","title":"","type":null},"content":[{"type":"text","text":"Angular"}]},{"type":"text","text":"前端和MySQL數據庫,在PHP中構建了這款應用。"}]},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/a6\/a65d6afcab75f2f490ff045d42be2050.png","alt":null,"title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":"center","origin":null},"content":[{"type":"text","text":"第一年結束時,我們的應用程序架構"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"當我們準備在第二年將用戶規模增加到三倍時,我們開始懷疑現有的應用程序能否良好地擴展。我開始學習所有最新的工具,聘請了一位經驗豐富的"},{"type":"link","attrs":{"href":"https:\/\/www.infoq.cn\/article\/mlMzHS1Ii4kGDg3awlvx","title":"","type":null},"content":[{"type":"text","text":"DevOps工程師"}]},{"type":"text","text":",然後制定了一項負載測試計劃。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"經過兩個半月的混亂,研究了"},{"type":"link","attrs":{"href":"https:\/\/xie.infoq.cn\/article\/3567a170d037dccc748e5fe1f","title":"","type":null},"content":[{"type":"text","text":"Docker"}]},{"type":"text","text":"、Azure Service Mesh和其他一些最新工具後,我們意識到無法趕上8月的截止日期。我們退後一步,重新考慮了所面對的問題。我開始向一些導師尋求建議,記得那天,其中一位叫我出去,對我說:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"“你不需要那麼多複雜的工具!”他告訴我。“在系統上再扔一臺服務器就行了。”"}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"爲什麼新技術如此吸引人?"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"像許多工程師一樣,我會抓住機會利用所有最酷的新工具。經過幾個月的無謂嘗試,我終於意識到解決方案本來很簡單,並且我們手頭已經有了所需的工具。我們水平擴展了API,垂直擴展了數據庫,這花了大約兩週時間。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/16\/167af403510cee91741f935aacf27603.png","alt":null,"title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":"center","origin":null},"content":[{"type":"text","text":"第二年開始時,我們的應用程序架構"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"事後看來這顯然是正確的選擇,但是爲什麼一開始它就不那麼明顯呢?爲什麼甚至頗有經驗的軟件工程師也會像飛蛾撲火一般被閃亮的新技術所吸引?"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"新技術承諾解決老問題"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"管理大量服務器非常困難,一直以來都是一個難題。當我們遷移到雲後,這個問題終於變簡單了,現在 Kubernetes 承諾可以讓這件事情變得更輕鬆。與所有“煩人的舊東西”相比,新技術有望更快、更高效或更靈活地解決問題。如果你只看那些宣傳資料,你可能會認爲它們甚至沒有任何代價可言。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"我們會因爲用上了“最新和最棒的技術”而受到關注"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"我在2015年讀到的所有文章都在說Docker將會有多偉大。他們堅持認爲它將在短短几年內取代VPS。早期採用的公司因此得到了很多正面的報道。我也想要這種關注。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"求職者湧向新技術"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"不幸的是,由Hacker News推動的炒作週期使工程師認爲他們必須採用最新技術才能跟上時代。對於新手開發人員來說尤其如此。你想不到最近有多少培訓班畢業生問我是否在使用新出的X或Y框架。甚至有人試着勸我將我們的整個關係數據庫轉移到區塊鏈上。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"我們也想變得很酷"}]},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"“深入其中並對所有事物做現代化改進是很有趣的事情——當然,你可以在此過程中學到很多東西(也許會以犧牲業務爲代價)。”——David LeBlanc"}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"我對豐富簡歷內容沒什麼興趣,但我記得那時候我會想:“這將成爲一次會議演講上的精彩故事。”我現在可不敢這麼說,因爲在2015年的早期創業階段嘗試部署Docker,結果以失敗告終的經歷,可能是我迄今爲止最大的管理敗績。"}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"過早採用新技術的風險"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"幾年前,我發現技術炒作週期是這麼一回事:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"“炒作週期中,市場先是對某種很棒的新事物有一段時期的誇大宣傳,鼓勵人們採用——直到技術逐漸真的普及開來,人們才發現新事物並沒有廣告中所描述的那麼神奇。然後這種新事物便會失寵,乃至被完全丟棄或遺忘,直到它的成功所需的知識基礎成型爲止。”——Dick Dowdell"}]}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/e3\/e32cdcc0a99e49ffd47c8d2eaa4547b6.png","alt":null,"title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":"center","origin":null},"content":[{"type":"text","text":"技術炒作週期"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"許多工程師在新技術誕生伊始的高峯期(也就是關注和討論最多的時期)錯誤地採用了它們。問題在於,不成熟的技術會有全新和未知的故障機制,而現有的解決方案並不會如此。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"軟件工程團隊需要浪費大量時間尋找不那麼明顯的錯誤、查找文檔裏沒有的邊緣案例並重寫代碼來適應新技術。這就是六年前我們嘗試採用Docker時發生的事情。我們沒有足夠的資源來遍歷所有沒有文檔支持的特性和選項,而且API會隨着版本升級而不斷變化。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"就算這些問題並沒有令你困擾,但早期採用者仍會承擔技術開發公司倒閉的風險。我記得有幾個朋友很早就用上了RethinkDB,但到了開發它的公司於2016年關閉時他們大失所望。儘管它後來作爲一個社區維護項目又回來了,但讓你的應用程序數據庫陷入困境從來都不是什麼好事情。"}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"技術採用技巧"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"既然如此,如果新技術增加了太多不必要的風險,爲什麼我們都沒有停留在1990年代的Java版本上呢?我們如何才能避免落後太多,以至於連升級途徑都找不到呢?當我們開始一個新項目時,我們不應該使用最新的技術工具嗎?"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"針對這些有趣的問題,答案都是“取決於具體情況”。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"我已經開始爲在軟件工程團隊中採用新技術的策略制定一些經驗法則。請隨意使用這些內容,也可以根據你的組織情況做出調整或建立自己的規則集。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"給人們時間進行實驗"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"我堅信可以給員工一些時間來在工作中學習新事物。這爲他們提供了一種創造力的源泉,使他們保持領先,並能讓你嘗試一些業務永遠不會優先考慮的事情。如果一位工程師使用他的學習時間來證明我們的應用程序中可以使用某些新技術工具,那麼我會認真考慮此事。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"blockquote","content":[{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"“在將新技術用於產品之前,需要對新技術進行驗證……你必須做出結果。如果不這樣做,就是把產品推向了死亡之路。”——Andrew Orsich"}]}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"保持一個默認技術棧"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"微服務的罪行之一是,它們鼓勵公司使用不同的編程語言來構建應用程序的不同部分。雖然經驗豐富的工程師可能會喜歡每週更換語言,但這會增加認知負擔,並讓新開發人員難以接受。當程序員選擇的語言不一樣時,團隊還會出現一些技術孤島。選擇一個技術棧作爲默認選項,僅在真正需要時才做擴展。"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"保持核心的可靠性"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"當你選擇嘗試新技術時,請先考慮將賭注限制在不太重要的功能上。當你基於SQL構建平臺時,很難採用某種新的、先進的數據庫,但是在臨時營銷站點上嘗試新的UI庫並不難。一旦在非關鍵任務中驗證了這項新技術後,你就可以決定在整個核心應用程序中採用它。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"image","attrs":{"src":"https:\/\/static001.geekbang.org\/infoq\/22\/2289616ee3cae8ce6c8753a7ba4a00cd.png","alt":null,"title":null,"style":[{"key":"width","value":"75%"},{"key":"bordertype","value":"none"}],"href":null,"fromPaste":true,"pastePass":true}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":"center","origin":null},"content":[{"type":"text","text":"在整個應用程序中採用新技術的風險級別"}]},{"type":"heading","attrs":{"align":null,"level":4},"content":[{"type":"text","text":"記住業務目標"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"與我合作過的最優秀的那些工程師始終會牢記“爲什麼”這一要點。他們在業務價值較低的應用程序部分中節約資源,而會花幾周時間來完善核心數據模型。作爲經理或團隊負責人,你必須隨時問自己爲什麼企業需要這種技術。如果某種新工具進入市場,你就必須判斷它會增加多少業務價值以及採用的成本。"}]},{"type":"heading","attrs":{"align":null,"level":2},"content":[{"type":"text","text":"結論"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"新技術並不壞。我喜歡嘗試使用新的框架和編程語言,但是作爲領導者,你必須在好奇心和業務目標之間取得平衡。人們很容易陷入未經驗證的新工具的泡沫中,因此,你應該制定標準來幫助你決定應該何時嘗試新的工具。"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"原文鏈接:"}]},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null}},{"type":"paragraph","attrs":{"indent":0,"number":0,"align":null,"origin":null},"content":[{"type":"text","text":"https:\/\/www.telerik.com\/blogs\/right-way-to-adopt-new-technology?fileGuid=RCrXjGYg9dpww3CK"}]}]}
發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章