星期一, 十月 02, 2006

OUTWIT - Mozilla Firefox

[webnote]
[software] 
 
 

outwit dds

OUTWIT

Outwit

Outwit is a suite of tools based on the Unix tool design principles allowing the processing of Windows application data with sophisticated data manipulation pipelines. The outwit tools offer access to the Windows clipboard, the registry, the event log, relational databases, document properties, and shell links.

You can find a set of native Win32 ports of GNU utilities that you can use with outwit here.

The current version of outwit is 1.26.

The following pages do not contain navigation links. Use your browser's back button to return to this page.

Download (.zip files)

Documentation (HTML and PDF)

Diomidis Spinellis home page

(C) Copyright 1995-2004 D. Spinellis. May be freely uploaded by WWW viewers and similar programs. All other rights reserved.
Last modified: $Date: 2004/11/20 10:36:58 $

李开复:算法的力量

[webnote]
 
 
算法是计算机科学领域最重要的基石之一,但却受到了国内一些程序员的冷落。许多学生看到一些公司在招聘时要求的编程语言五花八门就产生了一种误解,认为学计算机就是学各种编程语言,或者认为,学习最新的语言、技术、标准就是最好的铺路方法。其实大家都被这些公司误导了。编程语言虽然该学,但是学习计算机算法和理论更重要,因为计算机算法和理论更重要,因为计算机语言和开发平台日新月异,但万变不离其宗的是那些算法和理论,例如数据结构、算法、编译原理、计算机体系结构、关系型数据库原理等等。在"开复学生网"上,有位同学生动地把这些基础课程比拟为"内功",把新的语言、技术、标准比拟为"外功"。整天赶时髦的人最后只懂得招式,没有功力,是不可能成为高手的。


算法与我

当我在1980年转入计算机科学系时,还没有多少人的专业方向是计算机科学。有许多其他系的人嘲笑我们说:"知道为什么只有你们系要加一个'科学 ',而没有'物理科学系'或'化学科学系'吗?因为人家是真的科学,不需要画蛇添足,而你们自己心虚,生怕不'科学',才这样欲盖弥彰。"其实,这点他们彻底弄错了。真正学懂计算机的人(不只是"编程匠")都对数学有相当的造诣,既能用科学家的严谨思维来求证,也能用工程师的务实手段来解决问题――而这种思维和手段的最佳演绎就是"算法"。

记得我读博时写的Othello对弈软件获得了世界冠军。当时,得第二名的人认为我是靠侥幸才打赢他,不服气地问我的程序平均每秒能搜索多少步棋,当他发现我的软件在搜索效率上比他快60多倍时,才彻底服输。为什么在同样的机器上,我可以多做60倍的工作呢?这是因为我用了一个最新的算法,能够把一个指数函数转换成四个近似的表,只要用常数时间就可得到近似的答案。在这个例子中,是否用对算法才是能否赢得世界冠军的关键。

还记得1988年贝尔实验室副总裁亲自来访问我的学校,目的就是为了想了解为什么他们的语音识别系统比我开发的慢几十倍,而且,在扩大至大词汇系统后,速度差异更有几百倍之多。他们虽然买了几台超级计算机,勉强让系统跑了起来,但这么贵的计算资源让他们的产品部门很反感,因为"昂贵"的技术是没有应用前景的。在与他们探讨的过程中,我惊讶地发现一个O(n*m)的动态规划(dynamic programming)居然被他们做成了O (n*n*m)。更惊讶的是,他们还为此发表了不少文章,甚至为自己的算法起了一个很特别的名字,并将算法提名到一个科学会议里,希望能得到大奖。当时,贝尔实验室的研究员当然绝顶聪明,但他们全都是学数学、物理或电机出身,从未学过计算机科学或算法,才犯了这么基本的错误。我想那些人以后再也不会嘲笑学计算机科学的人了吧!


网络时代的算法

有人也许会说:"今天计算机这么快,算法还重要吗?"其实永远不会有太快的计算机,因为我们总会想出新的应用。虽然在摩尔定律的作用下,计算机的计算能力每年都在飞快增长,价格也在不断下降。可我们不要忘记,需要处理的信息量更是呈指数级的增长。现在每人每天都会创造出大量数据(照片,视频,语音,文本等等)。日益先进的纪录和存储手段使我们每个人的信息量都在爆炸式的增长。互联网的信息流量和日志容量也在飞快增长。在科学研究方面,随着研究手段的进步,数据量更是达到了前所未有的程度。无论是三维图形、海量数据处理、机器学习、语音识别,都需要极大的计算量。在网络时代,越来越多的挑战需要靠卓越的算法来解决。

