Microsoft Office 2010 Engineering
The official blog of the Microsoft Office product development group

Browse by Tags

  • Blog Post: Why I Don’t Use the ForEach Extension Method

    In my first version of my functional programming tutorial , I discussed a ForEach extension method, but I removed the topic from the second version. This extension method iterates through a source collection and performs an action on each item in the collection. ForEach isn’t included in the .NET...
  • Blog Post: Ease of Maintenance of LINQ Code

    I believe that it is easier to maintain code that is written in the functional style. For one thing, this is the very reason for many of the characteristics of functional code. No state is maintained, so we don’t have to worry about corrupting any state. If a variable is in scope, then the variable...
  • Blog Post: Finding Paragraphs by Style Name or Content in an Open XML Word Processing Document

    About a week ago, I posted a very interesting guest post by Bob McClellan , where he discussed some code that allows you to more easily move/insert/delete paragraphs in Open XML documents. He is in the process of putting together a PowerShell cmdlet that demonstrates this functionality within the PowerTools...
  • Blog Post: Functional Programming Tutorial for Visual Basic 9.0

    Visual Basic 9.0 added many language features that allow us to write in the functional style in a natural and expressive way. The value of programming in the functional style has been apparent to me for some time. VB developers can realize the benefits of functional programming, so I’ve written...
  • Blog Post: Closures

    Closures are one of the key components in C# 3.0 that makes functional programming easy, and results in clean syntax. Yet, they are not really necessary to understand in order to write queries in the functional style. Why? Because closures make the language ‘just work’ exactly in the way...
  • Blog Post: Object Dumper: An Invaluable Tool for Writing Code in the Functional Programming Style

    When developing C# programs in the functional programming style, you often need to dump out a collection to the console. Object dumper is a great tool to use for this. It is a sample that far too few developers know about. This blog is inactive. New blog: EricWhite.com/blog Blog TOC A functional transform...
  • Blog Post: Are Developers Using LINQ? (Part 2)

    The response to my previous blog post has been very interesting to me. And it has, to a very large extent, matched my own experience. This blog is inactive. New blog: EricWhite.com/blog Blog TOC I have seen four basic scenarios where folks use LINQ: Using LINQ to Objects (and LINQ to XML...
  • Blog Post: Are Developers Using LINQ?

    I had an interesting conversation with my nephew the other day. He is a very bright CS student working as a summer intern at a software company (not Microsoft). He is programming in C# using Visual Studio 2008. I asked him if developers at his company were using LINQ, and he said, "No, that the folks...
  • Blog Post: Using Annotations to Transform LINQ to XML Trees in an XSLT Style (Improved Approach)

    You can use LINQ to XML to transform XML trees with the same level of power and expressability as with XSLT, and in many cases more than with XSLT. This blog is inactive. New blog: EricWhite.com/blog Blog TOC One of the reasons that XSL is so powerful is that you can write multiple rules to transform...
  • Blog Post: Using the Open XML SDK

    [Blog Map] [Table of Contents] [Next Topic] Open XML Packages To follow this tutorial, you don't need to delve into all of the details of working with packages. This topic presents a small chunk of code that you can use as boilerplate code – it opens a word document and retrieves the main...
  • Blog Post: Parsing XML from an Open XML Document

    [Blog Map] [Table of Contents] [Next Topic] The first problem that we're going to tackle is to retrieve some specific text out of an Open XML Word document. In this word document will be text that has the style of "Code". We want to find all consecutive paragraphs that have this style, and retrieve...
  • Blog Post: Query Composition using Functional Programming Techniques in C# 3.0

    Functional Programming (FP) has the potential to reduce program line count by 20% to 50%, reduce bugs and increase robustness, and move us in the direction of taking advantage of multiple core CPUs. But perhaps due to the learning curve, and unfamiliarity, many developers are not taking advantage of...
  • Blog Post: Lazy Evaluation (and in contrast, Eager Evaluation)

    [Blog Map] [Table of Contents] [Next Topic] One of the most important concepts in LINQ is the notion of lazy evaluation. Without this facility, LINQ would perform very poorly. This blog is inactive. New blog: EricWhite.com/blog Blog TOC Query expressions operate on some type that implements IEnumerable<T>...
  • Blog Post: Complete Listing of ParseWordML

    [Blog Map] [Table of Contents] [Next Topic] The following code is attached to this page. This blog is inactive. New blog: EricWhite.com/blog Blog TOC using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.IO; using System.Xml; using System.Xml.Linq; using...
  • Blog Post: Pure Functions

    [Blog Map] [Table of Contents] [Next Topic] FP introduces the notion of pure functions/methods. A pure function is one that doesn't affect the state of anything outside of it, nor depends on anything other than the arguments passed to it. Also, given a set of arguments, a pure function will return...
  • Blog Post: Programming in a Functional Style

    [Blog Map] [Table of Contents] [Next Topic] We're now ready to talk more about some of the core FP concepts. Declarative vs. Imperative Code This blog is inactive. New blog: EricWhite.com/blog Blog TOC Imperative languages are state based. Object-oriented programming languages such as C#, C...
  • Blog Post: Introduction to the FP Tutorial

    [Blog Map] [Table of Contents] [Next Topic] Some time ago, I was talking to some members of a team that used LINQ and LINQ to XML in one particular area of their code. They said that the code written using a conventional approach to XML was in the order of 6000 lines of code. When re-written using...
Page 1 of 1 (17 items)