Code Complete --- (Note4 Software Craftsmanship)

Code Complete --- (Part 7  Software Craftsmanship)

============================================================
5. Where to find more information

A software developer's reading plan

Introductory Level
---- Programming Pearls[编程珠玑]

Practitioner level
---- Applying UML and Patterns: An Introduction to Object-Oriented Analysis and Design and the Unified Process [UML和模式应用]

Professional level
---- Writing Solid Code
---- Software Architecture in Practice
---- Refactoring: Improving the Design of Existing Code

============================================================
4. Themes in software craftsmanship

Write programs for people first, computers second

Program into your language, not in it

Focus your attention with the help of conventions

Programs in terms of problem domain


============================================================
3.  Personal Character

Intelligence and Humility
The more you learn to compensate for your small brain, the better you'll be.
The more humble you are, the faster you'll improve.

Curiosity (求知欲)

Intellectual Honesty

Communication and Cooperation

Creativity and Discipline

Habits

Persistence

============================================================
2. Self-Document Code

Avoid endline comments on single lines.
Use endline comments to annotate data declarations
Avoid using endline comments for maintenance notes
Use endline comments to mark ends of blocks
Differentiate between major and minor comments with ellipses. ....


============================================================
1. Layout and Style

/*-------------------------------------------------------------------------------------------------------------------------
        Class MyTest
        Description: My dedicated study of Code Complete

        Author: Paco
        Time:    2006-12-29

        (c) Copy Right CrystalHareHus blog, All rights reserved
----------------------------------------------------------------------------------------------------------------------------*/
#pragma once
#include "CrystalHare.h"

#define MAX_SIZE = 100;

// This function is to write a sample
void
Myfunction(
    const string myName; //IN parameter
    string herName;          //OUT parameter
){
    //Precondition
    Assert(myName != NULL);

    int m_size                    = MAX_SIZE;
    string m_name          = NULL;               // Read from external file
    MyTest  *m_pTest     = NULL;

    for (){
        if (){
        }  //End If
    }//End for

    //postcondition
    ASSERT( herName != NULL);
}

 
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值