Stardard coding convention

Today, I fix one ccr of wording change. One solution I chose is to use macro to replace the string.

Like this one,

#define REPLCE_STRING   _T("coding")

CString str;

str.Format(""REPLCE_STRING" and perfect");

The replace above will make reader confused when they want to change something related. But I found this is effective when changing string.

The standard coding convention should be used like below.

str.Format("%s", REPLCE_STRING);

时间: 2024-12-26 08:10:26

Stardard coding convention的相关文章

Java Code Convention Rules

Rules available in this category: Avoid_subclassing_java_lang_Thread Always_declare_a_class_having_only_private_constructors_as_final Replace_enumeration_with_iterator Combine_if_statements_using_boolean_short_circuit_operator Avoid_using_fully_quali

很好的iOS学习资料

https://github.com/vsouza/awesome-ios 汇集了很多好的资料 https://github.com/vsouza/awesome-ios Skip to content This repository Pull requests Issues Gist You don’t have any verified emails. We recommend verifying at least one email. Email verification helps ou

ExtJS笔记2 Class System

For the first time in its history, Ext JS went through a huge refactoring from the ground up with the new class system. The new architecture stands behind almost every single class written in Ext JS 4.x, hence it's important to understand it well bef

python 单下划线/双下划线使用总结(转载)

python 单下划线/双下划线使用总结 时间:2013-10-08 10:56来源:www.chengxuyuans.com Python 用下划线作为变量前缀和后缀指定特殊变量/方法. 主要存在四种情形1.    1. object # public    2. __object__ # special, python system use, user should not define like it    3. __object # private (name mangling duri

开始刷第二遍

从9月12号开始,到现在三个多月了,现在进度是300/304,后面几题难度比较大,尤其是dietpepsi加的一些Dynamic Programming的新题,自己往往做不出来要去看答案.今天起决定暂停做新题了,从头开始刷第二遍,之后的新题目,等到第二遍结束的时候再尝试挑战. 第二遍打算在两个月内刷完,研究Discuss版,争取每道题目能有最优解法和多种解法, 也要进行仔细和正确的复杂度分析,注意coding style以及coding convention.同时还要全面补强数据结构和算法的知识

hbase官方文档(转)

Apache HBase™ 参考指南  HBase 官方文档中文版 Copyright © 2012 Apache Software Foundation.保留所有权利. Apache Hadoop, Hadoop, MapReduce, HDFS, Zookeeper, HBase 及 HBase项目 logo 是Apache Software Foundation的商标. Revision History Revision 0.95-SNAPSHOT 2012-12-03T13:38 中文版

VB Procedures

VB Procedures A VB.NET procedure (aka sub for subroutine) is defined using the Sub / End Sub keywords. The procedure is invoked by using its name as a statement or, optionally, by preceding its name with the Call keyword. The sub name must conform to

[转]Python中下划线以及命名空间的意义

Python 用下划线作为变量前缀和后缀指定特殊变量/方法. 主要存在四种情形 1. 1. object # public    2. __object__ # special, python system use, user should not define like it    3. __object # private (name mangling during runtime)    4. _object # obey  coding convention, consider it a

Terminologies in MVC: Part 2 (Razor Engine Syntax vs Web Form)

By Abhishek Jaiswal :) on Mar 21, 2015 In this article we learn about Razor Engine Syntax vs Web Form in MVC ASP.NET. Quick View This article is all about the Razor Engine Syntax and traditional Web form explanations. I'll try to compare and differen