Posted in Uncategorized | Leave a comment

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.

Posted in N73, SIP | Leave a comment

Catch me if you can …

Posted in Uncategorized | Leave a comment

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,

which is located at SQLiteConnection.__init__ in trac/db/sqlite_backend.py. This is how sqlite got imported:

import pysqlite2.dbapi2 as sqlite
have_pysqlite = 2
except ImportError:
import sqlite3 as sqlite
have_pysqlite = 2
except ImportError:
import sqlite
have_pysqlite = 1
except ImportError:
have_pysqlite = 0

I have both pysqlite2 and sqlite3 installed. Remove pysqlite2 so that sqlite3 is imported as sqlite. It does the trick.

Posted in SQLite, Trac | Leave a comment



张在经济学上坚持实证的传统,重视以简单的经济学原理解释复杂的社会现象,反对数学工具在经济上的“无厘头”式应用。“我认为解释现象是经济学的唯一用途,没有其他”;张的三卷本经济学大著题为《经济解释》,当是源自这一基本认识。张对博弈理论(Game Theory)似乎持否定态度。相信他否定的并非其数学和逻辑的基础,而是其在经济学上的盲目运用。连张对经济学上均衡的理解也是实证(亦或实际?)的:“后来自己再想几年,得到的结论,是不均衡起于局限条件指定得不够,要达到理论的均衡点,我们要把有关的局限条件加上去,直至可以推出被事实验证的含意—那就是理论逻辑所说的均衡了。”

张对福利经济(Welfare economics)是否定的:“福利经济学是废物。不是说不应该关注社会福利,而是任何人都可以是「专家」,不需要读过经济。二百多年来,经济学无法证明,从某甲手上拿了一元,交到某乙的手上,社会福利会改进或改退。” 社会福利不在经济学的范畴内么?如张所言,经济学说到底是解释人的行为,尤其是功利行为。解释的关键有二,价值概念和局限条件。和人相关的价值难以衡量,局限亦难以确定。经济学上的价值概念和局限条件放在社会大背景下都只是局部, 因此经济学上的优化可以理解成是一种局部优化(Local Optimization)。局部优化是达成整体优化(Global Optimization) 的必要条件,并不充分。整体优化需要引进新的价值概念和新的局限条件。福利经济在经济学领域可能说不通,但在大社会的背景下可能说得通。福利经济在经济学上的实践可能是个失败,但其着眼点不能忽略。黄仁宇先生称其对中国历史的研究为“大历史”(macrohistory), 意在“将宏观及放宽视野这一观念导引到中国历史研究里去”。不知道有没有所谓的“大经济学”? 无论如何,佛利民到斯德哥尔摩领诺贝尔奖时,以游行示威来迎接他是不公平的。张老慧眼如炬看得清楚,“我们不容易明白为什么那么多的经济学者要替政府作什么建议,要以自己所学的来作什么改进社会之举。他们不可能不知道自己微不足道。”

Posted in 张五常,经济学 | Leave a comment

N73 in 400 Words

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, a full address book search has to be performed to extract a number from it.

And of course, N73 has to get along with my PowerBook. There’s a PC Suite from Nokia, but no one has heard of a Mac Suite. Never mind. Bluetooth works out of box. Sending file back and forth is easy. The default iSync does not work with N73, but here is a nice free plugin. N73 is now in sync with iCal and Address Book. Another nice option to back up address book is ShoZu .

I also use Google Calendar and there are two options to access it from N73. Option one, get GCalSync and access Google Calendar directly from N73. Option two, subscribe to Google Calendar from ICal. The URL to personal Google Calendar can be acquired by going to Calendar Details and clicking the green ICAL button under section Private Address. In addition, GCalDaemon can be used to keep the local copy of calendar file in sync with the online copy. This would allow Google Calendar events to be added directly from within iCal. The local calendar files are kept under ~/Library/Application Support/iCal/Sources .

There’s still no message backup. With Bluetooth AT Terminal , AT commands can be directly sent to the phone. It should be straightforward to create a utility to back up messages and contacts.

Posted in Calender, Nokia, OSX | Leave a comment