Visual studio feeds

All Visual Studio blogs in one place


Enter your email address:

Delivered by FeedBurner

Increase your website traffic with



Anti-spam: How many eyes has a typical person?

Follow us on FB


NHibernate Pitfalls: Specifying Property Types

AddThis Social Bookmark Button
This is part of a series of posts about NHibernate Pitfalls. See the entire collection here.When you want to specify an NHibernate type (implementation of NHibernate.Type.IType) for a property using mapping by code, you might be tempted to do something like this:
ltr; background-color: rgb(244, 244, 244);"> 1: ca.Property(x => x.SomeProperty, x => 2: { 3: x.Type();

Simple Calculations With .NET

AddThis Social Bookmark Button
The idea for this post came from a recent post of Salvador Gascon (@salvadorgascon): simple math expressions calculation I use the DataTable class. Very simple and we already have it! Also, we can use some SQL expressions (list at
courier, monospace; font-size: 8pt; direction: ltr; background-color: rgb(244, 244, 244);"> 1: var table = new DataTable(); 2: table.Columns.Add("A", typeof(int)); 3:...(Read whole news on source site)

Capturing Performance Counter Data for a Process by Process Id

AddThis Social Bookmark Button
The .NET PerformanceCounter class generally is pretty easy to use in order to retrieve performance information. You create a perf counter, initialize the first value to read, let some time pass and then read the next value and Windows gives you access to a plethora of performance information. It’s nice what’s available to make that happen. Process Specific Performance Counters On several occasions, however, I’ve had a need to profile process specific performance counters. For example, I need to look at a specific running application and display its CPU usage similar to the way Process Manager does. At first glance
that seems easy enough as you can simply request a perf counter for a process by its name. Here’s the simple code to do this (I’m using Chrome as my instance I’m profiling here):var perfCounter = new PerformanceCounter("Process", "% Processor Time", "chrome"); // Initialize to start capturing perfCounter.NextValue(); for (int i = 0; i <20; i++) { // give some time to accumulate data Thread.Sleep(1000); float cpu = perfCounter.NextValue()/Environment.ProcessorCount; Console.WriteLine("Chrome CPU: " + cpu); } This works and gets me the CPU status for Chrome. When I run the above code,...(Read whole news on source site)

How Agility leads to functional design and even TDD

AddThis Social Bookmark Button
Originally posted on: is it that the customer wants when she orders a software? Behavior. I define behavior as the relationship between input, output, and side effects. It´s like with the Turing Test. When can we consider a machine intelligent? As soon as we cannot tell from a dialog whether the "hidden participant" is a human or not. The Turing Test is about behavior. Requirements are met if some input leads to desired output and expected side effects. This includes performance, security, usability and other aspects. Behavior thus has functional as well as non-functional traits. Now the question
is: How is behavior produced? It´s all about logic, program logic. That is operators, control structures and hardware access. Only such programming language statements are relevant to producing behavior by working on data. Nothing has changed since Niclaus Wirth wrote "Algorithms and Data Structures" back in the 1970s. Nothing even has changed since the days of assembler programming. Forget about Object Orientation. Forget about Functional Programming. At least for a moment. That´s all just tools, not givens. The main question in programming is, how to move efficiently and effectively from requirements to logic? You can imagine requirements and logic separated...(Read whole news on source site)

.NET Rocks! – on Fusion!

AddThis Social Bookmark Button
I’ve been following the “.NET Rocks!” podcasts of Carl Franklin and Richard Campbell for many years now. They’ve had virtually all well-known names of the .NET development community on the show and hearing the podcasts is a good way to kill time on a flight, in the gym or elsewhere.From time to time they feature so-called “GeekOut” shows on topics other than software development. In recent months they had three shows on fusion science:Show #1013: Fusion Power GeekOutShow #1022: Fusion Power GeekOut #2Show #1037: Cold Fusion GeekOutThe two shows on “hot” fusion were both fascinating
and sobering at the same time, as the promise of “clean” energy seems to be far away – not only for “we haven’t figured that details out yet” reasons, but because of some very hard-core problems that are more or less being pushed back and ignored in order not to disturb the big machinery that is “Big Science”.The third show looks back at the circumstances of the original announcement and mentions current work by Mitsubishi that is not about producing energy, but basic research on nuclear reactions at low temperatures.Of course, a podcast can only scratch the surface of such...(Read whole news on source site)