Waichung

代码简洁之道 - 读书笔记
ReadingNote
27 min read

代码简洁之道 - 读书笔记

1. 简洁代码 * 优雅,高效;减少依赖;完善错误处理代码;处理专一事务 - Bjarne Stroustrup * 简单直接,干净利落的抽象(crisp abstraction),直截了当的控制语句 - Grady Booch * 可由其他开发者阅读和增补;应有单元测试和验收测试;有意义的命名;单一的做一件事的途径;经量少的依赖关系;清晰但尽量少的API - Dave Thomas * 几乎没有改进的余地 - Michael Feathers * 通过所有测试;不重复;体现系统中的全部设计理念;尽量少的实体 - Ron Jefferies * 代码让编程语言看起来像是专门为解决那个问题而存在 - Ward Cunningham 2. 命名 * 清晰,有意义的命名能有效降低代码的模糊度 * 避免留下掩盖代码本意的错误线索 * 有意义的区分 * Product,ProductInfo,

Read more
Wordpress Theme Development with Docker and UnderStrap
WordPress
2 min read

Wordpress Theme Development with Docker and UnderStrap

Docker Set-up [https://docs.docker.com/compose/wordpress/#bring-up-wordpress-in-a-web-browser] for Wordpress Development Define Services in a Compose File Reference [https://pawelgrzybek.com/configure-a-local-wordpress-development-using-docker/] # Version of the Compose file format # Version 3 is the most current and recommended one version: "3" # Top building block that defines # All containers used for this

Read more