Thursday, March 22, 2007

Export SQL query results with BCP


Following command exports query results with the bcp into the specified text file. It could be used to get, for example, NTEXT fields that are longer than 4000 and cutted out in SQL query analyzer:
>>bcp "select * from MyTable" queryout C:\result.txt -c -S SERVERNAME -U USERNAME -P PASSWORD

Weakest chain amplification principle


What I going to say is actually obvious- but somehow I never thought that the common sense proverb saying "the chain is as weak as its weakest link" is wrong. Really, when you hear it you may visually imagine a chain with a weak link which tears when disruptive force applied to it is much weaker than force needed to disrupt the rest of chain links.
So, what's wrong? The wrong thing is that this proverb usually not being applied to the physical chains. It applies to the chain of circumstances, probabilities or responsibilities.
In fact the chain is much weaker than its weakest link. Really, let's say we are talking about a transportation system in some city. If there is a chance of 50% that your autobus will late and a chance of 50% that your train will late there is a chance of only 25% that you will arrive at time. So, if you're looking at set or related factors where each of them has low failure probability the overall failure probability is much higher. I call it "weakest chain amplification principle".
I think this fact has interesting consequences in a lot of fields. For example in sociology: next time you hear about a 'weak chain' in politic, public sector, police, health system or whatever else you should realize that the overall situation is much worse than this 'weak chain' issue. If some politician is a bit not professional, another one does something a bit not completely legal and another one is a bit dumb all together they form a government that is not a bit weak, but really weak.
Of course - all above applies only when elements or factors are strongly related, i.e. when they are actually bound into 'chain'. And this, in turn, has some interesting implication in creation of complex systems, e.g. in software development. The thing is that, taking a SW development as an example - we may note that any big software complex has its own weak chain (bugs, design mis-considerations, etc), even in its final stage. Then - why at all those big programs are able to work? Considering all said above - it should be impossible to create a stable SW product in principle. How they work then? Well, they work since usually, after some polishing - bugs became kind of sparsely spread around and not related to each other. Theyhappen in certain conditions and with relatively low probability. And then the weakest chain amplification principle doesn't apply to them.

p.s.

Small note there is an obvious connection between above considerations and 'explicit boundaries' and 'autonomous evolution' principles in SOA.

Wednesday, March 14, 2007

ReSharper: no need to install hotfix when installing for VS 2005 SP1


The required hotfix is included in SP1. See this link for the full list of issues affected by SP1.

Sunday, March 11, 2007

Is saying that C# is 'better' than VB.NET is a mauvais ton?




One of my favourite childhood books was book of a semi-forgotten today Russian author - L. Kassil. Misfortunately he didn't stand in competition with McDonald's of today literature world a'la Harry Potter.

Now, you would ask - how it relates to the C#? - Here is the story: heroes of the book were arguing who's stronger - marine or soldier? Whale or an elephant? … - well, you got an idea.

Now an interesting article in SDK Dev' Team blog paradoxically resembled me all of it - marine, soldier and whale :)

In this article SDK developers present a coverage of various themes done for C# and VB.NET in Vista SDK samples:

.NET 3.0 Samples # of Unique C# Coverage VB Coverage
WCF 146 100% 72%
WF 60 100% 95%
WPF 434 98% 58%
Cross Technology 23 96% 9%
.NET Framework 2.0 138 95% 80%
Totals 801 98% 66%

Do you notice that C# coverage is a bit better?

That's why I going to stand on the mauvais ton side and say that C# is better than VB.NET.
Yes, yes, everything could be implemented in language constructions of both languages. But:
1) There is more important development in C# than in VB.NET (e.g. Enterprise Libraries).
2) I think that for historical reasons - most of the people writing in VB.NET are peoples who did a transaction from some sort of visual basic development. And VB projects in the pre .net era were kind of less 'hardcore' than, say, C++ projects, whose developers probably evolved into the C# rather than into the VB.NET.
Except, how else you may explain that market offers higher wages for C# pplz (than to VB.NET)?

Wednesday, March 07, 2007

How to use w.bloggar after switching to Google Account on blogspot.com


Here is a detailed explanation on how to use w.bloggar for posting to blogspot after switching to Google Account.
Just to add that host to be referenced is still beta.blogspot.com

I'm back


1. I'm back after really, really long blackout.
2. A lot to tell - it's even difficult to chose what to start with.