17th
June
2008
.NET, C#
General Development
Software, Tools, etc.
Gaming
Something Different
posted in Dotnet/.NET - C#, Gaming, Programming, Silverlight, Software/tools, Technology |
9th
June
2008
.NET/C#
- Microsoft project code named “Velocity” is a distributed in-memory caching platform that provides .NET applications with high-speed access, scaling, and high availability to application data. Download the Community Preview here.
- Danny Simmons enumerated various reasons for using Entity Framework.
- If your netMsmq WCF service shows signs of a handles leak, you may want to make sure you have .NET Framework 3.0 Service Pack 1 installed.
- Bryan wrote a timely article on TDD Tips: Test Naming Conventions & Guidelines.
- Microsoft announced the release of Microsoft Source Analysis for C#.
“Source Analysis is similar in many ways to Microsoft Code Analysis (specifically FxCop), but there are some important distinctions. FxCop performs its analysis on compiled binaries, while Source Analysis analyzes the source code directly. For this reason, Code Analysis focuses more on the design of the code, while Source Analysis focuses on layout, readability and documentation. Most of that information is stripped away during the compilation process, and thus cannot be analyzed by FxCop.”
General Programming
Tools
- The Query command line utility displays active Terminal Service/Remote Desktop sessions, among other things. This replaces the qwinsta utility.
Something Different
posted in Dotnet/.NET - C#, Programming, Software/tools |
1st
June
2008
Programming
.NET/C#
Software and Tools
Something Different
posted in Dotnet/.NET - C#, Gadgets, Programming, Software/tools, Technology, Tips |
15th
May
2008
“Chunking” is the technique used to break large amount of work into smaller and manageable parts. Here are a few reasons I can think of why you want to chunk, especially in a batch process where you have to process large number of items:
- Manage/minimize peak memory requirement.
- During failures, the entire process can resume at the last failure point, instead of all the way from the beginning.
- Take advantage of multiple processors/cores (by having multiple threads, each processing a small chunk).
Here’s a helper method to quickly split a List<T> into chunks:
/// <summary>
/// Splits a <see cref=”List{T}”/> into multiple chunks.
/// </summary>
/// <typeparam name=”T”></typeparam>
/// <param name=”list”>The list to be chunked.</param>
/// <param name=”chunkSize”>The size of each chunk.</param>
/// <returns>A list of chunks.</returns>
public static List<List<T>> SplitIntoChunks<T>(List<T> list, int chunkSize)
{
if (chunkSize <= 0)
{
throw new ArgumentException(“chunkSize must be greater than 0.”);
}
List<List<T>> retVal = new List<List<T>>();
int index = 0;
while (index < list.Count)
{
int count = list.Count - index > chunkSize ? chunkSize : list.Count - index;
retVal.Add(list.GetRange(index, count));
index += chunkSize;
}
return retVal;
}
If you want to be more efficient at the cost of readability, the second version below moves the items from the big list into the small chunks, so both types of lists will not need to be in memory at once:
/// <summary>
/// Break a <see cref=”List{T}”/> into multiple chunks. The <paramref name=”list=”/> is cleared out and the items are moved
/// into the returned chunks.
/// </summary>
/// <typeparam name=”T”></typeparam>
/// <param name=”list”>The list to be chunked.</param>
/// <param name=”chunkSize”>The size of each chunk.</param>
/// <returns>A list of chunks.</returns>
public static List<List<T>> BreakIntoChunks<T>(List<T> list, int chunkSize)
{
if (chunkSize <= 0)
{
throw new ArgumentException(“chunkSize must be greater than 0.”);
}
List<List<T>> retVal = new List<List<T>>();
while (list.Count > 0)
{
int count = list.Count > chunkSize ? chunkSize : list.Count;
retVal.Add(list.GetRange(0, count));
list.RemoveRange(0, count);
}
return retVal;
}
posted in Dotnet/.NET - C#, Programming |
21st
April
2008
Finds of the Week will be back online the last week of May.
posted in Dotnet/.NET - C#, Programming |
7th
April
2008
Programming
.NET/C#
Windows Mobile/Pocket PC
Gaming
Something a Little Different
posted in Dotnet/.NET - C#, Programming, Windows Mobile / Pocket PC |
31st
March
2008
Programming
.NET/C#
PowerShell
posted in Dotnet/.NET - C#, PowerShell, Programming, Software/tools |
24th
March
2008
Programming
C#
Something a Little Different
posted in Dotnet/.NET - C#, Programming |
17th
March
2008
Programming
C#.NET
Software & Tools
Gadgets
- I got myself a ThinkPad X60 Tablet PC last week, so naturally I’m writing this article on it :-). The Tablet PC Team Blog is a good starting location to look for Tablet PC tips. The combination of a Tablet PC and Microsoft OneNote is very nice. I am surprised at how good the text recognition engine engine in Windows Vista is.
Misc
Something a Little Different
posted in Dotnet/.NET - C#, Programming |
10th
March
2008
Programming
C#/.NET
Software and Tools
Something a Little Different
posted in Dotnet/.NET - C#, Programming, Software/tools, Technology |