輕量級方法

軟體方法就是用來編寫電腦程式的一套規則和慣例。重量級方法具有很多規則、慣例、和文檔。正確地遵循它們需要訓練及時間。輕量級方法僅具有很少的一些規則和慣例,或者說,這些規則和慣例遵守起來很容易。

軟體方法就是用來編寫電腦程式的一套規則和慣例。
重量級方法具有很多規則、慣例、和文檔。
正確地遵循它們需要訓練及時間。
輕量級方法僅具有很少的一些規則和慣例,或者說,這些規則和慣例遵守起來很容易。
在20世紀的60年代後期以及70年代早期,電腦程式員隨意使用他們能夠使用的任何方式來寫軟體是件非常常見的事情。
很多程式設計師競相寫出複雜得對於任何人來說都無法理解的軟體。
如果有一個程式,它沒有任何的bug,在那時可稱得上是個奇蹟。
大家都認為讓計算機有用武之地是個有價值的追求,不能說不象老早的西部冒險之旅。
EdsgerDijkstra於1968年給CACM(應該是CommunicationoftheAssociationforComputingMachinery:計算機器協會通信)寫了一封題為“goto語句其實有害”的信。
自此,軟體工程的主要概念開始成型。
那時大家認為更全面、更嚴謹的方法可以幫助我們創建品質可靠、成本可準確估計的軟體。
無法無天、牛仔式的編碼者們被懸崖勒馬。
20世紀80年代正是電腦程式員們的好時光。
我們有了一些規則和慣例。從質量上講,我們這時寫的軟體遠遠優於僅僅是寫於幾年前的軟體。
似乎可以認為:如果能夠建立足夠多的規則,可適用於所有能夠碰到的問題,我們就能夠寫出完美的軟體,並且還能按時完工。
於是乎就有了越來越多的、適用於所有潛在問題的規則和慣例,
現已進入了21世紀,我們發現,這些規則遵守起來非常困難,其過程很複雜,也沒有得以透徹地理解;使用各種抽象符號寫就的、海一樣的文獻猶如脫韁的野馬紛至沓來。
大家熱火朝天,都想提出更全面、更好的方法,跟California(加利福尼亞,加州)淘金熱似的真有一比;每個到了西部的人卻都很失望。
我們寫出了能夠幫助我們寫軟體的軟體。
但是,這很快就亂了套,各種重磅炸彈似的case工具迎面而來。
這些工具原本是用來幫助我們遵守規則的,可它們用起來很是困難,簡直都沒法用。
要按時完工,電腦程式員發現他們必須抄近路,忽略一些重要的慣例。
實際上沒有一個人真的遵守那些曾經用來自縛的重量級方法。
牛仔又回來了,我們回到了俄克拉荷馬州(譯者註:俄克拉荷馬州是偶對OK的猜測,因為偶了解到俄克拉荷馬州曾經是往美國西部輸出勞工的一個大州,但可能有誤,呵呵)的畜欄之中。
當程式設計師忽略了他們的方法中的規則時,他們(實際上是)本能地脫離重量級方法,回到了早期較為簡單的、輕量級方法時代,很少的規則便夠了。
可我們並不想忘記我們已經學到的東西。
我們可以把(能夠)幫助我們寫出高質量軟體的規則保留下來,而摒棄哪些阻礙我們前進的哪些規則。
我們可以對那些複雜得難以遵循的規則進行簡化。
我們也不想回到早期根本沒有任何規則可言的牛仔式編碼時代。
而是讓我們止於足夠能使我們的軟體可靠、適度定價的規則吧。
我們接受軟體行政長官而不要牛仔式的編碼者;我們作為團隊工作在一起,反應敏捷,僅僅用那些輕量級的、簡練的和有效的規則和慣例把我們武裝起來。
極度編程(XP)就是若干這種新式的、輕量級的方法之中的一種。
XP具有若干規則和適當數量的慣例,且所有這些遵守起來都很容易。
XP是一種乾淨簡潔的環境,它形成於對到底是哪些東西能夠加速軟體開發,以及哪些東西卻起著減速作用的觀察。
它是一種使程式設計師能夠自由發揮其創造力和生產力,卻同時有保持組織性和凝聚力的環境。

