Jeremiah Clark's Blog

A place to collect my ramblings about Microsoft and the .NET Framework.

Browse by Tags

Tagged Content List
  • Blog Post: Dynamic Expression Trees

    I have been working on a project that uses the Entity Framework as the persistence store. I am implementing a global search capability that returns results from the various entities that have a string property that start with a given query string. So I started out with writing code for each entity that...
  • Blog Post: Provide Caching For Your Complex Functions

    Function caching, or more specifically memoization , is a code optimization technique that can be used to speed up code that calls complex functions with the same inputs.  Let's take a look at the classic fibonacci function: 1: private int Fib( int val) 2: { 3: return val <= 2 ? 1 ...
  • Blog Post: Organizing A SharePoint Document Library

    Let's say that you have a document library in SharePoint where you programmatically upload log files or daily reports.  After a few weeks the document library might contain multiple pages of documents, making finding the document that you are looking for annoying.  You have to sort by date...
  • Blog Post: Managed BF Language Compiler

    As usual, I received my February 2008 copy of MSDN magazine and proceeded to devour it. An article that I found quite interesting was " Create a Language Compiler for the .NET Framework " by Joel Pobar . It talks about using the code generation features of the CLR to create a compiler. A co-worker...
  • Blog Post: Design By Contact Approach: Spec#

    I recently attended a very interesting presentation by Matt Podwysocki where he talked about Spec#. This is an extension to the C# language that implements the DBC (Design By Contract) approach to development. Spec# was developed by Microsoft Research and you can find more information about it...
  • Blog Post: StringBuilder.ToString() vs Reflection

    I had an intriguing conversation with a friend on Friday about the performance of using the StringBuilder.ToString() method to return the value of the String contained in the StringBuilder object. Following this conversation, I decided to take a deeper look at how StringBuilder works. Here is the StringBuilder...
  • Blog Post: Replacing CMD with PowerShell

    First off, I really like Windows PowerShell . I have been using it for a while now and I find it extremely powerful. I now use it for every command line thing that I do. (I would also recommend the PowerShell Community Extensions . These add some very useful features to PS. One that I particularly enjoy...
  • Blog Post: Simple GZip compression of files with .NET

    I had to do some file compression recently (which oddly enough I had never had to do before). Compressing files using GZipStream in a few lines of code: using (FileStream fStream = new FileStream( @"C:\test.docx.gzip" , FileMode.Create, FileAccess.Write)) { using (GZipStream zipStream = new...
  • Blog Post: C# 3.0 Anonymous Types

    I have been playing around with some of the new C# 3.0 features, and I really have to say that I like the anonymous types. In reality, they do not present a great advantage over typical code defined classes, but they are simple and easy to use and require a lot less code. I really like the fact that...
Page 1 of 1 (9 items)