Archives / 2009 / September
  • Gmail Problems

    Hmm, GMail has been increasingly inconsistent both for POP3 and browser usage for me lately.  Is anybody else seeing the same thing or is it just me (twitter seems to indicate it’s not just me).  I guess I shouldn’t expect much from a 0.5.32 release (of Gears), though… more

  • SQL Divide By Zero Error Solved

    Recently a report that had been running fine for months began failing with a Divide By Zero exception.  This report is a summary of a lot of data and is contained in a stored procedure which uses quite a few table variables to do its job.  Here’s part of it: declare @AccountManagerRevenueByFormat table (FormatID int, AccountManagerRevenue money) insert into @AccountManagerRevenueByFormat select CreativeFormatID, sum(AmountEarned) from lq_AccountManagerRevenueDetail amr inner join lq_Placement p on amr.PlacementID = p.ID where DateRecorded between @StartDate and @EndDate group by CreativeFormatID Ultimately, after a bunch of such … more

  • GiveCamps Get a new Sponsor

    If you haven’t heard of GiveCamps before, they’re a way for developers to give back to local charities and non-profits by providing their services over the course of a weekend.  GiveCamp was an idea hatched by Chris Koenig, a Developer Evangelist for Microsoft, a few years ago and now there are many GiveCamps organized around the country, including several in the Ohio-Michigan area (Ann Arbor GiveCamp, Columbus GiveCamp, Lansing GiveCamp, Grand Rapids GiveCamp). In addition to developers, a GiveCamp also needs organizers, volunteers, and sponsors.  If you’d like to help out or start your own GiveCamp, there’s a nice Cookbook describing what’s involved in putting one together on … more

  • Lake Maintenance and Fish Stocking

    I’m fortunate enough to live on the shore of a small lake, Lake Quincy, which I’m responsible for maintaining.  One of the things I love about Ohio, and our location in particular, is that it’s so easy to shift from urban to suburban to rural living.  For instance, where we live is in a township, not a city, so among other things we have the potential benefit of avoiding city income tax (unless we work in a city, which at the moment we do – Hudson).  However, we’re surrounded by cities like Kent, Streetsboro, Hudson, and Stow.  If we want to go to the store, order a pizza, go to a restaurant, or do anything else that requires civilization, all of these cities are within … more

  • The Ultimate Developer Desk

    Recently we moved from one end of our office building in Hudson, Ohio to the other, and while we wait for some space to open up and get renovated, a few of us are working out of a conference room with a 10’ or so long heavy duty table in the middle of it.  So we decided to deck it out with as many computers and hi-res flat screens as possible.  Sitting on one side, there are 3 keyboards, 3 mice, and 5 monitors (driving 3 computers with a combined 18GB of RAM), which makes for a pretty good pair programming experience (the laptops on the ends are for email/IM). Once we move to more permanent quarters, it’ll be tough to duplicate this much hardware in such a compact space, but … more

  • Imitation is the sincerest form of

    My SOLID Principles of OOP and ASP.NET MVC talk from this year’s TechEd is seeing some new life this week in Vancouver, Canada.  Daniel Flippance is giving a presentation based on my session’s powerpoint and code.  Good luck, Daniel, and thanks for letting me know.  Let me know how it goes and if you have any suggestions for making the presentation better. more

  • Use LINQ Aggregate to Multiply a Series of Digits

    The LINQ Aggregate() extension method uses a Func<int, int, int> to operate on items in a series.  If you want to use it, for example, to return the product of each value with its successor, you can do something like this: Func<int, int, int> producter = (one, two) => one * two; var result = subString.ToCharArray().ToDigits().Aggregate(producter); Of course, you don’t need the intermediate value.  You can simply use a lambda directly for the Aggregate()’s parameter: //Func<int, int, int> producter = (one, two) => one * two; var result = subString.ToCharArray().ToDigits().Aggregate((p1,p2) => p1 * p2); With a loop to … more

  • Euler 7 Trivial with LINQ and Generators

    Euler problem 7 requires returning the 10001st prime number.  It notes that the 6th prime number is 13 in the problem description.  Having already done some work with iterators and various number generators, including a Primes generator for previous Euler problems, the base case given in the problem can be reduced to this NUnit test: public void SixthPrimeIs13() { Assert.AreEqual(13, NumberGenerator.Primes().Take(6).Last()); } Replacing the 6 with 10001 takes care of the rest.  I’m really starting to dig using LINQ for this stuff. more

  • Windows Auto Sign On In Locked Mode

    Earlier this week, after enduring yet another windows update, I came up with a feature request for Windows that would make me a much happier user.  We’ve all heard about requests for speeding up boot times and there has been some progress on this (and of course there are hardware solutions like SSDs that can help here).  What I’m looking for is related, but not quite the same.   Background I had just turned on my computer, after shutting it down at the end of the day and letting it install updates.  That took a few minutes, but not too bad, but then it wanted to finish installing 3 updates as it started up.  Ok, fine, so I went and did something else for a … more

  • SQL Azure Database Deployment Tool

    If you’re playing with SQL Azure, the current (pre-release) process of moving an existing local SQL Server to SQL Azure can be greatly improved using a new SQL Azure Migration Wizard tool that’s being hosted at CodePlex.  Wade Wegner blogged about the tool yesterday, and his post includes a screencast showing how to use the wizard.  Check it out if you’re interested in hosting your data in the Azure cloud. more

  • PDC 2009 Sessions Posted

    They’ve recently updated the list of sessions for PDC09.  You can read the full list of PDC sessions here.  A few highlights include:   Scrum for Microsoft Visual Studio Team System Patterns for Building Scalable and Reliable Applications with Windows Azure Developing Advanced Applications with Windows Azure Windows Azure Monitoring, Logging, and Management APIs SQL Azure Database: Under the Hood Developing Rich Reporting Solutions with Microsoft SQL Server 2008 R2 Introduction to Microsoft SQL Server 2008 R2 StreamInsight Future Directions for C# and Visual Basic The Sessions are Tagged on the site, so if you’re only interested in, say SharePoint or WCF, you can … more