md 引入图片资源

This commit is contained in:
gdut-yy
2020-01-01 17:11:49 +08:00
parent 9085df5a8e
commit 7a4601dd50
19 changed files with 246 additions and 329 deletions

View File

@@ -1,7 +1,6 @@
# 第 4 章 Comments
Image
Image
![](figures/ch4/4_1fig_martin.jpg)
“Dont comment bad code—rewrite it.”—Brian W. Kernighan and P. J. Plaugher1
1. [KP78], p. 144.
@@ -148,7 +147,8 @@ There is a substantial risk, of course, that a clarifying comment is incorrect.
Warning of Consequences
Sometimes it is useful to warn other programmers about certain consequences. For example, here is a comment that explains why a particular test case is turned off:
Image
![](figures/ch4/4_2fig_martin.jpg)
```java
// Don't run unless you
// have some time to kill.
@@ -166,6 +166,7 @@ Image
Nowadays, of course, wed turn off the test case by using the @Ignore attribute with an appropriate explanatory string. @Ignore(”Takes too long to run”). But back in the days before JUnit 4, putting an underscore in front of the method name was a common convention. The comment, while flippant, makes the point pretty well.
Heres another, more poignant example:
```java
public static
SimpleDateFormat makeStandardHttpDateFormat()