Posts

喵喵埋伏在袋子里

Image

The Mysterious Autoconnect

I recently noticed something mysterious about my N73. Whenever there was an active voice call, whether incoming or outgoing, a data connection was established at the same time. Hang up the voice call, the data connection also went away. A natural initial diagnosis was that some virus or Trojan horse or spyware or malware was trying to phone home. But Connection Manager showed that the connection was completely idle without any data traffic at all. Tasky shows that whenever a voice call is made, a new sipprofilesrv.exe is also created. So it seems to be related to SIP . Indeed, I have a unregistered SIP profile with a valid access point under my SIP settings. Deleting the profile solves the problem.

Catch me if you can ...

Image

Debugging Trac

After a series of upgrading on my PowerBook: Trac 0.9.6 to 0.11dev Python 2.4 to 2.5 Subversion 1.3.2 to 1.4.2 SQLite 2.8.x to 3.3.5 my Trac stopped working. The tracd that comes with Trac works fine, but mod_python under Apache 2.0.58 reports a serious problem: [Thu Feb 01 08:49:14 2007] [notice] child pid 388 exit signal Segmentation fault (11) My Trac database has been upgraded to SQLite 3. I've also recompiled mod_python a few times, with different options each time. Still Segmentation fault. As a last resort, I inserted a bunch of apache.log_error into Trac source code to nail down the line at fault: cnx = sqlite.connect(path, detect_types=sqlite.PARSE_DECLTYPES, check_same_thread=sqlite_version < 30301, timeout=timeout) which is located at SQLiteConnection.__init__ in trac/db/sqlite_backend.py . This is how sqlite got imported: try: import pysqlite2.dbapi2 as sqlite ha...

《五常学经济》

Image
前不久在香港兰桂坊附近的三联购得张五常的文集《五常学经济》。全书的重点是追述其负笈北美的经历,共三章《第二章:老师的启发-艾智仁》《第三章:老师的启发-赫舒拉发》以及《第四章:佃农理论的前因后果》。另有一篇童年回忆《第一章:求学奇遇记》,一篇演讲《第六章:经济学要怎样学才对》,一篇自述《第五章:七十自述:我是怎样研究经济的》,和一篇人物回忆《附录:米尔顿・佛利民》。张的文字虽然诘曲聱牙,经历却生动有趣,多可借鉴,尤其是他的童年。北美几篇描述求学生活的同时也发掘其经济思想的起源。有两篇内容上稍有重复,应该是文章结集的结果。第六章对张的经济思想有精彩的宏观表述。 张在经济学上坚持实证的传统,重视以简单的经济学原理解释复杂的社会现象,反对数学工具在经济上的“无厘头”式应用。“我认为解释现象是经济学的唯一用途,没有其他”;张的三卷本经济学大著题为《经济解释》,当是源自这一基本认识。张对博弈理论(Game Theory)似乎持否定态度。相信他否定的并非其数学和逻辑的基础,而是其在经济学上的盲目运用。连张对经济学上均衡的理解也是实证(亦或实际?)的:“后来自己再想几年,得到的结论,是不均衡起于局限条件指定得不够,要达到理论的均衡点,我们要把有关的局限条件加上去,直至可以推出被事实验证的含意—那就是理论逻辑所说的均衡了。” 张对福利经济(Welfare economics)是否定的:“福利经济学是废物。不是说不应该关注社会福利,而是任何人都可以是「专家」,不需要读过经济。二百多年来,经济学无法证明,从某甲手上拿了一元,交到某乙的手上,社会福利会改进或改退。” 社会福利不在经济学的范畴内么?如张所言,经济学说到底是解释人的行为,尤其是功利行为。解释的关键有二,价值概念和局限条件。和人相关的价值难以衡量,局限亦难以确定。经济学上的价值概念和局限条件放在社会大背景下都只是局部, 因此经济学上的优化可以理解成是一种局部优化(Local Optimization)。局部优化是达成整体优化(Global Optimization) 的必要条件,并不充分。整体优化需要引进新的价值概念和新的局限条件。福利经济在经济学领域可能说不通,但在大社会的背景下可能说得通。福利经济在经济学上的实践可能是个失败,但其着眼点不能忽略。黄仁宇先生称其对中国历史的研究为“大历史”(macrohistory), 意在...

N73 in 400 Words

Image
As the new year turned, I bought a Nokia N73 , my first Symbian phone as well as my first phone with a color display. My initial plan was to get a Sony-Ericsson K800i and I still think K800i is a much better phone than N73. But Nokia wins my heart by offering great development tools . Python for S60 is especially delicious. After playing with it for more than two weeks, I'm surprised of how powerful mobile platforms have become and how little mobile applications have improved. Maybe I shouldn't. Isn't that exactly the same case on the PC platform, with software always trying to catch up with hardware? Sure, N73 has an excellent 3.2 megapixel camera and its 2.4" display is brilliant. But its applications are so lacking that even simple, routine jobs require tinkering. For example, history of recently used numbers is limited to voice calls only and is not available for SMS. For example, while typing the recipient of an SMS, address book based hinting is not available,...