我的编程回顾 - 浅谈怎么快速学习一门新的编程语言

admin 13年前
     <p style="text-align:left;" align="center"><span style="font-family:宋体;">我从</span>2002<span style="font-family:宋体;">年到现在,学习了好几种编程语言。有一些,早已不用并且忘光了,有一些尽管不用但还会惦记着,还有一些,朝九晚五地用着。</span></p>    <p> </p>    <p><span style="font-family:宋体;">我回顾过去</span>9<span style="font-family:宋体;">年的学习经历,差不多每年会学习一门新的语言,现在把它记录如下:</span></p>    <p> </p>    <table style="border-bottom:medium none;border-left:medium none;border-collapse:collapse;border-top:medium none;border-right:medium none;" border="1" cellspacing="0" cellpadding="0">     <tbody>      <tr>       <td style="border-bottom:black 1pt solid;border-left:black 1pt solid;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;border-top:black 1pt solid;border-right:black 1pt solid;padding-top:0cm;" valign="top"> <p><span style="font-family:宋体;">语言</span></p> </td>       <td style="border-bottom:black 1pt solid;border-left:medium none;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;border-top:black 1pt solid;border-right:black 1pt solid;padding-top:0cm;" valign="top"> <p><span style="font-family:宋体;">学习时间</span></p> </td>       <td style="border-bottom:black 1pt solid;border-left:medium none;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;border-top:black 1pt solid;border-right:black 1pt solid;padding-top:0cm;" valign="top"> <p><span style="font-family:宋体;">状况</span></p> </td>      </tr>      <tr>       <td style="border-bottom:black 1pt solid;border-left:black 1pt solid;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:black 1pt solid;padding-top:0cm;" valign="top"> <p>C</p> </td>       <td style="border-bottom:black 1pt solid;border-left:medium none;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:black 1pt solid;padding-top:0cm;" valign="top"> <p>2002</p> </td>       <td style="border-bottom:black 1pt solid;border-left:medium none;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:black 1pt solid;padding-top:0cm;" valign="top"> <p><span style="font-family:宋体;">学习时候在</span>TC<span style="font-family:宋体;">上编了一些玩具程序,还曾记得,迁移到</span>VC<span style="font-family:宋体;">的时候,找不到</span>graphics.h<span style="font-family:宋体;">时的不知所措。读</span>C<span style="font-family:宋体;">程序的时间远远多于写</span>C<span style="font-family:宋体;">程序。</span></p> </td>      </tr>      <tr>       <td style="border-bottom:black 1pt solid;border-left:black 1pt solid;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:black 1pt solid;padding-top:0cm;" valign="top"> <p>C++</p> </td>       <td style="border-bottom:black 1pt solid;border-left:medium none;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:black 1pt solid;padding-top:0cm;" valign="top"> <p>2003</p> </td>       <td style="border-bottom:black 1pt solid;border-left:medium none;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:black 1pt solid;padding-top:0cm;" valign="top"> <p><span style="font-family:宋体;">整天抱着</span>TCppPL<span style="font-family:宋体;">,混迹于</span>CSDN C++<span style="font-family:宋体;">版。</span>2005-2008<span style="font-family:宋体;">年,一直用</span>C++<span style="font-family:宋体;">写代码</span></p> </td>      </tr>      <tr>       <td style="border-bottom:black 1pt solid;border-left:black 1pt solid;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:black 1pt solid;padding-top:0cm;" valign="top"> <p>Java</p> </td>       <td style="border-bottom:black 1pt solid;border-left:medium none;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:black 1pt solid;padding-top:0cm;" valign="top"> <p>2004</p> </td>       <td style="border-bottom:black 1pt solid;border-left:medium none;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:black 1pt solid;padding-top:0cm;" valign="top"> <p><span style="font-family:宋体;">想了解一些</span>Web<span style="font-family:宋体;">方面的知识,于是开始学习</span>Java<span style="font-family:宋体;">。</span>05<span style="font-family:宋体;">年后一直没碰到,直到</span>08<span style="font-family:宋体;">年转做网页游戏,又重新拾起。</span></p> </td>      </tr>      <tr>       <td style="border-bottom:black 1pt solid;border-left:black 1pt solid;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:black 1pt solid;padding-top:0cm;" valign="top"> <p>Python</p> </td>       <td style="border-bottom:black 1pt solid;border-left:medium none;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:black 1pt solid;padding-top:0cm;" valign="top"> <p>2005</p> </td>       <td style="border-bottom:black 1pt solid;border-left:medium none;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:black 1pt solid;padding-top:0cm;" valign="top"> <p><span style="font-family:宋体;">我第一份工作的第一个任务就是做游戏服务器的任务系统,用的脚本正是</span>Python<span style="font-family:宋体;">。后来几年也会用</span>Python<span style="font-family:宋体;">写一些小工具。</span></p> </td>      </tr>      <tr>       <td style="border-bottom:black 1pt solid;border-left:black 1pt solid;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:black 1pt solid;padding-top:0cm;" valign="top"> <p>Lua</p> </td>       <td style="border-bottom:black 1pt solid;border-left:medium none;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:black 1pt solid;padding-top:0cm;" valign="top"> <p>2006</p> </td>       <td style="border-bottom:black 1pt solid;border-left:medium none;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:black 1pt solid;padding-top:0cm;" valign="top"> <p><span style="font-family:宋体;">魔兽世界让</span>Lua<span style="font-family:宋体;">火起来了,随波逐流地开始学习,后来喜欢上了。现在</span>Lua<span style="font-family:宋体;">是我游戏开发的御用脚本。</span></p> </td>      </tr>      <tr>       <td style="border-bottom:black 1pt solid;border-left:black 1pt solid;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:black 1pt solid;padding-top:0cm;" valign="top"> <p>Perl/Erlang</p> </td>       <td style="border-bottom:black 1pt solid;border-left:medium none;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:black 1pt solid;padding-top:0cm;" valign="top"> <p>2009</p> </td>       <td style="border-bottom:black 1pt solid;border-left:medium none;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:black 1pt solid;padding-top:0cm;" valign="top"> <p><span style="font-family:宋体;">为了读懂一些</span>mysql<span style="font-family:宋体;">管理工具,决定学习</span>Perl<span style="font-family:宋体;">。黄金国度的大部分工具都是用</span>Perl<span style="font-family:宋体;">开发。</span>Perl<span style="font-family:宋体;">带给我最大的麻烦是,一段时间后,读自己的代码都很晦涩。</span>07<span style="font-family:宋体;">年的时候就听大家讨论</span>Erlang<span style="font-family:宋体;">了,但一直没碰,借着国内出了第一本</span>Erlang<span style="font-family:宋体;">技术书的东风,开始学习起来。真的很喜欢,但也很清楚,短时间不会在商用项目里面使用,所以暂且搁置,但总会惦记着。</span></p> </td>      </tr>      <tr>       <td style="border-bottom:black 1pt solid;border-left:black 1pt solid;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:black 1pt solid;padding-top:0cm;" valign="top"> <p>Scala</p> </td>       <td style="border-bottom:black 1pt solid;border-left:medium none;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:black 1pt solid;padding-top:0cm;" valign="top"> <p>2010</p> </td>       <td style="border-bottom:black 1pt solid;border-left:medium none;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:black 1pt solid;padding-top:0cm;" valign="top"> <p><span style="font-family:宋体;">因为</span>Erlang<span style="font-family:宋体;">的原因,开始接触</span>Scala<span style="font-family:宋体;">,尝试了一段时间后,会觉得,既然我已经有</span>Erlang<span style="font-family:宋体;">,又何必要</span>Scala<span style="font-family:宋体;">呢。</span> </p> </td>      </tr>      <tr>       <td style="border-bottom:black 1pt solid;border-left:black 1pt solid;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:black 1pt solid;padding-top:0cm;" valign="top"> <p>ActionScript/Ruby</p> </td>       <td style="border-bottom:black 1pt solid;border-left:medium none;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:black 1pt solid;padding-top:0cm;" valign="top"> <p>2011</p> </td>       <td style="border-bottom:black 1pt solid;border-left:medium none;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:black 1pt solid;padding-top:0cm;" valign="top"> <p><span style="font-family:宋体;">一直很少关注客户端的技术,为了弥补这个缺陷,学习了</span>AS<span style="font-family:宋体;">。快乐编程是我追求的目标,于是开始尝试</span>Ruby</p> </td>      </tr>     </tbody>    </table>    <p> </p>    <p><span style="font-family:宋体;">每次开始学习一门新的语言,都会很兴奋,如同进入一个崭新的奇妙世界。兴奋之后,会发现,每次的学习过程大同小异</span>: <span style="font-family:宋体;">安装编译环境,测试</span>Hello World<span style="font-family:宋体;">,按照</span>Tutorial<span style="font-family:宋体;">一步一步的尝试,订阅邮件列表,看相关书籍,研读源代码,不断写代码。不断写代码是最重要的,其它步骤都是为它服务。</span></p>    <p> </p>    <p><span style="font-family:宋体;">我竟然学了那么多语言,而且还在不断学习新的。论语道“学而不思则罔,思而不学则殆”。所以,我要总结。我把学习一门新的语言分成</span>3<span style="font-family:宋体;">个阶段</span>: <span style="font-family:宋体;">会用、熟练用和举一反三扬长避短用。因为精力有限,大部分时候,我们只是浅尝则止,也就是我说的“会用”——能借助</span>google<span style="font-family:宋体;">和帮助文档,完成功能开发,对代码质量无要求。</span></p>    <p> </p>    <p><span style="font-family:宋体;">我发现,“淘金式”的学习方法能帮助我们快速“会用”。我把要淘的金子总结如下:</span></p>    <p style="text-indent:-18pt;margin-left:18pt;"><span><span>1.<span style="font:7pt 'Times New Roman';">       </span></span></span><span style="font-family:宋体;">数据类型:数值、字符串和布尔</span></p>    <p style="text-indent:-18pt;margin-left:18pt;"><span><span>2.<span style="font:7pt 'Times New Roman';">       </span></span></span><span style="font-family:宋体;">数据结构:数组和哈希字典</span></p>    <p style="text-indent:-18pt;margin-left:18pt;"><span><span>3.<span style="font:7pt 'Times New Roman';">       </span></span></span><span style="font-family:宋体;">变量声明与定义</span></p>    <p style="text-indent:-18pt;margin-left:18pt;"><span><span>4.<span style="font:7pt 'Times New Roman';">       </span></span></span><span style="font-family:宋体;">函数声明与调用</span></p>    <p style="text-indent:-18pt;margin-left:18pt;"><span><span>5.<span style="font:7pt 'Times New Roman';">       </span></span></span><span style="font-family:宋体;">程序结构:条件和循环</span></p>    <p style="text-indent:-18pt;margin-left:18pt;"><span><span>6.<span style="font:7pt 'Times New Roman';">       </span></span></span><span style="font-family:宋体;">文件操作:打开文件、读写文件、遍历目录</span></p>    <p style="text-indent:-18pt;margin-left:18pt;"><span><span>7.<span style="font:7pt 'Times New Roman';">       </span></span></span>XML<span style="font-family:宋体;">文件</span></p>    <p style="text-indent:-18pt;margin-left:18pt;"><span><span>8.<span style="font:7pt 'Times New Roman';">       </span></span></span><span style="font-family:宋体;">正则表达式</span></p>    <p style="text-indent:-18pt;margin-left:18pt;"><span><span>9.<span style="font:7pt 'Times New Roman';">       </span></span></span><span style="font-family:宋体;">数据库</span></p>    <p style="text-indent:-18pt;margin-left:18pt;"><span><span>10.<span style="font:7pt 'Times New Roman';">   </span></span></span><span style="font-family:宋体;">杂项:格式化输出、调用外部命令、时间日期、随机数和程序输入参数</span></p>    <p> </p>    <p><span style="font-family:宋体;">具体的例子,对于</span>Ruby<span style="font-family:宋体;">来说,知识点又是这样的:</span> </p>    <table style="border-bottom:medium none;border-left:medium none;border-collapse:collapse;border-top:medium none;border-right:medium none;" border="1" cellspacing="0" cellpadding="0">     <tbody>      <tr>       <td style="border-bottom:black 1pt solid;border-left:black 1pt solid;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;border-top:black 1pt solid;border-right:black 1pt solid;padding-top:0cm;" valign="top"> <p><span style="font-family:宋体;">知识点</span></p> </td>       <td style="border-bottom:black 1pt solid;border-left:medium none;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;border-top:black 1pt solid;border-right:black 1pt solid;padding-top:0cm;" valign="top"> <p><span style="font-family:宋体;">内容</span></p> </td>      </tr>      <tr>       <td style="border-bottom:black 1pt solid;border-left:black 1pt solid;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:black 1pt solid;padding-top:0cm;" valign="top"> <p><span style="font-family:宋体;">数据类型</span></p> </td>       <td style="border-bottom:black 1pt solid;border-left:medium none;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:black 1pt solid;padding-top:0cm;" valign="top"> <p style="text-indent:-18pt;margin-left:18pt;"><span><span>a.<span style="font:7pt 'Times New Roman';">       </span></span></span><span style="font-family:宋体;">支持整数、浮点数</span></p> <p style="text-indent:-18pt;margin-left:18pt;"><span><span>b.<span style="font:7pt 'Times New Roman';">       </span></span></span><span style="font-family:宋体;">字符串是</span>mutable<span style="font-family:宋体;">的,可以设置编码,对应</span>String<span style="font-family:宋体;">类,什么</span>index/start_with/end_with/split<span style="font-family:宋体;">应有尽有</span></p> <p style="text-indent:-18pt;margin-left:18pt;"><span><span>c.<span style="font:7pt 'Times New Roman';">       </span></span></span><span style="font-family:宋体;">字符串判断相等</span>== <span style="font-family:宋体;">和</span>?eql<span style="font-family:宋体;">都可以</span> </p> <p style="text-indent:-18pt;margin-left:18pt;"><span><span>d.<span style="font:7pt 'Times New Roman';">       </span></span></span>True/False/Nil</p> </td>      </tr>      <tr>       <td style="border-bottom:black 1pt solid;border-left:black 1pt solid;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:black 1pt solid;padding-top:0cm;" valign="top"> <p><span style="font-family:宋体;">数据结构</span></p> </td>       <td style="border-bottom:black 1pt solid;border-left:medium none;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:black 1pt solid;padding-top:0cm;" valign="top"> <p style="text-indent:-18pt;margin-left:18pt;"><span>a. </span><span style="font-family:宋体;">对应</span>Array<span style="font-family:宋体;">和</span>Hash</p> <p style="text-indent:-18pt;margin-left:18pt;"><span>b. </span><span style="font-family:宋体;">初始化分别是</span>[1, 2, 3]<span style="font-family:宋体;">和</span><span>{“one”=>1, “two”=>2, “three”=>3}</span></p> <p style="text-indent:-18pt;margin-left:18pt;"><span>c. </span><span style="font-family:宋体;">遍历方式</span>: xx.each{|x| print x}</p> <p style="text-indent:-18pt;margin-left:18pt;"><span>d. </span> </p> </td>      </tr>      <tr>       <td style="border-bottom:black 1pt solid;border-left:black 1pt solid;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:black 1pt solid;padding-top:0cm;" valign="top"> <p><span style="font-family:宋体;">变量声明与定义</span></p> </td>       <td style="border-bottom:black 1pt solid;border-left:medium none;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:black 1pt solid;padding-top:0cm;" valign="top"> <p style="text-indent:-18pt;margin-left:18pt;"><span>a. </span><span style="font-family:宋体;">支持全局变量、局部变量、类变量和实例变量。</span>Ruby<span style="font-family:宋体;">对于不同变量的命名有契约规则</span></p> <p style="text-indent:-18pt;margin-left:18pt;"><span>b. </span><span style="font-family:宋体;">不需要提前声明,也不需要指定类型,也没有</span>var<span style="font-family:宋体;">等修饰符</span></p> </td>      </tr>      <tr>       <td style="border-bottom:black 1pt solid;border-left:black 1pt solid;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:black 1pt solid;padding-top:0cm;" valign="top"> <p><span style="font-family:宋体;">函数声明与调用</span></p> </td>       <td style="border-bottom:black 1pt solid;border-left:medium none;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:black 1pt solid;padding-top:0cm;" valign="top"> <p style="text-indent:-18pt;margin-left:18pt;"><span><span>a.<span style="font:7pt 'Times New Roman';">       </span></span></span>def  foo() </p> <p style="text-indent:10.5pt;margin-left:17.95pt;"><span>puts “hello world”   </span></p> <p style="text-indent:0cm;margin-left:18pt;">end</p> <p style="text-indent:-18pt;margin-left:18pt;"><span><span>b.<span style="font:7pt 'Times New Roman';">       </span></span></span> foo()</p> <p style="text-indent:-18pt;margin-left:18pt;"><span>c. </span><span style="font-family:宋体;">语句可以不要终止符</span>’;’<span style="font-family:宋体;">,有时函数调用中的圆括号可以被省略</span></p> </td>      </tr>      <tr>       <td style="border-bottom:black 1pt solid;border-left:black 1pt solid;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:black 1pt solid;padding-top:0cm;" valign="top"> <p><span style="font-family:宋体;">程序结构</span></p> </td>       <td style="border-bottom:black 1pt solid;border-left:medium none;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:black 1pt solid;padding-top:0cm;" valign="top"> <p style="text-indent:-18pt;margin-left:18pt;"><span>a. </span><span style="font-family:宋体;">条件式</span> if/elsif/else/end</p> <p style="text-indent:-18pt;margin-left:18pt;"><span>b. </span><span style="font-family:宋体;">循环</span> while/do/end</p> <p style="text-indent:-18pt;margin-left:18pt;"><span>c. </span><span style="font-family:宋体;">循环</span> for var in collection do end</p> <p>d<span style="font-family:宋体;">.</span>ruby<span style="font-family:宋体;">的迭代</span>/<span style="font-family:宋体;">枚举功能很强大</span></p> </td>      </tr>      <tr>       <td style="border-bottom:black 1pt solid;border-left:black 1pt solid;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:black 1pt solid;padding-top:0cm;" valign="top"> <p><span style="font-family:宋体;">文件操作</span></p> </td>       <td style="border-bottom:black 1pt solid;border-left:medium none;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:black 1pt solid;padding-top:0cm;" valign="top"> <p>File/Dir/FileTest</p> </td>      </tr>      <tr>       <td style="border-bottom:black 1pt solid;border-left:black 1pt solid;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:black 1pt solid;padding-top:0cm;" valign="top"> <p>XML<span style="font-family:宋体;">文件</span></p> </td>       <td style="border-bottom:black 1pt solid;border-left:medium none;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:black 1pt solid;padding-top:0cm;" valign="top"> <p>rexml/document<span style="font-family:宋体;">足够用了</span></p> </td>      </tr>      <tr>       <td style="border-bottom:black 1pt solid;border-left:black 1pt solid;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:black 1pt solid;padding-top:0cm;" valign="top"> <p><span style="font-family:宋体;">正则表达式</span></p> </td>       <td style="border-bottom:black 1pt solid;border-left:medium none;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:black 1pt solid;padding-top:0cm;" valign="top"> <p>=~ / /</p> </td>      </tr>      <tr>       <td style="border-bottom:black 1pt solid;border-left:black 1pt solid;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:black 1pt solid;padding-top:0cm;" valign="top"> <p><span style="font-family:宋体;">数据库</span></p> </td>       <td style="border-bottom:black 1pt solid;border-left:medium none;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:black 1pt solid;padding-top:0cm;" valign="top"> <p>Mysql/Ruby<span style="font-family:宋体;">据说不错</span></p> </td>      </tr>      <tr>       <td style="border-bottom:black 1pt solid;border-left:black 1pt solid;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:black 1pt solid;padding-top:0cm;" valign="top"> <p><span style="font-family:宋体;">杂项</span></p> </td>       <td style="border-bottom:black 1pt solid;border-left:medium none;padding-bottom:0cm;padding-left:5.4pt;padding-right:5.4pt;border-top:medium none;border-right:black 1pt solid;padding-top:0cm;" valign="top"> <p style="text-indent:-18pt;margin-left:18pt;"><span>a. </span>puts/print/printf</p> <p style="text-indent:-18pt;margin-left:18pt;"><span>b. </span>`<span style="font-family:宋体;">外部命令</span>`</p> <p style="text-indent:-18pt;margin-left:18pt;"><span>c. </span>Time.now</p> <p style="text-indent:-18pt;margin-left:18pt;"><span>d. </span>srand/rand</p> <p style="text-indent:-18pt;margin-left:18pt;"><span>e. </span>ARGV</p> </td>      </tr>     </tbody>    </table>    <p> </p>    <p><span style="font-family:宋体;">怎么样?是不是对于</span>Ruby<span style="font-family:宋体;">有一个大概的认识?是不是想尝试一下这种淘金式的学习方法?那就开始吧。<br /> <br /> 转自:<a href="/misc/goto?guid=4958185681234621331">http://www.cnblogs.com/ro4tub/archive/2011/08/21/how_to_learn_a_new_computer_language.html</a><br /> </span></p>