====== 软件工程 ====== * [[https://qiangmzsx.github.io/Software-Engineering-at-Google/#/|Software-Engineering-at-Google]] ===== 测试 ===== * 单元测试 * 自动测试 * 持续集成 ===== 重构 ===== * 一切没有自动化测试的代码重构都是耍流氓。 * 自动化测试 * 提高测试覆盖率 * 重构的时机: 重构代码最佳的时间点:撰写每行代码的时候,而非火烧屁股的时候。 * 一. 当你写一段代码时,不得不从别处拷贝粘贴代码(第二次拷贝还可, 当第三次拷贝时, 就要考虑了). DRY(Don't repeat yourself) * 二. 你修改已有代码添加新功能时,发现已有代码总感觉哪里不对, 比如说,逻辑写得太绕,太复杂,太难以理解,循环太多,分支太多,状态太多等等 * 三. 当你调用已有的代码时(函数,类),不得不阅读被调用的代码才能确定怎么调用时 * 四. 当你写一段代码时,连带着要改很多代码 * 严格自律与他律, 人性本懒, 需要 role model (初始从自己做起,再带动团队) 与 团队气氛. ===== 项目工具推荐 ===== * IDE/代码编辑器 * [[public:it:vscode]] * 代码版本管理 * [[public:it:git]] * [[https://github.com/|github]] [在线] * [[https://bitbucket.org/product/|Bitbucket]] [在线] * [[https://gitlab.com/gitlab-org/gitlab|gitlab]] [可自建] * [[https://github.com/theonedev/onedev|onedev]] [可自建] * [[https://gitee.com/|Gitee]] [在线] [国内] 开始有预审查,不推荐。 * [[https://sourcehut.org/|SourceHut]] [在线] [可自建] [[https://ulyc.github.io/2022/08/10/sourcehut-the-hackers-forge/|介绍]] * [[https://github.com/charmbracelet/soft-serve|soft-serve]] [可自建] 只需在命令行执行一条命令,就能自己搭建 Git 服务器,简单易用 * [[https://github.com/harness/gitness|Gitness]] [可自建] 除了首次加载网页比较慢(需要下载十几M),其它都很符合自建git服务的需求。 * 代码Review * [[https://www.reviewboard.org/|ReviewBoard]] * [[https://www.gerritcodereview.com/|Gerrit]][可自建] * 测试 * [[https://www.zentao.net/|禅道]] [可自建] [国内] * [[https://www.tapd.cn/|TAPD]] [在线] [国内] * CI/自动化 * [[public:it:jenkins]][可自建] * web测试自动化:[[https://www.selenium.dev/|Selenium]] * 文档 * [[https://www.atlassian.com/zh/software/confluence|Confluence]] [可自建] * [[https://www.showdoc.com.cn/help|Showdoc]] [可自建] [国内] * [[https://www.yuque.com/|语雀]][线上] [国内] * [[https://www.apipost.cn/|Apipost]][线上] [国内] [自建收费] 专注api文档 * [[https://github.com/outline/outline|Outline]][可自建] 团队知识库,自建认证也需要可团队认账的账号,google workspace, slack 等。 * 产品设计/代码设计 * [[https://plantuml.com/zh/|PlantUML]] * 画图:[[https://www.processon.com|ProcessOn]] [在线] [国内] * 画图:[[https://www.diagrams.net/|diagrams.net]] [在线] * 任务管理 * 敏捷 scrum * [[https://trello.com/|Trello]] * [[https://www.leangoo.com/leangoo|leangoo]] [在线] [国内] * [[https://www.tapd.cn/|TAPD]] [在线] [国内] ===== 项目结构 ===== * [[https://monorepo.tools/|Monorepo]]: monorepo 指多个相关项目放在同一个代码仓库里面,链接介绍相关的知识与工具。