Welcome to MSDN Blogs Sign in | Join | Help

jaredpar's WebLog

Code, rants and ramblings of a programmer.

Syndication

News

Now Reading

Expert F#

What's a better book to read when learning F#?

Essential WPF

Thus far the best book I've read on WPF. Gets right down to working with WPF and the goals/history.

Purely Functional Data Structures

Reading this book makes me feel like I'm back in college. It will really get your mind going and is best read with a whiteboard handy.


Browse by Tags

stackoverflow: a new addiction
If you haven't visited stackoverflow.com yet I encourage you to take a trip. It's a great tag based newsgroup system. Check it out. Read More...

Posted Friday, October 10, 2008 8:00 AM by Jared Parsons | 4 Comments

Filed under:

VB Catch ... When: Why so special?
The VB Catch syntax has a particular feature not present in C#: When. It allows users to filter expressions based on something other than their type. Any arbitrary code can enter a When block to decide whether or not to handle an Exception Sub Sub1() Read More...

Posted Thursday, October 09, 2008 8:00 AM by Jared Parsons | 1 Comments

Filed under: ,

Functional C#: Providing an Option Part 2
In my previous post I discussed creating an Option style construct for C#/.Net.  This post is a followup with the complete code snippet.  It’s been updated in response to several bits of feedback I received.  Namely Option is now a struct Read More...

Posted Wednesday, October 08, 2008 8:00 AM by Jared Parsons | 1 Comments

Filed under: , ,

Unfold
F# has a handy method called Unfold.  Think of it as the logical opposite of an Aggregate function.  Aggregates take a sequence of elements and convert them to a single element.  An unfold method will take a single element and turn it into Read More...

Posted Tuesday, October 07, 2008 8:00 AM by Jared Parsons | 3 Comments

Filed under: , , ,

Functional C#: Providing an Option
Sorry for the terrible pun in the title.  I wanted to blog about developing an F# style Option class for C# and I couldn't resist. The basics of an Option class are very straight forward.  It's a class that either has a value or doesn't.  Read More...

Posted Monday, October 06, 2008 8:00 AM by Jared Parsons | 5 Comments

Filed under: , , ,

When is a LONG not a long?
Answer: When PInvoke is involved. I ran across a common error today on stackoverflow regarding P/Invoke that is worth blogging about. The question regarded the translation of a native API with a parameter of type LONG. The user mistakenly used the .Net Read More...

Posted Thursday, October 02, 2008 8:00 AM by Jared Parsons | 1 Comments

Filed under:

Learching: Definition to live search
Unfortunately when creating Live Search, the live team did not use a term which could easily be converted to a verb (i.e. google and google-ing).  The term "live searching" doesn't really flow well in a hallway conversation nearly as well Read More...

Posted Wednesday, October 01, 2008 8:00 AM by Jared Parsons | 3 Comments

Filed under: ,

Euler #2
Problem #2 came quite a bit faster. The yield syntax in F# is very similar to the C# iterator syntax and made translating this sample a breeze.  As a commenter posted, in problem #1, I would've been better served to use Seq.filter as opposed to Seq.choose Read More...

Posted Thursday, September 11, 2008 8:01 AM by Jared Parsons | 2 Comments

Filed under:

PInvoke Interop Assistant on Channel 9
Beth Massi dropped by my office a couple of months ago and we did a channel 9 video on the PInvoke Interop Assistant .  Mainly an overview of the product and a bit of a tutorial.  Check out the video here. http://channel9.msdn.com/posts/funkyonex/The-P-Invoke-Interop-Assistant Read More...

Posted Thursday, September 11, 2008 8:00 AM by Jared Parsons | 1 Comments

Filed under: ,

Debugging F# list's
One of the lacking's of the latest F# CTP is debugger visualization support for the built-in list types.  Viewing a list in the debugger is decidedly tedious compared to the mscorlib collection classes.  Take the following quick code sample Read More...

Posted Wednesday, September 10, 2008 8:00 AM by Jared Parsons | 1 Comments

Filed under: ,

When to use Type Inference
Occasionally the debate will come as to when it's OK to use type inference in order to declare a variable.  There appear to be three groups in this debate. Whenever it's possible Only when it's absolutely clear what the type is Never, type inference Read More...

Posted Tuesday, September 09, 2008 8:00 AM by Jared Parsons | 27 Comments

Filed under: ,

Euler and F#
I've been looking for some new problems to work on in F# to get more comfortable with the language.  I've been rather slack of late because of other projects but I had a little bit of time this week.  I decided it would be fun to join the crowd Read More...

Posted Monday, September 08, 2008 8:00 AM by Jared Parsons | 4 Comments

Filed under:

Where does the * go?
This is a more amusing than functional debate I enter into from time to time. On a line where you declare a pointer type in C++, where should the * go? Next to the type (i.e. Type* p1;) Next to the variable name (i.e. Type *p1;) Who cares For the moment Read More...

Posted Thursday, September 04, 2008 8:00 AM by Jared Parsons | 5 Comments

Filed under: ,

F# CTP First Impressions
I had a little bit of time this weekend to download the F# CTP.  The IDE portion of the CTP is a huge improvement over the previous CTP.  In particular the intellisense engine feels much more smooth, is available in new places and has much better Read More...

Posted Wednesday, September 03, 2008 8:00 AM by Jared Parsons | 2 Comments

Filed under:

A Lesson in Serialization
A few days ago, I recklessly added a [Serialization] attribute to a few of my immutable collection types.  I needed to pass data between AppDomain's and adding [Serialization] was the quick and dirty fix.  Compiled, ran and I didn't think much Read More...

Posted Tuesday, September 02, 2008 8:00 AM by Jared Parsons | 2 Comments

Filed under: , , ,

More Posts Next page »
Page view tracker