> 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/dan-wei-zhuan-huan/1-project-description.md).

# 题目介绍

现在，我们先用一道题目来开始热身。这是一道简单的长度单位之间的换算题，代码已经由你的前任程序员写好，但是……实现实在并不怎么优雅，好在前任还算负责，写了很多单元测试。这一课的任务就是对已有的代码做出修改，使它变得更可读，维护性更好。你可以先把代码拉下来，读读`README.md`里描述的需求，再随意读读代码感受一下，有兴趣的话你也可以尝试上手重构一把。

Java：

```
git clone https://github.com/linesh-simplicity/length-java.git
cd length-java
./gradlew clean build
```

JavaScript：

```
git clone https://github.com/linesh-simplicity/length.git
cd length
npm test
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://ethan-lin.gitbook.io/refactoring/dan-wei-zhuan-huan/1-project-description.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
