STANDARDDEVELOPMENTANDCODINGPRACTICESATMSRACompiledbyAdvancedTechnologyDepartmentMICROSOFTRESEARCHASIAVer.0.1January21,2002ContentCONTENT.............................................................................................................................................1ADAYINTHELIFEOFARESEARCHDEVELOPER.......................................................................1INTRODUCTION.....................................................................................................................................1WHATSHOULDIDOEACHDAY?..........................................................................................................1YOURMACHINEENVIRONMENT.............................................................................................................2KNOWYOURRESOURCES....................................................................................................................2REQUIREDREADINGLIST.....................................................................................................................2OTHERRECOMMENDEDREADING.........................................................................................................2MODIFICATIONHISTORY.......................................................................................................................2CODINGSTYLEGUIDELINES............................................................................................................3INTRODUCTION.....................................................................................................................................3NAMINGCONVENTIONS........................................................................................................................3CODEFORMATTING..............................................................................................................................4IMPLEMENTATIONISSUES......................................................................................................................9CODINGSTYLECHECKLIST............................................................................................................111CLASSES....................................................................................................................................112OTHERC/C++ISSUES................................................................................................................113SOURCEFILEORGANIZATION......................................................................................................114BASICDATATYPES.....................................................................................................................115NAMINGCONVENTIONS...............................................................................................................116FORMATTINGISSUES...................................................................................................................11SOURCEDEPOT,NTBUILDANDRAID...........................................................................................131SOURCEDEPOT...........................................................................................................................132NTBUILDSYSTEM.......................................................................................................................133RAIDSYSTEM..............................................................................................................................131ADayintheLifeofaResearchDeveloperIntroductionWelcometoMSRAdevelopment,alsoknownastheRSDE(researchsoftwaredesignengineer)andAT(advancedtechnology)team.ThispurposeofthisdocumentistogivethenewresearchdeveloperatMSRAaleg-upinunderstandingthetoolsandresourcesavailableinaccomplishinghisorherdailydutiesandresponsibilities,andismodeledaftertheDayintheLifeofanOfficeDeveloperdocument.WhatShouldIDoEachDay?AtMicrosoft,themostimportantapplicationtotrackisOutlook.Thisisbecausemuchcommunicationistrackedthroughe-mailandscheduling.(Tip:Ifyoufindyourselfdistractedbytoomanye-mails,useInboxAssistanttosiftandprioritize.Choosespecifictimesduringthedaytochecke-mail.)Peoplewillgenerallyexpectyoutoreadandreplytoe-mailwithinthesamedayitissent.Microsoft’sProductCycleModelisgearedtowardsproductteamswithtraditionalclientapplications,butitisstillimportanttofamiliarizeyourselfwiththis.Withinthecontextofthis,youshouldhavethefollowingspecifictaskstoworkon:Coding:Codingisthemostimportanttaskyoutakeonasdeveloper.Theyaremanywaystocode.However,thereisonlyonewaytocodeitright.That’swhyeachgrouphasacodingstyleguidelinetofollow.Thegoalofsuchdocumentistoensureeveryoneintheorganizationcodeinasimilarfashion,sothatallcodeswrittenbydifferentdeveloperscanbeeasilyunderstoodandmaintained.Thisisextremelyimportantforprojectdevelopment.Thisdocument,“CodingStyleGuidelines”,outlinesthemostcommonguidelinesweuseasdeveloperatMSRA.Wehighlyrecommendeveryone,ifyouwritecode,followtheseguidelines.SourcecodeCheck-in/BackupandBuild:Ascodingisthemostimport