再举另一个网络时代的例子。在互联网和手机搜索,如果要找附近的咖啡店,那么搜索引擎该怎么处理这个请求呢?最简单的办法就是把整个城市的咖啡馆都找出来,然后计算出它们的所在位置与你之间的距离,再进行排序,然后返回最近的结果。但该如何计算距离呢?图论里有不少算法可以解决这个问题。

这么做也许是最直观的,但绝对不是最迅速的。如果一个城市只有为数不多的咖啡馆,那么这么做应该没什么问题,反正计算量不大。但如果一个城市里有很多咖啡馆,又有很多用户都需要类似的搜索,那么服务器所承受的压力就大多了。在这种情况下,我们该怎样优化算法呢?

首先,我们可以把整个城市的咖啡馆做一次"预处理"。比如,把一个城市分成若干个"格子(grid)",然后根据用户所在的位置把他放到某一个格子里,只对格子里的咖啡馆进行距离排序。

问题又来了,如果格子大小一样,那么绝大多数结果都可能出现在市中心的一个格子里,而郊区的格子里只有极少的结果。在这种情况下,我们应该把市中心多分出几个格子。更进一步,格子应该是一个"树结构",最顶层是一个大格――整个城市,然后逐层下降,格子越来越小,这样有利于用户进行精确搜索――如果在最底层的格子里搜索结果不多,用户可以逐级上升,放大搜索范围。

