[爆卦]compile字根是什麼?優點缺點精華區懶人包

雖然這篇compile字根鄉民發文沒有被收入到精華區:在compile字根這個話題中,我們另外找到其它相關的精選爆讚文章

在 compile字根產品中有3篇Facebook貼文,粉絲數超過3,460的網紅Taipei Ethereum Meetup,也在其Facebook貼文中提到, 📜 [專欄新文章] 2021 區塊鏈開發入門 ✍️ Johnson Chen 📥 歡迎投稿: https://medium.com/taipei-ethereum-meetup #徵技術分享文 #使用心得 #教學文 #medium 在我大學的時候,除了學習網頁前端之外,因為課程報告的需要接觸到以太...

  • compile字根 在 Taipei Ethereum Meetup Facebook 的最佳貼文

    2021-02-04 14:57:33
    有 8 人按讚

    📜 [專欄新文章] 2021 區塊鏈開發入門
    ✍️ Johnson Chen
    📥 歡迎投稿: https://medium.com/taipei-ethereum-meetup #徵技術分享文 #使用心得 #教學文 #medium

    在我大學的時候,除了學習網頁前端之外,因為課程報告的需要接觸到以太坊(Ethereum),於是開始學寫智能合約,包括它使用的程式語言 solidity。

    工作以後鮮少再碰以太坊的相關技術,直到最近想重新把以太坊學起來,故而決定寫這篇文章,讓初次接觸區塊鏈與智能合約的人更好地進入開發者的世界。這篇文章不只面向開發者,同時也希望能夠給對區塊鏈有興趣的人,指引一條清晰的學習路線。

    關於區塊鏈

    區塊鏈會被廣為人知,無非是因為虛擬貨幣的出現,而虛擬貨幣的鼻祖就是比特幣。在比特幣出現以前,沒有一個能夠在全球網路上通用的數位貨幣;在比特幣出現之後,才真的實現了數位化的貨幣,能夠在全球網路上流通。

    這樣的技術性突破,blockchain 的名字從比特幣白皮書中被萃取出來,而這項技術也被更多人拿去做研發以及創新。

    區塊鏈這項技術的特性可以簡單概括為兩點:去中心化(decentralized)與不可竄改(immutable)。去中心化有程度上的差別,在公共網路上由世界各地的節點共同維護的區塊鏈,去中心化程度較高;相較之下,私人企業開發由特定節點來驗證交易的區塊鏈,去中心化程度較低。

    為什麼是以太坊?

    這年頭區塊鏈三個字大行其道,大部分都是為區塊鏈而區塊鏈的商業炒作。容許我獨斷地說,以太坊才是區塊鏈應用的大門。

    以太坊由全球最大的區塊鏈社群組成,提供一個去中心化的虛擬機器(Ethereum Virtual Machine)來處理「智能合約」,它是一個公共的區塊鏈平台,逛逛以太坊的官網吧!

    智能合約

    在以太坊區塊鏈中有所謂的智能合約,智能合約能夠部屬到以太坊區塊鏈上,合約即程式碼,放到區塊鏈上就不能再更新,只能執行合約上的程式,持有以太幣的人能夠與合約進行交易。把智能合約想像成是一台自動販賣機,把錢(以太幣)投進去,飲料會掉出來(合約上的程式會被執行)。

    在現實生活中,簽訂合約的雙方認為合約有效而且可以被信任,是因為有國家法律來保障,違反合約可能會受到法律制裁;而用以太幣與智能合約互動,認為智能合約可以被信任,是因為智能合約的不可竄改性 — 以太坊虛擬機會毫無偏袒、完全中立、冰冷不帶任何感情地執行智能合約上已經寫好的程式碼。

    建立在智能合約之上的虛擬貨幣

    事實上,以太坊擴大了區塊鏈這項技術的應用層面。回頭想想,比特幣來自區塊鏈技術,某個人若想打造一款同比特幣一樣的虛擬貨幣,就得模仿比特幣去建造一個自己的虛擬貨幣區塊鏈,一個區塊鏈網路要能夠有效運作並非易事,還需要節點、需要靠人挖礦去驗證交易。此時,若使用以太坊的智能合約,撰寫虛擬貨幣需要的程式碼,將合約部屬到以太坊區塊鏈上,叮咚!他就可以發行自己的虛擬貨幣,根本不必再去建造底層的區塊鏈,也不用想挖不挖礦了。

    此時會發現以太坊就像是一個區塊鏈平台,你不需要親手打造區塊鏈網路,即可享有區塊鏈去中心化與不可竄改的特性。與其他智能合約的開發者共同使用以太坊虛擬機 EVM(Ethereum Virtual Machine),在 EVM 上部屬無上限個智能合約。

    以太坊是一項基礎建設,底層區塊鏈幫你架設好,開發者便有更多時間去發想應用到網頁、手機、或物連網設備上,以下是一段簡單的智能合約,該合約創造了一個虛擬貨幣簡稱 MAT…

    直接進入開發領域 — 線上編輯器 Remix

    Remix 是開發智能合約的線上編輯器,進入Remix官網,點選 Create New File 以後,把上方程式碼複製貼上。在左側欄位中有 solidity compiler 的選項,確認一下左側欄第一列顯示的版本,調成 0.7.0 (上方程式碼使用的版本),就可以按下下方 compile 的按鈕,將智能合約「編譯」成 bytecode(給機器讀的語言)。

    接著我們要部屬合約到區塊鏈上,首先到左側欄位點選 DEPLOY & RUN TRANSACTIONS 的選項,可以看到環境是 javascript VM,這是指現在要部屬到的測試用虛擬機。按下下方的按鈕 Deploy 即可將合約「部屬」到 javascript VM 上。成功部屬後,你會發現 ACCOUNT 所持有的以太幣,從 100 變成 99.9999…,我們得知部屬智能合約需要花費一點點以太幣。

    左側下方會有 Deployed Contracts,點開來就會列出合約上可供呼叫的函式,點那些函式就能與剛剛部屬上去的智能合約進行互動了。

    有些函式呼叫會引發交易,所以需要以太幣,有些則不用。在 ACCOUNT 的地方可以展開來,它提供許多的地址 (address),也就是錢包,每個錢包裡面預設給你 100 顆以太幣,試著用那些地址去操作智能合約,你就能慢慢體會什麼是建立在以太坊之上的虛擬貨幣了。

    真正的開發者世界

    實際上開發智能合約只能算是以太坊開發的其中一部分,其他包括以太坊區塊鏈擴容方案、節點驗證等等又是另一個開發領域了,那部份我就沒有研究太多。而智能合約的開發是比較接近應用層面的,透過網頁前端或手機應用程式,與智能合約進行互動,稱作 Dapp(Decentralized App) 的開發,也象徵著網際網路走向 web3.0 的時代。

    學習 solidity 語言,除了看硬生生的官方文件之外,我推薦去玩cryptozombies,我本身就是從這款網頁遊戲中學習這門語言,聽說是連小孩子都能輕易學習的教材。

    除了學 solidity 之外,網路上還有很多方便的開發工具,開發者主要是運用這些工具做測試、自動化部屬、串接前端等等。許多網路上的教學文章會使用 Truffle + Ganache + web3.js 來建置開發環境。但我在這裡推薦另一款開發環境的架構,如果是新手直接從 hardhat 開始也是非常適合的,hardhat 的教學文章寫得清楚完整,本篇文章使用的程式碼也是從 hardhat-hackathon-boilerplate 這個專案而來。hardhat 使用的開發環境是 Waffle + Hardhat + ethers,它幫你把開發環境處理的簡單又舒服,讓開發者可以專注在開發智能合約上。

    OpenZeppelin 是很有名的智能合約套件庫,開發時可以引入它的智能合約。智能合約很講究安全性,稍微沒寫好就可能被駭客鑽漏洞,虛擬貨幣就被盜走了!OpenZeppelin 提供的 SafeMath 很常被引入到專案,對新手來說看 OpenZeppelin 的合約也是很好的學習管道。此外,官方也建了一個學習網站ethernaut,主要在教導如何寫出安全性夠強的智能合約,可惜網站在我寫這篇文章的時間一直處於維修不能用的狀態。

    最後再介紹一款實際上線的智能合約專案:Argent。它是一款運用智能合約來做虛擬貨幣錢包的公司,除了使用他們的錢包之外,也可以看看他們的智能合約是怎麼寫的,感受一下專業的程式碼架構與寫法。

    小結

    這篇文章希望能幫助到想了解區塊鏈這項技術的人,同時也想呈現一個智能合約的開發生態系,你大可以不必花太多力氣去了解密碼學、挖礦、節點、共識機制等等五花八門的專有名詞;反之,你可以專注在智能合約的開發,或回到本質去思考去中心化的用意、以及為什麼不可竄改的特性那麼重要。

    智能合約除了做虛擬貨幣之外,也能夠做投票系統,原本以貨幣為起始點的區塊鏈技術,是智能合約的出現擴大了區塊鏈更具彈性的用途,這圈子需要更多的開發者來探勘這片新大陸。

    尤其鼓勵人文社會科學的人才,無論是哲學、政治、經濟、法律或社會等各方領域,試著撇開人工智慧將主導未來社會的發展路線,與之截然不同的另一種形式:人類社會能否依靠科技的力量,促成彼此之間的合作,創造更有效率的市場、更公平的治理方式?

    延伸閱讀:激進市場(Radical Markets: Uprooting Capitalism and Democracy for a Just Society)

    2021 區塊鏈開發入門 was originally published in Taipei Ethereum Meetup on Medium, where people are continuing the conversation by highlighting and responding to this story.

    👏 歡迎轉載分享鼓掌

  • compile字根 在 Eric's English Lounge Facebook 的最佳解答

    2020-04-06 20:26:31
    有 426 人按讚

    [時事英文] 死亡率(mortality rate)*、壓平曲線(flattening the curve)、活動限制 (lockdown):如何理解這些術語?
     
    Language goes beyond a sealed system governed by a rigid set of rules. To fully understand the meaning of a word, one must look further than connotation and denotation, and also take context into consideration. In this case, one needs to examine the social, political, economic, and even statistical contexts of the terms.
     
    語言並非只是受嚴密規則所約束的封閉系統。為了充分理解一個單詞的意涵,我們不僅要瞭解其本義與引申義,同時還要考慮整個語境。在此一情況下,應要考察社會、政治、經濟甚至統計上的語境。
     
    Does “confirmed cases,” for example, mean the same thing in every country before and during the coronavirus outbreak? What about “lockdowns”? Does it mean that the government is advising people to stay home or is someone nailing your door shut? Some food for thought when reading about the coronavirus outbreak.
     
    例如,在冠狀病毒爆發前以及爆發期間,「確診病例」在各國是否具有相同的含義?那麼,封鎖呢?這是否意味著政府正建議人們留在家中,抑或有人正把你家大門釘上?以上是在閱讀疫情的相關資訊時所引人深思的一些事情。
     
    *同學好心的補充說明:「mortality rate」通常指的是死亡率,而「fatality rate」則是(因罹患某疾病)致死率。兩者都是重要的死亡指標,但計算公式不相同。
     
    ★★★★★★★★★★★★
     
    《紐約時報》報導:
     
    Making sense of the coronavirus pandemic requires getting up to speed on semantics as much as epidemiology. Government officials and health care professionals toss off mentions of mortality rates, flattening the curve and lockdowns, assuming that we know what they mean. But the terms mean different things from country to country, state to state, even city to city and person to person. Officials use the same phrases about mass testing, caseloads and deaths to describe very different situations. That makes it hard to give clear answers to vital questions: How bad are things? Where are they headed?
     
    1. make sense of… 理解……
    2. get up to speed on 了解最新情況;跟上進度
    3. toss off 輕而易舉地處理*
     
    弄懂新型冠狀病毒大流行,既需要了解流行病學的最新情況,也需要在語義學上跟上形勢。「死亡率」、「壓平曲線」和「活動限制」等說法從政府官員和公共衛生專業人士的嘴裡脫口而出,他們假設大家都知道這些詞的意思。但對不同的國家、不同的州,甚至不同的城市和個人來說,這些術語有著不同的含義。 官員們使用「大規模檢測」、「病例數」和「死亡病例數」等相同的措辭,來描繪非常不同的情況。這令一些重要的問題難以得到明確的回答:情況有多糟糕?正在向什麼方向發展?
     
    toss off: https://www.merriam-webster.com/dictionary/toss%20off
     
    ★★★★★★★★★★★★
     
    People search for insight by comparing their countries to those that are further along in the epidemic. But if the terms are misleading or used in differing ways, the comparisons are flawed. Also, the statistics and vocabulary offer a false sense of precision while in reality, the information we have shows only a fraction of what’s going on. “The new cases or deaths each day are given as exact numbers, and we’re trained to take that at face value,” said Mark N. Lurie, an epidemiologist at Brown University’s School of Public Health. “But those are far from exact, they’re deeply flawed, and their meaning varies from place to place and from time period to time period.”
     
    4. be further along in 在……上走得更深遠
    5. at face value 根據外表;從表面上看
     
    人們將自己的國家與那些經歷了疫情更多階段的國家進行比較,以求了解情況。但是,如果這些詞語使人產生誤解,或在使用方式上存在差異的話,這種比較就是錯誤的。此外,這些統計數據和詞彙給人以精準的假象,而現實是,我們所掌握的信息僅代表冰山一角。「每天的新增病例數或死亡人數都是以精準數字的形式通報的,我們被訓練成只看這些表面數字。」布朗大學公共衛生學院流行病學家馬克・盧裡說。「但這些數字遠非精準,而且有嚴重缺陷,它們的含義因不同的時間和地點而不同。」
     
    ★★★★★★★★★★★★
     
    I. Confirmed Cases 確診病例
     
    Countries vary wildly in testing for the virus and how they report the numbers, and experts say most infections are going undetected. So the publicized national tallies are rough, incomplete pictures that may not be all that comparable. And that’s if countries are forthcoming about their data.
     
    6. vary wildly in 在……上有極大的差異*
    7. publicize 公布;宣傳
    8. national tallies 國家的統計數據
    9. incomplete pictures 不完整的狀況
    10. forthcoming 樂於幫助的
     
    各國在病毒檢測以及通報數字的方式上有很大差異,而且專家們說,大多數感染都沒有被發現。因此,各國公布的只是粗略的數據,這些並不完整的描繪也許沒有多少可比性。這還是在假設各國願意提供數據的情況下。

    wildly: https://bit.ly/2wkgPjo
     
    ⊹⊹⊹⊹⊹⊹⊹⊹⊹⊹⊹⊹⊹⊹⊹⊹⊹
     
    Officials in the United States say that China, which has reported more than 82,000 infections, has understated its epidemic. Until this week, the Chinese government excluded those patients who tested positive for the virus but had no symptoms. China also doesn’t say how many tests it has conducted, and doubts have been raised about whether it has tested extensively in Xinjiang, the province where it holds hundreds of thousands of Muslims in indoctrination camps. The Covid Tracking Project, run by The Atlantic, has tried to compile all the numbers in the United States and reports more than 1.2 million tests so far, over 3,600 per million people.
     
    11. understate 未如實陳述;避重就輕地說
    12. exclude 把……排除在外
    13. indoctrination camps 再教育營
    14. run by 由……經營
     
    中國通報的累計確診病例超過8萬2千例,美國官員說,中國淡化了國內的疫情。直到本週前,中國政府一直把病毒檢測呈陽性但沒有癥狀的感染者不納入確診病例。中國也未公開接受檢測的人數,而且外界已對中國是否在新疆進行了大規模檢測表示懷疑,中國在那裡把數十萬穆斯林關進了拘禁營。《大西洋月刊》的新冠肺炎追蹤計劃試圖匯總美國的所有數據,它統計到的數字是,美國迄今為止進行了逾120萬例檢測,平均每百萬人超過3600例。
     
    ★★★★★★★★★★★★
     
    II. Widespread Testing 大規模檢測

    It matters not only how many people are tested, but also when, and who they are. Once again, countries differ, shaping what the numbers mean. A few countries, like South Korea, Australia and Singapore, got serious about mass testing early on. They used the information to do ambitious contact-tracing — finding and testing those who had recently been near infected people, even if they had no symptoms.
     
    15. it matters 重要的是
    16. not only……, but also…… 不僅……,而且……
    17. get serious about 認真對待某事
    18. early on 在早期
     
    重要的不只是多少人做了檢測,檢測時間和檢測對象也很重要。各國在檢測時間和對象上也有不同,這讓數字的含義也有所不同。韓國、澳洲和新加坡等少數國家很早就開始認真地進行大規模檢測。他們利用這些信息嚴格追蹤接觸者,也就是找到並檢測那些親密接觸者,即使他們沒有癥狀。
     
    ⊹⊹⊹⊹⊹⊹⊹⊹⊹⊹⊹⊹⊹⊹⊹⊹⊹
     
    But most nations with large numbers of cases have done less testing, waited longer to do it in bulk, and made little attempt at contact tracing. They find themselves playing catch-up with the virus, ramping up testing after their outbreaks had already mushroomed. They detect more cases, but by then it’s hard to tell how much of that growth is the expanding epidemic and how much is expanding surveillance. Unable to meet the demand, they often limit testing to the sickest patients and health workers.
     
    19. in bulk 大量
    20. make little attempt 幾乎未做嘗試
    21. ramp up 增加*
    22. mushroom (v.) 迅速增長;迅速發展*
    23. meet the demand 滿足需求
    24. limit……to 將……限制在……
     
    但大多數存在大量確診病例的國家進行的檢測數量都比較少,都是等了更長時間後才開始進行大規模檢測,而且對追蹤接觸者的工作幾乎未做嘗試。這些國家發現自己在拚命追趕病毒的傳播,在疫情迅速蔓延後才加大了檢測力度。這些國家都檢測到了更多的病例,但此時已很難判斷新增病例中有多少是疫情不斷擴大的結果,有多少是擴大疫情監測的結果。由於無法滿足檢測需求,這些國家通常只能對病情最嚴重的患者以及衛生工作者做檢測。
     
    ramp up: https://www.collinsdictionary.com/dictionary/english/ramp-up
    mushroom: https://www.ldoceonline.com/dictionary/mushroom
     
    ★★★★★★★★★★★★
     
    III. Fatality Rates 致死率
     
    It has been stated time and again: Italy and Spain have high mortality rates among coronavirus patients, Germany’s is low, and China’s is somewhere between. It may not be that simple. Counting the dead is as flawed and inconsistent as counting the infected. Recent reports say that mortuaries in Wuhan, China, where the disease was first discovered, have ordered thousands more urns than usual, suggesting a much higher death toll than the city’s official count, 2,535. The outbreaks in Wuhan, and parts of Italy and Spain, overwhelmed hospitals, forcing many sick people to ride it out at home. No one knows how many people have recovered or died without ever being tested. And if only the sickest patients are tested, then the number of infections will appear smaller and the percentage who die will seem higher.
     
    25. time and again 屢次;一再
    26. as flawed and inconsistent as 像……一樣存在缺陷與不一致
    27. mortuary 停屍間(太平間)
    28. urn 骨灰罈
    29. suggest 暗示*
    30. death toll 死亡人數
    31. to ride it out 安然渡過(難關)*
     
    一個反覆提及的說法是:義大利和西班牙的新冠病毒肺炎患者死亡率高,德國的低,中國的居中。情況也許並不那麼簡單。統計死亡人數和統計感染人數一樣存在缺陷和不一致的地方。最近有報導稱,武漢的殯儀館訂購的骨灰盒數比該市官方統計的2535例死亡高出好幾千,表明死亡人數遠高於官方公布的數字。新冠病毒最早就是在這座城市發現的。武漢以及義大利和西班牙部分地區的疫情使醫院不堪重負,許多患者被迫在家中渡過難關。沒人知道究竟有多少人在從未做檢測的情況下康復或死亡。如果只對病情最嚴重的患者做檢測的話,感染人數看上去會更低,而死亡率看起來將更高。
     
    suggest: https://www.oxfordlearnersdictionaries.com/definition/english/suggest
    ride sth out: https://bit.ly/2Rd6Tj6
     
    ★★★★★★★★★★★★
     
    IV. The Peak 疫情高峰
     
    Officials often talk about when the epidemic peaks or plateaus — when a country “flattens the curve.” But they rarely specify, the peak of what? And how can we be sure we’re past it? When an outbreak is growing unchecked, more people become infected and more die each day than the day before. On a graph, the curve showing the daily count of new cases has gone from rising sharply to moving sideways — the curve has flattened — and even begun to move downward. That is one corner being turned: The rate of the spread of the virus has slowed down. It takes longer to turn another: the rate of people dying.
     
    32. from rising sharply to moving sideways 從急劇上升到橫向移動
    33. turn the corner 好轉;度過難關*
     
    官員們經常提疫情何時達到高峰或進入平台期,也就是一個國家「壓平曲線」的時候。但他們很少具體說明是什麼達到了高峰,以及我們怎麼能確定高峰已過?當疫情不受控制地發展時,每天的感染和死亡人數都比前一天多。曲線圖上顯示的每天新增病例數從急劇上升變得趨於平緩——曲線已被壓平——甚至開始下降。這是一個轉折點:病毒的傳播速度已經放緩。度過死亡人數的轉折點則需要更長的時間。
     
    turn the corner: https://www.merriam-webster.com/dictionary/turn%20the%20corner
     
    ⊹⊹⊹⊹⊹⊹⊹⊹⊹⊹⊹⊹⊹⊹⊹⊹⊹
     
    But even when those curves flatten, the epidemic still has not “peaked” by another crucial measure: the number of active cases. That figure continues to rise until the number of patients who either die or recover each day is larger than the number of new infections. To ease the staggering load on health care systems, the active cases curve must also flatten and then fall.
     
    34. peak (v.) 使……達到頂峰
    35. either……or…… 不是……就是……
    36. staggering 沉重的;巨大的
     
    但是,即使這些曲線已趨於平緩,疫情的另一個重要衡量指標——現存確診病例數——仍未達到「峰值」。在每天的死亡或康復患者人數超過新增感染人數之前,這個數字還將繼續上升。為緩解衛生系統的沉重負擔,現存確診病例數的曲線也必須先趨平,然後下降。
     
    peak: https://www.oxfordlearnersdictionaries.com/definition/english/peak_2
     
    ★★★★★★★★★★★★
     
    V. Lockdowns 封鎖(活動限制)
     
    More than two billion people, including most Americans, are living under something usually called a lockdown. But there is no set definition of that word — or related terms like stay-at-home mandates and social distancing — so the details differ from place to place. The biggest differences may be in enforcement. Some places, like those in the United States with lockdowns, mostly rely on people to follow the rules without coercion. But Italy and others have deployed soldiers to ensure compliance, and French police have fined hundreds of thousands of people for violating restrictions. China, in addition to using security forces, mobilized an army of volunteers, ratcheting up social pressure to obey.
     
    37. set definition 固定的定義
    38. enforcement 實施;執行
    39. rely on 仰賴;依靠
    40. deploy 部署
    41. compliance 服從
    42. fine 處……以罰款(或罰金)
    43. in addition to 除了……之外
    44. mobilize 動員
    45. ratchet sth up/down 逐步增加/減少
     
    全球有20多億人,包括大多數美國人正生活在一般被稱為「活動限制」的狀態下。但這個詞沒有固定的定義,其他的相關說法,比如政府的「待在家裡」和「保持社交距離」令也沒有明確的定義,所以各地的具體做法也不一樣。最大的不同可能在執行方面。有些地方,比如美國有限制令的地方,主要依靠人們自覺遵守,而非強制。但義大利等國為確保限制令的落實而動用了軍隊,法國警方還對數已十萬計的違反禁令者處以罰款。中國除了使用安全部隊外,還動員了一支志願者大軍來加大服從封鎖隔離措施的社會壓力。
     
    ⊹⊹⊹⊹⊹⊹⊹⊹⊹⊹⊹⊹⊹⊹⊹⊹⊹
     
    Italy’s experience shows the looseness of the term. It has gone through several phases of restrictions, applying them to more people, making them stricter and increasing enforcement. A few weeks ago, a person could travel around Italy for a valid work or family reason. Now, people are fined for nonessential walking too far from their homes. But each stage was widely called by the same name: lockdown.
     
    46. looseness 鬆散
    47. valid 確鑿的;合理的;有根據的;讓人信服的
     
    義大利的經歷表明了這個詞語解釋上的自由。義大利的封鎖令經歷了幾個階段,適用範圍擴大到越來越多的人,封鎖及其執行也變得越來越嚴格。幾週前,人們還可以因為正當的工作或家庭原因在義大利旅行。現在,人們會因不必要的離家太遠的走動而被罰款。但禁令的每個階段用的都是同一個泛泛的名稱:活動限制。
     
    《紐約時報》完整報導:https://nyti.ms/2XcCUeT

    圖片出處:https://fxn.ws/34gwSeH
     
    ★★★★★★★★★★★★
     
    時事英文大全:http://bit.ly/2WtAqop
     
    如何使用「時事英文」:https://bit.ly/3a9rr38
     
    #疫情英文

  • compile字根 在 91 敏捷開發之路 Facebook 的精選貼文

    2019-06-07 18:09:08
    有 86 人按讚


    雖然是有點搞笑,但真實場景卻很常上演這樣的劇碼。
     
    大家有看出來一個小小的重點嗎?
     
    跟敏捷強調的一樣:「一次只做一件事」
     
    不該一次想修掉 4 個 bug,都修完之後才 compile and run,越大範圍、一次做越多件事,發生問題的機率就會越高、問題的根本原因就越難定位。
     
    開發 feature 也是,貪多,步子邁大了就容易卡著蛋。嚴謹的 TDD + baby step 就是避免開發人員慣性上的貪多,關注在單一個 scenario,搭配即時的重構。
     
    有些人對 TDD 有些誤解,覺得「TDD 總是邊寫邊想測試案例,架構/設計 見樹不見林。」
     
    那就像功夫只練了一半,九陰真經只練了九陰白骨爪一樣,當然效果出不來。
     
    TDD, 不是只有 test-first,搭配【極速開發】中的技巧,會讓「驅動」開發,不只是驅動設計,而包含著大量的驅動產品代碼開發。
     
    簡單地說,#任何外部看得見的命名_都該從測試驅動而來,因為那些名字都跟 需求、情境、domain 有關。

你可能也想看看

搜尋相關網站