1.小步伐修改程序,每一小步的修改后,程序能正常运行,commit。
2.JS OOP (JavaScript高级程序设计,p 156~166;或 Javascript 权威指南 第8章后两节 和 第九章 前两节)
3.重构后,每个函数只做一件事,函数不超过十五行
4.函数名符合命名规范,见名知意
5.函数内圈复杂度在容易理解的前提下降至最低。
1.小步伐修改程序,每一小步的修改后,程序能正常运行,commit。
2.JS OOP (JavaScript高级程序设计,p 156~166;或 Javascript 权威指南 第8章后两节 和 第九章 前两节)
3.重构后,每个函数只做一件事,函数不超过十五行
4.函数名符合命名规范,见名知意
5.函数内圈复杂度在容易理解的前提下降至最低。
/** | |
* Typing animation with pure CSS. | |
* Works best in browsers supporting the ch unit. | |
*/ | |
@keyframes typing { from { width: 0; } } | |
@keyframes blink-caret { 50% { border-color: transparent; } } | |
h1 { | |
font: bold 200% Consolas, Monaco, monospace; |
#!/bin/sh | |
# ------------------------------------------------------------------------------ | |
# SOME INFOS : fairly standard (debian) init script. | |
# Note that node doesn't create a PID file (hence --make-pidfile) | |
# has to be run in the background (hence --background) | |
# and NOT as root (hence --chuid) | |
# | |
# MORE INFOS : INIT SCRIPT http://www.debian.org/doc/debian-policy/ch-opersys.html#s-sysvinit | |
# INIT-INFO RULES http://wiki.debian.org/LSBInitScripts | |
# INSTALL/REMOVE http://www.debian-administration.org/articles/28 |