jaredpar's WebLog

Code, rants and ramblings of a programmer.
Posts
  • jaredpar's WebLog

    Regular Expression Limitations

    • 0 Comments
    I'm struggling with an introduction line to this blog post so I'm just going to go for bluntness:  Regular expressions are limited and it's important to understand these limitations.  Ok, now that the premise is out of the way, lets go to a...
  • jaredpar's WebLog

    PInvoke and bool (or should I say BOOL)?

    • 0 Comments
    Boolean value types are a constant source of problems for people attempting to generate PInvoke signatures. It's yet another case of managed and native types differing on size. There are two common boolean types in native code: bool and BOOL. As with...
  • jaredpar's WebLog

    If it's not broken, maybe you should fix it anyway

    • 2 Comments
    I know this is goes against conventional wisdom but it's something I believe in.  Every sufficiently large project has that section of code nobody wants to go near.  The mere mention of it causes people to leave the room.  It usually has...
  • jaredpar's WebLog

    stackoverflow: a new addiction

    • 4 Comments
    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.
  • jaredpar's WebLog

    VB Catch ... When: Why so special?

    • 5 Comments
    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()...
  • jaredpar's WebLog

    Functional C#: Providing an Option Part 2

    • 3 Comments
    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...
  • jaredpar's WebLog

    Unfold

    • 3 Comments
    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...
  • jaredpar's WebLog

    Functional C#: Providing an Option

    • 5 Comments
    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. ...
  • jaredpar's WebLog

    When is a LONG not a long?

    • 1 Comments
    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...
  • jaredpar's WebLog

    Learching: Definition to live search

    • 3 Comments
    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...
  • jaredpar's WebLog

    Euler #2

    • 2 Comments
    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...
  • jaredpar's WebLog

    PInvoke Interop Assistant on Channel 9

    • 1 Comments
    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...
  • jaredpar's WebLog

    Debugging F# list's

    • 1 Comments
    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...
  • jaredpar's WebLog

    When to use Type Inference

    • 27 Comments
    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...
  • jaredpar's WebLog

    Euler and F#

    • 4 Comments
    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...
  • jaredpar's WebLog

    Where does the * go?

    • 5 Comments
    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...
  • jaredpar's WebLog

    F# CTP First Impressions

    • 2 Comments
    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...
  • jaredpar's WebLog

    A Lesson in Serialization

    • 2 Comments
    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...
  • jaredpar's WebLog

    F# CTP Released

    • 1 Comments
    A new version of the F# CTP was released today. There are a lot of new improvements to the language and project system. Check it out here
  • jaredpar's WebLog

    Disabling JIT optimizations while debugging

    • 2 Comments
    If you've ever been debugging a managed app, only to be unable to evaluate any of the locals or parameters because the code was "optimized", check out the article below.  It shows a quick trick to disable optimizations by way of a .ini...
  • jaredpar's WebLog

    5 things Hollywood thinks computers can do

    • 3 Comments
    Reading another Jtenos' blog , I came across this article about things Hollywood thinks can be done with computers.  Humorous read. http://www.cracked.com/article_15229_5-things-hollywood-thinks-computers-can-do.html
  • jaredpar's WebLog

    Comments

    • 7 Comments
    If only people spent as much time writing comments as they did speaking to the evils of comments.  Everything from useless, inaccurate, to many comments make code unreadable, you should code better ... etc.  I haven't ever looked at a piece...
  • jaredpar's WebLog

    Simple class for tests involving a SynchronizationContext

    • 1 Comments
    Recently I had to test a class which heavily depended upon a SynchronizationContext .  This threw me off for about half an hour as I didn't want to write multi-threaded unit tests.  Multi-threaded code is difficult enough without adding needless...
  • jaredpar's WebLog

    CLR Changes in 3.5 SP1

    • 4 Comments
    If you haven't come across this post yet about inlining changes in 3.5 SP1 it's a good read. The short version is, value types will have better performance. http://blogs.msdn.com/clrcodegeneration/archive/2007/11/02/how-are-value-types-implemented-in...
  • jaredpar's WebLog

    Don't speak geek to your family

    • 7 Comments
    In planning my recent vacation an email thread was started about who would be picking up the groceries.  Most importantly, who would be picking up the drinks.  My brother was quick to volunteer.  I said in no uncertain terms I didn't want...
Page 5 of 13 (321 items) «34567»