<?xml version="1.0" encoding="gb2312"?>
<rss version="2.0">
<channel>
<title><![CDATA[关心永远在 Life is in Action]]></title>
        <image>
        <title>http://hi.baidu.com</title>
        <link>http://hi.baidu.com</link>
        <url>http://img.baidu.com/img/logo-hi.gif</url>
        </image>
<description><![CDATA[是否习惯平淡的生活]]></description>
<link>http://hi.baidu.com/bestgo</link>
<language>zh-cn</language>
<generator>www.baidu.com</generator>
<ttl>5</ttl>


<item>
        <title><![CDATA[Windows Server 2003 简体中文企业版 下载及序列号]]></title>
        <link><![CDATA[http://hi.baidu.com/bestgo/blog/item/5137535875b9c78b800a18a3.html]]></link>
        <description><![CDATA[
		
		Windows Server 2003 简体中文企业版<br>
<img src="http://www.seshop.com/image/product/200305/MSCP7300058_L.jpg"><br>
<br>
软件大小：606M <br>
软件语言：简体中文 <br>
授权方式：零售版 <br>
软件类别：操作系统 <br>
运行环境：Win9x/NT/2000/XP/ <br>
软件介绍:&nbsp;&nbsp;  windows.net正式更名为windows server 2003是全新概念的服务器版本！！！！　 这个版本为光盘版，可以光盘启动。<br>
Windows Server 2003 简体中文企业版，真正免激活。<br>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  CD-KEY：JB88F-WT2Q3-DPXTT-Y8GHG-7YYQY <br>
　　安装序列号：JCGMJ-TC669-KCBG7-HB8X2-FXG7M<br>
　　使用这个序列号 Windows Server 2003 可在线升级!<br>
　　如果已经安装了 Windows Server 2003 Enterprise Edition 3790 操作系统，安装时使用了 JB88F-WT2Q3-DPXTT-Y8GHG-7YYQY 这个安装序列号或其他的号，正常激活系统但不能在线升级的，你可以不需要卸载掉原来的操作系统重新使用 JCGMJ-TC669-KCBG7-HB8X2-FXG7M 进行安装了，就立即可以实现在线升级了！<br>
<br>
<br>
下载地址:http://61.153.220.10/uploadsoft/win2003.iso<br> <a href="http://hi.baidu.com/bestgo/blog/item/5137535875b9c78b800a18a3.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/bestgo/blog/category/%B8%F6%C8%CB">个人</a>&nbsp;<a href="http://hi.baidu.com/bestgo/blog/item/5137535875b9c78b800a18a3.html#comment">查看评论</a>]]></description>
        <pubDate>2009年11月13日 星期五  下午 04:18</pubDate>
        <category><![CDATA[个人]]></category>
        <author><![CDATA[梦怀秋]]></author>
		<guid>http://hi.baidu.com/bestgo/blog/item/5137535875b9c78b800a18a3.html</guid>
</item>

<item>
        <title><![CDATA[MikroTik RouterOS安装图解]]></title>
        <link><![CDATA[http://hi.baidu.com/bestgo/blog/item/05205343469f6d1a72f05df0.html]]></link>
        <description><![CDATA[
		
		<p class="MsoNormal" style="margin-left: 19.5pt; text-indent: -19.5pt; mso-list: l3 level1 lfo4; "><span style="font-size: 10pt; mso-bidi-"><span style="mso-list: Ignore">一、</span></span><span style="font-size: 10pt;  mso-ascii- mso-hansi-">通过下载光盘镜像文件，并制作成启动安装光盘。</span><span style="font-size: 10pt"></span></p>
<p class="MsoNormal"><span style="font-size: 10pt;  mso-ascii- mso-hansi-">二、将光盘放入光驱中，并将电脑的</span><span style="font-size: 10pt">BIOS</span><span style="font-size: 10pt;  mso-ascii- mso-hansi-">启动设置为光驱引导。</span><span style="font-size: 10pt"></span></p>
<p class="MsoNormal"><span style="font-size: 10pt;  mso-ascii- mso-hansi-">三、当光驱引导完成后，在屏幕上会出现如下显示：</span><span style="font-size: 10pt"></span></p>
<p class="MsoNormal"><span style="font-size: 10pt"> </span></p>
<p class="MsoNormal"><span></span></p>
<p class="MsoNormal"><span> </span></p>
<p class="MsoNormal" style="text-indent: 10pt; mso-char-indent-count: 1.0"><span style="font-size: 10pt;  mso-ascii- mso-hansi-">上面是进入</span><span class="SpellE"><span style="font-size: 10pt">RouterOS</span></span><span style="font-size: 10pt;  mso-ascii- mso-hansi-">的安装功能选择操作，从图中可以看到</span><span class="SpellE"><span style="font-size: 10pt">RouterOS</span></span><span style="font-size: 10pt;  mso-ascii- mso-hansi-">的各个功能选择，图中前三排英文提示为，移去所有功能选项按&ldquo;</span><span style="font-size: 10pt">p</span><span style="font-size: 10pt;  mso-ascii- mso-hansi-">&rdquo;或&ldquo;</span><span style="font-size: 10pt">n</span><span style="font-size: 10pt;  mso-ascii- mso-hansi-">&rdquo;键，选择一个功能选项用&ldquo;空格&rdquo;键，选择所有功能则按&ldquo;</span><span style="font-size: 10pt">a</span><span style="font-size: 10pt;  mso-ascii- mso-hansi-">&rdquo;键，最小安装按&ldquo;</span><span style="font-size: 10pt">m</span><span style="font-size: 10pt;  mso-ascii- mso-hansi-">&rdquo;，按&ldquo;</span><span class="SpellE"><span style="font-size: 10pt">i</span></span><span style="font-size: 10pt;  mso-ascii- mso-hansi-">&rdquo;键则是本地安装，&ldquo;</span><span style="font-size: 10pt">r</span><span style="font-size: 10pt;  mso-ascii- mso-hansi-">&rdquo;是安装远程的路由器，&ldquo;</span><span style="font-size: 10pt">q</span><span style="font-size: 10pt;  mso-ascii- mso-hansi-">&rdquo;是取消安装并重启。</span><span style="font-size: 10pt"></span></p>
<p class="MsoNormal"><span style="font-size: 10pt"> </span></p>
<p class="MsoNormal"><span style="font-size: 10pt"> </span></p>
<p class="MsoNormal"><span style="font-size: 10pt;  mso-ascii- mso-hansi-">四、选择功能，如在安装</span><span style="font-size: 10pt">L4</span><span style="font-size: 10pt;  mso-ascii- mso-hansi-">以上级别，推荐安装功能如下：</span><span style="font-size: 10pt"></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 10pt"></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 10pt"> </span></p>
<p class="MsoNormal"><span style="font-size: 10pt;  mso-ascii- mso-hansi-">五、选择好功能组件后，即可按&ldquo;</span><span class="SpellE"><span style="font-size: 10pt">i</span></span><span style="font-size: 10pt;  mso-ascii- mso-hansi-">&rdquo;键进行安装，此时会提示&ldquo;硬盘上的所有数据都会被删除，是否继续&rdquo;选择&ldquo;</span><span style="font-size: 10pt">y</span><span style="font-size: 10pt;  mso-ascii- mso-hansi-">&rdquo;继续，如果是&ldquo;</span><span style="font-size: 10pt">n</span><span style="font-size: 10pt;  mso-ascii- mso-hansi-">&rdquo;键安装会停止，并会重启。选择&ldquo;</span><span style="font-size: 10pt">y</span><span style="font-size: 10pt;  mso-ascii- mso-hansi-">&rdquo;继续后，会提示是否保持以前的配置，这是升级安装，并想保留以前路由器的设置参数，选择&ldquo;</span><span style="font-size: 10pt">y</span><span style="font-size: 10pt;  mso-ascii- mso-hansi-">&rdquo;，如果是不想保留则选择&ldquo;</span><span style="font-size: 10pt">n</span><span style="font-size: 10pt;  mso-ascii- mso-hansi-">&rdquo;。</span><span style="font-size: 10pt">(</span><span style="font-size: 10pt;  mso-ascii- mso-hansi-">全新安装则选择&ldquo;</span><span style="font-size: 10pt">n</span><span style="font-size: 10pt;  mso-ascii- mso-hansi-">&rdquo;</span><span style="font-size: 10pt">)</span></p>
<p class="MsoNormal"><span style="font-size: 10pt"> </span></p>
<p class="MsoNormal"><span style="font-size: 10pt;  mso-ascii- mso-hansi-">六、选择完后</span><span class="SpellE"><span style="font-size: 10pt">RouterOS</span></span><span style="font-size: 10pt;  mso-ascii- mso-hansi-">开始安装</span><span style="font-size: 10pt"></span></p>
<p class="MsoNormal"><span style="font-size: 10pt"></span></p>
<p class="MsoNormal"><span style="font-size: 10pt"> </span></p>
<p class="MsoNormal"><span style="font-size: 10pt;  mso-ascii- mso-hansi-">七、安装完后</span><span class="SpellE"><span style="font-size: 10pt">RouterOS</span></span><span style="font-size: 10pt;  mso-ascii- mso-hansi-">提示按&ldquo;回车&rdquo;键，并重启。</span><span style="font-size: 10pt"></span></p>
<p class="MsoNormal"><span style="font-size: 10pt"></span></p>
<p class="MsoNormal"><span style="font-size: 10pt"> </span></p>
<p class="MsoNormal"><span style="font-size: 10pt;  mso-ascii- mso-hansi-">八、安装完后，进入系统会提示输入注册码，如下图：</span><span style="font-size: 10pt"></span></p>
<p class="MsoNormal"><span style="font-size: 10pt"></span></p>
<p class="MsoNormal"><span style="font-size: 10pt"> </span></p>
<p class="MsoNormal"><span style="font-size: 10pt"> </span></p>
<p class="MsoNormal"><span style="font-size: 10pt;  mso-ascii- mso-hansi-">九、在进入系统后，会有</span><span style="font-size: 10pt">24</span><span style="font-size: 10pt;  mso-ascii- mso-hansi-">小时的使用时间，&ldquo;</span><span style="font-size: 10pt">Software ID</span><span style="font-size: 10pt;  mso-ascii- mso-hansi-">&rdquo;表示的是</span><span style="font-size: 10pt">ROS</span><span style="font-size: 10pt;  mso-ascii- mso-hansi-">的</span><span style="font-size: 10pt">ID</span><span style="font-size: 10pt;  mso-ascii- mso-hansi-">号，如上图所示为：</span><span style="font-size: 10pt">KRYH-I8N </span><span style="font-size: 10pt;  mso-ascii- mso-hansi-">通过此</span><span style="font-size: 10pt">ID</span><span style="font-size: 10pt;  mso-ascii- mso-hansi-">号申请注册码。因为注册码比较长所以需要使用</span><span class="SpellE"><span style="font-size: 10pt">winbox</span></span><span style="font-size: 10pt;  mso-ascii- mso-hansi-">进行操作，更为简便和直观。</span><span style="font-size: 10pt"></span></p>
<p class="MsoNormal"><span style="font-size: 10pt"> </span></p>
<p class="MsoNormal"><span style="font-size: 10pt"> </span></p>
<p class="MsoNormal"><span style="font-size: 10pt;  mso-ascii- mso-hansi-">十、首先将</span><span class="SpellE"><span style="font-size: 10pt">Winbox</span></span><span style="font-size: 10pt;  mso-ascii- mso-hansi-">下载到可以与</span><span class="SpellE"><span style="font-size: 10pt">RouterOS</span></span><span style="font-size: 10pt;  mso-ascii- mso-hansi-">相连接的</span><span style="font-size: 10pt">Windows</span><span style="font-size: 10pt;  mso-ascii- mso-hansi-">电脑上，然后双击打开，如图：</span><span style="font-size: 10pt"></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 10pt"> </span></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 10pt"></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 10pt"> </span></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 10pt"> </span></p>
<p class="MsoNormal"><span style="font-size: 10pt;  mso-ascii- mso-hansi-">十一、在没有设置</span><span style="font-size: 10pt">IP</span><span style="font-size: 10pt;  mso-ascii- mso-hansi-">地址前使用</span><span style="font-size: 10pt">MAC</span><span style="font-size: 10pt;  mso-ascii- mso-hansi-">地址登录，点击</span><span class="SpellE"><span style="font-size: 10pt">winbox</span></span><span style="font-size: 10pt;  mso-ascii- mso-hansi-">中扫描按钮，选择需要登录的</span><span style="font-size: 10pt">ROS</span><span style="font-size: 10pt;  mso-ascii- mso-hansi-">，默认的帐号为&ldquo;</span><span style="font-size: 10pt">admin</span><span style="font-size: 10pt;  mso-ascii- mso-hansi-">&rdquo;，密码为空；按回车或者点击&ldquo;</span><span style="font-size: 10pt">connect</span><span style="font-size: 10pt;  mso-ascii- mso-hansi-">&rdquo;进行登录。</span><span style="font-size: 10pt"></span></p>
<p class="MsoNormal"><span style="font-size: 10pt"> </span></p>
<p class="MsoNormal"><span style="font-size: 10pt"> </span></p>
<p class="MsoNormal"><span style="font-size: 10pt"> </span></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 10pt"></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 10pt"> </span></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 10pt"> </span></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 10pt"></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 10pt"> </span></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 10pt"> </span></p>
<p class="MsoNormal"><span style="font-size: 10pt"> </span></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 10pt"></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 10pt"> </span></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 10pt"> </span></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 10pt"> </span></p>
<p class="MsoNormal"><span style="font-size: 10pt;  mso-ascii- mso-hansi-">十二、当您获得注册码后，请通过复制注册码的所有信息，进入</span><span class="SpellE"><span style="font-size: 10pt">Winbox</span></span><span style="font-size: 10pt;  mso-ascii- mso-hansi-">中的</span><span style="font-size: 10pt">system &gt;&gt; license</span><span style="font-size: 10pt;  mso-ascii- mso-hansi-">项，点击</span><span style="font-size: 10pt">paste key</span><span style="font-size: 10pt;  mso-ascii- mso-hansi-">选项粘贴注册码。之后</span><span class="SpellE"><span style="font-size: 10pt">Winbox</span></span><span style="font-size: 10pt;  mso-ascii- mso-hansi-">会弹出注册成功并重启的英文提示，重启完成后即可完成注册。</span><span style="font-size: 10pt"></span></p>
<p class="MsoNormal"><span style="font-size: 10pt"> </span></p>
<p class="MsoNormal"><span style="font-size: 10pt"> </span></p>
<p class="MsoNormal"><span style="font-size: 10pt;  mso-ascii- mso-hansi-">进入</span><span class="SpellE"><span style="font-size: 10pt">Winbox</span></span><span style="font-size: 10pt;  mso-ascii- mso-hansi-">中的</span><span style="font-size: 10pt">system &gt;&gt; license</span><span style="font-size: 10pt;  mso-ascii- mso-hansi-">项</span><strong style="mso-bidi-font-weight: normal"><span style="font-size: 10pt"></span></strong></p>
<p class="MsoNormal"><span style="font-size: 10pt"></span></p>
<p class="MsoNormal"><span style="font-size: 10pt"> </span></p>
<p class="MsoNormal"><span style="font-size: 10pt;  mso-ascii- mso-hansi-">点击</span><span style="font-size: 10pt">paste key</span><span style="font-size: 10pt;  mso-ascii- mso-hansi-">选项粘贴注册码</span><span style="font-size: 10pt"></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 10pt"></span></p>
<p class="MsoNormal" style="text-align: center" align="center"><span style="font-size: 10pt"> </span></p>
<p class="MsoNormal"><span style="font-size: 10pt"> </span></p>
<p class="MsoNormal"><span style="font-size: 10pt;  mso-ascii- mso-hansi-">十三、</span><span style="font-size: 10pt">OK</span><span style="font-size: 10pt;  mso-ascii- mso-hansi-">！完成注册，感谢您使用正版</span><span class="SpellE"><span style="font-size: 10pt">MikroTik</span></span><span style="font-size: 10pt"> <span class="SpellE">RouterOS</span> </span><span style="font-size: 10pt;  mso-ascii- mso-hansi-">软件！</span><span style="font-size: 10pt"></span></p> <a href="http://hi.baidu.com/bestgo/blog/item/05205343469f6d1a72f05df0.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/bestgo/blog/category/Ros">Ros</a>&nbsp;<a href="http://hi.baidu.com/bestgo/blog/item/05205343469f6d1a72f05df0.html#comment">查看评论</a>]]></description>
        <pubDate>2009年08月17日 星期一  下午 06:47</pubDate>
        <category><![CDATA[Ros]]></category>
        <author><![CDATA[梦怀秋]]></author>
		<guid>http://hi.baidu.com/bestgo/blog/item/05205343469f6d1a72f05df0.html</guid>
</item>

<item>
        <title><![CDATA[！--]]></title>
        <link><![CDATA[http://hi.baidu.com/bestgo/blog/item/aabc4b3db0b281cf9e3d6258.html]]></link>
        <description><![CDATA[
		
		<p>郁闷的生活</p> 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/bestgo/blog/category/%B8%F6%C8%CB">个人</a>&nbsp;<a href="http://hi.baidu.com/bestgo/blog/item/aabc4b3db0b281cf9e3d6258.html#comment">查看评论</a>]]></description>
        <pubDate>2009年05月16日 星期六  下午 09:25</pubDate>
        <category><![CDATA[个人]]></category>
        <author><![CDATA[梦怀秋]]></author>
		<guid>http://hi.baidu.com/bestgo/blog/item/aabc4b3db0b281cf9e3d6258.html</guid>
</item>

<item>
        <title><![CDATA[C# .net视频]]></title>
        <link><![CDATA[http://hi.baidu.com/bestgo/blog/item/1ced4ebf4b8ebe0219d81fa9.html]]></link>
        <description><![CDATA[
		
		学知网是个有5000G学习资料的下载网站,注册后可免费下载以下资料:<br>
[路径]电脑网络-计算机视频-编程语言-DotNet全书<br>
[文件][最强Dot.Net教程资料集合].Asp.Net-Chm.EBooks.55.ISO|[最强Dot.Net教程资料集合].Asp.Net-PDF.EBooks.40.ISO|[最强Dot.Net教程资料集合].Microsoft.ASP.NET.2.0.Web.Applications.Delivery.Guide.(2005).iso|[最强Dot.Net教程资料集合].Microsoft.Net.Training.(C-#,.Asp,.Vb).iso|[最强Dot.Net教程资料集合].Visual.Basic.NET.2005Step.By.Step.iso|[最强Dot.Net教程资料集合].VTC-ASP.NET.(Mov).ISO|C-#ASP.NET开发快速入门(EN).ISO|DotNet全书-ADO.NET.ISO|DotNet全书-ASP.NET.ISO|DotNet全书-C-#.ISO|DotNet全书-C.ISO|DotNet全书-Framework.ISO|DotNet全书-Mobile.ISO|DotNet全书-Training.Kit.ISO|DotNet全书-VB.NET.ISO|DotNet全书-XML.NET.ISO<br>
[地址]http://www.stuknow.com/dirlist/10002/dbd8fd46d7d4317e27a6224cf9822cde.htm?popid=myh65013<br> <a href="http://hi.baidu.com/bestgo/blog/item/1ced4ebf4b8ebe0219d81fa9.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/bestgo/blog/category/%C4%AC%C8%CF%B7%D6%C0%E0">默认分类</a>&nbsp;<a href="http://hi.baidu.com/bestgo/blog/item/1ced4ebf4b8ebe0219d81fa9.html#comment">查看评论</a>]]></description>
        <pubDate>2009年03月26日 星期四  上午 02:01</pubDate>
        <category><![CDATA[默认分类]]></category>
        <author><![CDATA[梦怀秋]]></author>
		<guid>http://hi.baidu.com/bestgo/blog/item/1ced4ebf4b8ebe0219d81fa9.html</guid>
</item>

<item>
        <title><![CDATA[公布一些常用的WebServices]]></title>
        <link><![CDATA[http://hi.baidu.com/bestgo/blog/item/74b4c89051cc6a85a877a4ea.html]]></link>
        <description><![CDATA[
		
		天气预报Web服务，数据来源于中国气象局 <br>
<a title="Endpoint" href="http://www.webxml.com.cn/WebServices/WeatherWebService.asmx" target="_blank">Endpoint</a>  <br>
<a title="Disco" href="http://www.webxml.com.cn/WebServices/WeatherWebService.asmx?disco" target="_blank">Disco</a>  <br>
<a title="WSDL" href="http://www.webxml.com.cn/WebServices/WeatherWebService.asmx?wsdl" target="_blank">WSDL</a> <br>
<br>
IP地址来源搜索 WEB 服务（是目前最完整的IP地址数据） <br>
<a title="Endpoint" href="http://www.webxml.com.cn/WebServices/IpAddressSearchWebService.asmx" target="_blank">Endpoint</a>  <br>
<a title="Disco" href="http://www.webxml.com.cn/WebServices/IpAddressSearchWebService.asmx?disco" target="_blank">Disco</a>  <br>
<a title="WSDL" href="http://www.webxml.com.cn/WebServices/IpAddressSearchWebService.asmx?wsdl" target="_blank">WSDL</a> <br>
<br>
随机英文、数字和中文简体字 WEB 服务 <br>
<a title="Endpoint" href="http://www.webxml.com.cn/WebServices/RandomFontsWebService.asmx" target="_blank">Endpoint</a>  <br>
<a title="Disco" href="http://www.webxml.com.cn/WebServices/RandomFontsWebService.asmx?disco" target="_blank">Disco</a>  <br>
<a title="WSDL" href="http://www.webxml.com.cn/WebServices/RandomFontsWebService.asmx?wsdl" target="_blank">WSDL</a> <br>
<br>
中国邮政编码 &lt;-&gt; 地址信息双向查询/搜索 WEB 服务 <br>
<a title="Endpoint" href="http://www.webxml.com.cn/WebServices/ChinaZipSearchWebService.asmx" target="_blank">Endpoint</a>  <br>
<a title="Disco" href="http://www.webxml.com.cn/WebServices/ChinaZipSearchWebService.asmx?disco" target="_blank">Disco</a>  <br>
<a title="WSDL" href="http://www.webxml.com.cn/WebServices/ChinaZipSearchWebService.asmx?wsdl" target="_blank">WSDL</a>  <br>
<br>
验证码图片 WEB 服务 支持中文、字母、数字 图像和多媒体 <br>
<a title="Endpoint" href="http://www.webxml.com.cn/WebServices/ValidateCodeWebService.asmx" target="_blank">Endpoint</a>  <br>
<a title="Disco" href="http://www.webxml.com.cn/WebServices/ValidateCodeWebService.asmx?disco" target="_blank">Disco</a>  <br>
<a title="WSDL" href="http://www.webxml.com.cn/WebServices/ValidateCodeWebService.asmx?wsdl" target="_blank">WSDL</a> <br>
<br>
Email 电子邮件地址验证 WEB 服务 <br>
<a title="Endpoint" href="http://www.webxml.com.cn/WebServices/ValidateEmailWebService.asmx" target="_blank">Endpoint</a>  <br>
<a title="Disco" href="http://www.webxml.com.cn/WebServices/ValidateEmailWebService.asmx?disco" target="_blank">Disco</a>  <br>
<a title="WSDL" href="http://www.webxml.com.cn/WebServices/ValidateEmailWebService.asmx?wsdl" target="_blank">WSDL</a>  <br>
<br>
中文简体字 &lt;-&gt;繁体字转换 WEB 服务 <br>
<a title="Endpoint" href="http://www.webxml.com.cn/WebServices/TraditionalSimplifiedWebService.asmx" target="_blank">Endpoint</a>  <br>
<a title="Disco" href="http://www.webxml.com.cn/WebServices/TraditionalSimplifiedWebService.asmx?disco" target="_blank">Disco</a>  <br>
<a title="WSDL" href="http://www.webxml.com.cn/WebServices/TraditionalSimplifiedWebService.asmx?wsdl" target="_blank">WSDL</a>  <br>
<br>
中文 &lt;-&gt; 英文双向翻译 WEB 服务 <br>
<a title="Endpoint" href="http://www.webxml.com.cn/WebServices/TranslatorWebService.asmx" target="_blank">Endpoint</a>  <br>
<a title="Disco" href="http://www.webxml.com.cn/WebServices/TranslatorWebService.asmx?disco" target="_blank">Disco</a>  <br>
<a title="WSDL" href="http://www.webxml.com.cn/WebServices/TranslatorWebService.asmx?wsdl" target="_blank">WSDL</a>  <br>
<br>
火车时刻表 WEB 服务 （第六次提速最新列车时刻表） <br>
<a title="Endpoint" href="http://www.webxml.com.cn/WebServices/TrainTimeWebService.asmx" target="_blank">Endpoint</a>  <br>
<a title="Disco" href="http://www.webxml.com.cn/WebServices/TrainTimeWebService.asmx?disco" target="_blank">Disco</a>  <br>
<a title="WSDL" href="http://www.webxml.com.cn/WebServices/TrainTimeWebService.asmx?wsdl" target="_blank">WSDL</a>  <br>
<br>
中国股票行情数据 WEB 服务（支持深圳和上海股市的基金、债券和股票） <br>
<a title="Endpoint" href="http://www.webxml.com.cn/WebServices/ChinaStockWebService.asmx" target="_blank">Endpoint</a>  <br>
<a title="Disco" href="http://www.webxml.com.cn/WebServices/ChinaStockWebService.asmx?disco" target="_blank">Disco</a>  <br>
<a title="WSDL" href="http://www.webxml.com.cn/WebServices/ChinaStockWebService.asmx?wsdl" target="_blank">WSDL</a> <br>
<br>
即时外汇汇率数据 WEB 服务 <br>
<a title="Endpoint" href="http://www.webxml.com.cn/WebServices/ExchangeRateWebService.asmx" target="_blank">Endpoint</a>  <br>
<a title="Disco" href="http://www.webxml.com.cn/WebServices/ExchangeRateWebService.asmx?disco" target="_blank">Disco</a>  <br>
<a title="WSDL" href="http://www.webxml.com.cn/WebServices/ExchangeRateWebService.asmx?wsdl" target="_blank">WSDL</a>  <br>
<br>
腾讯QQ在线状态 WEB 服务 <br>
<a title="Endpoint" href="http://www.webxml.com.cn/webservices/qqOnlineWebService.asmx" target="_blank">Endpoint</a>  <br>
<a title="Disco" href="http://www.webxml.com.cn/webservices/qqOnlineWebService.asmx?disco" target="_blank">Disco</a>  <br>
<a title="WSDL" href="http://www.webxml.com.cn/webservices/qqOnlineWebService.asmx?wsdl" target="_blank">WSDL</a>  <br>
<br>
中国电视节目预告（电视节目表） WEB 服务 <br>
<a title="Endpoint" href="http://www.webxml.com.cn/webservices/ChinaTVprogramWebService.asmx" target="_blank">Endpoint</a>  <br>
<a title="Disco" href="http://www.webxml.com.cn/webservices/ChinaTVprogramWebService.asmx?disco" target="_blank">Disco</a>  <br>
<a title="WSDL" href="http://www.webxml.com.cn/webservices/ChinaTVprogramWebService.asmx?wsdl" target="_blank">WSDL</a> <br>
<br>
外汇-人民币即时报价 WEB 服务 <br>
<a title="Endpoint" href="http://www.webxml.com.cn/WebServices/ForexRmbRateWebService.asmx" target="_blank">Endpoint</a>  <br>
<a title="Disco" href="http://www.webxml.com.cn/WebServices/ForexRmbRateWebService.asmx?disco" target="_blank">Disco</a>  <br>
<a title="WSDL" href="http://www.webxml.com.cn/WebServices/ForexRmbRateWebService.asmx?wsdl" target="_blank">WSDL</a> <br>
<br>
中国股票行情分时走势预览缩略图 WEB 服务 <br>
<a title="Endpoint" href="http://www.webxml.com.cn/webservices/ChinaStockSmallImageWS.asmx" target="_blank">Endpoint</a>  <br>
<a title="Disco" href="http://www.webxml.com.cn/webservices/ChinaStockSmallImageWS.asmx?disco" target="_blank">Disco</a>  <br>
<a title="WSDL" href="http://www.webxml.com.cn/webservices/ChinaStockSmallImageWS.asmx?wsdl" target="_blank">WSDL</a> <br>
<br>
国内飞机航班时刻表 WEB 服务 <br>
<a title="Endpoint" href="http://www.webxml.com.cn/webservices/DomesticAirline.asmx" target="_blank">Endpoint</a>  <br>
<a title="Disco" href="http://www.webxml.com.cn/webservices/DomesticAirline.asmx?disco" target="_blank">Disco</a>  <br>
<a title="WSDL" href="http://www.webxml.com.cn/webservices/DomesticAirline.asmx?wsdl" target="_blank">WSDL</a>  <br>
<br>
中国开放式基金数据 WEB 服务 <br>
<a title="Endpoint" href="http://www.webxml.com.cn/WebServices/ChinaOpenFundWS.asmx" target="_blank">Endpoint</a>  <br>
<a title="Disco" href="http://www.webxml.com.cn/WebServices/ChinaOpenFundWS.asmx?disco" target="_blank">Disco</a>  <br>
<a title="WSDL" href="http://www.webxml.com.cn/WebServices/ChinaOpenFundWS.asmx?wsdl" target="_blank">WSDL</a>  <br>
<br>
股票行情数据 WEB 服务（支持香港、深圳、上海基金、债券和股票；支持多股票同时查询） <br>
<a title="Endpoint" href="http://www.webxml.com.cn/WebServices/StockInfoWS.asmx" target="_blank">Endpoint</a>  <br>
<a title="Disco" href="http://www.webxml.com.cn/WebServices/StockInfoWS.asmx?disco" target="_blank">Disco</a>  <br>
<a title="WSDL" href="http://www.webxml.com.cn/WebServices/StockInfoWS.asmx?wsdl" target="_blank">WSDL</a>  <br> <a href="http://hi.baidu.com/bestgo/blog/item/74b4c89051cc6a85a877a4ea.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/bestgo/blog/category/%2Enet">.net</a>&nbsp;<a href="http://hi.baidu.com/bestgo/blog/item/74b4c89051cc6a85a877a4ea.html#comment">查看评论</a>]]></description>
        <pubDate>2009年03月10日 星期二  下午 07:08</pubDate>
        <category><![CDATA[.net]]></category>
        <author><![CDATA[梦怀秋]]></author>
		<guid>http://hi.baidu.com/bestgo/blog/item/74b4c89051cc6a85a877a4ea.html</guid>
</item>

<item>
        <title><![CDATA[没必要过多炒作中国出兵打击索马里海盗]]></title>
        <link><![CDATA[http://hi.baidu.com/bestgo/blog/item/9ef679f211dcef14b17ec5ef.html]]></link>
        <description><![CDATA[
		
		<div><font color="#0000ff"><strong>作者：藜民</strong> </font></div>
<div><font color="#0000ff"> </font></div>
<div><font color="#0000ff"> 近段时间，索马里海盗活动猖獗，给世界各国远洋运输安全带来严峻挑战。11月14日，中国天津远洋渔业公司的渔船&ldquo;天裕8&rdquo;号在肯尼亚海域被索马里海盗劫持，包括17名中国船员在内的25人被扣为人质；11月15日，索马里海盗轻松劫持了世界上最大的油轮&mdash;&mdash;沙特&ldquo;天狼星&rdquo;号；11月18日，中国香港货轮在亚丁湾，被索马里海盗劫持。<br>
&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp; 就在安理会通过有关打击索马里海盗的第1851号决议，中国副外长何亚非表示&ldquo;中国正积极考虑近期派军舰赴亚丁湾、索马里海域参加护航活动&rdquo;、并基本确定由南海舰队052B导弹驱逐舰承担此任务之时，又一艘中国货轮&mdash;&mdash;中国交通建设集团总公司圣文森特籍&ldquo;振华4&rdquo;轮，在亚丁湾水域处受到海盗袭击，险些遭劫持。面对如此严重威胁国际航运安全、尤其是中国货运安全的形势，中国迅速派遣军舰参与护航已经是迫在眉睫，藜民我非常赞成立即出兵。<br>
&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp; 由于是首次进行这种行动，受到国人关注是正常的和可以理解的。现在的问题是，我们的各种媒体对此炒得是沸沸扬扬。各种消息满天飞，重要意义说得是天花乱坠，可藜民我一直在冷静观察和思考：此次行动真的有那么重要的意义吗？尤其是&ldquo;振华4&rdquo;轮遭袭后首先赶到救援的是马来西亚直升机时，在藜民我看来，中国派兵执行所谓的打击索马里海盗根本就没有太大的军事意义，从政治上说更是如此。这只不过是在联合国要求下，为了维护亚丁湾航运的正常秩序、保护中国船只免受海盗袭扰的普通军事行动。<br>
&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp; 之所以有这样的认识，是因为有几个问题一致缠绕在我心头：<br>
&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp; 1. 无论海盗多么张狂，当他们面对全副武装的国家军事力量时，肯定不堪一击。从军事角度上看，派兵去亚丁湾并不具有显示军事实力的作用。可是，我们有些人非要将此次行动认定是为了显示实力、搞和平之旅，未免太牵强赴会了。<br>
&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp; 2. 无论索马里海盗怎么标榜自己不是恐怖主义者，但威胁正常的航运安全、随意扣押船只和人员就是恐怖主义行为。中国政府反恐的立场是坚定的和长期的。出于反恐的需要，派遣自己的军舰去护航，只能进一步表明中国政府反恐的决心，没必要将行动的性质扩大化。<br>
&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp; 3. 当包括北约、俄罗斯、欧盟、印度、韩国、马来西亚等16个国家都积极参与此次行动时，中国没有尽快派兵，只能说我们的行动迟缓和患得患失。如果我们真的派兵，值得那么骄傲吗？<br>
&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp; 4. 现代军舰能周游世界是很正常的，更何况亚丁湾属于国际海域，此次行动只不过相当于另一种形式的维和，并不能因此就成为中国军事力量走向世界的标志。<br>
&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp; 有人将中国派兵说成是&ldquo;表现了中国动用海上军事力量维护自己的海上利益、维护地区安全环境、维护海上航行及海洋通道安全的决心、意志和能力&rdquo;，藜民我不赞成这一观点。必须明确，索马里海盗行为并非索马里国家行为，而且这是在被逼无奈之下的举措，与经常性护航或者威慑性巡航有着本质的区别，根本不具有国家层面上的战略意义。我们过多的拔高炒作，是否反而无端助长&ldquo;中国威胁论&rdquo;的喧嚣？当有人提出应该考虑设立军事基地时，本人实在是觉得太想入非非了。<br>
&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp; 5. 索马里海盗只不过是最近才开始引起瞩目，说明他们大规模从事这一行当的时间并不长，是索马里长期处于战乱、国家一贫如洗后被逼无奈的结果，是一贯高喊民主、人权的美国等西方国家的恶行种下的恶果。中国出兵只不过是护航，何来的打击之有？如果这也说成是打击的话，中国派兵维和是不也是为了打击？一个护航行动居然被炒作成了类似战争的行为，是否有哗众取宠之嫌？<br>
&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp; 6. 索马里海盗尽管劫持这么多国家的船只，居然没有劫持一条悬挂美国国旗的船只，这就说明他们极高的政治敏感性，其他国家派兵护航其实是在替美国收拾烂摊子，纯属无奈之举，根本不值得炫耀。<br>
&nbsp;&nbsp;&nbsp;&nbsp;<br>
&nbsp;&nbsp;&nbsp;&nbsp; 总之，我们应该搞清楚此次派军舰护航的性质，不应该过多炒作，尤其是上纲上线的炒作。</font></div> <a href="http://hi.baidu.com/bestgo/blog/item/9ef679f211dcef14b17ec5ef.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/bestgo/blog/category/%CE%C4%D5%C2">文章</a>&nbsp;<a href="http://hi.baidu.com/bestgo/blog/item/9ef679f211dcef14b17ec5ef.html#comment">查看评论</a>]]></description>
        <pubDate>2008年12月27日 星期六  上午 03:03</pubDate>
        <category><![CDATA[文章]]></category>
        <author><![CDATA[梦怀秋]]></author>
		<guid>http://hi.baidu.com/bestgo/blog/item/9ef679f211dcef14b17ec5ef.html</guid>
</item>

<item>
        <title><![CDATA[微软架构师谈编程语言发展（四）]]></title>
        <link><![CDATA[http://hi.baidu.com/bestgo/blog/item/cc5cbb012b9696097aec2c02.html]]></link>
        <description><![CDATA[
		
		<div twffan="done" align="center">译者：程化</div>
<div twffan="done" align="left">Charles：你这么一说，关于&ldquo;函数型&rdquo;编程，我马上想到一个问题是：在现有基础上再加一层必须考虑的抽象，实际上能不能增加程序员的生产率，是否真的有帮助？作为程序员，现在还要考虑&ldquo;副作用&rdquo;的问题。反正我现在用C#还是其他语言编程的时候，是不会像一个&ldquo;函数型&rdquo;程序员那样考虑副作用的。</div>
<div twffan="done" align="left">Herb：往一个语言上增加更多的特性无法使其变简单，这是个我们面临的基本难题。</div>
<div twffan="done" align="left">Anders：作为一个语言设计师，对于编程语言，我们所能做的是&mdash;&mdash;减缓新特性不断累积的速度，从而避免最终的倒塌。我想说的是，你永远不能收回某个特性。理论上，你可以收回某个特性，实际中，你不能这样做，因为后果是若干代码的崩溃，这行不通。</div>
<div twffan="done" align="left">Brian：是的，在从VB6到VB.NET的过程中，很多人已经感到饱受折磨了。是的，（微软的）解决方案是说那（VB.NET）是个完全不同的语言。但是，我认为，&ldquo;函数型&rdquo;编程的概念已经出现了不短的时间，新毕业的程序员至少听说过这个概念。他们在Python、JavaScript或者其他什么地方见过lambda表达式，或者他们学过Scheme，总之这不是个没听说过的东西，因此，当他们在C#或其他的更传统的编程语言，如VB或C++中看到这些概念的时候，他们并不会感到畏惧，因为他们了解这些概念的优点，他们知道这些东西如果用得正确，可以增加代码的可组合性。你知道，传统语言的可组合性靠的是程序员的自觉。在某些方面，Haskell编程比&ldquo;命令型&rdquo;编程要痛苦得多，然而反过来说，它也比&ldquo;命令型&rdquo;编程要简单些，因为你不会把事情弄得一团糟。呵呵呵。</div>
<div twffan="done" align="left">Anders：这里我想插一句。我认为，在很大程度上，我希望我们在C#或VB上做的工作至少是&mdash;&mdash;在很大程度上对&ldquo;函数型&rdquo;编程进行&ldquo;去神秘化&rdquo;。学院式的人总是倾向于让事情听起来比实际的要复杂，因为这样一来就显得他们自己比较聪明。&ldquo;呃，我并不是针对任何人，但是，这里有不少符号代数和其他东西呢！（译者注：音频提高了，似乎在学某些人的语气）&rdquo;。当我向人们解释lambda表示式时，大家是另一种感觉：&ldquo;你的意思是他们就是函数？这有什么新鲜的？我们早就有函数了，lambda表达式只是些语法糖衣外壳吧？&rdquo;是的，lambda表达式确实只是语法糖衣外壳，但这是种强有力的语法糖衣外壳，它使你能按照一种新的方式去思考问题，以前总是存在的一些语法噪音&mdash;&mdash;必须声明函数，进行委托，等等&mdash;&mdash;就会逐渐减少，最终，一个全新层次的表达式列表会产生出来。这才是关键所在！围绕着&ldquo;函数型&rdquo;编程还有非常多神秘，我希望我们能够（在打破神秘上）有所突破……</div>
<div twffan="done" align="left">Herb：关于（Brian）说的教育问题，就是关于人们能够在学校中学到的东西的说法，我不太同意。我真的希望情况确实如此，但是我认为缺乏证据，或者说除了 &ldquo;Pascal熟悉者&rdquo;之外，我们无法获得更多。不管是在学校还是在今后的职业生涯中，人们都认为自己接触了多种语言，因为他们用过C、C#、C++、VB以及Pascal。但是，这些语言本质上是一样的，是同一族的语言。人们并没有接触过APL&mdash;&mdash;编程就象在解释器外壳（译者注：可以想象DOS的命令行）上敲东西；不熟悉Prolog&mdash;&mdash;任何东西都是规则；不知道Lisp&mdash;&mdash;所有的都是链表。只有当你深入了2到3种这些东西后，你才知道，并不是所有的东西都是命令。也许在你今后的职业生涯中用的都是命令型语言，正如我们大多数人一样，但是，你不会对其他看待世界的观点一无所知。某人从小到大，如果没有离开过成长的城市，如纽约，超过一英里的话，会错过不少有趣的地方，不管你是否想在其他地方住下来，你应该知道它们，体验它们。</div>
<div twffan="done" align="left">Brian：呃，我觉得这是个渐变的过程，当然，我确实观察到年轻一代程序员对于&ldquo;函数型&rdquo;编程有更好的认识了。你知道，10年，15年之前，如果你和人们谈起Scheme时，人们会感到不解地看着你，&ldquo;什么？你在说什么？&rdquo;。现在，人们听说过了，他们见过&ldquo;函数型&rdquo;编程的关键字。而且，通过JavaScript和Python，人们尝试了&ldquo;函数型&rdquo;编程，也使得这些东西更加流行。我并不是说已经出现了巨大的变化，我是说逐渐的变化和更多的认知，人们不再象以前那样看到这些东西就害怕了。</div>
<div twffan="done" align="left">Erik：也许JavaScript是这个世界上最……（译者注：Brian一阵激动的插嘴，搞得Erik的话听不清了）。我不确定当人们使用JavaScript时，他们是否意识到了这是一种把&ldquo;函数&rdquo;当作第一要素的语言。</div>
<div twffan="done" align="left">Brian：你可以在运行的时候创造它们（函数）……</div>
<div twffan="done" align="left">Charles：所有的东西都是一种类型，所有的东西都是对象，是吧？这是个有趣的语言。随着整个互联网的发展，你认为这种语言也应该有所进化……？</div>
<div twffan="done" align="left">Brian：这里的&ldquo;所有的东西都是对象&rdquo;，不是面向对象的意义。这里是从&ldquo;任何东西都是关联链表&rdquo;的角度来说。现在我听起来像一个老Lisp编程者（译者注：Lisp基于链表），是吧？一个JavaScript的对象不像一个C#对象那样&mdash;&mdash;所有的内存排列都决定了，什么东西都静态地决定了。这意味着所有的东西都可以添加、拿走，可以违反规则，它确实只意味着一个关联链表。</div>
<div twffan="done" align="left">Anders：属性包（我得意地笑）……</div>
<div twffan="done" align="left">Brian：是的，属性包的说法更好！</div>
<div twffan="done" align="left">Erik：是的，值可以是函数、其他对象，或者是其他属性包。</div>
<div twffan="done" align="left">Brian：JavaScript其实就是源自Lisp的Scheme。我又在说Scheme，因为我也许是这个屋子中唯一老到听说过这个词的人，呵呵！但是，Scheme有点类似于&ldquo;上帝的Lisp&rdquo;（译者注：不知道是God&rsquo;s Lisp, Guard&rsquo;s Lisp还是什么别的，懂得有限，暂时按God&rsquo;s Lisp处理，达人请指教），所有的噪音都被消除了，只剩下最基本的、最少的东西。JavaScript就是把这些东西带到了前台，披上件不那么可怕的外衣的结果。因为JavaScript看起来有点&ldquo;C&rdquo;的味道，你可以使用花括号！呵呵！</div>
<div twffan="done" align="left">（一阵乱哄哄）</div>
<div twffan="done" align="left">Charles：但是，JavaScript只是一种解释性语言，而且，对开发者来说，用它编程也不是很有效率。JavaScript不像C#或VB，它没有一种真正的面向对象语言所应该具备的IDE，以及你可以工作于其上的框架。</div>
<div twffan="done" align="left">Anders：呃，JavaScript是一种弱类型语言，或者说动态编程语言。人们经常把&ldquo;编译时&rdquo;与语言的&ldquo;类型强弱&rdquo;相提并论。但是，这两个概念其实是相互独立的，是吧？你可以有一种&ldquo;强类型&rdquo;，然而在运行期编译的语言，如果你真想要这样的东西的话。但是，对我来说，我以前也讲过，我非常乐于向那些喜欢&ldquo;动态语言&rdquo;、&ldquo;脚本语言&rdquo;的人指出，正是他们所醉心的那些地方会有问题。经常地，人们都理所当然地认为，如果没有类型碍事，就不用声明什么东西了，可以随手就用，诸如此类。这样干的时候你确实能够更快地写程序，然而，这里有一个陷阱：因为没有类型，我们（编译器）给你提供的帮助就少得多。当你写&ldquo;X.&rdquo;时，对不起，&ldquo;.&rdquo;之后是什么我们没法告诉你，我们没有足够的智能显示给你，因为我们没有任何办法知道将发生什么。有时我们可以猜，但我们有可能猜错，有时我们根本就一无所知，对吧？X或者其他参数，我们不知道将发生什么。我发现，有趣的是，我们在C#中进行的类型推论的工作，在许多方面都使得C#编程看起来更像动态语言，因为不会随时看到类型，甚至压根看不到。但是，类型在那里，静态地在那里，这也意味着，我们仍然可以给你提供&ldquo;语句完成&rdquo;这样的智能帮助。</div>
<div twffan="done" align="left">Charles：你是在说&ldquo;var&rdquo;关键字啰？</div>
<div twffan="done" align="left">Anders：&ldquo;var&rdquo;关键字只是个例子。光看这个关键字，似乎这是动态类型，然而，这是静态类型。当你定义&ldquo;var Blar&rdquo;时，我们知道&ldquo;Blar&rdquo;是什么类型；当你写&ldquo;Blar.&rdquo;时，&ldquo;.&rdquo;之后我们可以为你显示出东西。</div>
<div twffan="done" align="left">Herb：我们（C++）中也在做一样的事情。我有一个&ldquo;int&rdquo;类型的vector，我从该vector的头部取出一个元素，我有什么必要再用vector&lt;int&gt; 来声明一个遍历器？编译器知道它是这个类型，编译器能够将类型正确加到变量上。这就是&ldquo;var&rdquo;类型干的事，你不必到处都写出类型信息。这带来了很大的好处，你可以书写更好的&ldquo;范型&rdquo;代码，以前那些东西是写&ldquo;范型&rdquo;代码的障碍。</div>
<div twffan="done" align="left">Anders：我想说的是，（如果有类型），我们就能在你写代码的时候给你许多的帮助，尤其在&ldquo;智能感知&rdquo;上我说是大实话。当今世界，如果你想把&ldquo;智能感知&rdquo;去掉，人们绝对会大叫&ldquo;不！不！&rdquo;，呵呵，这工具太有用了。但是，这里还有性能的问题。我是说，当编译器知道类型时，它能够为你生成更好的代码。就是说，你会得到更好的执行效率。</div>
<div twffan="done" align="left">Erik：这里有件趣事。几个月前我们有次编译器XX（译者注：没听清），参加者都反映说，&ldquo;喔，你知道，F#是最好的动态语言！&rdquo;要我来说的话，F#是拥有最先进的静态类型系统的语言。当然，你不用写任何的类型，因为编译器帮你推断了所有的类型。很有趣的是，人们经常混淆&ldquo;不用写类型&rdquo;与&ldquo;动态类型&rdquo;。</div>
<div twffan="done" align="left">Brian：这些人可都是写编译器的职业程序员！这是在课程结束时，做调查时出的趣事：&ldquo;你最喜欢的动态语言？&rdquo;&ldquo;F#！&rdquo;</div>
<div twffan="done" align="left">Charles：但是（结巴了一阵，可能是震惊了），从开发人员的角度来看，动态类型是设计期的事吧？就我自己而言，如果我不必对任何东西进行强类型处理，我就会假设是动态类型。这是不是错了？我是说，编译器是怎么弄的？</div>
<div twffan="done" align="left">Anders：&ldquo;动态类型&rdquo;和&ldquo;隐式类型&rdquo;是有区别的。一种情况是，靠编译器推断出类型，但编译器在编译期就推断出来了。另一种情况是，编译器在编译时一无所知，它假设这东西可以是任何类型，然后在运行时的适当时机，检查到底是什么类型。后一种情况下，当你分发一个虚函数调用时，也许会使用一个查找表，或是别的什么东西，因为你压根还不知道那是什么东西。前一种情况，根据到底是C#或是C++，你可以预先构造好虚表，准确地知道使用这个虚表的哪个内存地址来找到实际的东西，因为我已经计算好了。这就是预先有效地计算好了所有的东西。但是，人们往往错误理解（静态类型）为，&ldquo;我，我这个人本身，必须在任何时候亲自手动写出类型&rdquo;实际上这并不必要，因为类型可以被推断出来，如果你在一个地方知道了类型，你可以跟踪程序逻辑，根据这里发生了什么，类型是如何变化的，从而知道在另一个地方类型是什么。如果你是个足够聪明的编译器，你应该可以做到这些，是吧？我们正开始把这种&ldquo;聪明&rdquo;加入到程序语言中。</div>
<div twffan="done" align="left">Brian：F#可能是这方面最好的例子。F#甚至欺骗了职业编译器程序员！我认为人们真正喜欢的是快速的反馈。人们喜欢快速看到结果。在他们的意识中，他们把这种喜好和&ldquo;动态&rdquo;相混淆了。下面我具体讲讲：你输入了一个函数，然后马上敲入一行代码来测试刚写的函数，如果能够正常工作，你就可以放心地忘掉它们（译者注：指可以投入下面的其他工作），这是人使自己的&ldquo;大脑堆栈&rdquo;保持满负荷运作的方式，是人的力量。历史上，&ldquo;动态语言&rdquo;在使人以这种方式工作上卓有成效。你打开一个Lisp，你实际上得到的是一个Lisp的监听器，你键入代码，然后在相同的环境中立即测试代码。但是，这实际上是个工具问题，与编译器什么的完全没有关系。你能够使动态语言有一个好的IDE和交互的开发环境，你也能使静态语言，如F#，拥有这样的IDE和交互的开发环境。这就是Sam在F#演示上干的事情。他打开好长一段代码，用鼠标选择它们，用&ldquo;GO&rdquo;按钮来执行；然后他打开另外一段代码，再用鼠标选择，再按&ldquo;GO&rdquo;来执行。所有的人都以为这是动态解释执行的。实际上，这是静态的，完全编译的。这就是欺骗行家的方法。呵呵（我得意地笑……）。但这确实是人们喜欢的东西。大家都喜欢能提供&ldquo;不断反馈&rdquo;的好工具，或者是&ldquo;交互式开发环境&rdquo;，无论你管这叫什么。只要你能够随时写代码并且测试，你就不必写一大堆代码后再测试。你会这样想，&ldquo;嘿，我写了个叫&lsquo;RandomDouble&rsquo;的函数，让我把它敲进去看看是否能工作&rdquo;。如果能正常工作，你就可以在进一步的Debugging前把它忘掉（去做别的工作）。</div>
<br>
<br>
<br>
<table cellspacing="0" cellpadding="0" width="468" align="center" border="0">
    <tbody>
        <tr>
            <td>
            
            
            </td>
        </tr>
    </tbody>
</table> <a href="http://hi.baidu.com/bestgo/blog/item/cc5cbb012b9696097aec2c02.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/bestgo/blog/category/%CE%C4%D5%C2">文章</a>&nbsp;<a href="http://hi.baidu.com/bestgo/blog/item/cc5cbb012b9696097aec2c02.html#comment">查看评论</a>]]></description>
        <pubDate>2008年11月20日 星期四  上午 02:07</pubDate>
        <category><![CDATA[文章]]></category>
        <author><![CDATA[梦怀秋]]></author>
		<guid>http://hi.baidu.com/bestgo/blog/item/cc5cbb012b9696097aec2c02.html</guid>
</item>

<item>
        <title><![CDATA[微软架构师谈编程语言发展（三）]]></title>
        <link><![CDATA[http://hi.baidu.com/bestgo/blog/item/4fb7d8afdaa765fcfaed5001.html]]></link>
        <description><![CDATA[
		
		<div twffan="done" align="left">Herb：我想，我们有必要在&ldquo;函数型&rdquo;编程领域做一个进一步区分，将其划分成两个部分。我非常同意Anders和Erik的意见。我不太同意的是这样的措辞：我们之所以继续使用&ldquo;命令型&rdquo;编程语言，是因为这是大家目前所能理解的；通用程序员目前的工作并未取得巨大的成功；市场对于&ldquo;所有的东西都是表达式，所有的语言都应该是表达式类型的语言&rdquo;这样的理念已经非常接受了；&ldquo;函数型&rdquo;语言是&ldquo;串行执行&rdquo;的好药方。我们要想使&ldquo;函数型&rdquo;语言运转良好，关键的并不是处理好基本的表达式问题，而是处理好lambda表达式和副作用的问题，关键是能够将表达式作为第一级的编程要素来使用&mdash;&mdash;LINQ也是最近才在做，关键是能够指出lambda表达式和Closure（译者注：函数型编程语言中的一个概念，可以方便地组合函数，返回函数）的副作用。实际上，最后这点目前是缺失的（Anders也附和着：对，对）。这些东西在&ldquo;命令型&rdquo;语言中也是要处理的东西。我为什么提这些？因为我觉得说&ldquo;函数型&rdquo;语言是方向，目前的&ldquo;命令型&rdquo;语言不够好，因此是垃圾，必须要抛在脑后，全面采用&ldquo;函数型&rdquo;语言这样的说法不对（译者注：呵呵，对Anders的说法有点急了，毕竟是泡在C++上，对C++有感情的人）。我认为，对于&ldquo;函数型&rdquo;语言能够帮助程序员完成哪些工作，目前还不太明了。比如，能够用它写通用代码吗？能够用它系统级代码吗？当然，&ldquo;函数型&rdquo;语言有不少我们能够应用的好东西，比如lambda表达式，比如Closure，C#借鉴了，C++也在借鉴，这些语言因此增色不少。关于&ldquo;函数型&rdquo;语言还有另一个问题，那就是有两种类型的&ldquo;函数型&rdquo;语言，一种是没有副作用的，因此就没有共享的易变的状态的问题；一种是人人都在使用的，对吧（译者注：显然Herb认为&ldquo;没有副作用&rdquo;的理想情况是不太可能的）？因为你不太可能说，&ldquo;瞧，我是完全并发安全的，因为每次我从XX（译者注：听不清）向量中得到一个拷贝，或者我使用XX（译者注：听不清）元素的时候，我都是取得一个拷贝&rdquo;。确实不错，这里是没有共享的易变的状态，但是是否能够完全并发安全则不一定。</div>
<div twffan="done" align="left">Anders：是的。我的意思是，在类似C#或VB这样的&ldquo;命令型&rdquo;编程语言中加入&ldquo;函数型&rdquo;结构，能给我们提供&ldquo;以函数型风格&rdquo;写库的能力，从而我们就能够非常明确地说，如果你能保证传入的lambda表达式是纯粹的函数，我们就能保证正确地把它分散到若干个线程或者CPU上，最后把它综合起来，给你一个正确的结果，我们能够保证代码运行得更快，同时你还不用作任何编码上的修改。如果你在写一个大大的For循环，我们永远都不可能保证做到前面所说的，此时，&ldquo;函数型&rdquo;编程能够提供给你的是一系列表达式，再加上&ldquo;把代码当作参数传递&rdquo;，&ldquo;类型推论和泛型编程可以正确地绑定所有的类型&rdquo;这些特性，这样你就能更方便地编写&ldquo;可组合的算法块&rdquo;。</div>
<div twffan="done" align="left">Charles：这样一来不就削弱了抽象吗（译者注：Charles可能想的是程序员不需要再关心&ldquo;可组合性&rdquo;，语言和运行库应该保证这件事，而现在听起来并非如此）？</div>
<div style="text-align: left" twffan="done" align="left">Herb：呃，我很同意Anders的意见，我想指出的是，当前所有的语言都有意不保证 &ldquo;没有副作用&rdquo;。之所以如此的原因是，除非所有的语言都添加一些机制让程序员可以清除副作用，我们这些做语言的人不敢打这个包票。但是，添加这样的机制涉及到众多参加者，大家一起思考、讨论什么是最好的方法的过程会很漫长。我们所做的是相信程序员，因为我们自己不知道。然而，程序员在很多情况下也不知道，因为他写的函数要调用其他的库。这里&ldquo;可组合性&rdquo;又浮上水面了，程序员根本不知道他用的库有怎样的副作用。一般说来程序员会再增加一层间接性，但是问题依然存在，没有人能够清楚地知道副作用，除非他拥有涉及到的所有的代码，这就是难题所在。上面这些讨论对&ldquo;锁&rdquo;也适用，因为&ldquo;锁&rdquo;也是个全局问题，对于&ldquo;可操作性&rdquo;是个障碍。</div>
<div twffan="done" align="left">Brian：（译者注：在Herb说话的时候已经很着急地想说了几次）在这点上Haskell做得很好，Haskell是&ldquo;永远没有副作用&rdquo;的范例。</div>
<div twffan="done" align="left">Erik：是的，但做到这点的过程也是痛苦的，因为并非所有的情况都一目了然。一旦你的（库）代码有副作用，而且因此使程序员的代码必须按照某种顺序执行（因为副作用的关系，该程序必须先干某事，再干某事），某种意义上你在用汇编语言编写东西，因为程序员将不再能用&ldquo;表达式+表达式&rdquo;的方式来写代码，他必须决定先对某个表达式求值，再对另一表达式求值，再把值加起来。因此我认为我们在这点上干得还是不够漂亮。</div>
<div twffan="done" align="left">Brian：现在，我们在&ldquo;流库&rdquo;上有例子。好消息是，我们已经有Haskell向你展示如何以&ldquo;可行性&rdquo;方面的代价，换来用绝对纯粹的方式来做事。当然，除Haskell外我们有各种&ldquo;杂牌&rdquo;语言。呵呵！</div>
<div twffan="done" align="left">（众人均乐）</div>
<div twffan="done" align="left">Charles：这是个供研究的语言吗？</div>
<div twffan="done" align="left">Brian：是的，我们将它设计为供研究用。</div>
<div twffan="done" align="left">Anders：没有纯粹的好或坏，我认为，虽然进展缓慢，我们仍然快到一个令人满意的中间点了。我完全同意说，如果我们确实能够保证函数的纯粹性，生活将会非常美好。最终我们必须要做到。</div>
<div twffan="done" align="left">Brian：在研究领域，大概有20多项工作与此有关&mdash;&mdash;契约语言，契约和限制，等等。</div>
<div twffan="done" align="left">Erik：但是，不少的副作用也并非坏事，如果我的函数使用了一个局部变量，这就是使用了一个状态，但是，函数本身还是纯粹的。如果你想要完全避免副作用，我觉得会非常困难，一些东西可以是局部不纯粹而整体纯粹的。</div>
<div twffan="done" align="left">Herb：回过头，让我们从整体上看看&ldquo;可组合性&rdquo;。让我吃惊的一件事是，很多时候，人们甚至都没有意识到这是个问题。他们并没有意识到自己实际上经常碰到这个问题。整个软件工业，整个世界其实已经基于可组合的软件了。在硬件会议上，我经常对硬件公司提到的是（呵呵，通常此时我都是在轰击硬件工业，但是软件业也有同样的问题）：硬件的并发问题被仔细地探索过了，而且，当前消除共享易变状态的最好办法就是&ldquo;锁&rdquo;；但是，锁是全局的，是一种全局资源，不能被组合；&ldquo;被锁&rdquo;是经常发生的事情，而拥有一个锁时，我还能调用任何其他的未知的代码，这就破坏了&ldquo;可组合性&rdquo;。说到这里，有的听者往往一脸茫然：这有什么问题吗？我于是指出，好的，你们是否上网下载别人刚刚发布的，自己喜欢的新软件，比如，某个浏览器，3个插件，然后就用呢？大家回答：是啊。于是我再指出，你们是否意识到了，当你们这样做时，经常地，这些软件都是第一次在最终用户的机器上被组合，被使用？既然如此，你们怎么可能对其进行测试？这时，屋子里有百分之十的人会露出恍然的表情，因为此前他们没有想过这个问题：这些软件是第一次在最终用户的机器上被组合，我们怎么进行测试？正因如此，&ldquo;可组合性&rdquo;是更加重要的一个问题。更不用说我们现在有AJAX，应用程序，以及众多的其他插件经常被下载，而且被要求在同一个用户界面中协调工作。</div> <a href="http://hi.baidu.com/bestgo/blog/item/4fb7d8afdaa765fcfaed5001.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/bestgo/blog/category/%CE%C4%D5%C2">文章</a>&nbsp;<a href="http://hi.baidu.com/bestgo/blog/item/4fb7d8afdaa765fcfaed5001.html#comment">查看评论</a>]]></description>
        <pubDate>2008年11月20日 星期四  上午 02:01</pubDate>
        <category><![CDATA[文章]]></category>
        <author><![CDATA[梦怀秋]]></author>
		<guid>http://hi.baidu.com/bestgo/blog/item/4fb7d8afdaa765fcfaed5001.html</guid>
</item>

<item>
        <title><![CDATA[微软架构师谈编程语言发展（二）]]></title>
        <link><![CDATA[http://hi.baidu.com/bestgo/blog/item/488067ddf1b9bee877c63801.html]]></link>
        <description><![CDATA[
		
		<div twffan="done" align="left">Brian：是的，在有的情况下，多种语言互相关联。比如，如今的Windows编程就是一项大苦差：你必须懂PHP、JavaScript、HTML、XML、SQL等等，要把这些东西全写到名片上，你就只有小小的一块地方可以写自己的名字了。哈哈哈。当然，能够同时使用多种语言也是有好处的，至少你可以选择自己喜欢的语法……</div>
<div twffan="done" align="left">Erik：我们的编程语言之所以有差异，还是因为这些语言没有能够统一起来，在语言下面还有若干不一致的地方，我们实际上是被强迫使用不同的东西。CLR就不一样，基于CLR上面的东西使用相同的库，这些语言之间的排他性就要少一些，你可以选择，而非被迫使用某种特定的语言。</div>
<div twffan="done" align="left">Brian：目前我们做得很多工作就是：减少大家被迫使用某种语言这种情况。我们努力改进平台，增加更多的功能，提供更多的.NET库。值得大家期待喔！</div>
<div twffan="done" align="left">Charles：但是，像VB和C#这样的语言，C++除外啊，就如你们所说，它们确实绑定在某个框架上。这样的话，在一定意义上是否有其局限性？我的意思是，让我们谈谈函数型程序，这种程序如何能够融入到我们所谈的巨大的框架中呢？比如Haskell，有比如流行的F#，它们的结构（与现在的语言）完全不同。</div>
<div twffan="done" align="left">Erik：很有趣的是，传统上，如果我们用&ldquo;命令型语言&rdquo;编程，我们的基本成份是&ldquo;语句&rdquo;。&ldquo;语句&rdquo;使用并且共享&ldquo;状态&rdquo;，从而导致不太好的&ldquo;可组合性&rdquo;。你不能拿着两段语句，然后简单地把它们粘合到一起，因为它们的全局状态不能很好地交互。这就导致&ldquo;命令型语言&rdquo;不能很好地组合到一起。如果你看看LINQ，就会发现我们已经更多地采用&ldquo;函数型语言&rdquo;的风格，所有的东西都基于表达式。&ldquo;表达式&rdquo;从其定义来说就是可组合的。你如何创建一个新的表达式？你用小的表达式组合出一个大的表达式，你使用lambda表达式，如此等等。从一定意义上来说，我认为在C#3和VB9中没有什么东西是Haskell或F#中没有的。这里面有一些深奥的事情，如果你看看Haskell的类型系统，你会发现这个类型系统跟踪程序的副作用。这就给了你一定形式的可组合性。现在你虽然不能把有某种副作用的语句组合到有其他副作用的语句上，但是，你可以组合副作用相同的东西。F#有一个非常强悍的类型推论机制，F#从设计之初就考虑了类型推论。我们以前也有类型推论，这并非什么新东西，但是现在的类型推论要考虑很多困难因素，比如，重载，这些东西使类型推论很困难。如果你从这个角度来看，我认为我们已经在很大程度上采用了浓厚的&ldquo;函数型&rdquo;风格，并且以相当&ldquo;可组合&rdquo;的方式来使用表达式和lambda表达式。</div>
<div twffan="done" align="left">Anders：我想插进来说几句。我们对&ldquo;函数型编程&rdquo;的兴趣并非学院式兴趣。我们面临的一个挑战，嗯，实际上，当编程语言向前推进时，我们面临两类挑战。挑战之一是古老的追求&mdash;&mdash;不断提高程序员的生产率，对吧？将采用和一直以来在采用的方法是&mdash;&mdash;提升抽象的层次，对吧？给程序员垃圾回收机制、类型安全、异常处理，甚至是全新的&ldquo;声明型&rdquo;编程语言，如此等等。在提升抽象层次的过程中，正如Erik指出的，这些&ldquo;声明型&rdquo;语言获得了更高层次的&ldquo;可组合型&rdquo;。&ldquo;函数型&rdquo;语言之所以有魅力，正是因为你可以做出&ldquo;没有副作用&rdquo;，或者其他别的什么承诺，这样一来可组合性就极大地提高了。不光如此，在我们将如何让多核处理器、多CPU（比如，32个CPU）保持忙碌上，我们也会有所收获。显然，当我们更多地使用&ldquo;函数型&rdquo;或者&ldquo;声明型&rdquo;风格的编程时，我们更有可能把运行时框架构建得能更好地发挥多核的优势，更有可能更好地并行化。如果以&ldquo;命令型&rdquo;风格来工作，我们能够发挥的余地就很小，因为你无法预见所有动作&mdash;&mdash;这拿点东西，那放点东西&mdash;&mdash;背后可能带来的影响，所有这些必须串行执行，否则不可预料的事情就会发生。</div>
<div twffan="done" align="left">Charles：这很有趣。我的意思是，作为程序员，使用了如此巨大的一个处理引擎&mdash;&mdash;比如CLR之后，当然认为这些底层的东西应该被抽象掉。（译者注：Charles显然比较吃惊。）你的意思也是，如果我使用了一个4核的机器，运行时的引擎应该有能力负责分配进程（在CPU上的分配）。</div>
<div twffan="done" align="left">Anders：嗯，你这样想很正常。但是，CLR以及我们的工业中目前绝大多数的运行时，都是&ldquo;命令型&rdquo;引擎，其指令集都是相当传统的，比如，堆栈增长啥的，以及拥有易变的状态，包括易变的全局状态等等。在此之上能够进行&ldquo;函数型&rdquo;编程，因为&ldquo;函数型&rdquo;编程从本质上来说，是&ldquo;命令型&rdquo;编程所具备的能力集的一个子集。现在我们想做的是最大化这种灵活性，但其实不过也就是让&ldquo;函数型&rdquo;能力子集越来越相关，使其越来越主流化而已。</div>
<br> <a href="http://hi.baidu.com/bestgo/blog/item/488067ddf1b9bee877c63801.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/bestgo/blog/category/%CE%C4%D5%C2">文章</a>&nbsp;<a href="http://hi.baidu.com/bestgo/blog/item/488067ddf1b9bee877c63801.html#comment">查看评论</a>]]></description>
        <pubDate>2008年11月20日 星期四  上午 01:56</pubDate>
        <category><![CDATA[文章]]></category>
        <author><![CDATA[梦怀秋]]></author>
		<guid>http://hi.baidu.com/bestgo/blog/item/488067ddf1b9bee877c63801.html</guid>
</item>

<item>
        <title><![CDATA[微软架构师谈编程语言发展（一）]]></title>
        <link><![CDATA[http://hi.baidu.com/bestgo/blog/item/ed11c423c050be559922ed01.html]]></link>
        <description><![CDATA[
		
		<p>本文是对微软Channel 9中采访几个语言大牛的视频的翻译。<br>
视频在Channel 9，链接<a href="http://channel9.msdn.com/Showpost.aspx?postid=273697">http://channel9.msdn.com/Showpost.aspx?postid=273697</a>。<br>
名字为Anders Hejlsberg, Herb Sutter, Erik Meijer, Brian Beckman: Software Composability and the Future of Languages<br>
大家可以找来看看。<br>
个人感觉这些大牛高屋建瓴，有点有面地谈到了多个语言的发展和语言的相互关系，对于我们开拓视野非常有帮助。由于只能靠听来翻译，篇幅又长，只能分段（估计有4-5段）慢慢来。而且，水平所限，难免错误，请大家指正。</p>
<p>译者：程化<br>
Charles：好的。今天我们请到了微软设计编程语言的大师们。请你们介绍一下自己。<br>
（译者注：Channel 9的主持人，从其对话来看，应该是编程出身，对于程序有很好的理解）<br>
Herb：我是Herb Sutter，我是VC++小组的架构师。<br>
（译者注：C++标准委员会主席，Exceptional C++系列的作者，C++领域的大牛人）<br>
Erik：Erik Meijer，我在VB以及C#小组工作。<br>
（译者注：先是SQL Server组的架构师，现为VB、C#组的架构师，从事把CLR、关系数据库、XML数据合为一体的伟大事业）<br>
Brian：我是Brian Beckman，和Erik Meijer一起工作。呵呵<br>
（译者注：物理学家，天体物理为主，业余时间写程序，包括编译器，自称来自从事影视娱乐业的家族，家里以其从事科学研究为奇）<br>
Anders：我是Anders Hejlsberg，我的技术领域是C#。<br>
（译者注：微软的&ldquo;技术小子&rdquo;，公认的牛人，C#的主要设计者，.NET框架的重要参与者。微软之前，Anders是Borland的工程师，Turbo PASCAL的主要开发人员，Delphi的首席架构师）<br>
Charles：我们今天访谈主要讨论两个相关的论题：可组合性（Composability）与编程语言。作为程序员，当我们构造系统时，总是要面对这两个问题。你们是创设语法，搭建架构的人。所以，我想讨论的一点是，你们是如何协调工作的？三个语言&mdash;&mdash;C#、VB和C++，都在演进，同时又服务于不同的目的，C++更多服务于系统级，C#和VB更多偏向应用层面。而且，语言之间还互相影响。这一切是如何形成的？你们一起工作吗？你们是如何决定语言间相互影响的？你们是一起设计，还是想到什么后再与他人共享？很抱歉提这样的怪问题，请试着回答。<br>
Anders：我想，你说的两种情况都存在吧。事实上，早在我们做LINQ之前，Erik就在Comega项目做了很多工作了。在LINQ和Omega之间有很多相似之处，有很多互相影响的部分。我们一直在讨论相关的问题。而且，Erik实际也在C#设计组中，所以，我们总是就当前的工作及时交换意见。VB组和C++组的人也在一幢楼里工作，大家经常碰到一起。所以，我认为这一切是相互渗透，以及不断聊天的结果。<br>
Charles：但是我的意思是，你们是否也象最终用户一样对自己做出区分？比如，有的事情在VB中能做，C#中就做不了。比如，对于VB来说，完全的晚绑定以非常简单的方式实现了，而C#中就没有晚绑定。为什么VB和C#有这样的不同？你们有意如此的吗？<br>
Anders：我认为这个问题更多的是历史原因。我想说的是，我们必须考虑历史因素，尤其当你讨论VB时更是如此。VB有其悠久而丰富的历史，从一开始，VB就作为晚绑定的语言出现。（开始时）VB没有任何类型。很显然，晚绑定对于VB来说有某种核心作用。但是，从那时开始，VB已经逐步演进为一种更为&ldquo;强类型&rdquo;的语言，到现在，甚至你可以把VB看作一种支持晚绑定的强类型语言。呵呵。但实际上，这个过程是相反的。C#从一开始就是强类型语言，而且直到现在，我们都坚持早绑定。这并不是说我们在未来也不会支持晚绑定，但是，我们很可能以不同于VB的方式支持，而且可能对晚绑定的方式做些改进。C#是否支持晚绑定其实只是一种选择。对于老式的弱类型对象模型来说，比如OLE，如果我们从晚绑定角度出发，会比从早绑定角度出发好讨论得多，因为这种对象模型无非就是对象的若干方法的交互，反射，等等。<br>
Charles：这些东西完全可以靠底层帮你完成……<br>
Anders：是的，对，非常正确！<br>
Herb：语言之间的差异在一定程度上是由用户引起的。对于靠近底层编程的C和C++程序员来说，性能永远都是一个核心和主要的问题。你可能发现不同语言有不同的特性，但是，更经常的是，你会发现这些不同特性想要解决的都是同一类的问题，比如，&ldquo;并行执行&rdquo;。现在，没有谁能够忽视这个问题，并且，一种语言如果想在未来5到10年保留在主流编程语言的队伍中，这个问题就是无法忽视的，因为这是硬件的发展方向。我们正处于一个新的时代，50年以来，我们首次在非单核的机器上工作。任何人都无法忽视这个现象。因此，就这个问题来说，大家都要处理一些相似的东西，但是，处理方式、语法可能不同，具体的特性也可能不尽相同。我也相信，不同语言推出同一特性的时间先后顺序也不相同，因为不同语言针对不同的客户群体服务，客户要求的东西不一样，因此，对于特性处理的时间先后顺序并不一致。就像Anders说的，各种情况都有一些。<br>
Erik：是这样的。对VB和C#有怎样的差异，我可以给出一个具体的例子。该例子是&ldquo;无名函数（或&lsquo;lambda表达式&rsquo;）&rdquo;。我们想在VB中也加入这种功能。首先就是寻找正确的语法。我们向VB项目组要到了VB的名称表，名称表中的名字支持两种语法的都有（VB和C#）。但是，这次他们想要更像关键字的名字，而不是C#那样长长的名字，因为他们觉得像关键字的名字更加&ldquo;VB化&rdquo;一些。这里你看到的就是语法上的区别。但是，在语义上也是有区别的。当你查看一个大函数内部的，嵌套很深的结构，比如&ldquo;for&rdquo;循环的时候，语言是何时、如何处理变量捕获，如何进行实例保护的就非常不同。在C#中，每次循环时实例都被保护，而在VB中，象JavaScript那样，变量是被隐性提升到函数顶部的。所以，在变量捕获方面，语义上的区别也存在。有时这些区别是极其细微的，你必须写非常变态的程序才能看到这些区别。<br>
Anders：每次你写出依赖这样的特性的程序时，我们就能找出成百的Bug。呵呵<br>
Erik：是啊是啊。<br>
Brian：你逃不出作战室的<br>
（译者注：微软的&ldquo;作战室&rdquo;，是产品、程序、测试人员一起对需求、找Bug之所在。）<br>
Charles：这样看来，大家都同意不同语言在相互影响，不断演进。对于VB和C#来说，你们有相同的核心&mdash;&mdash;处理引擎，你们必须在CLR的基础上出发，随着CLR的演进而演进。很显然，C++属于另一个世界。但是，各种语言要互相影响，你们必须在C#中加点什么来吸引用户，让他们用C#而不是VB.NET，是吧？应该不止是语法的区别，语言中必须还有一些核心的东西来吸引用户。<br>
Herb：我认为你说的是对的。但是，我不同意你提出的理由，说我们必须在各自的语言中加点什么特性吸引用户，从而使他们不去使用其他的微软的语言。为什么呢？比如我吧，我更加关心使用C++或者C#的用户到底需要什么，我怎样才能帮助他们把工作完成得更好。也许某处有某种很牛的特性的语言，但我的工作是&mdash;&mdash;怎样才能使客户的工作更成功？我必须要考虑客户会如何集成，我怎样做才能使客户工作得更好，这也是CLR的核心所在，因为目前已经不是靠一种语言就能做完整个项目的时代了。我怀疑在稍有点规模的实际项目中，是否还有人仅仅依靠一种开发语言。一般说来，你用脚本语言写点东西，其他语言写工具和组件，系统语言写核心的东西。你不停地在做集成。这就带来了我们所讨论的&ldquo;可组合性&rdquo;的问题。因为&ldquo;可组合性&rdquo;本质上就是跨语言产生的问题。当你写Web浏览器时，你不知道某个插件是用C#，C++，某种CLR扩展，还是其他什么写的。不管如何，这些东西必须一起工作，这就是主要挑战之所在。因为，要想使这种&ldquo;可组合性&rdquo;成为现实，我们必须时时将CLR和CLR以外的东西当作白盒来考虑。但是，我们这样做的时候又会碰到&ldquo;锁&rdquo;的问题。&ldquo;并行执行&rdquo;已经越来越重要了，但是，&ldquo;锁&rdquo;是完全不具备组合性的。因此，这是&ldquo;可组合性&rdquo;面对的主要障碍。我实际上已经转移到另一个话题上了。总之，对我而言，这更多的是一个语言交互的问题，而非语言竞争的问题。<br>
Brian：我插句嘴。我在一定程度上代表了用户。我是个物理学家，同时，我也经常写点小程序，进行模拟和仿真，解决一些数学问题。要想成功，&ldquo;可组合性&rdquo;对我的来说是绝对地重要。我可以不在乎编程语言，但是我很在乎该语言是否有我所需要的组件。我有点夸张了，因为我其实还是在乎编程语言的，呵呵。基本上，我十分愿意使用任何能使我的工作更简单的编程语言。<br>
这里，我先戴上顶&ldquo;老人&rdquo;帽，谈谈这个世界的历史上，非常少的成功软件之一&mdash;&mdash;数值计算库（译者注：谢谢drdirac的修正）。这些东西是N年以前用FORTRAN写的。几十年以来，人们用这些库解决了许多非常重要的科学问题。任何头脑正常的人都不会想坐下来从头写一个&ldquo;线性代数包&rdquo;（译者注：谢谢drdirac的修正）或者类似的东西。有许多数学家终其一生在完善这些软件包。我们需要的是&ldquo;互操作性&rdquo;。不简单的是互操作性，我们需要的是&ldquo;可组合性&rdquo;。所有人都知道，FORTRAN不支持递归，因为所有的变量都是引用传递。这就带来了包之间接口问题。如果你想要集成某种自身内部不支持集成的东西，你就不能再需要集成的两边使用这样同一个包用于集成，这行不通。呃，我已经忘了最开始我在说啥了，哈哈，我尽讲些物理小故事了。让我回到C++、C#和VB上。这些语言我都要使用，我更喜欢C#一些，因为我喜欢它的操作符重载。为什么我喜欢操作符重载？因为我做数学计算，类似于XX和XX（译者注：听不清）的奇怪算法，用一个小加号就能够代表那些要进行的一大堆计算。<br>
Erik：伙计，也许你想用的是模板？哈哈。<br>
Brian：（译者注：看样子生怕别人认为自己不知道模板）不，我才不想用模板呢。只要我一用模板，我就会开始想：喔，模板的预处理器是图灵完备的（译者注：谢谢drdirac的修正），我也许能够在库中做队列处理……很快，我就会偏离真正的数学思考。在应用程序绝对需要晚绑定的场合（比如，那些小的计算模拟器什么的，晚绑定是成功的关键），此时，很自然地，我会选择VB。至于C++，天哪，大多数时候，C++用来实现其他的语言，做这类事C++很拿手。在用于科学的环境下，我多次实现过Scheme（译者注：谢谢drdirac的修正）。<br>
总而言之，我就是泛泛谈谈&ldquo;可组合性&rdquo;。<br>
Anders：如果你回过头去看看十年之前，会发觉潮流已经逐渐变化了。当我开始编程生涯时，进入编程这行的学习曲线就是：学习要使用的编程语言本身。各个编程语言几乎在每个方面都不相同。语法是你要学习的很大一部分。这是以前的事了。现在，你要学习巨大的框架，这个框架正越变越大，语法只是顶上的一小颗樱桃。我认为我们在这方面确实前进了很多。很有趣的是，编程语言就像你的眼镜一样，所有的东西根据编程语言的不同，要么看着是玫瑰色的，要么是紫色的，如此等等。但是，实际上起作用的东西是学习所有的API，学习你所基于的，越来越大的平台或者框架。如今，学习曲线的90%都耗费在这上面。掌握了这些，你就可以在C++、C#或者VB.NET什么的之间，毫不费力地进行语言转换，将部分项目使用这种语言，部分项目使用那种，并且找出组合这些语言的解决方案。相对于以前，实际上是不久之前，这是个主要的进步。当然，这些能出现，是由于有了通用的类型系统，以及各种语言中的那些抽象。每种语言之间的差别则是细微的，而且这些差别说不上来有什么特别的理由。</p> <a href="http://hi.baidu.com/bestgo/blog/item/ed11c423c050be559922ed01.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/bestgo/blog/category/%C4%AC%C8%CF%B7%D6%C0%E0">默认分类</a>&nbsp;<a href="http://hi.baidu.com/bestgo/blog/item/ed11c423c050be559922ed01.html#comment">查看评论</a>]]></description>
        <pubDate>2008年11月20日 星期四  上午 01:53</pubDate>
        <category><![CDATA[默认分类]]></category>
        <author><![CDATA[梦怀秋]]></author>
		<guid>http://hi.baidu.com/bestgo/blog/item/ed11c423c050be559922ed01.html</guid>
</item>

<item>
        <title><![CDATA[网线分类]]></title>
        <link><![CDATA[http://hi.baidu.com/bestgo/blog/item/be382b77d6d2671db151b91a.html]]></link>
        <description><![CDATA[
		
		<span class="Apple-style-span" style="word-spacing: 0px; font: 12px/18px Arial; text-transform: none; color: rgb(136,176,63); text-indent: 0px; white-space: normal; letter-spacing: normal; border-collapse: separate; orphans: 2; widows: 2; webkit-border-horizontal-spacing: 2px; webkit-border-vertical-spacing: 2px; webkit-text-decorations-in-effect: none; webkit-text-size-adjust: auto; webkit-text-stroke-width: 0"><font color="#339966">
<div forimg="1" align="right"> </div>
网线的分类方法很多：<br style="line-height: normal">
我们一般所见的网线（双绞线）分为STP屏蔽型和UTP非屏蔽型，市场上卖的10/100MB 网线都是UTP类型，STP可用于1000MB网络，实际使用时网线仅仅有1、2、3、6根在工作，其余的线并没有用到。<span class="Apple-converted-space"> </span><br style="line-height: normal">
<br style="line-height: normal">
〔 1 〕网线共有三种：<span class="Apple-converted-space"> </span><br style="line-height: normal">
<br style="line-height: normal">
一、直通线（也叫平行线）：用于 主机和交换机、集线器连接；路由器和交换机、集线器连接；<span class="Apple-converted-space"> </span><br style="line-height: normal">
<br style="line-height: normal">
二、交叉线：用于 交换机&lt;－&gt;交换机；主机&lt;－&gt;主机；集线器&lt;－&gt;集线器；集线器&lt;－&gt;交换机；主机&lt;－&gt;路由器<span class="Apple-converted-space"> </span><br style="line-height: normal">
<br style="line-height: normal">
三、全反线：用于进行Router的配置，连接Console口，需要一个DB25转接头，不过我们一般用不到。<span class="Apple-converted-space"> </span><br style="line-height: normal">
<br style="line-height: normal">
上面的大家一定要记牢！<span class="Apple-converted-space"> </span><br style="line-height: normal">
<br style="line-height: normal">
〔 2 〕网线的接口（也叫水晶头、RJ45）做法有两种：<span class="Apple-converted-space"> </span><br style="line-height: normal">
<br style="line-height: normal">
一、568A ，把网线剥开<span class="Apple-converted-space"> </span><br style="line-height: normal">
<br style="line-height: normal">
从左到右排列顺序为：白绿、绿、白橙、蓝、白蓝、橙、白棕、棕<span class="Apple-converted-space"> </span><br style="line-height: normal">
<br style="line-height: normal">
二、568B，把网线剥开<span class="Apple-converted-space"> </span><br style="line-height: normal">
<br style="line-height: normal">
从左到右排列顺序为：白橙、橙、白绿、蓝、白蓝、绿、白棕、棕<span class="Apple-converted-space"> </span><br style="line-height: normal">
<img class="blogimg" border="0" small="0" src="http://hiphotos.baidu.com/bestgo/pic/item/936a0fb1541cf24e09230284.jpg"><br style="line-height: normal">
如果我要制作 PC&lt;－&gt;交换机或集线器 的网线，应该选择直通线：两头都是568A 或者 两头都是568B<span class="Apple-converted-space"> </span><br style="line-height: normal">
<br style="line-height: normal">
如果我要制作 路由器&lt;－&gt;交换机或集线器 的网线，应该选择直通线：两头都是568A 或者 两头都是568B<span class="Apple-converted-space"> </span><br style="line-height: normal">
<br style="line-height: normal">
如果我要制作 PC &lt;－&gt; PC 的网线，应该选择交叉线： 一头是568A 、一头是568B<span class="Apple-converted-space"> </span><br style="line-height: normal">
<br style="line-height: normal">
〔 3 〕另外如果要进行设备（集线器、交换机）级联有些要求：<span class="Apple-converted-space"> </span><br style="line-height: normal">
<br style="line-height: normal">
如果要连接的两个设备端口上都有 &ldquo;1X&rdquo; 标识，使用交叉线。<span class="Apple-converted-space"> </span><br style="line-height: normal">
<br style="line-height: normal">
如果要连接的两个设备端口上都有 &ldquo;1&rdquo; 标识，使用交叉线。<span class="Apple-converted-space"> </span><br style="line-height: normal">
<br style="line-height: normal">
如果要连接的两个设备，一个端口上为&ldquo;1X&rdquo;标识、另一个端口上为&ldquo;1&rdquo;标识，使用直通线<span class="Apple-converted-space"> </span><br style="line-height: normal">
<br style="line-height: normal">
〔 4 〕 全反线做法<span class="Apple-converted-space"> </span><br style="line-height: normal">
<br style="line-height: normal">
一头如果是568A，那么另外一头全部反接，<span class="Apple-converted-space"> </span><br style="line-height: normal">
<br style="line-height: normal">
如一头为：白绿、绿、白橙、蓝、白蓝、橙、白棕、棕<span class="Apple-converted-space"> </span><br style="line-height: normal">
<br style="line-height: normal">
另一头为：棕、白棕、橙、白蓝、蓝、白橙、绿、白绿<span class="Apple-converted-space"> </span></font></span> <a href="http://hi.baidu.com/bestgo/blog/item/be382b77d6d2671db151b91a.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/bestgo/blog/category/%B5%E7%C4%D4%D6%AA%CA%B6">电脑知识</a>&nbsp;<a href="http://hi.baidu.com/bestgo/blog/item/be382b77d6d2671db151b91a.html#comment">查看评论</a>]]></description>
        <pubDate>2008年10月09日 星期四  下午 10:35</pubDate>
        <category><![CDATA[电脑知识]]></category>
        <author><![CDATA[梦怀秋]]></author>
		<guid>http://hi.baidu.com/bestgo/blog/item/be382b77d6d2671db151b91a.html</guid>
</item>

<item>
        <title><![CDATA[太无聊了，]]></title>
        <link><![CDATA[http://hi.baidu.com/bestgo/blog/item/bb7325ef7b440e10fcfa3c78.html]]></link>
        <description><![CDATA[
		
		<p>两只青蛙相爱了，结婚后生了一个癞蛤嫫，<br>
公青蛙见状大怒说：贱人，怎么回事？<br>
母青蛙哭着说：他爹，认识你之前我整过容。 <br>
(爱情需要信任)</p>
<p>小驴问老驴：为啥咱们天天吃干草，而奶牛顿顿精饲料？<br>
老驴叹到：咱爷们比不了，我们是靠跑腿吃饭，人家是靠胸脯吃饭！ <br>
(生活需要忍耐)</p>
<p>鸭子和螃蟹赛跑,一起到达终点，难分胜负，裁判说：你们来个剪刀石头布吧！<br>
鸭子大怒：妈的，算计我?我一出是布，他总是剪刀。 <br>
(比赛需要天赋)</p>
<p>狗对熊说：嫁给我吧,嫁给我你会幸福。<br>
熊说：才不嫁呢，嫁给你只会生狗熊，我要嫁给猫，生熊猫那才尊贵呢! <br>
(婚姻需要理智)</p>
<p>老鳖调戏河蚌，被咬，老鳖忍痛拖着河蚌来回爬，<br>
青蛙见了敬佩的说：乖乖，鳖哥混大了，出入都夹着公文包。<br>
(该装的时候得装)&nbsp;&nbsp;  预祝中秋快乐啊！</p> <a href="http://hi.baidu.com/bestgo/blog/item/bb7325ef7b440e10fcfa3c78.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/bestgo/blog/category/%CE%C4%D5%C2">文章</a>&nbsp;<a href="http://hi.baidu.com/bestgo/blog/item/bb7325ef7b440e10fcfa3c78.html#comment">查看评论</a>]]></description>
        <pubDate>2008年09月09日 星期二  下午 04:19</pubDate>
        <category><![CDATA[文章]]></category>
        <author><![CDATA[梦怀秋]]></author>
		<guid>http://hi.baidu.com/bestgo/blog/item/bb7325ef7b440e10fcfa3c78.html</guid>
</item>

<item>
        <title><![CDATA[告警程序实例]]></title>
        <link><![CDATA[http://hi.baidu.com/bestgo/blog/item/bf3ec510494a5bfac2ce7971.html]]></link>
        <description><![CDATA[
		
		<div><span style="font-size: 10.5pt; ">
<div class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style=" mso-ascii-">告警程序实例</span><span>(c#</span><span style=" mso-ascii-">实现</span><span>)</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt; text-indent: -18pt; mso-list: l1 level1 lfo1; "><span style="mso-fareast-"><span style="mso-list: ignore">1．<span style="font-weight: normal; font-size: 7pt; line-height: normal; font-style: normal; font-variant: normal">  </span></span></span><span style=" mso-ascii-">需求</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt"><span style=" mso-ascii-">设计一个简化版的告警程序。这是一个</span><span>Windows</span><span style=" mso-ascii-">应用程序，它能够根据用户的选择结果，给出不同级别的告警消息。用户根据信号的不同，判断当前的错误警告属于何种级别。</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt 18pt"><span style=" mso-ascii-">告警程序的功能如下：</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt 39pt; text-indent: -21pt; mso-list: l0 level1 lfo2; "><span style="mso-fareast-"><span style="mso-list: ignore">(一)<span style="font-weight: normal; font-size: 7pt; line-height: normal; font-style: normal; font-variant: normal">  </span></span></span><span style=" mso-ascii-">根据用户的选择触发告警信息：</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt 39pt; text-indent: -21pt; mso-list: l0 level1 lfo2; "><span style="mso-fareast-"><span style="mso-list: ignore">(二)<span style="font-weight: normal; font-size: 7pt; line-height: normal; font-style: normal; font-variant: normal">  </span></span></span><span style=" mso-ascii-">告警消息根据警告的严重情况分为</span><span>Lower,Medium</span><span style=" mso-ascii-">和</span><span>High</span><span style=" mso-ascii-">三级；</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt 39pt; text-indent: -21pt; mso-list: l0 level1 lfo2; "><span style="mso-fareast-"><span style="mso-list: ignore">(三)<span style="font-weight: normal; font-size: 7pt; line-height: normal; font-style: normal; font-variant: normal">  </span></span></span><span style=" mso-ascii-">不同级别的告警消息发出不同的声音；</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt"><span>2</span><span style=" mso-ascii-">．通过需求识别对象</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt"><span><span style="mso-spacerun: yes">&nbsp;&nbsp;  </span></span><span style=" mso-ascii-">告警程序的功能非常简单。我们可以利用识别系统的关键词来寻找需要定义的对象。毋庸置疑，告警消息是整个需求分析中反复强调的，它应该是我们的关重心。需求分析中还有两个名词：用户与声音，它们是否是我们需要识别的对象的？判断的标准是这些对象是否参与了系统的功能实现，并与程序模型密切相关。</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt"><span><span style="mso-spacerun: yes">&nbsp;&nbsp;  </span></span><span style=" mso-ascii-">例如用户对象，它是否属于程序的一部分呢？虽然，功能需求中要求告警信号必须根据用户的选择而触发，然而，它代表的含义实际上是指用户通过交互界面，完成对告警信号的选择。因此，它仅仅属于信息交互中的一个操作者，程序并不要求用户执行相应的行为，也不需要获取用户的相关属性。如果排除某些特定的需求（例如标记接口），这种有行为与属性的对象在软件系统中是没有存在的必要的。</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt"><span><span style="mso-spacerun: yes">&nbsp;&nbsp;  </span></span><span style=" mso-ascii-">声音对象无疑是存在的，以为我们需要调用播放声音的方法。如果声音是一个外部文件，则准确的对象识别应该是声音播放器，通过它播放声音文件，例如</span><span>wav</span><span style=" mso-ascii-">文件。实际上，</span><span>.net framwork</span><span style=" mso-ascii-">已经定义了声音播放对象</span><span>System.Media.SoundPlayer,</span><span style=" mso-ascii-">我们只需调用其</span><span>Play</span><span style=" mso-ascii-">方法即可。</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style=" mso-ascii-">在项目中添加资源文件的方法：</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style=" mso-ascii-">在项目上右键点击</span><span>-</span><span style=" mso-ascii-">添加</span><span>-</span><span style=" mso-ascii-">新建项</span><span>-</span><span style=" mso-ascii-">选择</span><span>Resouse file</span><span style=" mso-ascii-">类型</span><span>-</span><span style=" mso-ascii-">然后选择添加声音文件即可</span><span>-</span><span style=" mso-ascii-">在项目中会出项一个</span><span>Resouse</span><span style=" mso-ascii-">文件夹，添加的声音文件将被拷贝到此文件夹下</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt"><span> </span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt"><span><span style="mso-spacerun: yes">&nbsp;&nbsp;  </span></span><span style=" mso-ascii-">现在，回过头来分析告警消息对象的属性与行为。通过需求，我们知道告警信号能够发出声音，这证实它的一种行为表现形式，我们可以将其定义为告警消息对象的方法。那么，告警消息对象是否具有特定的属性呢？从需求判断，告警消息根据警告的严重情况分为</span><span>Lower,Medium</span><span style=" mso-ascii-">和</span><span>High</span><span style=" mso-ascii-">三级，这似乎可以作为对象的一个属性，通过该属性值判断当前对象的严重级别。此外，该属性值还将制约行为的实现方式。因此告警消息对象的定义与实现如下：</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left; mso-layout-grid-align: none" align="left"><span style="font-size: 10pt; color: blue;  mso-hansi-">namespace</span><span style="font-size: 10pt;  mso-hansi-"> AlarmManager</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left; mso-layout-grid-align: none" align="left"><span style="font-size: 10pt;  mso-hansi-">{</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left; mso-layout-grid-align: none" align="left"><span style="font-size: 10pt;  mso-hansi-"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;  </span><span style="color: blue">class</span> <span style="color: teal">Alarm</span></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left; mso-layout-grid-align: none" align="left"><span style="font-size: 10pt;  mso-hansi-"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;  </span>{</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left; mso-layout-grid-align: none" align="left"><span style="font-size: 10pt;  mso-hansi-"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  </span><span style="color: blue">private</span> <span style="color: teal">SoundPlayer</span> m_player;<span style="color: green">//</span></span><span style="font-size: 10pt; color: green;  mso-hansi-">声明<span>SoundPlayer</span>对象<span></span></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left; mso-layout-grid-align: none" align="left"><span style="font-size: 10pt;  mso-hansi-"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  </span><span style="color: blue">private</span> <span style="color: blue">string</span> m_seriousLevel;<span style="color: green">//</span></span><span style="font-size: 10pt; color: green;  mso-hansi-">严重级别<span></span></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left; mso-layout-grid-align: none" align="left"><span style="font-size: 10pt;  mso-hansi-"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  </span><span style="color: blue">public</span> <span style="color: blue">string</span> SeriousLevel</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left; mso-layout-grid-align: none" align="left"><span style="font-size: 10pt;  mso-hansi-"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  </span>{</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left; mso-layout-grid-align: none" align="left"><span style="font-size: 10pt;  mso-hansi-"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  </span><span style="color: blue">get</span></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left; mso-layout-grid-align: none" align="left"><span style="font-size: 10pt;  mso-hansi-"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  </span>{</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left; mso-layout-grid-align: none" align="left"><span style="font-size: 10pt;  mso-hansi-"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  </span><span style="color: blue">return</span> m_seriousLevel;</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left; mso-layout-grid-align: none" align="left"><span style="font-size: 10pt;  mso-hansi-"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  </span>}</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left; mso-layout-grid-align: none" align="left"><span style="font-size: 10pt;  mso-hansi-"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  </span><span style="color: blue">set</span></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left; mso-layout-grid-align: none" align="left"><span style="font-size: 10pt;  mso-hansi-"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  </span><span style="mso-spacerun: yes"> </span>{</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left; mso-layout-grid-align: none" align="left"><span style="font-size: 10pt;  mso-hansi-"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  </span>m_seriousLevel = <span style="color: blue">value</span>;</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left; mso-layout-grid-align: none" align="left"><span style="font-size: 10pt;  mso-hansi-"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  </span>}</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left; mso-layout-grid-align: none" align="left"><span style="font-size: 10pt;  mso-hansi-"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  </span>}</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left; mso-layout-grid-align: none" align="left"><span style="font-size: 10pt;  mso-hansi-"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  </span><span style="color: blue">public</span> Alarm()</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left; mso-layout-grid-align: none" align="left"><span style="font-size: 10pt;  mso-hansi-"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  </span>{</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left; mso-layout-grid-align: none" align="left"><span style="font-size: 10pt;  mso-hansi-"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  </span>m_seriousLevel = <span style="color: maroon">&quot;High&quot;</span>;</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left; mso-layout-grid-align: none" align="left"><span style="font-size: 10pt;  mso-hansi-"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  </span>}</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left; mso-layout-grid-align: none" align="left"><span style="font-size: 10pt;  mso-hansi-"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  </span><span style="color: blue">public</span> Alarm(<span style="color: blue">string</span> seriousLevel)</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left; mso-layout-grid-align: none" align="left"><span style="font-size: 10pt;  mso-hansi-"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  </span>{</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left; mso-layout-grid-align: none" align="left"><span style="font-size: 10pt;  mso-hansi-"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  </span>m_seriousLevel = seriousLevel;</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left; mso-layout-grid-align: none" align="left"><span style="font-size: 10pt;  mso-hansi-"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  </span>}</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left; mso-layout-grid-align: none" align="left"><span style="font-size: 10pt;  mso-hansi-"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;  </span><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: blue">public</span> <span style="color: blue">void</span> knock()</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left; mso-layout-grid-align: none" align="left"><span style="font-size: 10pt;  mso-hansi-"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  </span>{</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left; mso-layout-grid-align: none" align="left"><span style="font-size: 10pt;  mso-hansi-"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  </span><span style="color: blue">switch</span> (m_seriousLevel.ToUpper())</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left; mso-layout-grid-align: none" align="left"><span style="font-size: 10pt;  mso-hansi-"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  </span>{</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left; mso-layout-grid-align: none" align="left"><span style="font-size: 10pt;  mso-hansi-"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  </span><span style="color: blue">case</span> <span style="color: maroon">&quot;HIGH&quot;</span>:</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left; mso-layout-grid-align: none" align="left"><span style="font-size: 10pt;  mso-hansi-"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  </span>m_player = <span style="color: blue">new</span> <span style="color: teal">SoundPlayer</span>(AlarmManager.<span style="color: teal">Resource1</span>.ALARM1);</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left; mso-layout-grid-align: none" align="left"><span style="font-size: 10pt;  mso-hansi-"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  </span><span style="color: green">//AlarmManager</span></span><span style="font-size: 10pt; color: green;  mso-hansi-">为声音文件的名称<span></span></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left; mso-layout-grid-align: none" align="left"><span style="font-size: 10pt;  mso-hansi-"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  </span><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="color: blue">break</span>;</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left; mso-layout-grid-align: none" align="left"><span style="font-size: 10pt;  mso-hansi-"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  </span><span style="color: blue">case</span> <span style="color: maroon">&quot;MEDIUM&quot;</span>:</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left; mso-layout-grid-align: none" align="left"><span style="font-size: 10pt;  mso-hansi-"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  </span>m_player = <span style="color: blue">new</span> <span style="color: teal">SoundPlayer</span>(AlarmManager.<span style="color: teal">Resource1</span>.ALARM2);</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left; mso-layout-grid-align: none" align="left"><span style="font-size: 10pt;  mso-hansi-"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  </span><span style="color: green">//Resource1</span></span><span style="font-size: 10pt; color: green;  mso-hansi-">为资源对象<span></span></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left; mso-layout-grid-align: none" align="left"><span style="font-size: 10pt;  mso-hansi-"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  </span><span style="color: blue">break</span>;</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left; mso-layout-grid-align: none" align="left"><span style="font-size: 10pt;  mso-hansi-"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  </span><span style="color: blue">default</span>:</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left; mso-layout-grid-align: none" align="left"><span style="font-size: 10pt;  mso-hansi-"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  </span>m_player = <span style="color: blue">new</span> <span style="color: teal">SoundPlayer</span>(AlarmManager.<span style="color: teal">Resource1</span>.ALARM3);</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left; mso-layout-grid-align: none" align="left"><span style="font-size: 10pt;  mso-hansi-"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  </span><span style="color: green">//ALARM3</span></span><span style="font-size: 10pt; color: green;  mso-hansi-">为声音文件名称<span></span></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left; mso-layout-grid-align: none" align="left"><span style="font-size: 10pt;  mso-hansi-"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  </span><span style="color: blue">break</span>;</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left; mso-layout-grid-align: none" align="left"><span style="font-size: 10pt;  mso-hansi-"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  </span>}</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left; mso-layout-grid-align: none" align="left"><span style="font-size: 10pt;  mso-hansi-"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  </span>m_player.Play();</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left; mso-layout-grid-align: none" align="left"><span style="font-size: 10pt;  mso-hansi-"> </span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left; mso-layout-grid-align: none" align="left"><span style="font-size: 10pt;  mso-hansi-"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;  </span>}</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt; text-align: left; mso-layout-grid-align: none" align="left"><span style="font-size: 10pt;  mso-hansi-"><span style="mso-spacerun: yes">&nbsp;&nbsp;&nbsp;  </span>}</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="font-size: 10pt;  mso-hansi-">}</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="font-size: 10pt;  mso-hansi-"> </span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="font-size: 10pt;  mso-hansi-">如果我们现在要添加一个更高级别的告警，则需要修改<span>knock</span>方法，在<span>switch</span>中添加分支，并建立一个新的实例，并不能很好的适应需求的变化。<span></span></span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt"> </div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="font-size: 10pt;  mso-hansi-">更好的解决方法，期待大家一起解决！共同探讨</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt"><span style="font-size: 10pt;  mso-hansi-">
<div class="MsoNormal" style="margin: 0cm 0cm 0pt"> </div>
</span></div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt"> </div>
<div class="MsoNormal" style="margin: 0cm 0cm 0pt"> </div>
<div> </div>
<p>本文出自 &ldquo;<a href="http://xiaoshu838.blog.51cto.com/">无名鼠辈</a>&rdquo; 博客，请务必保留此出处<a href="http://xiaoshu838.blog.51cto.com/433568/90678">http://xiaoshu838.blog.51cto.com/433568/90678</a></p>
</span><font size="3"> </font></div> <a href="http://hi.baidu.com/bestgo/blog/item/bf3ec510494a5bfac2ce7971.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/bestgo/blog/category/%2Enet">.net</a>&nbsp;<a href="http://hi.baidu.com/bestgo/blog/item/bf3ec510494a5bfac2ce7971.html#comment">查看评论</a>]]></description>
        <pubDate>2008年09月09日 星期二  下午 04:06</pubDate>
        <category><![CDATA[.net]]></category>
        <author><![CDATA[梦怀秋]]></author>
		<guid>http://hi.baidu.com/bestgo/blog/item/bf3ec510494a5bfac2ce7971.html</guid>
</item>

<item>
        <title><![CDATA[郁闷]]></title>
        <link><![CDATA[http://hi.baidu.com/bestgo/blog/item/06a6cb54049e9252574e001d.html]]></link>
        <description><![CDATA[
		
		<p><img src="http://img.baidu.com/hi/jd/j_0041.gif">找个工作真死啊，什么时间才好啊</p> 
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/bestgo/blog/category/%CE%C4%D5%C2">文章</a>&nbsp;<a href="http://hi.baidu.com/bestgo/blog/item/06a6cb54049e9252574e001d.html#comment">查看评论</a>]]></description>
        <pubDate>2008年08月13日 星期三  下午 08:40</pubDate>
        <category><![CDATA[文章]]></category>
        <author><![CDATA[梦怀秋]]></author>
		<guid>http://hi.baidu.com/bestgo/blog/item/06a6cb54049e9252574e001d.html</guid>
</item>

<item>
        <title><![CDATA[软件工程师不可不知的10个概念（转）]]></title>
        <link><![CDATA[http://hi.baidu.com/bestgo/blog/item/9a9993df0254b31562279811.html]]></link>
        <description><![CDATA[
		
		35公里 写道 &quot;出色的软件工程师善用设计模式，勤于代码重构，编写单元测试，并对简单有宗教般的追求。除了这些，优秀的软件工程师还要通晓10个概念，这10个概念超越了编程语言与设计模式，软件工程师应当从更广的范围内明白这些道理（全文阅读）： <br>
接口 （Interfaces ） <br>
惯例与模板 （Conventions and Templates） <br>
分层 （Layering ） <br>
算法的复杂性 （Algorithmic Complexity） <br>
散列法 （Hashing ） <br>
缓存 （Caching ） <br>
并发 （Concurrency ） <br>
云计算（Cloud Computing ） <br>
安全（Security ） <br>
关系数据库 （Relational Databases ） <br>
10. 关系数据库 (Relational Databases)<br>
<br>
关系数据库因为在大规模 Web 服务上缺乏可扩充性而颇受微词，然而，关系数据库仍然是近20年来计算机技术中最伟大的成就。关系数据库对处理订单，公司数据方面有着出色的表现。 <br>
<br>
关系数据库的核心是以记录表示数据，记录存放在数据库表，数据库使用查询语言（SQL）对数据进行搜索与查询，同时，数据库对各个数据表进行关联。 <br>
<br>
数据库的标准化技术（normalization）讲的是使用正确的方式对数据进行分存以降低冗余，并加快存取速度。 <br>
<br>
9. 安全 （Security）<br>
<br>
随着黑客的崛起与数据敏感性的上升，安全变得非常重要。安全是个广义的概念，涉及验证，授权与信息传输。 <br>
<br>
验证是对用户的身份进行检查，如要求用户输入密码。验证通常需要结合 SSL （secure socket layer）进行；授权在公司业务系统中非常重要，尤其是一些工作流系统。最近开发的 OAuth 协议可以帮助 Web 服务将相应信息向相应用户开放。Flickr 便使用这种方式管理私人照片和数据的访问权限。 <br>
<br>
另外一个安全领域是网络设防，这关系到操作系统，配置与监控。不仅网络危险重重，任何软件都是。Firefox 被称为最安全的浏览器，仍然需要频频发布安全补丁。要为你的系统编写安全代码就需要明白各种潜在的问题。 <br>
<br>
8. 云计算 （Cloud Computing）<br>
<br>
RWW 最近的关于云计算的文章 Reaching For The Sky Through Compute Clouds 讲到了云计算如何改变大规模 Web 应用的发布。大规模的并行，低成本，与快速投入市场。 <br>
<br>
并行算法发明以来，首先迎来的是网格计算，网格计算是借助空闲的桌面计算机资源进行并行计算。最著名的例子是 Berkley 大学的 SETI@home 计划，该计划使用空闲的 CPU 资源分析太空数据。金融机构也大规模实施网格计算进行风险分析。空闲的资源，加上 J2EE 平台的崛起，迎来了云计算的概念：应用服务虚拟化。就是应用按需运行，并可以随着时间和用户规模而实时改变。 <br>
<br>
云计算最生动的例子是 Amazon 的 Web 服务，一组可以通过 API 进行调用的应用，如云服务（EC2），一个用来存储大型媒体文件的数据库（S3），索引服务（SimpleDB），序列服务（SQS）。 <br>
<br>
7. 并发 （Concurrency）<br>
<br>
并发是软件工程师最容易犯错的地方，这可以理解，因为我们一直遵从线形思维，然而并发在现代系统中非常重要。 <br>
<br>
并发是程序中的并行处理，多数现代编程语言包含内置的并发能力，在 Java，指的是线程。关于并发，最经典的例子是&ldquo;生产/消费&rdquo;模式，生产方生产数据和任务，并放入工作线程消费或执行。并发的复杂性在于，线程需要经常访问共同数据，每个线程都有自己的执行顺序，但需要访问共同数据。Doug Lea 曾写过一个最复杂的并发类，现在是 core Java 的一部分。<br>
<br>
6. 缓存（Caching）<br>
<br>
缓存对现代 Web 程序不可或缺，缓存是从数据库取回，并存放在内存中的数据。因为数据库直接存取的代价非常高，将数据从数据库取回并放在缓存中访问就变得十分必要。比如，你有一个网站，要显示上周的畅销书，你可以从数据将畅销书榜一次性取回放在缓存中，而不必在每次访问时都去数据库读数据。 <br>
<br>
缓存需要代价，只有最常用的内容才可以放入缓存。很多现代程序，包括 Facebook，依靠一种叫做 Memcached 的分布式缓存系统，该系统是 Brad Firzpatrick 在工作于 LiveJournal 项目时开发的，Memcached 使用网络中空闲的内存资源建立缓存机制，Memcached 类库在很多流行编程语言，包括 Java 和 PHP 中都有。 <br>
<br>
5. 散列法（Hashing） <br>
<br>
Hashing 的目的是加速访问速度。如果数据是序列存储的，从中查询一个项的时间取决于数据列的大小。而散列法对每一个项计算一个数字作为索引，在一个好的 Hashing 算法下，数据查找的速度是一样的。 <br>
<br>
除了存储数据，散列法对分布式系统也很重要。统一散列法（uniform hash ）用来在云数据库环境下，在不同计算机之间分存数据。Google 的索引服务就是这种方法的体现，每一个 URL 都被散列分布到特定计算机。 <br>
<br>
散列函数非常复杂，但现代类库中都有现成的类，重要的是，如何对散列法进行细调以获得最好的性能。<br>
<br>
4. 算法的复杂性 （Algorithmic Complexity）<br>
<br>
关于算法的复杂性，软件工程师需要理解这样几件事。第一，大O标记法（big O notation）；第二，你永远都不应该使用嵌套式循环（循环里面套循环），你应该使用 Hash 表，数组或单一循环；第三，如今优秀类库比比皆是，我们不必过分纠缠于这些库的效能的差别，我们以后还有机会进行细调；最后，不要忽视算法的优雅及性能，编写紧凑的，可读的代码可以让你的算法更简单，更干净。 <br>
<br>
3. 分层 （Layering）<br>
<br>
用分层来讨论软件架构是最容易的。John Lakos 曾出版过一本关于大型 C++ 系统的书。Lakos 认为软件包含了层，书中介绍了层的概念，方法是，对每个软件组件，数一下它所依赖的组件数目就可以知道它的复杂程度。 <br>
<br>
Lakos 认为，一个好的软件拥有金字塔结构，就是说，软件组件拥有层层积累的复杂度，但每个组件本身必须简单，一个优秀的软件包含很多小的，可重复使用的模块，每个模块有自己的职责。一个好的系统中，组件之间的依赖性不可交叉，整个系统是各种各样的组件堆积起来，形成一个金字塔。 <br>
<br>
Lakos 在软件工程的很多方面都是先驱，最著名的是 Refactoring （代码重构）。代码重构指的是，在编程过程中需要不断地对代码进行改造以保证其结构的健壮与灵活。 <br>
<br>
2. 惯例与模板 （Conventions and Templates）<br>
<br>
命名惯例和基础模板在编程模式中常被忽视，然而它可能是最强大的方法。命名惯例使软件自动化成为可能，如，Java Beans 框架在 getter 和 setter 方法中，使用简单的命名惯例。del.icio.us 网站的 URL 命名也使用统一的格式，如 http://del.icio.us/tag/software 会将用户带到所有标签为 software 的页。 <br>
<br>
很多社会网络均使用简单命名，如，你的名字是 johnsmith ，那你的头像可能命名为 johnsmith.jpg，而你的 rss 聚合文件的命名很可能是 johnsmith.xml 。 <br>
<br>
命名惯例还用于单元测试，如，JUnit 单元测试工具会辨认所有以 test 开头的类。 <br>
<br>
我们这里说的模板（templates ）指的并不是 C++ 或 Java 语言中的 constructs，我们说的是一些包含变量的模板文件，用户可以替换变量并输出最终结果。 <br>
<br>
Cold Fusion 是最先使用模板的程序之一，后来，Java 使用 JSP 实现模板功能。Apache 近来为 Java 开发了非常好用的通用模板, Velocity。PHP 本身就是基于模板的，因为它支持 eval 函数。<br>
<br>
1. 接口（Interfaces）<br>
<br>
软件工程中最重要的概念是界面。任何软件都是一个真实系统的模型。如何使用简单的用户界面进行模型化至关重要。很多软件系统走这样的极端，缺乏抽象的冗长代码，或者过分设计而导致无谓的复杂。 <br>
<br>
在众多软件工程书籍中，Robert Martin 写的《敏捷编程》值得一读。 <br>
<br>
关于模型化，以下方法对你会有帮助。首先，去掉那些只有在将来才可能用得着的方法，代码越精练越好。第二，不要总认为以前的东西是对的，要善于改变。第三，要有耐心并享受过程。 <a href="http://hi.baidu.com/bestgo/blog/item/9a9993df0254b31562279811.html">阅读全文</a>
		
		<br/><b>类别：</b><a href="http://hi.baidu.com/bestgo/blog/category/%CE%C4%D5%C2">文章</a>&nbsp;<a href="http://hi.baidu.com/bestgo/blog/item/9a9993df0254b31562279811.html#comment">查看评论</a>]]></description>
        <pubDate>2008年08月05日 星期二  下午 07:45</pubDate>
        <category><![CDATA[文章]]></category>
        <author><![CDATA[梦怀秋]]></author>
		<guid>http://hi.baidu.com/bestgo/blog/item/9a9993df0254b31562279811.html</guid>
</item>


</channel>
</rss>