Asoftwaremethodologyisthesetofrulesandpracticesusedtocreatecomputerprograms.
Aheavyweightmethodologyhasmanyrules,practices,anddocuments.
Itrequiresdisciplineandtimetofollowcorrectly.
Alightweightmethodologyhasonlyafewrulesandpracticesoroneswhichareeasytofollow.
Inthelate1960sandearly1970sitwascommonpracticeforcomputerprogrammerstocreatesoftwareanywaytheycould.
Manyprogrammersexcelledatcreatingsoftwaretoocomplexforanyonetounderstand.
Atthattimeitwasamiracleifaprogramranwithoutanybugs.
Makingcomputersusefulwasconsideredaworthyquestandnotunlikeanadventureintotheoldwest.
In1968EdsgerDijkstrawrotealettertoCACMentitledGOTOStatementConsideredHarmful.
Thecentralideasofsoftwareengineeringwerebeingborn.
Atthattimewebelievedthatbigger,moredisciplinedmethodologieswouldhelpuscreatesoftwarewithconsistentqualityandpredictablecosts.
Thelawlesscowboycoderswerebeingreinedin.
The1980sweregoodtimesforcomputerprogrammers.
Wehadafewrulesandpracticestocreatesoftwarethatwasfarsuperiorinqualitytowhatwewerecreatingonlyafewyearsearlier.
Itseemedlikeifwecouldjustcreateenoughrulestocovertheproblemsweencounterwecouldcreateperfectsoftwareandbeontime.
Weaddedmoreandmorerulesandpracticestocoverallthepotentialproblems.
Nowinthe21stcenturywefindtheserulesarehardtofollow,proceduresarecomplexandnotwellunderstoodandtheamountofdocumentationwritteninsomeabstractnotationiswayoutofcontrol.
TryingtocomeupwithabiggerandbettermethodologywaslikeaCaliforniagoldrush;everyoneheadedwestonlytobedisappointed.
Wecreatedsoftwaretohelpuscreatesoftware.
ButthisquicklygotoutofcontrolanddreadnoughtCASEtoolswereborn.
Thesetools,originallycreatedtohelpusfollowtherules,aretoohardtousethemselves.
Computerprogrammersfinditnecessarytocutcornersandskipimportantpracticestostayonschedule.
Nooneisactuallyfollowingtheheavymethodologieswehavehandcuffedourselveswith.
ThecowboyshavereturnedandwefindourselvesbackattheOKCorral.
Whenprogrammersignoretherulesoftheirmethodologytheyareinstinctivelymovingawayfromheavyweightmethodologiesandbacktowardanearlier,simplertimeoflightweightmethodologieswhenafewruleswereenough.
Butwedon'twanttoforgetwhatwehavelearned.
Wecanchoosetokeeptherulesthathelpuscreatequalitysoftwareandthrowawaythosethathinderourprogress.
Wecansimplifythoserulesthatseemtoocomplextofollowcorrectly.
Wedon'twanttoreturntotheearlydaysofcowboycodingwhentherewerenorulesatall.
Butinsteadlet'sstopatjustenoughrulestokeepoursoftwarereliableandreasonablypriced.
Insteadofcowboycoderswehavesoftwaresheriffs;workingtogetherasateam,quickonthedraw,armedwithafewrulesandpracticesthatarelight,concise,andeffective.
ExtremeProgramming(XP)isoneofseveralnewlightweightmethodologies.
XPhasafewrulesandamodestnumberofpractices,allofwhichareeasytofollow.
XPisacleanandconciseenvironmentdevelopedbyobservingwhatmakessoftwaredevelopmentgofasterandwhatmakesitmoveslower.
Itisanenvironmentinwhichprogrammersfeelfreetobecreativeandproductivebutremainorganizedandfocused.

相關詞條

相關搜尋

熱門詞條

聯絡我們