> For the complete documentation index, see [llms.txt](https://ethan-lin.gitbook.io/refactoring/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://ethan-lin.gitbook.io/refactoring/bugszero/3-task-1.md).

# 任务1：初体验

第一个任务，建议你先从一些简单的地方入手，比如修一修 IDE 给的提示，移除没有用到的方法，随手的重命名之类的。在随手修葺的过程中，也可以顺便感受一下代码的坏味道。

## 你的任务

> 如果你还没有拉取代码，请执行如下命令拉取代码并安装依赖

Java：

```
git clone git@github.com:linesh-simplicity/bugszero-java.git
git checkout task-1-begin
cd java
./gradlew clean build
```

JavaScript：

```
git clone git@github.com:linesh-simplicity/bugszero.git
git checkout task-1-begin
cd javascript
npm i
npm test
```

* 先做一些简单的清理，比如修复 IDE 的提示、移除无用代码、简单的重命名
* 读一遍《重构 2：改善既有代码的设计》第三章的 24 种坏味道
* 列一下这道题所存在的坏味道，思考一下，你会大概以什么顺序入手重构
