RSS 2.0 Feed

Monday, October 24, 2005

Saturday, May 28, 2005

MVP Robert McLaws 关于Longhorn IIS 7的报道.

http://www.longhornblogs.com/robert/archive/2005/05/25/14114.aspx

 

posted @ | Feedback (5) | Filed Under [ Other ]

Wednesday, May 25, 2005

How do I mix C# and C++ code in a single assembly?

 If your C++ code is not compiled with /clr:safe (i.e. it is compiled with /clr or /clr:pure), do the following:

1) compile your C++ code into .obj files

2) compile your C# code into a .netmodule, using /AddModule to reference the C++ .obj files

3) link the C# netmodule directly with the C++ object files using the C++ linker to create a mixed language assembly 

 If your C++ code is compiled with /clr:safe, build your C++ code as a .netmodule.  You can use it just like you would use a .netmodule from any other language.

This applies to .Net framework beta2+.

posted @ | Feedback (14) | Filed Under [ .Net ]

Monday, March 21, 2005

MSDN新推出了一个系列

http://msdn.microsoft.com/netframework/programming/classlibraries/

Designing .NET Class Libraries

The Designing .NET Class Libraries series presents design guidelines for developing classes and components that extend the .NET Framework. The goal of the Designing .NET Class Libraries series is to encourage consistency and predictability in public APIs while enabling Web and cross-language integration. The guidelines presented in Designing .NET Class Libraries are intended to help class library designers understand the trade-offs between different solutions. There might be situations where good library design requires that you violate these design guidelines. Such cases should be rare, however it is important that you provide a solid justification for your decision.

每一个讲座都带有一段录象. 这些录象其实是微软内部的课程.

如果你的工作涉及设计类库的话, 这可能是你最好的资源了.

 

posted @ | Feedback (10) | Filed Under [ .Net ]

Tuesday, December 14, 2004

Asia Tims 有一篇关于China and Spam的文章

Spammers hide behind the Great Wall
http://www.atimes.com/atimes/China/FL14Ad02.html

这篇文章出现在slashdot.org今天的首页上.
http://it.slashdot.org/article.pl?sid=04/12/13/1758203&tid=111

作为一个中国人,我很不愿意看到别人这样讨论中国.可是我无力反驳.在我的英文blog上每两天都能收到很多comment spam.目前为止所有的spam都是从中国过来的.

我希望spam的朋友能够自重.我看了你(们)的主页,都很有内容.可是spam只能让别人憎恶你,不会增加你们网站的点击率.

 

posted @ | Feedback (29) | Filed Under [ Other ]

Friday, December 10, 2004

如果你关心VC 2005的话,你应该阅读Stan Lippman的blog.

http://blogs.msdn.com/slippman

Stan Lippman写的<<C++ Primer>>,可能是世界上最流行的C++入门书了.

posted @ | Feedback (16) | Filed Under [ .Net ]

Herb Sutter在他的blog上讨论了C++/CLI的deterministic destruction.

http://pluralsight.com/blogs/hsutter/archive/2004/11/23/3666.aspx

Herb Sutter是C++ Standard Committee 的主席.他现在在微软主持VC 2005(即C++/CLI)的设计.

posted @ | Feedback (9) | Filed Under [ .Net ]

Tuesday, November 02, 2004

每个人都说Ngen可以加快程序的启动速度.可到底有多大作用呢?

Rico 给了个例子:

Cold Startup Performance

他的数据表明,NGEN最大的作用还是在warm startup的时候.如果你有多个程序运行的话,基本上就是warm startup了. 

posted @ | Feedback (12) | Filed Under [ .Net ]

Monday, October 25, 2004

有朋友问为什么.Net Framework Service Pack没有用publisher policy.

下面是我的一个回答:

http://blogs.msdn.com/junfeng/archive/2004/10/11/240822.aspx

There are several reasons:

1. Publisher Policy can be opted out by applications.

In App.Config you can say publisherPolicy="No", effectively ignore any publisher policy. Majority of the fixes in SP are security fixes. We don't want people to opt out security fixes.

