Misc

Misc

Testing SyntaxHighlighter

12 September 2011 |

So I found what looks like it might be a good solution to some issues I’m having with syntax highlighting on my blog.  It’s a combination of a script called SyntaxHighlighter (http://alexgorbatchev.com/SyntaxHighlighter/) and a Windows LiveWriter plugin called PreCode Snippet (http://precode.codeplex.com/).  So here’s a little test to make sure it works well with both C# and F# (I found the F# brush for SyntaxHighligher over at Steve Gilham’s blog - http://stevegilham.blogspot.com/2009/10/syntaxhighlighter-20-brushes-for-f-and.html) public class Foo { public object Bar { get; set; } private object _baz; public void SetBaz(object o) ...

Error 52

06 May 2011 |

I get the following error on build intermittently: Error 52 It is an error to use a section registered as allowDefinition='MachineToApplication' beyond application level.  This error can be caused by a virtual directory not being configured as an application in IIS. C:\Work\…\web.config 98 Frontend I get it infrequently enough that I never remember the fix for it.  I always Google it and come up with the same links – they all imply it’s because of a problem with some configuration.  For me it’s not a configuration problem.  If I delete the \obj directory...

Next up: F#

29 April 2011 |

The next language I’ll be learning will be F#.  I just started and have already written my first stack overflow!  But it taught me a lesson about the order of precedents in F#. I was writing my first real function, one that wasn’t pre-written in the tutorials I was using (at least not that I got up to yet!): Fibonacci.  I started with 1: let rec fib x = 2: if x = 0 then ...

On looking for a job–your online reputation

27 April 2011 |

I attended a session at MIX11 entitled Windows Azure from Startup to Scale (http://channel9.msdn.com/events/mix/mix11/SVC09) which was presented by the makers of myonlinecareer.com.  While explaining the problem which his company solves (and forgetting to actually speak about any technical details!), the presenter mentioned some issues with checking job applicant's’ Facebook and other social media pages.  From an employer’s perspective, there are some liabilities with checking these services since a potential employee’s ethnicity and sex are visible and obviously it would be inappropriate to make any sort of decisions based on that information. From the potential employee perspective, however, I actually...

If the property’s computed, tell me!

08 March 2011 |

Today’s lesson learned: if a property may or may not be computed, provide a mechanism that allows consumers to check if it is computed.  Seems pretty simple when you hear it but we don’t always design like this.  And I think we probably should most of the time.  I came to this conclusion based on the following problem: My project has a lot of similarities to a shopping cart.  Imagine a product catalog with both a Product and a SubProduct (only one level deep).  Both a Product and SubProduct have a price but price is only required on a...

Reading config file when called through COM interop

18 August 2010 |

Seems obvious in retrospect, but gave me some trouble yesterday.  I’m using hMailServer (a nifty, open source SMTP server) which supports scripting via VBScript event handlers.  Now I don’t want to code in VBScript so I wrote a .NET library and was using some COM interop to pass everything through.  However, I wanted my library to read configuration values via the ConfigurationManager class and didn’t know what config file it was looking for! In a .NET app you typically have an App.Config that gets copied to a new name on build – YourApp.exe.config.  I was building a library though,...

QA Based Testing

28 March 2010 |

Over the last couple weeks I’ve spoken to a few people about something I’m calling QA Based Testing, and I figured it would be a good time to write about it. There’s been a lot of attention around Test Driven Development in the last couple years.  TDD does take some practice to get used to and it requires team participation.  If your boss tells you to “do it right now” while he looks over your shoulder waiting to alert the business that it’s ready, you might have a hard time practicing TDD ;). But there’s another way to...

BitlyDotNet just got more awesome

11 March 2010 |

Mike Gleason Jr has a bit.ly client library written in C# called BitlyDotNet (it’s hosted on here on Google Code).  If it wasn’t cool enough before, it just got more awesome. I submitted a new version with the following improvements: Added support for error code 208 ("you have exceeded your hourly rate limit for this method") Overload to shorten multiple URLs in one shot Fixed bug that occurred when hourly limit was exceeded (SingleOrDefault throws InvalidOperationException because of multiple errorCode nodes) This library saved me time on...

Help me build a great software development course

09 February 2010 |

It looks like I might be giving a course on Beginning .NET Development to non developers with IT backgrounds.  I'm putting together my lectures and it's really hard.  I want to make sure that I explain things so others can understand them.  Even though this is a .NET course (with a web-based slant), I really see it as a fundamental software development (crash) course.  You can’t become a great developer without understanding what’s going on behind the scenes.  If you have any thoughts or advice on any of the topics at hand (am I missing a topic?  are...

Gunnar Optiks glasses update

03 December 2009 |

All I can say is I love my Gunnar Optiks Rx computer glasses.  My whole body just feels better at the end of the day and I have a lot less sensitivity to light at 10pm.  In general, during my day, I concentrate more and lose myself in my work more since I got these glasses.  I highly recommend them to everyone who spends most of their day in front of a computer monitor.