zoukankan      html  css  js  c++  java
  • Project Code Write

    1. In the funciton block, the position where does variables definition responsed in variables name in my suggest . like prefix definition: g_ is a globle member , s_is a static memeber,m_ is a member , p_ is a parameter , t_ is a temp variable ,c_ is a const variable ,etc .
    2. all the prefix can composite to together ,of course, some of them may be exclude .
    3. cp_ stand for , this variable is const&parameter of the function .
    4. use if/else if to dispatch all of the posibility , if/else if cover all of the already-known condition , the last else is for the defaute or unknown condition process ,but not the last condition process .if there are three condition ,so it can be / must be like this :

        if(condition1){}

        else if(condition2){}

        else if(condition3){}

        else{}

        Can not write like this :

        if(condition1){}

        else if(condition2){}

        else{}// process for condition3 .

        make all of process explicity ,and do a helper for reverse-engin--he can known the three  condition only read this source code ,other wise he must read some document for the third condition ,if there is no document , he will be crazy .

    5. If possible , logic process and pure data process write to different class . what is logic and how to recognize it ? if something belong to bussiness , it is logic ; logic orgnize data to meaning information .
    6. 相关阅读:
      反向传播BP算法
      有关一些求导的概念与神经网络梯度下降
      CS224n学习笔记(二)
      CS224n学习笔记(一)
      【模板】动态主席树
      【模板】静态主席树
      【模板】替罪羊树
      【模板】Splay
      洛谷 2387/BZOJ 3669 魔法森林
      洛谷 2622 关灯问题Ⅱ
    7. 原文地址:https://www.cnblogs.com/Cmpl/p/2213482.html
    Copyright © 2011-2022 走看看