In retrospection, the reason we introduce publisherPolicy="No" is for app compat. Since then the thinking has been shifted to security first.

2. Framework assemblies are tested in a group. And we want to ship them in a group.

This is the same reason we introduce framework unification policy. We tested all the framework assemblies in redist SP together. And we ship them together. Say we shipped publisher policy. If you intend to opt out publisher policy, you end up with a configuration we did not test, and we do not want to support. Of course if you do not intend to opt out publisher policy, then it makes no difference for you whether we use publisher policy or not. 

The bottom line is the current policy system is not optimal for .Net framework Servicing, and we intend to change that in future releases.

posted @ | Feedback (153) | Filed Under [ .Net ]

Tuesday, September 14, 2004

http://msdn2.microsoft.com/library

可以让你直接查询每个类型的文档了.

比如说System.Reflection.Assembly class,

http://msdn2.microsoft.com/library/System.Reflection.Assembly.aspx

 

posted @ | Feedback (15) | Filed Under [ Other ]

Thursday, August 19, 2004

最近在做一些关于CLR起动时间优化的东西.随便扯两句.

先说大的.

Rico Mariani, CLR的Performance Architecture, 在他的blog里提到Performance Culture, http://blogs.msdn.com/ricom/archive/2003/12/02/40779.aspx

总结起来对开发者来说有两点.

1.测量. 包括选择什么样的测试程序,怎么样测试.测试一定要自动化,并且一定要有数字结果.这样才能知道你是改进了,还是退步了.
2. 知识.你应该知道什么API耗时长,什么API耗时短.这样你才能选择正确的API.

他认为Performance Culture应该包括三个部分:

1.预算, 指的是产品推出的时候,应该有什么样的features,应该有什么样的performance.
2.计划, 有了一个预算之后,应该有个计划来怎么分配预算.
3.证实, 必须通过测量来保证始终在预算里.如果有超出预算的,应该毫不留情地砍掉.

就我自己的感受
1. LoadLibrary很慢,能不用尽量不要用.
2.文件访问很慢,任何文件访问的减少都是胜利
3.Registry的访问也很慢,特别是RegOpenKey.如果你有很多数据在Registry里,尽量放在同一个Registry Key下面.

我的情况里没有网络.你的情况很可能不一样.

posted @ | Feedback (9) | Filed Under [ General ]

这是MSDN上的一篇介绍VC++2005的文章.

http://msdn.microsoft.com/visualc/default.aspx?pull=/library/en-us/dnvs05/html/VS05Cplus.asp

我现在也在学习VC++2005,有时间写一点心得.

posted @ | Feedback (8) | Filed Under [ .Net ]

Saturday, August 07, 2004

C5 http://www.itu.dk/research/c5/

 C5 is a library of generic collection classes for the upcoming version 2.0 of the .Net platform. C5 extends the standard .Net System.Collections.Generic namespace with tree data structures, heap based priority queues and hash indexed array lists and linked lists, making it more comprehensive than most collection class libraries on similar platforms. Unlike many other collection class libraries, C5 is designed with a strict policy of supporting "code to interface not implementation".

之所以看到那么多的Collection,我想还是因为.Net framework现在没有提供完整的数据结构.我的intern就向我抱怨说.Net framework 1.1里没有linkedList和Tree.

posted @ | Feedback (8) | Filed Under [ .Net ]

Friday, August 06, 2004

Jeffrey Richter和他的在Wintellect的朋友开始了一个Open Source的项目

PowerCollectiolns

http://www.wintellect.com/powercollections/

他们的目的是要实现更多的.Net Collection.

数据结构这种东西,作为一个社区项目可能更合理一些.

posted @ | Feedback (8) | Filed Under [ .Net ]

Thursday, August 05, 2004

也许大家都知道了.MSN刚刚推出了网络版的MSN Messenger.

http://webmessenger.msn.com

posted @ | Feedback (62) | Filed Under [ Other ]