随笔-8  评论-2  文章-0  trackbacks-0
  2006年11月17日
下载 VS2005 Team Suite Trial 后复制出镜像光盘上的所有内容,修改"VS\Setup\setup.sdb"文件的"Product Key"字段值为"KYTYHTQKW6VWPBQDKC8FHWC4J",这样 Trial 就变成 RTM 了。
posted @ 2006-11-17 13:50 aa 阅读(652) | 评论 (0)编辑 收藏
  2006年11月16日
不管是什么样的网站想必 SiteMap 都是重要的内容之一,从头设计一个 SiteMap 难度并不大但肯定会花费不少时间和精力,基于“尽量减少重复建设”的目的,使用(重用)SiteMapPath 都是上佳的选择。SiteMapPath 扩展性良好,因为层次结构的设计,即使在网站上线运营之后也可以非常方便的增、删、修改其中的任何部分,对于 ASP.NET 站点来说,SiteMapPath 的确能为程序员节省不少的时间。

以论坛程序举例来说,假如某论坛有如果层次结构。
论坛首页
    计算机技术
        编程语言
        网络语言


要在论坛中使用 SiteMapPath(下面简称为 SMP)需要以某种方式模拟出上面的层次结构,而 XML 绝对是描述树状层次结构的绝佳工具。首先创建一个 .sitemap 的 XML 文件。
<?xml version="1.0" encoding="utf-8" ?>
<siteMap xmlns="http://schemas.microsoft.com/AspNet/SiteMap-File-1.0" >
    
<siteMapNode url="~/default.aspx" title="首页"  description="论坛首页">
      
<siteMapNode url="~/pc.aspx" title="计算机技术" description="计算机技术板块">
        
<siteMapNode url="~/pl.aspx" title="编程语言" description="计算机编程语言子板块" />
        
<siteMapNode url="~/nt.aspx" title="网络技术" description="计算机网络技术子板块" />
      
</siteMapNode>
    
</siteMapNode>
</siteMap>

并在 default.aspx/pc.aspx/nt.aspx 中插入 <asp:SiteMapPath> 控件,之后访问 pl.aspx 的话,在插入 SMP 的位置就会显示“首页 > 计算机技术 > 编程语言”这样的 SiteMap。

节点 siteMapNode 的 url 属性描述了文件位置和文件名,title 属性则是在网页上显示的文本,description 属性是 onMouseOver 时的提示信息。
posted @ 2006-11-16 15:13 aa 阅读(2417) | 评论 (2)编辑 收藏
  2006年11月15日
GA 的事情找朋友证实确有其事,他父亲就是当地公安机关的警察,只不知道是否真有人丧生。除事件本身的医患纠纷外,最让我气愤的是信息不畅通。


凤凰卫视记者闾丘露薇《我有很多个为什么》一文中的观点我深表赞同。
posted @ 2006-11-15 09:43 aa 阅读(317) | 评论 (0)编辑 收藏
  2006年11月14日
韩国信息通信部韩国要建 Linux 城市”之后,中国开源软件推进联盟广东省软件行业协会广东省 Linux 中心和广东省中山市 Linux 中心也有了“建设 Linux 城市的动议”。不过我还是怀疑各方推进这项动议的目的和决心。
posted @ 2006-11-14 11:25 aa 阅读(256) | 评论 (0)编辑 收藏
原文:
  1. Every good work of software starts by scratching a developer's personal itch.
  2. Good programmers know what to write. Great ones know what to rewrite (and reuse).
  3. "Plan to throw one away; you will, anyhow."
  4. If you have the right attitude, interesting problems will find you.
  5. When you lose interest in a program, your last duty to it is to hand it off to a competent successor.
  6. Treating your users as co-developers is your least-hassle route to rapid code improvement and effective debugging.
  7. Release early. Release often. And listen to your customers.
  8. Given a large enough beta-tester and co-developer base, almost every problem will be characterized quickly and the fix obvious to someone.
  9. Smart data structures and dumb code works a lot better than the other way around.
  10. If you treat your beta-testers as if they're your most valuable resource, they will respond by becoming your most valuable resource.
  11. The next best thing to having good ideas is recognizing good ideas from your users. Sometimes the latter is better.
  12. Often, the most striking and innovative solutions come from realizing that your concept of the problem was wrong.
  13. "Perfection (in design) is achieved not when there is nothing more to add, but rather when there is nothing more to take away."
  14. Any tool should be useful in the expected way, but a truly great tool lends itself to uses you never expected.
  15. When writing gateway software of any kind, take pains to disturb the data stream as little as possible—and never throw away information unless the recipient forces you to!
  16. When your language is nowhere near Turing-complete, syntactic sugar can be your friend.
  17. A security system is only as secure as its secret. Beware of pseudo-secrets.
  18. To solve an interesting problem, start by finding a problem that is interesting to you.
  19. Provided the development coordinator has a communications medium at least as good as the Internet, and knows how to lead without coercion, many heads are inevitably better than one.

