UNIX编程艺术豆瓣中文版.pdf
http://www.100md.com
2020年11月16日
![]() |
| 第1页 |
![]() |
| 第4页 |
![]() |
| 第20页 |
![]() |
| 第27页 |
![]() |
| 第43页 |
![]() |
| 第253页 |
参见附件(29452KB,547页)。
《传世经典书丛:UNIX编程艺术》主要介绍了Unix系统领域中的设计和开发哲学、思想文化体系、原则与经验,由公认的Unix编程大师、开源运动领袖人物之一Eric S.Raymond倾力多年写作而成

反对学习Unix文化的理由
Unix的耐用性及其技术文化对于喜爱Unix的人们、以及技术史家来说肯定颇为有趣。但是,Unix的本源用途-作为大中型计算机的通用分时系统,由于受到个人工作站的围剿,正迅速地退出舞台,隐入历史的迷雾之中。因而Unix究竟能否在目前被Microsoft主宰的主流商务桌面市场上取得成功,人们自然也存在着一定的疑问。
外行常常把Unix当作是教学用的玩具或者是黑客的沙盒而不屑一顾。有一本著名的抨击Unix的书-《Unix反对者手册》(Unix Hater's Handbook)[Garfinkell,几乎从Unix诞生时就一直奉行反对路线,将Unix的追随者描写成一群信奉邪教的怪人和失败者。AT&T,Sun,Novell,以及其他一些大型商业销售商和标准联盟在Unix定位和市场推广方面不断铸下的大错也已经成为经典笑柄。
即使在Unix世界里,Unix的通用性也一直受到怀疑,摇摆在危崖边。在持怀疑态度的外行人眼中,Unix很有用,不会消亡,只是登不了大雅之堂:注定只能是个小众的操作系统。
挫败这些怀疑者的不是别的,正是Linux和其它开源Unix(如现代BSD各个变种)
的崛起。Unix文化是如此的有生命力,即使十几年的管理不善也丝毫未制它的勃勃生机。现在Unix社区自身已经重新控制了技术和市场,正快速而有效地解决着Unix的问题(第20章将有详述)
Unix之失
对于一个始于1969年的设计来说,在Unix设计中居然很难找到硬伤,这着实令人称奇。其它的选择不是没有,但是每一个这样的选择同样面临争论,无论是Unix爱好者,还是操作系统设计社群的人们。
Unix文件在字节层次以上再无结构可言。文件删除了就没法恢复。Unix的安全模型公认地太过原始。作业控制有欠精致。命名方式非常混乱。或许拥有文件系统本身就是一个错误。我们将在第20章讨论这些技术问题。
但是,也许Unix最持久的异议恰恰来自Unix哲学的一个特性,这一条特性是x window设计者首先明确提出的。x致力于提供一套“机制,而不是策略”,以支持套极端通用的图形操作,从而把使用工具箱和界面的“观感”(策略)推后到应用层。
Unix其它系统级的服务也有类似的倾向:行为的最终逻辑被尽可能推后到使用端。Unix用户可以在多种shell中进行选择。而Unix应用程序通常会提供很多的行为选项和令人眼花缭乱的定制功能。
这种倾向也反映出Unix的遗风:原本是为技术人员设计的操作系统:同时也表明设计的信念:最终用户永远比操作系统设计人员更清楚他们究竟需要什么。
贝尔实验室的Dick Hamming"在1950年代便树立了此信条:尽管计算机稀缺昂贵,但是开放式的计算模式,即客户可以为系统写出自己的应用程序,这一点势在必行,因为“用错误的方式解决正确的问题总比用正确的方法解决错误的问题好".
-Doug Mcltroy然而这种选择机制而不是策略的代价是:当用户“可以”自己设置策略时,他们其实是“必须”自己设置策略。非技术型的终端用户常常会被Unix丰富的选项和接口风格搞得晕头转向,于是转而选择那些伪称能够给他们提供简洁性的操作系统。
只看眼前的话,Unix的这种自由放纵主义风格会让它失去很多非技术型用户。但从长远考虑,最终你会发觉这个“错误”换来至关重要的优势:策略相对短寿,而机制才会长存。现今流行的界面观感常常会变成明日进化的死胡同(去问间那些使用已经过时的X工具包的用户,他们会有一肚子苦水倒给你!)。说来说去,只提供机制不提供方针的哲学能使Unix长久保鲜;而那些被束缚在一套方针或界面风格内的操作系统,也许早就从人们的视线中消失了。"
跨平台可移植性和开放标准
Unix仍是唯一一个在不同种类的计算机、众多厂商、各种专用硬件上提供了一个一致的、文档齐全的应用程序接口(API)的操作系统。Unix也是唯一一个从嵌入式芯片、手持设备到桌面机,从服务器到专门用于数值计算的怪兽级计算机以及数据库后端都腾挪有余的操作系统。
Unix API几乎就可以作为编写真正可移植软件的硬件无关标准。难怪最初IEEE称之为“可移植操作系统标准”(Portable Operating System Standard)的POS很快就被大家加了后缀变成了"POSIX"[译注:缩写为POSIX是为了读音更像Unix]。确实,只有称之为Unix API的等价物才能算是这种标准比较可信的模型。
其它操作系统只提供二进制代码的应用程序,并随其诞生环境的消亡而消亡,而Unix源码却是永生的。至少,永生在数十年不断维护翻修它们的Unix技术文化之中。
精彩书摘
terminfo本身使用文件系统作为一个简单的层级数据库。这种偷懒相当具有建设性,符合经济性原则和透明性原则。这意味着对文件系统进行浏览、检查和修改的所有普通工具都可以用于对terminfo数据库进行浏览、检查和修改;无需编写和调试专用工具(用于打包和解包单个记录的tic(1)和infocmp(1)工具除外)。这也意味着要加速数据库的访问就得要加速文件系统本身,知道这一点可以使更多应用程序受益,而不仅仅是curses(3)的用户。
这种结构还有另外一种优点,但在terminfo例子中没有展示出来:你开始使用Unix的授权机制而不用自己编写带来额外bu9的访问控制层。这也是采纳而不是对抗Unix“一切皆文件”基本原则的结果。
terminfo目录的布局在大多数Unix文件系统上都很浪费空间。每条目长度通常在400~1400字节之间,但是文件系统通常为每一个非空磁盘文件至少分配4k的空间。出于选择压缩二进制格式的同一个原因,即为了把terminfo使用的程序的启动延时降到最小,设计者接受了这个代价。同一价格所能买到的磁盘容量已经猛增了一千倍,更能证明这个决定的正确。
比较这种格式和Microcsoft Windows的注册表文件所用的格式很有启发意义。注册表是Windows本身及应用程序都使用的属性数据库。所有注册记录都存放在一个大文件中。注册记录既包含文本也包含二进制数据,需要专用的编辑工具。别的不说,这种“一个大文件”的方法还导致了臭名昭著的“注册表蠕变”现象;平均访问时间随着新记录的加入而无限上升。因为系统没有提供标准APl来编辑注册表,应用程序本身使用专用代码编辑注册表,使得注册表极易受损,甚至能够锁定整个系统。
使用Unix文件系统作为数据库是一种策略,对数据库要求简单的其它应用程序可以效仿并从中受益。不这样做的充分理由通常与性能问题无关,更可能的情形是数据库关键字不太适合做文件名。无论如何,这是在原型设计时非常有用的一种很好的快速编程方法。
6.1.7 实例分析:Freeciv数据文件
Freeciv是一款受到Sid Meier经典的Civilization H启发而制作的开源策略游戏。在该游戏中,每个玩家从一群到处流浪的新石器游牧民开始缔造一个文明。玩家的文明可以探索并拓殖世界,参与战争,从事贸易和研究先进技术。有些玩家实际上可能是人工智能;和这些电脑玩家玩单机游戏很有挑战性。如果谁统治了整个世界,或者第一个研制出先进技术从而获得宇宙飞船飞往半人马座阿尔法星(Alpha Centauri),谁就是游戏的胜利者。源码和文档可以在处获得。
UNIX编程艺术豆瓣截图




bbs.theithome.com基础的重要性(程序员之路)
学习编程有几年了,感觉走了不少弯路,而不少的学弟学妹又在重蹈我当初的覆辙,不免有些痛心。最近在网
上也看了许多前辈们的经验建议,再结合自己的学习经历在这里谈谈基础的重要性,希望帮助大家少走些弯
路。
什么是基础呢?就是要把我们大学所学的离散数学,算法与数据结构,操作系统,计算机体系结构,编译原理
等课程学好,对计算机的体系,CPU本身,操作系统内核,系统平台,面向对象编程,程序的性能等要有深层次的掌握。
初学者可能体会不到这些基础的重要性,学习jsp,donet,mfc,vb的朋友甚至会对这些嗤之以鼻,但是一开始没学
好基础就去学jsp或donet会产生很坏的影响,而且陷入其中不能自拔。
我上大二的时候还对编程没什么概念,就上了门C++也不知道能干什么,老师说MFC也不知道是什么东西,看别的同学在学asp.net就跟着学了,然后就了解到.net,j2ee,php是什么了,就觉得软件开发就是用这些了,而上
的那些专业课又与我们学的sqlserver啊,css啊,ajax啊,毫无关系,就感慨啊,还不如回家自学去就为一个文凭吗?
还不如去培训,浪费这么多钱.于是天天基本上没去上什么课,天天就在做网站,几个学期就做了三个网站。感觉做
这些网站就是学到些技巧,没什么进步,这些技巧就好比别人的名字,告诉你你就知道了,网上也都可以搜到。那时
候就觉得把.net学好就行了,搞j2ee的比较难,搞api编程就别想了,操作系统更是望尘莫及了。后来随着学习
的深入和看了网上许多前辈们的建议才对这些基础的重要性有所体会。
虽然.net或java的开发并不直接用到汇编,操作系统这些,但是不掌握这些基础是有很大问题的,因为你只知
其然不知其所有然,在mfc和.net里面控件一拖什么都做好了,很方便,但是出了问题可能就解决不了,有些在
网上搜都搜不到。这就是基础没打好,不知道它的原理就不知道出错的原因。在学.net的时候常会讨论那些控件
该不该用别人说尽量别用也不知道为什么?不让用是因为你在高层开发,你不知道它的原理出错了你可能解决不
了,但其实是应该用的,不然人家开发它干嘛,但要在了解它的原理后去用就会很方便。
要编写出优秀的代码同样要扎实的基础,如果数据结构和算法学的不好,怎么对程序的性能进行优化,怎样
从类库中选择合适的数据结构。如果不了解操作系统,怎样能了解这些开发工具的原理,它们都是基于操作系统
的。不了解汇编,编译原理,怎么知道程序运行时要多长时间要多少内存,就不能编出高效的代码。
如果没有学好基础一开始就去学.net,java这些越往后就会觉得越吃力,它们涉及的技术太多了,而且不但
在更新,对于三层啊,mvc,orm这些架构,你只会用也不明白为什么用,就感觉心里虚,感觉没学好。而你把
面向对象,软件工程,设计模式这些基础学好了再去看这些就可以一不变应万变。
大家不要被新名词、新技术所迷惑.NET、XML等等技术固然诱人,可是如果自己的基础不扎实,就像是在
云里雾里行走一样,只能看到眼前,不能看到更远的地方。这些新鲜的技术掩盖了许多底层的原理,要想真正
的学习技术还是走下云端,扎扎实实的把基础知识学好,有了这些基础,要掌握那些新技术也就很容易了。
开始编程应该先学CC++,系统api编程,因为它们更接近底层,学习他们更能搞清楚原理。学好了cC++
编程和基础,再去学习mfc,.net这些就会比较轻松,而且很踏实。假设学习VB编程需要4个月,学习基础课程和
VC的程序设计需要1年。那么如果你先学VB,再来学习后者,时间不会减少,还是1年,而反过来,如果先学习
后者,再来学VB,也许你只需要1个星期就能学得非常熟练。
bbs.theithome.com教的表面看来是马步冲权实则都是内功心法,郭靖拜师洪七之后开始练习降龙十八掌凭借的就是这深厚的内
功,吞食蝮蛇宝血又加上练习了周博通传授的九阴真经和外加功夫双手互博技之后,终于练就行走江湖的武
功,由此可见马玉道长传授给了郭靖的是最基础的,也是最重要的观念,编程也好比盖高楼,根基没打好早晚有
一天会挎掉的,而且盖得越高,损失也越惨重。这些底层知识和课本不是没有用也不是高深的不能学,而是我
们必须掌握的基础。
这些是个人的愚见,说的不是很清楚,大家可以看看这些前辈们的经验,相信看完后大家一定会有所体会
说了这么多无非是想告诫大家要打好扎实的基础,不要只顾追求时髦的技术,打好基础再去学那些技术或是
参加些培训,对自身的发展会更好的。
基础这么重要怎样学好它呢?我觉得学好它们应该对照这些基础课程所涉及的方面,多看一些经典书籍,像算
法导论,编程珠玑,代码大全(具体介绍在本论坛每本书的版块里)等,这些经典书籍不仅能帮助我们打好基础,而且
对我们的程序人生也能产生莫大的影响,相信认真研究看完这些书籍后,我们的程序之路会十分顺畅。然而这
些书籍并不好读,有些甚至相当难读,国内的大学用这些书当教材的也不多,这些书又偏向理论,自己读起来难免会
有些枯燥无味。于是就想到建一个论坛,大家共同讨论学习这些书籍,就会学的更踏实更牢固更有趣,这样就能
为以后的学习打下扎实的基础。
1.为计算机初学者或基础不太扎实的朋友指明方向,要注重内功
2.为学习者推荐经典书籍,指明应看哪些书籍,怎样练内功
3.为学习者提供一个交流的地方,更容易学好,不会那么枯燥
4.对每本书分章分别讨论,更专,会学的更踏实更牢固
5.讨论的都是经典书籍,每一本都会让我们受益匪浅,对每本书分别讨论是很有意义的。
本论坛特色: bbs.theithome.com
的。为了方便大家阅读,我把这些前辈们的建议的文章整理成了pdf,大家在下面下载吧!希望对大家有帮助。pdf
地址:http:bbs.theithome.comread-htm-tid-123.html
编程就好比练功,如果学习.net,mfc,vb等具体的语言和工具是外功(招式),对基础的学习就是内功,只注重
招式而内功不扎实是不可能成为高手的。很多人会认为《射雕英雄传》中马玉道长什么都没有教郭靖,马道长
bbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.com ......
学习编程有几年了,感觉走了不少弯路,而不少的学弟学妹又在重蹈我当初的覆辙,不免有些痛心。最近在网
上也看了许多前辈们的经验建议,再结合自己的学习经历在这里谈谈基础的重要性,希望帮助大家少走些弯
路。
什么是基础呢?就是要把我们大学所学的离散数学,算法与数据结构,操作系统,计算机体系结构,编译原理
等课程学好,对计算机的体系,CPU本身,操作系统内核,系统平台,面向对象编程,程序的性能等要有深层次的掌握。
初学者可能体会不到这些基础的重要性,学习jsp,donet,mfc,vb的朋友甚至会对这些嗤之以鼻,但是一开始没学
好基础就去学jsp或donet会产生很坏的影响,而且陷入其中不能自拔。
我上大二的时候还对编程没什么概念,就上了门C++也不知道能干什么,老师说MFC也不知道是什么东西,看别的同学在学asp.net就跟着学了,然后就了解到.net,j2ee,php是什么了,就觉得软件开发就是用这些了,而上
的那些专业课又与我们学的sqlserver啊,css啊,ajax啊,毫无关系,就感慨啊,还不如回家自学去就为一个文凭吗?
还不如去培训,浪费这么多钱.于是天天基本上没去上什么课,天天就在做网站,几个学期就做了三个网站。感觉做
这些网站就是学到些技巧,没什么进步,这些技巧就好比别人的名字,告诉你你就知道了,网上也都可以搜到。那时
候就觉得把.net学好就行了,搞j2ee的比较难,搞api编程就别想了,操作系统更是望尘莫及了。后来随着学习
的深入和看了网上许多前辈们的建议才对这些基础的重要性有所体会。
虽然.net或java的开发并不直接用到汇编,操作系统这些,但是不掌握这些基础是有很大问题的,因为你只知
其然不知其所有然,在mfc和.net里面控件一拖什么都做好了,很方便,但是出了问题可能就解决不了,有些在
网上搜都搜不到。这就是基础没打好,不知道它的原理就不知道出错的原因。在学.net的时候常会讨论那些控件
该不该用别人说尽量别用也不知道为什么?不让用是因为你在高层开发,你不知道它的原理出错了你可能解决不
了,但其实是应该用的,不然人家开发它干嘛,但要在了解它的原理后去用就会很方便。
要编写出优秀的代码同样要扎实的基础,如果数据结构和算法学的不好,怎么对程序的性能进行优化,怎样
从类库中选择合适的数据结构。如果不了解操作系统,怎样能了解这些开发工具的原理,它们都是基于操作系统
的。不了解汇编,编译原理,怎么知道程序运行时要多长时间要多少内存,就不能编出高效的代码。
如果没有学好基础一开始就去学.net,java这些越往后就会觉得越吃力,它们涉及的技术太多了,而且不但
在更新,对于三层啊,mvc,orm这些架构,你只会用也不明白为什么用,就感觉心里虚,感觉没学好。而你把
面向对象,软件工程,设计模式这些基础学好了再去看这些就可以一不变应万变。
大家不要被新名词、新技术所迷惑.NET、XML等等技术固然诱人,可是如果自己的基础不扎实,就像是在
云里雾里行走一样,只能看到眼前,不能看到更远的地方。这些新鲜的技术掩盖了许多底层的原理,要想真正
的学习技术还是走下云端,扎扎实实的把基础知识学好,有了这些基础,要掌握那些新技术也就很容易了。
开始编程应该先学CC++,系统api编程,因为它们更接近底层,学习他们更能搞清楚原理。学好了cC++
编程和基础,再去学习mfc,.net这些就会比较轻松,而且很踏实。假设学习VB编程需要4个月,学习基础课程和
VC的程序设计需要1年。那么如果你先学VB,再来学习后者,时间不会减少,还是1年,而反过来,如果先学习
后者,再来学VB,也许你只需要1个星期就能学得非常熟练。
bbs.theithome.com教的表面看来是马步冲权实则都是内功心法,郭靖拜师洪七之后开始练习降龙十八掌凭借的就是这深厚的内
功,吞食蝮蛇宝血又加上练习了周博通传授的九阴真经和外加功夫双手互博技之后,终于练就行走江湖的武
功,由此可见马玉道长传授给了郭靖的是最基础的,也是最重要的观念,编程也好比盖高楼,根基没打好早晚有
一天会挎掉的,而且盖得越高,损失也越惨重。这些底层知识和课本不是没有用也不是高深的不能学,而是我
们必须掌握的基础。
这些是个人的愚见,说的不是很清楚,大家可以看看这些前辈们的经验,相信看完后大家一定会有所体会
说了这么多无非是想告诫大家要打好扎实的基础,不要只顾追求时髦的技术,打好基础再去学那些技术或是
参加些培训,对自身的发展会更好的。
基础这么重要怎样学好它呢?我觉得学好它们应该对照这些基础课程所涉及的方面,多看一些经典书籍,像算
法导论,编程珠玑,代码大全(具体介绍在本论坛每本书的版块里)等,这些经典书籍不仅能帮助我们打好基础,而且
对我们的程序人生也能产生莫大的影响,相信认真研究看完这些书籍后,我们的程序之路会十分顺畅。然而这
些书籍并不好读,有些甚至相当难读,国内的大学用这些书当教材的也不多,这些书又偏向理论,自己读起来难免会
有些枯燥无味。于是就想到建一个论坛,大家共同讨论学习这些书籍,就会学的更踏实更牢固更有趣,这样就能
为以后的学习打下扎实的基础。
1.为计算机初学者或基础不太扎实的朋友指明方向,要注重内功
2.为学习者推荐经典书籍,指明应看哪些书籍,怎样练内功
3.为学习者提供一个交流的地方,更容易学好,不会那么枯燥
4.对每本书分章分别讨论,更专,会学的更踏实更牢固
5.讨论的都是经典书籍,每一本都会让我们受益匪浅,对每本书分别讨论是很有意义的。
本论坛特色: bbs.theithome.com
的。为了方便大家阅读,我把这些前辈们的建议的文章整理成了pdf,大家在下面下载吧!希望对大家有帮助。pdf
地址:http:bbs.theithome.comread-htm-tid-123.html
编程就好比练功,如果学习.net,mfc,vb等具体的语言和工具是外功(招式),对基础的学习就是内功,只注重
招式而内功不扎实是不可能成为高手的。很多人会认为《射雕英雄传》中马玉道长什么都没有教郭靖,马道长
bbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.combbs.theithome.com ......
您现在查看是摘要介绍页, 详见PDF附件(29452KB,547页)。





