freepeople性欧美熟妇, 色戒完整版无删减158分钟hd, 无码精品国产vα在线观看DVD, 丰满少妇伦精品无码专区在线观看,艾栗栗与纹身男宾馆3p50分钟,国产AV片在线观看,黑人与美女高潮,18岁女RAPPERDISSSUBS,国产手机在机看影片

正文內(nèi)容

微軟程序開發(fā)制勝策略微軟程序員13條制勝法則-文庫吧在線文庫

2025-02-16 14:15上一頁面

下一頁面
  

【正文】 023/5/16 29微軟高級開發(fā)管理峰會測試代碼,安家立命之本? Debug vs. Trace? 活用斷言( Assert)? 異常處理? 編寫 Unit Test2023/5/16 30微軟高級開發(fā)管理峰會法則 5: Debug vs. Trace? Debug vs. Release? Debug vs. Trace– Debug類和 Trace類– 建議使用 ? 在 .NET中使用 –Demo? 在 .NET中使用 –Demo2023/5/16 31微軟高級開發(fā)管理峰會法則 6:活用斷言( Assert)? 不要有任何假設(shè)–Defensive Programming? 大多數(shù)錯誤出在代碼之間的調(diào)用上? 使用斷言– 調(diào)用參數(shù)的檢驗(yàn)– 返回值的檢驗(yàn)– 數(shù)據(jù)有效性檢驗(yàn)– 算法有效性檢驗(yàn)2023/5/16 32微軟高級開發(fā)管理峰會調(diào)用參數(shù)的驗(yàn)證public bool FindCustomer (int customerID){ (customerID 0, FindCustomer出錯 ,customerID應(yīng)該大于0)。 ( != null,“測試 Bug有效性 ”, “Bug負(fù)責(zé)人不能為空 )。 } if(!CloseFile()){ goto End。} }FileException NewFileException(…){string description = //build localized stringreturn new FileException(description)。 // rethrow}}? 添加更加詳細(xì)的信息public Int32 GetInt (Int32[ ] array, Int32 index){try{return array[index]。}finally{if(stream != null) ()。 ReadBytes(…)。// More code...return true。}else{( !CustomerIsValid(customerID))。}}public class BookClient{public static void main(String[] args) {BookShelf myBookShelf = new BookShelf()。// Loop 10 timesfor(int i=0。}if (isCodingGuru(words)){(“Admire…)。 j0。 i++){string argument = 。? 使用縮寫準(zhǔn)則– GetWindow vs. GetWin– 首字母縮寫? 避免使用不被廣泛接受的首字母縮寫? IO vs. InputOut。}2023/5/16 7微軟高級開發(fā)管理峰會添加注釋(續(xù))? 添加注釋的目的– 使代碼易讀、易寫、易維護(hù)? 如何添加注釋– 代碼、數(shù)據(jù)、算法的解釋– 做標(biāo)記(時(shí)間、所做的改動等)– 標(biāo)識代碼的功能和目的– 代碼如何調(diào)用? 避免– 對顯而易見的內(nèi)容進(jìn)行注釋– 添加大段注釋– 注釋的拼寫錯誤? 例子– Duwamish的例子2023/5/16 8微軟高級開發(fā)管理峰會起個(gè)好名字if (() ()){(b1)。 i。2023/5/16 5微軟高級開發(fā)管理峰會代碼風(fēng)格一致(續(xù))2023/5/16 6微軟高級開發(fā)管理峰會添加注釋//根據(jù) bugID獲取 Bug//在 bugHashTable中, Bug作為 Object存儲,需要進(jìn)行類型轉(zhuǎn)換Bug currentBug = (Bug) bugHashTable[bugID]。}else{//Bug今天重新被激活,重置 bug1在 AlertSystem中的激活日期(bug1)。closeConnection()。}//Test for two particular stringsif ( == 2){if (words[0].ToLower().Equals(“coding) words[1].ToLower().Equals(“guru)){(“Admire…)。}}}2023/5/16 18微軟高級開發(fā)管理峰會Method Cohesion(續(xù))public void process(string[] words){for (int i=0。}}2023/5/16 21微軟高級開發(fā)管理峰會法則 3: 降低代碼間耦合(續(xù))public class Book {// Represents the behaviour Book is designed to deliverpublic void BookyBehavior() {(Just being a Book...)。// Method to add a Book to the internal ArrayListpublic void addBook(Book aBook) {(aBook)。
點(diǎn)擊復(fù)制文檔內(nèi)容
教學(xué)課件相關(guān)推薦
文庫吧 www.dybbs8.com
備案圖鄂ICP備17016276號-1