上述算法对咖啡馆的例子很实用,但是它具有通用性吗?答案是否定的。把咖啡馆抽象一下,它是一个"点",如果要搜索一个"面"该怎么办呢?比如,用户想去一个水库玩,而一个水库有好几个入口,那么哪一个离用户最近呢?这个时候,上述"树结构"就要改成"r-tree",因为树中间的每一个节点都是一个范围,一个有边界的范围(参考:http://www.cs.umd.edu/~hjs/rtrees/index.html)。

通过这个小例子,我们看到,应用程序的要求千变万化,很多时候需要把一个复杂的问题分解成若干简单的小问题,然后再选用合适的算法和数据结构。


并行算法:Google的核心优势

上面的例子在Google里就要算是小case了!每天Google的网站要处理十亿个以上的搜索,GMail要储存几千万用户的2G邮箱, Google Earth要让数十万用户同时在整个地球上遨游,并将合适的图片经过互联网提交给每个用户。如果没有好的算法,这些应用都无法成为现实。

在这些的应用中,哪怕是最基本的问题都会给传统的计算带来很大的挑战。例如,每天都有十亿以上的用户访问Google的网站,使用Google的服务,也产生很多很多的日志(Log)。因为Log每份每秒都在飞速增加,我们必须有聪明的办法来进行处理。我曾经在面试中问过关于如何对Log进行一些分析处理的问题,有很多面试者的回答虽然在逻辑上正确,但是实际应用中是几乎不可行的。按照它们的算法,即便用上几万台机器,我们的处理速度都根不上数据产生的速度。

那么Google是如何解决这些问题的?

首先,在网络时代,就算有最好的算法,也要能在并行计算的环境下执行。在Google的数据中心,我们使用的是超大的并行计算机。但传统的并行算法运行时,效率会在增加机器数量后迅速降低,也就是说,十台机器如果有五倍的效果,增加到一千台时也许就只有几十倍的效果。这种事半功倍的代价是没有哪家公司可以负担得起的。而且,在许多并行算法中,只要一个结点犯错误,所有计算都会前功尽弃。

那么Google是如何开发出既有效率又能容错的并行计算的呢?

Google最资深的计算机科学家Jeff Dean认识到,Google所需的绝大部分数据处理都可以归结为一个简单的并行算法:Map and Reduce(http://labs.google.com/papers/mapreduce.html)。这个算法能够在很多种计算中达到相当高的效率,而且是可扩展的(也就是说,一千台机器就算不能达到一千倍的效果,至少也可以达到几百倍的效果)。 Map and Reduce的另外一大特色是它可以利用大批廉价的机器组成功能强大的server farm。最后,它的容错性能异常出色,就算一个 server farm宕掉一半,整个fram依然能够运行。正是因为这个天才的认识,才有了Map and Reduce算法。借助该算法, Google几乎能无限地增加计算量,与日新月异的互联网应用一同成长。


算法并不局限于计算机和网络

举一个计算机领域外的例子:在高能物理研究方面,很多实验每秒钟都能几个TB的数据量。但因为处理能力和存储能力的不足,科学家不得不把绝大部分未经处理的数据丢弃掉。可大家要知道,新元素的信息很有可能就藏在我们来不及处理的数据里面。同样的,在其他任何领域里,算法可以改变人类的生活。例如人类基因的研究,就可能因为算法而发明新的医疗方式。在国家安全领域,有效的算法可能避免下一个911的发生。在气象方面,算法可以更好地预测未来天灾的发生,以拯救生命。

所以,如果你把计算机的发展放到应用和数据飞速增长的大环境下,你一定会发现;算法的重要性不是在日益减小,而是在日益加强。

引用地址:http://www.yuanma.org/data/2006/0623/article_929.htm



Trackback: http://tb.donews.net/TrackBack.aspx?PostId=1051566

周星驰“绿叶”大全

[webnote]
[movie] 
 
周星驰"绿叶"大全    [转贴 2006-09-28 10:06:38 | 发表者: 风中雨露]   


吴孟达

所谓"戏骨"是指那些演戏基本已经达到戏我两忘,人戏合一之境界的演员们,有句话常来形容这样一种人,说他们"浑身上下都是戏"。周星驰电影中的"戏骨"则以吴孟达为其中的杰出代表。吴孟达,1953年1月2日出生,祖籍福建省厦门,1971年,考进无线电视台第三期艺员训练班,从此开始其演艺生涯。不需要任何统计,亦可肯定吴孟达在周星驰作品里拥有无数个记录,譬如出镜率最高的配角、合作时间最久的演员、最具知名度的绿叶等等。他与周星驰最早的合作要追溯到1983年版的《射雕英雄传》,其中周星驰饰演了一名"宋兵乙",即一出场即被杀掉的那种龙套,而吴孟达当时的待遇要比他好一点点,出演一个稍有戏份的丐帮"彭长老"。

自打《赌圣》开始,吴孟达就成为周星驰身边不可或缺的超级绿叶,亦是含金量最高的搭档。你可以说他是永远的配角,也可以称他为周星驰身边的超级大龙套。一旦离开周星驰,吴孟达亦都很难迸发出不一样的光芒。起码在这两年,他基本上没有演出过任何一个让人印象深刻的角色。有记者曾经让周星驰形容一下生活中的吴孟达,周星驰说:"他其实是很孤独的。"这一点,尤其与周星驰本人相似。


陈百祥

别名"阿叻"的陈百祥出身自乐队Loosers(前身是温拿乐队),后来成为香港著名的节目主持人。《漫画威龙》是他与周星驰合作的第一部电影,随后在《鹿鼎记》中他是与韦小宝烧黄纸的把兄弟多隆,在《唐伯虎点秋香》他则是妙趣横生的祝枝山。他还在《武状元苏乞儿》、《龙过鸡年》中充当友情客串。也有人将他排在吴孟达之后,称为"周星驰身边二号绿叶"。


葛民辉

大名鼎鼎的香港另类演唱组合"软硬天师"的成员。《行运一条龙》里的他尚可算是有为上进,《算死草》中他则是冤大头兼幸运儿的何欢。作为一个有追求的艺术青年,他还执导过好几部不知所云的实验电影,例如《四面夏娃》、《龙火》、《初缠绵后之二人世界》等。

 


黄秋生

黄秋生唯一一次在周星驰电影中出演的人物,就是《济公》中一身大疮的九世乞丐朱大种。这两年黄秋生经常演一些很酷的角色,几乎让人忘记了原来他也是很会搞笑的。


罗家英

粤剧名伶,八岁即开始戏曲演出,1973年正式担纲,演出《蟠龙令》,自此参与不少大戏。他以《大话西游》里的唐僧、《国产零零漆》中的达文西最为内地观众熟知。他曾凭借《我爱厨房》的演出获得过香港电影金像奖最佳男配角的提名。


钟镇涛

被称为"阿B"的钟镇涛与陈百祥一样,最初也是温拿乐队的成员之一。从八十年代开始,他在电影中常常以老实正直的傻小子形象示人(代表作《表错七日情》、《上海之夜》等),被香港影评人石琪称为"在港台影坛绝无仅有"。在周星驰电影《新精武门》和《漫画威龙》中,他所扮演的潇洒哥,同样也是无人可以取代的经典人物。


梁家仁

作为七十年代末出道的功夫明星,他曾在许多电影中扮演过英雄人物。但是在周星驰的电影中他却只能演一些类似二百五的角色,以衬托周的英明神武(他与周星驰最早的合作是无线电视剧《�I仔�I心肝》)。《龙的传人》里他是周星驰的师叔毛仁性――听听这个名字就知道是什么货色;在《唐伯虎点秋香》里,他是卤莽的武状元。他还在《逃学威龙之龙过鸡年》,《审死官》中有过出色演出。


苑琼丹

她曾在《唐伯虎点秋香》出演过"风华绝代的石榴姐",但她给人最深刻的印象则是"老鸨又是我",在《九品芝麻官》以及《大内密探零零发》中她均以老鸨形象示人,以至于被影迷称为"老鸨专业户"。作为无线电视台的基本演员,她在电视剧中的形象要丰富得多。


张达明

虽然个头儿不高,可他被称为香港最具有演技实力的几个人之一。张达明曾经做过编剧,教过人演戏,还在电台作过DJ,身份十分复杂。在《大内密探零零发》中,他饰演霉运当头的皇帝,当他面对那群如狼似虎的后宫"佳丽"时,所流露出悲怆的表情尤其让人绝倒。


秦沛

本名严昌,又名姜昌年,出生于演艺世家,秦沛是他的艺名,由大导演李翰祥所赐。弟弟姜大卫、尔冬升均是香港电影中的出色演员和导演。秦沛的经典角色很多,曾两获香港电影金像奖最佳男配角称号。在周星驰电影《赌圣》中,他饰演赌术高明的洪爷。在《审死官》中他饰演"官官相互"的八府巡按。


夏萍

因与外国明星柯德莉・夏萍(内地译名为奥黛丽・赫本)同名,她的名字常被香港演艺圈拿来戏谑。她其实是香港资深的老演员,参与过影视剧不计其数。在《九品芝麻官》里,她饰演包龙星的老妈,在关键时刻送上"尚方宝剑"一把。2005年在TVB台庆晚会上,夏萍击败汪明荃获得TVB万千光辉演艺大奖(相当于终身成就奖)。


谷峰

邵氏电影时期的百搭配角,曾多次在李翰祥、张彻等导演的电影中充当重要角色。他曾以李翰祥执导的《武松》中饰演武大郎获得金马奖最佳男配角奖。在《九品芝麻官》里,他扮演反派常威的老爸,果真是老而弥"奸"。


薛家燕

原名薛家彦,九岁开始拍电影,六十年代粤语片鼎盛时期,她是著名的银幕"七公主"之一;1996年婚姻失败,她凭着无线电视连续剧《真情》中"好姨"一角东山再起;同年,她出演周星驰电影《食神》,以夸张的肢体语言和生动的表情给观众留下深刻了的印象。


黄韵诗

黄韵诗的演技风格独特,连《金枝欲孽》中的"如妃"邓萃雯也称自己曾偷师于她。香港专栏作家林燕妮曾专门为她撰文,称其为"大胆癫"和"细腻演"。在《赌侠II之上海滩赌圣》里她演出的川岛芳子便是这个特点。


吴启华

他虽然在电视圈发展很风光,然而在电影界总是难如人意。在《九品芝麻官》他演包龙星的对头――广州第一状师方唐镜,他在其中相当嚣张,"怎么样怎么样怎么样,打我啊,笨蛋。"当然,"像这种要求我这辈子都没见过。"吴孟达在对其一顿暴扁之后撂下这么一句话。


朱咪咪

如果说苑琼丹是老鸨专业户,那么朱咪咪就得算是奶妈专业户了,虽然在《唐伯虎点秋香》里她被扶正做了周星驰的老妈,但是她在《审死官》里的奶妈形象基本成为了这一角色的标准,以至于她后来在电视剧中也多次出演奶妈这一角色。朱咪咪还有个歌星的身份――唱片主要销往她的老家,马来西亚。


林雪

从开场时的霸气十足,到猪笼城寨被莫名爆竹引爆,林雪在不动声色之间已经令人拍案叫绝。熟悉港片的人大都通过杜琪峰电影认识到他。剧务出身的他曾经在片场里做过无数行当:场务、道具、灯光、机工、制片……但他偏却对演戏情有独钟,从《破坏之王》里惊鸿一瞥的龙套,到两度获提名最佳男配角(《枪火》及《PTU》),林雪的经历堪比《喜剧之王》更加传奇和曲折。


元华

在《九品芝麻官》中,皇帝封京门捕头"豹子头"为"高手高手高高手",这表明用一个"高手"这样的名字,都不足以形容这些厉害角色们。他们往往并不是以演技出众而闻名,而以另一种特长达到炉火纯青的地步而得到这一美名。其中的代表人物是元华。  元华七岁便跟随于占元师傅学艺,是"七小福"成员之一,多年来一直从事武指工作。而一手发掘元华作幕前演出的,是他的大师兄洪金宝。《东方秃鹰》是他最早的一部给观众留下深刻印象的作品。在与周星驰的合作中,元华亦都有着不俗的表现,比如《龙的传人》里的土地主"大澳周飞鸿"、《漫画威龙》中的大反派、《情圣》里的神经大哥等等。在周星驰最新作品《功夫》中,元华出演神藏不露的高手包租公,获得香港电影金像奖最佳男配角奖。


郑佩佩

六十年代她因出演胡金铨电影《大醉侠》而成为著名的银幕侠女,《卧虎藏龙》里的碧眼狐狸令她再度声名大噪。在《唐伯虎点秋香》里,她是那位与周星驰一路掐到"顶多不笑不走路"的华夫人。


元秋

早年拜在于占元师傅门下学戏的元秋,跟成龙一样是山东人,按辈分算还是洪金宝的师姐。年轻时,元秋同其他武行一样担任过替身演员,偶尔也会在幕前出演。1980年,元秋退出银幕,一心在家相夫教子。但是这场婚姻并未能维持太久。2003年她又被周星驰重新挖掘出来,出演《功夫》中包租婆一角,获得了第42届台湾电影金马奖最佳女配角奖。


徐锦江

美术大师关山月的关门弟子,在八十年代到香港后被麦当雄导演赏识,以《省港旗兵续集》入行,后来曾经拍摄过多部我该死。他在《九品芝麻官》扮演的豹子头则勇猛得很,在《百变星君》中他扮演那个疯狂的爱因斯坦式的教授。


黄一飞

黄一飞十六岁即进入戏班跑龙套,先后曾混迹于多家电视台。凭借《少林足球》中出位的大师兄,他获得了2002年香港电影金像奖以及金紫荆奖的最佳男配角奖,他在许多周星驰电影中都常有客串:在《大内密探零零发》中他饰白云城主叶孤城;在《国产零零漆》中饰死囚;《百变星君》中饰星君老爸;《破坏之王》中饰茶餐厅老板;《审死官》中饰阿福;《九品芝麻官之白面包青天》中饰七品县官等。

 来源:腾讯文艺论坛



标签:   一些资料  

票数:0
我顶什么是"我顶"?
【发起辩论】  [手机订阅]  [收藏到我的网摘] [推荐] | [评论] | [投诉] | [打印] 本文章被推荐到了0个圈子
点击数: 26
评论数: 1

本文章引用通告地址(TrackBack Ping URL)为:
http://post.blog.hexun.com/byj0301/trackback.aspx?articleid=5804649
本文章尚未被引用。

The Invention of C++

[webnote]
 
 

Before reading, you should realize that this is totally fictitious and not to be taken seriously.

On the 1st of January, 1998, Bjarne Stroustrup gave an interview to the IEEE's 'Computer' magazine. Naturally, the editors thought he would be giving a retrospective view of seven years of object-oriented design, using the language he created. By the end of the interview, the interviewer got more than he had bargained for and, subsequently, the editor decided to suppress its contents, 'for the good of the industry' but, as with many of these things, there was a leak. Here is a complete transcript of what was said, unedited, and unrehearsed, so it isn't as neat as planned interviews. You will find it interesting...

Interviewer:

Well, it's been a few years since you changed theworld of
software design.How does it feel, looking back?

Stroustrup:

Actually, I was thinking about those days, just before you
arrived.Do you remember?Everyone was writing 'C' and,
the trouble was, they were pretty damn good at it.
Universities got pretty good at teaching it, too.They were
turning out competent - I stress the word 'competent' -
graduates at a phenomenal rate.That's what caused the
problem.

Interviewer:

Problem?

Stroustrup:

Yes, problem.Remember when everyone wrote COBOL?

Interviewer:

Of course, I did, too.

Stroustrup:

Well, in the beginning, these guys were like
demi-gods.Their salaries were high, and they
were treated like royalty.

Interviewer:

Those were the days, eh?

Stroustrup:

Right.So what happened?IBM got sick of it,
and invested millions in training programmers, till
they were a dime a dozen.

Interviewer:

That's why I got out.Salaries dropped within a
year, to the point where being a journalist actually
paid better.

Stroustrup:

Exactly.Well, the same happened with 'C' programmers.

Interviewer:I see, but what's the point?

Stroustrup:

Well, one day, when I was sitting in my office, I
thought of this little scheme, which would redress
the balance a little.I thought 'I wonder what
would happen, if there were a language so complicated,
so difficult to learn, that nobody would ever be able
to swamp the market with programmers?

Actually, I got some of the ideas from X10, you know,
X windows.That was such a bitch of a graphics system,
that it only just ran on those Sun 3/60 things.They
had all the ingredients for what I wanted.A really
ridiculously complex syntax, obscure functions, and
pseudo-OO structure.Even now, nobody writes raw X-windows
code.Motif is the only way to go if you want to retain
your sanity.

Interviewer:

You're kidding...?

Stroustrup:

Not a bit of it.In fact, there was another problem.
Unix was written in 'C', which meant that any 'C'
programmer could very easily become a systems programmer.
Remember what a mainframe systems programmer used to earn?

Interviewer:

You bet I do, that's what I used to do.

Stroustrup:

OK, so this new language had to divorce itself from Unix,
by hiding all the system calls that bound the two together
so nicely.This would enable guys who only knew about DOS
to earn a decent living too.

Interviewer:

I don't believe you said that...

Stroustrup:

Well, it's been long enough, now, and I believe most people
have figured out for themselves that C++ is a waste of time but,
I must say, it's taken them a lot longer than I thought it would.

Interviewer:

So how exactly did you do it?

Stroustrup:

It was only supposed to be a joke, I never thought people would
take the book seriously. Anyone with half a brain can see that
object-oriented programming is counter-intuitive, illogical and
inefficient.

Interviewer:

What?

Stroustrup:

And as for 're-useable code' --- when did you ever hear of a
company re-using its code?

Interviewer:

Well, never, actually, but...

Stroustrup:

There you are then.Mind you, a few tried, in the early days.
There was this Oregon company --- Mentor Graphics, I think they
were called --- really caught a cold trying to rewrite everything
in C++ in about '90 or '91.I felt sorry for them really, but
I thought people would learn from their mistakes.

Interviewer:

Obviously, they didn't?

Stroustrup:

Not in the slightest.Trouble is, most companies hush-up all
their major blunders, and explaining a $30 million loss to the
shareholders would have been difficult.Give them their due,
though, they made it work in the end.

Interviewer:

They did?Well, there you are then, it proves O-O works.

Stroustrup:

Well, almost.The executable was so huge, it took five minutes
to load, on an HP workstation, with 128MB of RAM.Then it ran
like molasses. Actually, I thought this would be a major
stumbling-block, and I'd get found out within a week, but nobody
cared.Sun and HP were only too glad to sell enormously powerful
boxes, with huge resources just to run trivial programs.You
know, when we had our first C++ compiler, at AT&T, I compiled
'Hello World', and couldn't believe the size of the executable:
2.1MB

Interviewer:

What?Well, compilers have come a long way, since then.

Stroustrup:

They have?Try it on the latest version of g++ - you won't get
much change out of half a megabyte. Also, there are several quite
recent examples for you, from all over the world.British Tele-
com had a major disaster on their hands but, luckily, managed to
scrap thewhole thing and start again. They were luckier than
Australian Telecom.

Now I hear that Siemens is building a dinosaur, and getting more
and more worried as the size of the hardware gets bigger, to
accommodate the executables.Isn't multiple inheritance a joy?

Interviewer:

Yes, but C++ is basically a sound language.

Stroustrup:

You really believe that, don't you?Have you ever sat down and
worked on a C++ project?Here's what happens: First, I've put
in enough pitfalls to make sure that only the most trivial proj-
ects will work first time.Take operator overloading.At the
end of the project, almost every module has it, usually, because
guys feel they really should do it, as it was in their training
course.The same operator then means something totally different
in every module.Try pulling that lot together, when you have a
hundred or so modules.And as for data hiding, God, I sometimes
can't help laughing when I hear about the problems companies
have making their modules talk to each other.

I think the word 'synergistic' was specially invented to twist
the knife in a project manager's ribs.

Interviewer:

I have to say, I'm beginning to be quite appalled at all this.
You say you did it to raise programmers' salaries?That's ob-
scene.

Stroustrup:

Not really.Everyone has a choice.I didn't expect the thing to
get so much out of hand. Anyway, I basically succeeded.C++ is
dying off now, but programmers still get high salaries, especial-
ly those poor devils who have to maintain all this crap.You do
realise, it's impossible to maintain a large C++ software module
if you didn't actually write it?

Interviewer:

How come?

Stroustrup:

You are out of touch, aren't you?Remember the typedef?

Interviewer:

Yes, of course.

Stroustrup:

Remember how long it took to grope through the header files only
to find that 'RoofRaised' was a double precision number?Well,
imagine how long it takes to find all the implicit typedefs in
all the Classes in a major project.

Interviewer:

So how do you reckon you've succeeded?

Stroustrup:

The universities haven't been teaching 'C' for such a long time,
there's now a shortage of decent 'C' programmers.Especially
those who know anything about Unix systems programming. How many
guys would know what to do with 'malloc', when they've used 'new'
all these years and never bothered to check the return code. In
fact, most C++ programmers throw away their return codes.What-
ever happened to good ol' '-1'?At least you knew you had an
error, without bogging the thing down in all that 'throw' 'catch'
'try' stuff.

Interviewer:

But, surely, inheritance does save a lot of time?

Stroustrup:

Does it?Have you ever noticed the differencebetween a 'C'
project plan, and a C++ project plan?The planning stage for
a C++ project is three times as long.Precisely to make sure
that everything which should be inherited is, and what shouldn't
isn't.Then, they still get it wrong. Whoever heard of memory
leaks in a 'C' program? Now finding them is a major industry.
Most companies give up, and send the product out, knowing it
leaks like a sieve, simply to avoid the expense of tracking them
all down.

Interviewer:

There are tools....

Stroustrup:

...Most of which were written in C++.

Interviewer:

If we publish this, you'll probably get lynched, you do realise
that?

Stroustrup:

I doubt it.As I said, C++ is way past its peak now, and no
company in its right mind would start a C++ project without a
pilot trial. That should convince them that it's the road to
disaster.If not, they deserve all they get.You know, I tried
to convince Dennis Ritchie to rewrite Unix in C++.

Interviewer:

Oh my God.What did he say?

Stroustrup:

Well, luckily, he has a good sense of humor.I think both he
and Brian figured out what I was doing, in the early days, but
never let on.He said he'd help me write a C++ version of DOS,
if I was interested.

Interviewer:

Were you?

Stroustrup:

Actually, I did write DOS in C++, I'll give you a demo when
we're through.I have it running on a Sparc 20 in the computer
room.Goes like a rocket on 4 CPU's, and only takes up 70 megs
of disk.

Interviewer:

What's it like on a PC?

Stroustrup:

Now you're kidding.Haven't you ever seen Windows '95?I think
of that as my biggest success.Nearly blew the game before I was
ready, though.

Interviewer:

You know, that idea of a Unix++ has really got me thinking.
Somewhere out there, there's a guy going to try it.

Stroustrup:

Not after they read this interview.

Interviewer:

I'm sorry, but I don't see us being able to publish any of this.

Stroustrup:

But it's the story of the century.I only want to be remembered
by my fellow programmers, for what I've done for them.You know
how much a C++ guy can get these days?

Interviewer:

Last I heard, a really top guy is worth $80 - $90 an hour.

Stroustrup:

See?And I bet he earns it.Keeping track of all the gotchas I
put into C++ is no easy job. And, as I said before, every C++
programmer feels bound by some mystic promise to use every damn
element of the language on every project. Actually, that really
annoys me sometimes, even though it serves my original purpose.
I almost like the language after all this time.

Interviewer:

You mean you didn't before?

Stroustrup:

Hated it.It even looks clumsy, don't you agree?But when the
book royalties started to come in... well, you get the picture.

Interviewer:

Just a minute.What about references?You must admit, you
improved on 'C' pointers.

Stroustrup:

Hmm.I've always wondered about that.Originally, I thought I
had.Then, one day I was discussing this with a guy who'd written
C++ from the beginning.He said he could never remember whether
his variables were referenced or dereferenced, so he always used
pointers.He said the little asterisk always reminded him.

Interviewer:

Well, at this point, I usually say 'thank you very much' but it
hardly seems adequate.

Stroustrup:

Promise me you'll publish this.My conscience is getting the
better of me these days.

Interviewer:

I'll let you know, but I think I know what my editor will say.

Stroustrup:

Who'd believe it anyway?Although, can you send me a copy of that
tape?

Interviewer:

I can do that.

Last edited by EndIf (Yesterday 03:10 PM)

测试一下你的杀毒软件是什么等级

[webnote]
[software] 
 
  以下内容转自SAG's BLOG,个人测试过后觉得值得推荐!
  

  这段由欧洲防病毒协会提供的代码绝对值得大家一试:看看你杀毒软件的能力吧!
  测试方法:
  1.鼠标右键点击桌面空白处,创建一个"文本文档"。
  2.将下面这段测试代码复制到"文本"里,保存,然后可以直接右键点击这个文本,用杀毒软件扫描,也可以等一会,如果你的杀毒软件还行,会自动报毒并将该文本删除,那就可以初步放心了。
X5O!P%@AP[4\PZX54(P^)7CC)7}$EICAR-STANDARD-ANTIVIRUS-TEST-FILE!$H+H*
  测试原理:
  该段代码是欧洲计算机防病毒协会开发的一种病毒代码,其中的特征码已经包含在各种杀毒软件的病毒代码库里,所以可以用做测试病毒扫描引擎。
  测试等级:
  特等:复制完代码后便提示内存有病毒
  优等:刚保存完就提示病毒(或者直接删除)
  中等:保存后几秒提示病毒(或者直接删除)
  下等:需自己启动病毒扫描查杀才提示病毒(或者直接删除)
  劣等:无论怎么扫描都无法提示病毒(或者直接删除)
  请大家测试完后在评论里说下自己用的什么杀毒软件以及排什么等级,那这篇文就好似中文杀毒软件评测文章了,也可以惠及更多的网友了。

How To Write a Good Howto

[webnote]
 
 

How To Write a Good Howto

Howtos are always useful, no matter the subject they are about. Whether you are trying to contribute to an Open Source project or to attract traffic to your blog howtos can make the things done.

I wrote this list of things to keep in mind while writing a howto based on the howto definition from Wikipedia and my own experience reading howtos
  1. Try to keep it short
    • Be specific. Howtos are supposed to be a guide to complete some specific task so don't discuss other topics, even if they are related. This take us to the next point
    • Leave irrelevant details for appendices or another document. Details tend to distract the reader
    • Divide it in several files if it has to be long and for online reading

  2. Make it easy to read
    • Be informal. Imagine your reader in front of you
    • Highlight important information. Many readers just scan the document looking for a specific piece of information
    • Summarize and categorize. This not only helps your reader to find what they're looking for faster, but helps you to organize your ideas while writing too
    • Use list and sections. This helps you to achieve the previous point. The entire howto can be a list if you're writing about a simple subject (like this)

  3. Use visual resources
    • Use images or videos. They can save you a lot of words, but use them sparingly because there are a lot of people using slow connections. However, video howtos may be the best choice for some complex tasks.

  4. Keep it simple. Maybe the most important point and summarizes all previous things. Howtos are intended to make things clearer, after all
    • Use technical terms only when it is necessary
    • Build a glossary of technical terms or link them to a wiki page that explain it
Finally, if you're writing rather formal linux related howto give a try to this HOWTO Generator, it can save you some work.

Have other tips? Please share them with us in your comments. I'm not an expert and this list is not intended to be complete.

Technorati tags: , , , , , ,

google站内搜索

Google