Skip to content

Commit 7d1d6e0

Browse files
committed
introduction
1 parent b8a7539 commit 7d1d6e0

File tree

1 file changed

+38
-2
lines changed

1 file changed

+38
-2
lines changed

README.md

Lines changed: 38 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
Clean Code concepts adapted for TypeScript.
44
Inspired from [clean-code-javascript](https://github.com/ryanmcdermott/clean-code-javascript).
55

6+
将代码整洁的理念适配至 TypeScript , 灵感来自于[代码整洁的 JavaScript ](https://github.com/ryanmcdermott/clean-code-javascript)
7+
68
## Table of Contents
79

810
1. [Introduction](#introduction)
@@ -17,6 +19,20 @@ Inspired from [clean-code-javascript](https://github.com/ryanmcdermott/clean-cod
1719
10. [Formatting](#formatting)
1820
11. [Comments](#comments)
1921

22+
## 目录
23+
24+
1. [简介](#简介)
25+
2. [变量](#变量)
26+
3. [函数](#函数)
27+
4. [对象和数据结构](#对象和数据结构)
28+
5. [](#类)
29+
6. [SOLID](#solid)
30+
7. [测试](#测试)
31+
8. [并发](#并发)
32+
9. [错误处理](#错误处理)
33+
10. [格式化](#格式化)
34+
11. [评论](#评论)
35+
2036
## Introduction
2137

2238
![Humorous image of software quality estimation as a count of how many expletives
@@ -45,9 +61,29 @@ shaped into its final form. Finally, we chisel away the imperfections when
4561
we review it with our peers. Don't beat yourself up for first drafts that need
4662
improvement. Beat up the code instead!
4763

48-
**[⬆ back to top](#table-of-contents)**
64+
## 简介
65+
66+
![一张用你阅读代码时吐槽的数量来评估软件质量的搞笑图片](https://www.osnews.com/images/comics/wtfm.jpg)
67+
68+
将源自 Robert C. Martin 的 [*Clean Code*](https://www.amazon.com/Clean-Code-Handbook-Software-Craftsmanship/dp/0132350882)
69+
的软件工程原则适配到 TypeScript 。 这不是一个代码风格指南, 它是一个使用 TypeScript 来生产
70+
可读的, 可重用的, 以及可重构的软件的指南。
71+
72+
这里的每一项原则都不是必须遵守的, 甚至只有更少的能够被广泛认可。 这些仅仅是指南而已, 但是却是
73+
*Clean Code* 作者多年经验的结晶。
74+
75+
我们的软件工程行业只有短短的 50 年, 依然有很多要我们去学习。 当软件架构与建筑架构一样古老时,
76+
也许我们将会有硬性的规则去遵守。 而现在, 让这些指南做为你和你的团队生产的 TypeScript 代码的
77+
质量的标准。
78+
79+
还有一件事: 知道这些指南并不能马上让你成为一个更加出色的软件开发者, 并且使用它们工作多年也并
80+
不意味着你不再会犯错误。 每一段代码最开始都是草稿, 像湿粘土一样被打造成最终的形态。 最后当我们
81+
和搭档们一起审查代码时清除那些不完善之处, 不要因为最初需要改善的草稿代码而自责, 而是对那些代
82+
码下手。
83+
84+
**[⬆ 返回目录](#目录)**
4985

50-
## Variables
86+
## Variables
5187

5288
### Use meaningful variable names
5389

0 commit comments

Comments
 (0)