-5

假设您有 200 页代码。或任何数量。但不是你写的。因此,在 javascript 中,任何事情都可以在任何地方完成。你是如何阅读和理解的?解码或逆向工程。有什么工具在这个过程中有所帮助?一般来说,我发现阅读我旁边的任何其他代码是不可能的,除非它少于半页。

4

2 回答 2

1

What I typically do is follow the call-in logic from outer layers of code inward and instead of trying to grok thousands of lines of someones program, I try to figure out how the pieces I need to work on function.

You don't read code top-down like you read a book (pages?), you follow calls (initially you can ignore class instantiation) from the outmost position inwards. JavaScript is not a nice language in this regard but still if a compiler/interpreter can read it, so can you.

It's important to write readable code, and as a professional you should, on a policy level, expect that from other people, but on a technical level, you need to be able to cut through the bushes.

于 2013-05-14T13:05:20.533 回答
0

如果您对 javascript 有任何具体问题,您需要了解函数式编程、jquery 等。把它贴在这里。

于 2013-05-14T12:42:15.903 回答