Tải bản đầy đủ - 0 (trang)
Chapter 3.  Use a version control system

Chapter 3.  Use a version control system

Tải bản đầy đủ - 0trang

Summary

Thepalestofinkisbetterthanthebestmemory(Chinese

proverb):Useaversioncontrolsystem(VCS).Neverkeepfiles

checkedoutforlongperiods.Checkinfrequentlyafteryour

updatedunittestspass.Ensurethatchecked-incodedoesnot

breakthebuild.



Discussion

Nearlyallnontrivialprojectsneedmorethanonedeveloper

and/ortakemorethanaweekofwork.Onsuchprojects,you

willneedtocomparehistoricalversionsofthesamefileto

determinewhen(and/orbywhom)changeswereintroduced.

Youwillneedtocontrolandmanagesourcechanges.

Whentherearemultipledevelopers,thosedeveloperswillmake

changesinparallel,possiblytodifferentpartsofthesamefile

atthesametime.Youneedtoolstoautomate

checkout/versioningoffileand,insomecases,mergingof

concurrentedits.AVCSautomatesandcontrolscheckouts,

versioning,andmerging.AVCSwilldoitfasterandmore

correctlythanyoucoulddoitbyhand.Andyoudon'thavetime

tofiddlewithadministriviayouhavesoftwaretowrite.

Evenasingledeveloperhas"oops!"and"huh?"moments,and

needstofigureoutwhenandwhyabugorchangewas

introduced.Sowillyou.AVCSautomaticallytracksthehistory

ofeachfileandletsyou"turntheclockback."Thequestion

isn'twhetheryouwillwanttoconsultthehistory,butwhen.

Don'tbreakthebuild.ThecodeintheVCSmustalwaysbuild

successfully.

ThebroadrangeofVCSofferingsleavesnoexcusenottouse

one.Theleastexpensiveandmostpopulariscvs(see

References).Itisaflexibletool,featuringTCP/IPaccess,

optionalenhancedsecurity(byusingthesecureshellssh

protocolasaback-end),excellentadministrationthrough

scripting,andevenagraphicalinterface.ManyotherVCS

productseithertreatcvsasastandardtoemulate,orbuildnew

functionalityontopofit.



Exceptions

Aprojectwithoneprogrammerthattakesaboutaweekfrom

starttofinishprobablycanlivewithoutaVCS.



References

[BetterSCM][Brooks95]Đ11,Đ13[CVS]



4.Investincodereviews

Summary

Discussion

References



Summary

Re-viewcode:Moreeyeswillhelpmakemorequality.Show

yourcode,andreadothers'.You'llalllearnandbenefit.



Tài liệu bạn tìm kiếm đã sẵn sàng tải về

Chapter 3.  Use a version control system

Tải bản đầy đủ ngay(0 tr)

×