[Erlang危机](1.1)如何深入代码
来源:互联网 发布:国家四大人工智能平台 编辑:程序博客网 时间:2024/04/29 23:22
原创文章,转载请注明出处:服务器非业余研究http://blog.csdn.net/erlib 作者Sunface
Chapter 1 How to Dive into a Code Base
如何深入研究代码
"Read the source" is one of the most annoying things to be told, but dealing with Erlang programmers, you’ll have to do it often. Either the documentation for a library will be incomplete, outdated, or just not there.
“阅读源码” 是最讨人厌的忠告之一,但是对于编写Erlang来说,你不得不经常阅读源码。阅读过程中可能会遇到这种情况:代码文档不全、过时了、甚至找不到该文档。
In other cases, Erlang programmers are a bit similar to Lispers in that they will tend to write libraries that will solve their problems and not really test or try them in other circumstances, leaving it to you to extend or fix issues that arise in new contexts.
另一方面来说,Erlang编程人员的处境有点类似于Lispers,他们倾向于亲自写代码库来解决遇到的难题,同时也不会测试这些代码库在其他应用场景下的应用。如果想在新场景应用这些第三方代码库,只能亲自去扩展或修复其中存在的问题。
It’s thus pretty much guaranteed you’ll have to go dive in some code base you know nothing about, either because you inherited it at work, or because you need to fix it or understand it to be able to move forward with your own system. This is in fact true of most languages whenever the project you work on is not one you designed yourself.
当你在接管他人的工作、修复一个难题或将代码移植到你自己的系统时,你需要深入研究源码才能确保系统的稳定运行。 因此当使用的项目不是自己设计的,“阅读源码”是最有效的方法。
There are three main types of Erlang code bases you’ll encounter in the wild: raw Erlang code bases, OTP applications, and OTP releases. In this chapter, we’ll look at each of these and try to provide helpful tips on navigating them.
一般你会遇到三种类型的Erlang代码库:第三方Erlang代码库,OTP Applications(OTP应用)和OTP releases(OTP发布)。在本章的后续内容,我们会逐一分析这三种库,并提供一些有用的建议以便更好地驾驭它们。
- [Erlang危机](1.1)如何深入代码
- [Erlang危机](1.2)第三方Erlang代码库
- [Erlang危机](3.4)习题
- [Erlang危机](4.2)Remsh
- [Erlang危机](2.0)创建erlang开源程序
- 多核危机:Scala vs. Erlang
- 多核危机:Scala vs Erlang
- [Erlang危机](1.3)OTP应用
- [Erlang危机](2.1)项目结构
- [Erlang危机](3.0)过载处理
- [Erlang危机](3.2)限制输入
- [Erlang危机](4.4)命名管道
- [Erlang危机](5.1.1)内存
- [Erlang危机](5.1.2)CPU
- [Erlang危机](5.1.3)进程
- [Erlang危机](1.4)OTP发布及习题
- [Erlang危机](3.1)常见过载情景
- [Erlang危机](3.3)丢弃数据上篇
- Ubuntu13.10编译Android4.3源码(二)
- 写一个函数参数是一个int数值要求倒着输出这个数,要求用到递归算法。
- Android起始之路之一:git和svn的使用。
- 组合数计算(快速幂)
- ImageView 清空图片
- [Erlang危机](1.1)如何深入代码
- 2014-11-6Android学习------Spinner下拉选择框控件学习(二)---监听事件
- JAVA的protected权限
- 奇数阶幻方求解
- 对一篇文章计数输出最多的20个(《编程珠玑》)
- Suse Linux Enterprise 12下编译protocol buffer并生成python binding
- poj解题报告——1218
- hdu 2147 kiki's game 博弈
- 50.字符典 (15分)