DBGCOOL

debugging seems to be cool, doesn't it?

Browsing Posts published by Lionel

The Economic Naturalist

Details

Name: The Economic Naturalist: In Search of Explanations for Everyday Enigmas
Publisher: Basic Books
Release Date: May 21, 2007
Author: Robert H. Frank

书名:牛奶可乐经济学——最妙趣横生的经济学课堂
出版社:中国人民大学出版社
出版日期:2008年3月(晚1年)
译者:闾佳

Review

我对经济学并没有什么研究,也一直没有对经济学产生浓厚兴趣。但是这本书简直是太好了!妙趣横生以生活中的小事为例,介绍了很多经济学的知识,让我大开眼界。这本书可算是深深的吸引了我,看完后我最大的收获就是,要多注意生活得细节,细节决定成败!

生活中好多东西大家都已经习以为常了,例如装牛奶的大多都是方形纸盒,而可乐却放在圆形塑料瓶里,有人想过为什么吗?24小时便利店后半夜明明不赚钱,为何还要通宵营业呢?这些看似简单的问题,背后却隐藏着经济学的知识。这本书中文名字起的非常好,叫牛奶可乐经济学,很符合这本书的特色。相比较而言,英文名字则显得不那么浅显了。

这本书我买了有一年多了,中间由于各种原因一直没看。今天终于看完啦,上网一搜,发现这本书已经出到第三卷了。强烈推荐大家!

Refactoring

Details

Name: Refactoring: Improving the Design of Existing Code
Publisher: Addison-Wesley Professional
Release Date: July 8, 1999
Author: Martin Fowler, Kent Beck, John Brant, William Opdyke, Don Roberts

书名:重构——改善既有代码的设计
出版社:中国电力出版社
出版日期:2003年8月(晚4年)
译者:熊节

Review

早在2005年,刚工作不久,就见同事抱着这本书在看。当时我看的书大多还是Windows或者C++相关的,所以觉得重构是比较深奥的事情。直到后来看完了设计模式,才自然而然的看重构。看完重构后也证实了我看书的流程是正确的,好多重构的方法最终都是以模式为目标的。

遗憾的是,对于C++来说,没有太好的支持重构的工具,只能手动重构。Visual Studio 2010支持对C#的重构,Eclipse支持对Java的重构,虽然Eclipse也支持C++的重构,但貌似支持的也不太好。

看完重构这本书,你并不会成为重构大师,只能说是入了门了,因为重构这本书提到的60来个重构方法都是比较简单的,而且往往都是正反成对出现的,例如:

  • Extrace Method <-> Inline Method
  • Extract Class <-> Inline Class
  • Hide Delegate <-> Remove Middle Man
  • Change Value to Reference <-> Change Reference to Value
  • Change Unidirectional Association to Bidirectional
  • Change Bidirectional Association to Unidirectional
  • Add Parameter <-> Remove Parameter
  • Parameterize Method <-> Replace Parameter with Explicit Methods
  • Pull Up Field <-> Push Down Field
  • Pull Up Method <-> Push Down Method
  • Replace Inheritance with Delegation <-> Replace Delegation with Inheritance

在工作当中,具体如何处理还要具体问题具体分析了。跟设计模式一样,看完了只会入门。要想熟练应用,还是要经过长期的磨练和经验积累的。

(Originally posted on the official Google blog.)

We have always pursued innovative projects because we want to drive breakthroughs in computer science that dramatically improve our users’ lives. Last year at Google I/O, when we launched our developer preview of Google Wave, a web app for real time communication and collaboration, it set a high bar for what was possible in a web browser. We showed character-by-character live typing, and the ability to drag-and-drop files from the desktop, even “playback” the history of changes—all within a browser. Developers in the audience stood and cheered. Some even waved their laptops.

We were equally jazzed about Google Wave internally, even though we weren’t quite sure how users would respond to this radically different kind of communication. The use cases we’ve seen show the power of this technology: sharing images and other media in real time; improving spell-checking by understanding not just an individual word, but also the context of each word; and enabling third-party developers to build new tools like consumer gadgets for travel, or robots to check code.

But despite these wins, and numerous loyal fans, Wave has not seen the user adoption we would have liked. We don’t plan to continue developing Wave as a standalone product, but we will maintain the site at least through the end of the year and extend the technology for use in other Google projects. The central parts of the code, as well as the protocols that have driven many of Wave’s innovations, like drag-and-drop and character-by-character live typing, are already available as open source, so customers and partners can continue the innovation we began. In addition, we will work on tools so that users can easily “liberate” their content from Wave.

Wave has taught us a lot, and we are proud of the team for the ways in which they have pushed the boundaries of computer science. We are excited about what they will develop next as we continue to create innovations with the potential to advance technology and the wider web.

目前国内各大院校使用的BBS系统,大多是1997年前后从台湾传入大陆的Firebird系统。该系统最早在1990年左右,由Mississippi State University的同学们开发的,原名叫Pirate BBS。这是一种原始的BBS系统,每个连接占用一个TTY终端,所以可以同时在线的人数非常有限。后来在1992年,该系统又被The University of Southern Mississippi大学改为Eagles BBS。这两种BBS都是英文系统,几乎不支持中文。一直到1996年左右,才被台湾国立中正大学汉化,并更名为Firebird BBS,同时也加入了daemon守护进程的支持。

自从1997年BBS系统传入大陆开始,各大院校先后搭建BBS服务器。BBS在线人数也不断超过3000,超过10000,不断创造在线人数新高。南京大学更是开发了njuweb系统,使大家可以通过web浏览器登录BBS系统,查看帖子。在2000年后,BBS系统风靡全国,达到顶峰。BBS系统虽然经过各大院校的不断优化和改造,发展出很多分支,但其核心技术和原型毕竟还是90年代的产物,相对较为原始。

2004年,Facebook的上线标识着新一代的社交网络的开始。Facebook同样出自校园,是由哈佛大学的Mark Zuckerberg同学开发。该系统已经不仅是电子公告板,更增加了很多互动的元素。可以说目前各大院校使用的BBS与Facebook这种模式各有利弊,前者侧重信息共享,以文字为主。后者侧重互动,可以一起游戏、关注好友动态。如果哪个学校可以开发出一套结合二者的系统,或者说可以在现有系统上增加一些互动的元素,那一定可以引领BBS接下来的10年。国内BBS发展慢,通过看BBS的代码可以发现,目前BBS的代码质量不高,Bug很多,系统维护大多是本科生或硕士研究生。本科生刚开始接触C/C++,刚开始接触Linux,刚开始接触网络编程,所以无法写出太高质量的代码。而硕士往往时间有限,没有太多精力维护代码。博士?博士维护BBS系统的人就更少了。

10年后各大院校的BBS会有什么样的发展呢?让我们一起拭目以待吧。

白酒喝多了伤身容易得酒精肝;啤酒喝多了涨肚容易啤酒肚;红酒?更像是给老年人舒筋活血,或者是烛光晚餐时两个人喝的。所以,平时没事我更喜欢喝些预调酒,或者是少量烈酒加冰块。可是,国内可以买到的预调酒品牌少,价格贵,天天喝喝不起。

国内最常见的牌子应该是Bacardi公司的Breezer,还有RIO,此外还有前几天同学推荐的稍微便宜一些的麒麟冰结,今天刚刚尝了另外一个牌子Briska Cider

这些进口的牌子一瓶350ml左右的都要10元左右,为什么国内公司不生产自己的牌子呢?如果可以卖到5元以下,买的人肯定很多。

Breezers

Breezers