Visual Studio 2012

The Book of F#

The Book Of F#Earlier this year (late February to be exact) my life took an interesting turn: a publisher approached me about writing an F# book. Writing a book had been something that I’d thought of doing for some time but it was never something I gave any serious consideration. After some discussion with my wife, mostly about the time commitment, I decided to go ahead with the project. Since then, a mix of writing, reviewing, revising, and the variety of other activities that go along with getting a book on the shelves have consumed most of my nights and weekends.

After months of work, I’m very excited to announce that The Book of F#: Breaking Free with Managed Functional Programming will be published by No Starch Press! The book is scheduled for release on March 22, 2014 but No Starch is accepting pre-orders now! By pre-ordering from No Starch with the coupon code PREORDER, you can save 30% off the cover price of $44.95.

If you’re an experienced .NET developer that would like to break free from the chains of C# and Visual Basic or someone that’s just curious about the language, this book is for you. The Book of F# will introduce you to the basics of the language and walk you through features such as currying, partial application, pattern matching, discriminated unions, record types, units of measure, type providers, and a plethora of other concepts. Throughout the book you’ll see examples of how F#’s terse syntax and functional-first nature will help you be more productive and produce code that’s more predictable than that of many modern languages.

F# has been getting a lot of attention lately. If you’re even remotely curious as to why, I hope you’ll consider adding this book to your collection.

Advertisements

Custom Dark Colors for F# Depth Colorizer for VS2012

Custom F# Depth ColoringA few days ago I installed the F# Depth Colorizer extension for Visual Studio 2012. I really liked the idea but didn’t care much for the default colors used with the dark theme. Rather than alternating light and dark colors I thought it would look better with the background getting progressively lighter giving the illusion of each block being stacked on its container.

After a little tweaking I created the necessary registry entry and was pretty pleased with the result.  The image to the right shows the colors against the same code snippet used in the extension’s description.  If you’d like to use these colors just copy the registry information below into a .reg file and apply it. You’ll need to restart Visual Studio for the changes to take effect.

Windows Registry Editor Version 5.00

[HKEY_CURRENT_USER\Software\Microsoft\VisualStudio\11.0\Text Editor\FSharpDepthColorizer\Dark]
"Depth0"="0,0,0,0,0,0"
"Depth1"="15,15,15,15,15,15"
"Depth2"="30,30,30,30,30,30"
"Depth3"="45,45,45,45,45,45"
"Depth4"="55,55,55,55,55,55"
"Depth5"="65,65,65,65,65,65"
"Depth6"="75,75,75,75,75,75"
"Depth7"="80,80,80,80,80,80"
"Depth8"="85,85,85,85,85,85"
"Depth9"="90,90,90,90,90,90"

More information about the extension including how to customize the colors is available on Brian McNamara’s blog.

.NET Rocks! Visual Studio 2012 Launch Road Trip in Indianapolis!

.NET Rocks Visual Studio 2012 Launch Road Trip

The details are still a bit sparse on this one but here’s a note to mark your calendar.  On October 8 (Yes, the day after GiveCamp) IndyTechFest presents The .NET Rocks! Visual Studio 2012 Launch Road Trip in Indianapolis!

If you’re wondering what this is all about here you go:

Well, we’ve done it again! We went and rented a big 37′ RV and booked another United States (mostly) Road Trip for the launch of Visual Studio 2012. No charge for admission.

At each stop we will record a live .NET Rocks! show with a guest star, whom we will fly in for the occasion.

Following that, we (Richard Campbell and Carl Franklin) will each do a presentation around building modern applications on the Windows platform. Carl leans toward development and client-side technology and Richard leans toward DevOps and server-side technology.

There will be food, drink, geeking out, and hopefully some alert locals will know of a pub where we can adjourn after the event to continue the conversation.

If you’d like to attend be sure to register.  I’ll update this space with more details as they’re made available.  I hope to see you there!

10/8/2012 Update

I’m a little behind with this update since I was tied up with GiveCamp all weekend but the venue details are as follows:

IndyCoz
7960 Castleway Dr
Indianapolis, Indiana 46250
[Map]

Moles vs Fakes: The Differences

If you’re a fan of the Microsoft Moles framework you’ve probably heard that it’s being included in Visual Studio 2012 as Microsoft Fakes.  As I was preparing my talk covering this isolation framework I noted some of the key differences between the two.  Rather than going back and updating my original post regarding Moles (much of which is still applicable even with terminology changes) I thought I’d list those differences here.  So without further ado:

  • Assembly generation is driven by a .fakes file rather than a .moles file
  • Isolation types are placed in a .Fakes assembly and .Fakes namespace
  • Shim types replace Mole types
  • Stub types are prefixed with “Stub”
  • Shim types are prefixed with “Shim”
  • ShimsContext replaces HostTypeAttribute for enabling profiling
  • Profiling occurs in the IntelliTrace profiler rather than the Moles profiler
  • Fakes allows shims for static constructors whereas Moles allowed erasing static constructors through an assembly attribute
  • Fakes does not provide any support for finalizers whereas Moles allowed erasing finalizers through an assembly attribute
  • Moles allowed controlling whether the profiler would run as a 32-bit or 64-bit process but this is now handled entirely by the IntelliTrace profiler
  • The “classes” filter attribute was removed.
  • Fakes supports isolating auto-implemented properties
  • Fakes play much nicer with testing frameworks other than MSTest when run through Visual Studio