译文(translator: habpi?HansB?):
  1. 每个好的软件工作都开始于搔到了开发者本人的痒处。
  2. 好的程序员知道该写什么,伟大的程序员知道该写写(重用)什么。
  3. 计划好抛弃,无论如何,你会的。
  4. 如果你有正确的态度,有趣的问题就会找上你。
  5. 当你对一个程序失去兴趣时,你最后的责任就是把它传给一个能干的后继者。
  6. 把用户当做协作开发者是快速改进代码和高效调试的无可争辩的方式。
  7. 早发布,常发布,听取客户的建议。
  8. 如果有一个足够大的 BETA 测试人员和协作开发人员的基础,几乎所有问题都可以被快速找出并被一些人纠正。
  9. 聪明的数据结构和笨拙的代码要比相反的搭配工作的更好。
  10. 如果你像对待最富贵的资源一样对待你的 BETA 测试员,他们就会成为你最富贵的资源。
  11. 想出好主意是好事,从你的用户那里发现好主意也是好事,有时候后者更好。
  12. 最重要和最有创新的解决方案常常来自于你认识到你对问题的概念是错误的。
  13. 最好的设计不是再也没有什么东西可以添加了,而是再也没有什么东西可以去掉。
  14. 任何工具都应该能以预期的方式使用,但是伟大的工具提供你没料到的功能。
  15. 当写任何种类的网关程序时,多费点力,尽量少干扰数据流,永远不要抛弃信息,除非接收方强迫这么做。
  16. 如果你的语言一点也不像图灵完备的,严格的语法会有好处。
  17. 一个安全的系统只能和它的秘密一样安全,当心伪安全。
  18. 要解决一个有趣的问题,请从发现让你感兴趣的问题开始。
  19. 如果开发协调人员有至少和 Internet 一样好的媒介,而且知道怎样不通过强迫来领导,许多头脑不可避免地比一个好。
posted @ 2006-11-14 10:30 aa 阅读(203) | 评论 (0)编辑 收藏
  2006年11月13日
太阳公司开放了爪哇的源代码,伟大领袖 RMS 因此激动到昏迷了。
posted @ 2006-11-13 19:49 aa 阅读(292) | 评论 (0)编辑 收藏
以前用 MyIE/Maxthon 自从在机器上安装了 Ubuntu 之后渐渐爱上了 Firefox。很多人因为 Firefox 对标准 WEB 的支持而頗有微词,不过这反倒是我非常欣赏 Firefox 的缘由之一,我想这些人是已经习惯了 IE(内核)了。
posted @ 2006-11-13 17:46 aa 阅读(212) | 评论 (0)编辑 收藏
  2006年11月12日
以前在 my.donews 安家,可是那的 blog 系统总出一些无伤大雅但让我心烦的问题。自动替换某些 html 标记甚至丢失手工输入的 css/html 等等。抱着 bsp 可能修正这些错误的想法而等待了数月之久,现在我的耐心彻底消失不见了,而博客园则多了一个注册用户。

我不是 PHP 爱好者更不是 PHP 程序员,不过我不保证未来不会对 PHP 产生兴趣。目前我关注的是开源和 Python,而我的职业是 .NET 程序员,虽然同 PHP 一样我对 .NET 没有任何兴趣,但这并不妨碍 .NET 成为我的谋生手段之一。
posted @ 2006-11-12 16:39 aa 阅读(191) | 评论 (0)编辑 收藏
仅列出标题