zoukankan
html css js c++ java
代码的注意事项
尽量保持方法简短。(最佳长度是5-20行,根据你的情况而定)
永远永远不要把同一个变量用于多个不同的目的,一个变量应该始终只为一个目的服务
使用自描述的变量名和方法名,尽量不要用简写方式,除非有特殊的习惯,例如:src-source,pos-position
尽可能的把变量定义在靠近使用它的地方
拒接神秘数字,当你要把一个东西跟常量做比较时,记得把这个值一定为常量
友好的对待你的语言
警惕过早优化,首先你应该关心写出易于理解的代码
积极重构测试过的程序
不要过度沉迷于技巧
通过习例学习新知
查看全文
相关阅读:
Multi-Channel Buffers
FFmpeg 的bug
关于游戏的网络同步探索1
预处理、编译、汇编、链接、启动代码、相关command
Linux命令——whiptail交互式shell脚本对话框
实模式、保护模式、三种地址、分段、分页
XAMPP + PhpStorm + Xdebug本地实验环境搭建
Web数据库架构
PHP语法基础
A quick introduction to Source Insight for seamless development platform between Linux and Windows
原文地址:https://www.cnblogs.com/yandufeng/p/5186894.html
最新文章
【转】常见的数据校验方法
C++类型转换方法
vector<char*>输出的全是最后一个插入的数据的问题
core文件的产生和使用
虚拟内存计算、管理和使用
Golang程序启动占用超大虚拟内空间,导致Linux内存分配失败(关于overcommit_memory)
strace的使用
golang+vscode开发环境的搭建
字典序
卖买股票的最佳时机
热门文章
shadowMap
基于物理规则的渲染(PBR)
OpenGL normalMap
ffmpeg新旧API对比
视频图像格式大小
关于dota2同步方式
实现FFMPEG 使用CUDA解码播放
关于游戏的网络同步探索2
utf8编码
出现chkstk.asm问题的解决方式
Copyright © 2011-2022 走看看