LUCAS IS DAS BLOGGIN'

Object reference not set to an instance of a diggity...

How I missed Codemash 2014 and still learned something

I have to stop having kids around Codemash time, or rather, roughly 9 months before Codemash time.

Every year I attend I usually write a follow up blog post saying how it rejuvenates my love for the profession each year.  I have missed 2 incarnations of Codemash in its history due to my 2 beautiful daughters being born within months of the event (read: WORTH IT), but this year was a little different.  This time I wasn’t able to attend, but I still had that same fire ignited inside me as the years that I was there. 

What happened?  Well two things.

1.  I was able to send a young and talented developer in my place that had never been.

2.  The twitter feed.

Let’s start with #1.  I found that ”prepping” someone that was as excited to go as I was the first time made me feel like I was there again.  Make sure you do this, listen to this speaker he/she is great, participate in an open space, eat lots of bacon (he was paleo, so he liked this part), MEET PEOPLE, etc. etc.  In the week upcoming the event, we talked about it everyday.

Secondly, I probably have never used twitter as much as that week, trying to follow along with the events.  Since I was home with the baby and up a lot, I was spending a lot of time at night working on the website for my new business.  I was challenging myself to step out of my .NET comfort zone and build something solely with HTML and JavaScript (maybe it was Codemash from a distance inspiring me).  The problem that I was having was that my first cut at it had a lot of HTML that I was repeating across pages (navigation bar, header, footer, images, etc.) , and I thought there has to be a better way .  My first thought was MVC to deliver a base layout and render a body dynamically, but that broke my rule of trying something new, so that was out.  In comes the Codemash twitter feed where I was hearing a lot about AngularJS, specifically from my friend that went in my place who had attended a class on it and was tweeting about it.  The lights went on.  That will handle my situation AND be something new (but still kinda comfortable since I was used to the controller concept of MVC!).  A couple of nights of reading and doing and viola!, Holeshot Software was finally out there.  Is it spectacular? not really, but it was something I had been wanting to do, it challenged me, and I succeeded, and my business has a landing page with my contact information.

So, all of the reasons that love Codemash so much were still present, even in its absence, including the interaction with the most important  part, the people (only this time it was strictly via Twitter). 

Unless something happens around April again, I will see you all next year!

Opinions are like Utility.dll, everybody’s got one…

You know what I ‘m talking about.  You want to put that method that sends an email, or that Key/Key Pair dictionary thing the you stole from Jon Skeet’s blog somewhere for all of your colleagues to use and bask in your reusable API glory.  The question is, where do you put it?  On a server share?  Checked in to source control?  On a mapped drive that everyone has?  I suppose, but how are you going to version it?  How are you going to let the people referencing upgrade?  How are you going to handle breaking changes?  Dependency Management?  Well, here is my opinion: Nuget to the rescue.  If you are sharing any code in your organization, hosting an internal Nuget feed is a great way to do that.  Get this set up early and have your CI build continue to publish packages and you can add and share code as quickly as your build server can build it (and run the tests of course).

I have used the integrated Nuget server in TeamCity before, and I have to admit, it’s pretty awesome (minus managing packages, as of this date that still sucks since you can’t issue Nuget.exe commands to it).  For the purposes of this post, however, for those that aren't running TeamCity or want a process that isn't married to a third party, we will talk about setting one up from scratch.

Before we get in to putting the package somewhere, lets go over creating the package in the first place.  So, you have your assembly:

image

The first thing you need to do is create a nuspec file.  You can generate this by “nuget spec” in the same folder as your csproj (I just put a copy of Nuget.exe in the same folder to make it easy):

image

image

All that does is generate a nuspec file for you, but if you ask me, it’s pretty weak in terms of actually doing anything for you specific to this project.  Maybe its more useful if as part of your build process you are generating a new nuspec file every time and using this text as wildcards to what you would replace.  Honestly, for now, you can just copy this and and start from there:

<?xml version="1.0"?>
<package >
  <metadata>
    <id>$id$</id>
    <version>$version$</version>
    <title>$title$</title>
    <authors>$author$</authors>
    <owners>$author$</owners>
    <licenseUrl>http://LICENSE_URL_HERE_OR_DELETE_THIS_LINE</licenseUrl>
    <projectUrl>http://PROJECT_URL_HERE_OR_DELETE_THIS_LINE</projectUrl>
    <iconUrl>http://ICON_URL_HERE_OR_DELETE_THIS_LINE</iconUrl>
    <requireLicenseAcceptance>false</requireLicenseAcceptance>
    <description>$description$</description>
    <releaseNotes>Summary of changes made in this release of the package.</releaseNotes>
    <copyright>Copyright 2013</copyright>
    <tags>Tag1 Tag2</tags>
  </metadata>
</package>

Those $variable$ replacement tokens come from your AssemblyInfo.cs, so make sure that it populated, or just hard code the values instead (we will pass the version into the pack command):

image

Also, IT IS IMPORTANT THE THE NUSPEC FILE IS THE SAME NAME AS THE CSPROJ.  That will come in to play when we package this sucker.  It is a convention thing, and it bit me pretty good when I tried to do this for the first time.

Time to pack it up.  There are MSBuild targets for this as well, but since we have that Nuget.exe right there, we can call “nuget pack” (if you don’t have that, you can pass it a csproj after the word ‘pack’).  In this case we are going to use a few of the optional command line arguments to 1. build the package before packaging 2. Produce debug symbols 3.  Build in release mode 4. Specify a version.  You can specify an OutputDirectory, but it will use the current directory if you don’t specify.

So, “nuget pack –Build –Symbols -Properties Configuration=Release –Version 1.0.0.0”

image

You will have some warnings that you haven't filled everything out properly, and you can take care of that if you’d like.

Viola!  We have a package! (and symbols, which is great for an internal Nuget feed since you most likely own the code and will want to debug)

image

 

Now, where to put it?

Let’s start with setting up an internal server. There are 2 ways to do this:

1. a network share (simple, but may have some performance and security complications)

2. a remote feed through an IIS website (probably best, but has a little bit more of a startup effort to implement)

#1 – A Network Share

Create a share somewhere and put your packages in it.

In Visual Studio – Go to Tools > Options > Package Manager > Package Sources.  Add a name and a UNC share location:

image

Now you can consume it in your project that needs it.  First things first, make sure you have this checked:

image

Then you can right click on your project, and Manage Nuget Packages:

imageimage

When you install, you will get a reference to Holeshot.Utility, a packages.config, and a .nuget folder (if you have Restore Nuget Packages on, which I think you will).  Open the NuGet.targets and make sure RestorePackages is true and DownloadNuGetExe is true.  Make sure that the Nuget.exe is NOT checked in to source control, as it will download a new copy every time if it needs to.

imageimage

There you have it, the next time a new Holeshot.Utility is put in the network share, your Holeshot.ProjectThatNeedsUtility will notify you that there has been an update to your reference, and you have the option to take the new version.  Herein lies one of the biggest advantages of this process.  It puts the product owners back in charge.  Don’t want to take the upgrade now because the Minor version changed and that indicates a possible breaking change?  Then don’t take it.  When you are ready, take it, correct any compilation errors (if any), run your tests, and you are in business with a potentially effortless upgrade.

image

image

 

#2 – A remote feed in IIS

If you have a build server, TFS server, or some other computer that is publicly accessible, that will do the trick.  It’s not like it needs to be a beefy machine. 

First, create an Empty ASP.NET Web Application, and install Nuget.Server from the Manage Nuget Packages console.  Notice how it resolves all of its own dependencies (Elmah, Ninject, about 25 others, etc.).  You can have that too in your packages using this process and specifying dependencies in your nuspec file, but that is another post.

image

Now you will have this.  Notice the packages folder, that is where your packages need to go now.

image

Go to the web.config and specify an API key:

image

Publish and browse to the web site:

image

Now we can either push to the feed, or just copy the packages to the folder specified above:

image

BAM!

image

There you have it.  I did all of this while documenting in a matter of 2 hours.  Well worth the effort if you ask me.

 

Technorati Tags: ,,

You Need to Wrap That S*** Up B

I was recently writing a test for an engine that takes in 2 points and calculates the mileage between them.  I had already been given 2 distinct list of points (zips in this case) as input, but for the purposes of this demo I will just stub them out.  It is irrelevant really what the engine takes in, I just wanted to show case this “new to me” method on Enumerable called Zip.

   1:  [Test]
   2:  public void NonParallelMileageTest()
   3:  {
   4:       var originPoints= PointHelper.GetPoints(PointType.Origin);
   5:       var destinationPoints = PointHelper.GetPoints(PointType.Destination);
   6:   
   7:       IEnumerable<Point> origin100Points = originPoints.Take(100);
   8:       IEnumerable<Point> destination100Points = destinationPoints.Take(100).Reverse(); //to ensure most of the points are different
Technorati Tags:
9:
 
  10:       List<Tuple<string, string>> originDestinationPair =
  11:            origin100Points.Zip(destination100Points, (origin, destination) => new Tuple<string, string>(origin.Zip, destination.Zip))
  12:            .ToList(); //contains 100 elements
  13:   
  14:       foreach (Tuple<string, string> pair in originDestinationPair
  15:      {
  16:          MileageHelper.GetMileage(pair.Item1, pair.Item2);
  17:          Assert.Greater(mileage, 0);
  18:      }
  19:  }

One enumerable can “zip” another enumerable, and input is
1.  the other enumerable, and
2.  a lambda expression with inputs of an item from each enumerable and how you want to create your new object. 

In this case I am creating a Tuple (it’s ok, I’m in a test).

Pretty cool.

One other thing to be aware of about the method: if the 2 enumerables you are “zipping up” don’t contain the same amount of elements, it will use the lowest collection count.  See comment above in the sample that the resulting list will contain 100 elements.

So this example only contains 99 elements,

   1:  [Test]
   2:  public void ParallelMileageTest()
   3:  {
   4:       var originPoints= PointHelper.GetPoints(PointType.Origin);
   5:       var destinationPoints = PointHelper.GetPoints(PointType.Destination);
   6:   
   7:       IEnumerable<Point> origin100Points = originPoints.Take(100);
   8:       IEnumerable<Point> destination100Points = destinationPoints.Take(99).Reverse(); //to ensure most of the points are different
   9:   
  10:       List<Tuple<string, string>> originDestinationPair =
  11:            origin100Points.Zip(destination100Points, (origin, destination) => new Tuple<string, string>(origin.Zip, destination.Zip))
  12:            .ToList(); //contains 99 elements
  13:   
  14:       Parallel.ForEach(originDestinationPair , (pair) => MileageHelper.GetMileage(pair.Item1, pair.Item2)
  15:  }

I have really been meaning to blog about the Parallel namespace as I have been using it quite a bit lately and love it.  More on that later.

Codemash 2012, Is there anything else like it?

I bet there is not.  If there is, I want to see it.

Seriously, Codemash is a “down-home/local” conference that isn't “down-home” or “local” and one that brings the likes of Scott Hanselman (@shanselman),  and other big names in the industry, just to give an hour long talk, not to mention the excellent key notes that are always good.  When I got home and started to read the twitter feeds on #codemash, the general consensus was HUGS!!!  I may be wrong here, but the twitter feed from #build did not give the aura of love.  Codemash is also a small world.  Not only did I run into a few buddies from college that I haven't seen in years (Bruce Hubbard. @brucehubbard and Wes Grollmus, @wesg92), I found out that Jon Kruger (@jonkruger) is married to one of my wife’s friends that I shared a locker with for 4 years in high school.  You walk out of this conference thinking that what was once just twitter handles are now actual friends.

With all of that touchy feely stuff aside, the content is just downright amazing.  Codemash has “the law of two feet”, which translates to: If you aren't learning or contributing….leave without recourse.  Well, not once the whole 3 days did I feel that way. 

If you been to the conference but haven't attended the precompiler, please make an effort to do so.  I actually think it is the most important day of the week.  As I have said before in previous Codemash posts, the people are what make Codemash special, and the precompiler is probably the best place to do that in a semi-professional setting (as opposed to room parties, of course). 

/* if you want to read about how I spent my time at this event

This Codemash was slightly different for me this year.  As my work is embarking on some technology that isn't as familiar to me as what I have been doing for the past 10 years in .NET.  I tried to go sessions where I wasn't very familiar with the subject matter.  That, of course, is the whole premise of this conference, but I have always spent most of my time strengthening the things I knew, instead of exploring things I didn't.  This year I spend the morning session of the precompiler with Leon Gersing  (@rubybuddha) and Scott Walker (@pragma_tech) as they walked us through what was essentially 53 examples of JavaScript gotchas.  They were, in fact, proponents of the language, but wanted to point out some of the nuances that would otherwise not seem to make sense to someone like me, and that was extremely helpful.  The afternoon session I spent with Clark Sell (@csell5) and Brandon Satrum (@BrandonSatrom) while they walked us through where HTML5 is, and gave us a wealth of labs and experiments to try stuff on our own.  This class was great, my only complaint was that it should have been a full day, there was so much good content and the 2 speakers spent quite a bit of time putting together these labs.  Four hours just wasn't enough.  I explained this to Clark and he agreed, but I would have come on Tuesday if I knew I could have had that much hands on stuff to go through.

Thursday was equally as informative.  I actually had so many sessions I wanted to see, it was HARD to narrow down which to go to.  On the contrary, for the morning session, I knew I was going to see Scott Hanselman’s (@shanselman) talk on the Web Stack of Love.  There is a reason this guy is a sought after speaker, and there is a reason there is standing room only in his talks.  He is that good.  Next, Rich Dudley (@rj_dudley) showed us about building applications in Windows 8 with HTML.  He was very energetic (which I am told is baseline) and fun and informative.   Glenn Block’s (@glock) talk on Node.js and Azure was next, and man, Node is pretty cool.  The talk seemed to be more about Node than Azure, which was fine with me given that the likelihood of my current work involving Azure is small, but cool nonetheless.  The rest of the day I learned about CoffeeScript from Brandon Satrum (@BrandonSatrom) and Roslyn from Dustin Campbell (@dcampbell) .  CoffeeScript was very intriguing to me as someone who doesn't write a lot of JavaScript.  The language seemed to make more sense to me, and it guards you from some of the gotchas that I learned about on Wednesday.  While CoffeeScript is not a replacement for learning JavaScript, I can see it as a valuable tool in doing so.  The Roslyn stuff was also pretty awesome.  It left me wondering if something like this will improve such things as Resharper, or make it harder for them to provide value if a lot of what they do is baked in to Visual Studio…

Friday.  The bittersweet last day of Codemash.  The day you have a “hung over eagerness” to continue from what you learned earlier in the week.  Thankfully, the content was still just as good as ever, and I actually had up to 4 classes per session that I wanted to attend.  Phil Japiske (@skimedic) gave a talk using JustMock that I think I can apply to my current work, and that is always exciting.  Next I attended another Scott Hanselman (@shanselman) talk on Dealing with Information Overload.  This was basically a class on lessons learned by Scott on managing your life and your work.  The biggest takeaway from this sessions was “if there is something in your life that isnt improving it or making you money, delete it”.  He talked about how a large amount of developers have trouble sleeping (myself included) and that is because we are doing a for loop in our heads of the things we didn't get done and the things we want to do.  The second takeaway was that (paraphrasing here) “every developer should have a blog, I don't care how mundane the content”.  Every year Codemash reignites my writing in this blog, and this year was no different.  Lastly, I attended a class from Bill Wagner (@billwagner) entitled “C# Stunt Coding”.   Caching the expression tree of a reflection call and compiling it on the fly for subsequent calls to eliminate the performance hit!  Oh my!

*/

I just cant say enough good things about this event.  It is truly that good.  My company sent 10 developers this year, and to quote Michael Letterle (@mletterle) in reference to his company sending just as many: “#thatishowyoudoit”.   I'm already counting down to next year.  Big thanks to the organizers and attendees that make it awesome.

LINQ Order By Fun

I came across something at work the other day that I found interesting, and since I am never afraid to admit that I don’t know something, I thought I would post it.  Other than the fact that I used anonymous types to create the sample objects as opposed to writing classes, the code explains itself:

Public Sub TestLinqOrderBy()
        Dim f1 = New With {Key .Commodity = "Commod1", .Qty = 1000}
        Dim f2 = New With {Key .Commodity = "Commod2", .Qty = 2000}
        Dim f3 = New With {Key .Commodity = "Commod3", .Qty = 3000}

        Dim list1 = GetAnonymousList(f1)
        list1.Add(f1)
        list1.Add(f2)
        list1.Add(f3)

        'functionally these 2 calls are identical, since they are the same the rest of the example will use var
        Dim var = list1.OrderByDescending(Function(p) p.Qty) ' sort the list descending by quantity
        Dim var2 = From p In list1 Order By p.Qty Descending

        ' the list var now looks like this:
        'Commodity = "Commod3", Qty = 3000}
        'Commodity = "Commod2", Qty = 2000}
        'Commodity = "Commod1", Qty = 1000}

        'however, these will return you an IOrderedEnumerable (not an IEnumerable like most other simple linq queries), essentially a sorted list that will keep it sorted on the key
        'therefore, as statement like this may give you a list back you didnt expect because after the set has occurred, the IOrderedEnumerable will resort and keep itself sorted
        For i As Integer = 0 To 2
            var(i).Qty = New Random(i).Next(3000)
        Next

        ' since the above code changes the key of the list (Qty), it will set and reorder
        ' since you are looping through the list by index, you may not be changing the value in the list you thought you were when the loop began, 
        ' and the runtime will not tell you that you have modified the collection while looping

        ' the thing to note here is that if you specifiy an order by in your linq statement, that you are getting back a list that will always be sorted by the key, unless…
        ' if you want to sort a list with linq and then get it back without the live sorting, you can ToList your IOrderedEnumerable to return an IEnumerable
        Dim var3 = (list1.OrderByDescending(Function(p) p.Qty)).ToList  ' sort the list descending by quantity without live sorting
        'or
        Dim var4 = (From p In list1 Order By p.Qty Descending).ToList

        'YOU CAN PASTE THIS CODE INTO A NUNIT TEST CLASS AND STEP THROUGH IT IF YOU WANT TO SEE WHAT IS HAPPENING
    End Sub

    Private Function GetAnonymousList(Of T)(ByVal itemOfType As T) As List(Of T)
        Return New List(Of T)
    End Function
Technorati Tags: ,

LINQ Rocks!

That may be old news to some, but the it seems like every time I pull LINQ out of my toolbox I am more and more impressed with it.  I have a list of favorite interview questions I like to ask a candidate, and they are mostly centered around conversation as opposed to test questions.  One of my favorite interview questions to ask someone is “What is your favorite thing about .NET?".  There is no right or wrong answer there, but I am looking for an answer that shows some kind of passion.  If I were to answer my own question, for me it used to be reflection, but now my answer would be LINQ.  It is awesome to have a set based tool in your kit.

Since LINQ seems to teach me something every time I use it, this post was prompted by what I thought was a pretty cool query.  Say you were given an collection object called Dealerships, and there is a shared method on a Dealership a list that contains all of the valid makes of car that the Dealership is allowed to sell.  Then you have a user in UserRequestedObject that has requested to see the Dealerships that are possible matches for the makes he/she wants to buy.

The data would look something like this:

 
  Dealerships        
  Dealership1 Dealership2 Dealership3 Dealership4 Dealership 5
  BMW BMW VW Porsche Ford
  Maserati   Audi Lamborghini  
  Land Rover        

 

  UserRequestedObject
  BMW
  Porsche

So, one way to find the dealerships the user is asking for is you could write a query like this :

    Dim commonDealerships = (From t In dealerships Where _
            (From p In UserRequestedObject Select p.MakeOfCar).Any _
            (Function(u) GetValidMakesForDealership(t).Contains(u)))

Which will return you Dealerships 1, 2 and 4, and is seriously cool stuff if you ask me.

In addition, if you have an object that is a collection that contains another object that is a collection, like this:

  Dealership Cars    
  Dealership1 Car1 Car2  
  Make BMW BMW  
  Model M3 M5  
  Year 1997 2000  
         
  Dealership2 Car1 Car2 Car3
  Make BMW Audi BMW
  Model 540 S4 M3
  Year 2001 2005 1997

If a user requested to see all dealerships that have a 1997 BMW M3, you could write a query like this:

        Dim m3Dealers = (From t In dealerships Where _
           (From p In t.Cars Select p.Make, p.Model, p.Year).All _
           (Function(u) u.Make = requestedMake AndAlso u.Model = requestedModel AndAlso u.Year = requestedYear))

Nested Loops no more!  This effectively gives you all parent rows that have children that are an exact match to the key you passed in.  I understand that under the hood this is doing the same thing as a nested loop, but if you can think in set based syntax, sometimes that is the best way to solve the problem.   Very useful!

 

Technorati Tags: ,

Picture yourself behind the wheel of the Ultimate Driving Machine

I have had a number of people personally ask me to put my opinions about this on paper, specifically “How to buy a CPO BMW”.  If you don't already know, I have what some would call a mild obsession with BMW, and by mild I mean SUPREME BRAND LOYALTY.

That doesn't mean that I am willing to break the bank for one.  Before my wife’s 328xi, I haven't owned a BMW less than 10 years old.  Before you make judgment, I have almost 400,000 miles on my 2 BMW’s, I have loved every second being behind the wheel of them, and I paid less combined than you did for that Camry, but I digress… I am not going to go into the countless reasons why I think BMW’s are the best car to own, but I am going to go into some tips on how to buy them.  Before you quit reading this because you don't think you can afford a BMW, think again. 

BMW’s Certified Pre Owned program is a certification placed on a car by the dealership.  Before the car can even be considered as a CPO, it has to sight unseen pass a certain number of criteria (miles, no body damage, year of production, etc.).  Even the smallest aesthetic flaw can keep a BMW from being granted the CPO title.  Generally these cars come from 30,000 mile leases.  Then the dealer “refreshes” the car to make it pass a much more extensive quality checklist.  This could mean brand new tires, new brakes, etc. etc.  Then, they sell it as a CPO and offer it with what is essentially the closest you are ever going to come to a new car warranty on a used car.  The warranty gets extended 6 years from the production day, therefore, 2007 CPO’s are warranted until 2013.  In addition, they are often sold with new-car interest rates (we got 1.9%, but it all depends on the current specials BMW financial is running at the time).  If your credit is good, ask them to take a point off the rate, some dealerships will eat the point to sell the car.

So, there are a few things that you need to know before you start looking:

1)  What do you want?  What are the bare minimum features that you are willing to have?  My wife whom we were shopping for luckily already had this down pat:  “I want 4 wheel drive, heated seats, sunroof, a a CD player.”  Those were the deal breakers.  If you don't know that going in, then employing this strategy will be tough, because you can get lost in a sea of features in these cars.

2)  What is the absolute maximum you are willing to spend?  We are not going to start negotiating there, we are actually going to probably start about 3000-5000 dollars less.  But, you need to know this number so you know when to leave.  This is, after all, a business deal.  A good gambler knows when to walk away, you should too.

A friend of mine once taught me how to buy a new BMW, and I mean one that you are having made and delivered from Germany (because then, you truly know what you want, and what you are going to get).  Spec your car out completely, pick a price that you find fair, go to every dealership in the area and offer them that price.  If you make it to all of the dealerships in the area and they have all turned you down, raise your price by X (my buddy used 50 bucks, that could take a while these days) dollars and do it all over again, all the while making every dealership know your motive.  At some point they are going to take what they can get because a little profit is better than no profit.

You can use parts of that strategy when buying a CPO BMW as well.  If you know what you want, find the dealerships that have cars that fit your criteria.  Look for ones within 6000-7000 of your price range and that have your minimum criteria and set up appointments at the dealership (setting an appointment up will keep you from standing around looking dumb waiting for someone to come out and talk to you, and it lets the salesman know that you are serious).

Rule #1 – Know your product.  It really helps to know what you want to buy like the back of your hand, and it is also good to know the market in the area, because you are going to go around to all the dealerships in the area to see what they have to offer, right?  A good salesman will back off if you show that you know what you are talking about.  They don't like to screw with you if they know you can call them on it.  I had 2 salesmen say, “You know what, I am going to shut up because it is obvious you know this car better than I do”.  You don't have to be obsessed like me, but a little research can go a long way.  Then you stop getting the potential salesman shtick, another characteristic to tell them that you mean business.

Rule #2 – Take your time.  One of the main facets of this strategy is that you have to have time.  If you need a car right NOW, this isn't the way to do it.  If you don't care about the extra 5 grand, this probably isn't for you.  If you are in a rush to buy, you aren't going to get the best deal.  Our whole process took about 2 weeks, but we were shopping a few months before to get some salesman's cards and see what was on the lot.  We didn't even drive anything, just a little recon.

Rule #3 – Shop at the end of the month.  CPO BMW’s have a 60-90 day turnover where if they have been on the lot that long, BMW mandates that they go to auction.  So, if you shop at the end of the month, there is a good chance that there will be some cars on the lot that the dealership is HIGHLY motivated to get rid of.  ALWAYS ask them how long the car has been on the lot.  If it is anything over 2 months, you’ve gotta good chance of knocking some serious dough off that sticker.  If it just got there, maybe it will be there in 2 months.  For that matter, look often.  New CPO’s are hitting the lot almost daily in some cases.

Rule #4 – Be willing to walk away.  After you have scheduled your appointments, go drive the cars, find out if you would be happy behind the wheel for the next 5 years, make sure this is a salesman you feel comfortable with (if you do buy the car from him, it is nice to always have someone to call about the car in the future).  Every dealership is going to try and crunch some numbers with you that night.  Don’t do it, at least not tonight.  There are 5 BMW dealerships in the NE Ohio area, so in our case, we had a lot more shopping to do.  There is a good chance that even when you get in the negotiation room that you will want to walk away.  It gives the dealership time to think about what they are willing to get rid of the car for.  Consider it recon for yourself on where the market is, and most importantly get a feel for how badly they want to sell the car.  Also, because of rule #2, it is very possible that you may lose the opportunity on some cars, but there will be more, I promise.  This CPO market is VERY driven by inventory.  Some dealers will have killer prices on X3’s, and the other has expensive X3’s but super deals on 328xi’s.

Rule #5 – Use what you have learned from shopping and researching.  Once you get to a point where you are ready to buy, remember why you have been doing all this research!  It would be a waste to have spent all that time and been too shy not to voice it.  If a dealer has offered you what you think is a decent price and you have walked away (which you should have at least once), let the other dealers know what there competition is.  Don’t be an asshole, you don't have to name names or be threatening, but you can say “Hey Salesman X, your competition is a X dollar offer right now, if you cant beat that, I won’t waste either our times”.  I had one dealer tell me he could not touch that price, and I had the other say “Yeah, I can beat it by 1000 bucks”.  By the way, that was the car we bought.

Rule #6 – Learn a poker face.  Unless it is free, no matter what number that dealer throws at you, be as unimpressed as the first time you tasted a Bud Light.  Since you did your research, you already know what you want to pay for the car.  It is very appropriate to say something like “I need that to be around X dollars or we flat out cant make a deal here.”  You would be surprised how much you can get knocked off of a car without even saying a word.

Negotiation will almost undoubtedly be a little uncomfortable, but it is a good thing to learn across many aspects of life, from negotiating a raise at your job, to buying a car, to negotiating a price on a house, to buying something at a gun/trade show.  You are out to do what is best for you, and the dealership is out there to make a little money.  There is a balance there, but it is one you generally have to fight for.

Lastly, when you do buy a car, let the other salesmen know that you found something.  You should have all of their contact info by now, and I think it is just common courtesy so they don't have to keep looking for a car that meets your needs.  Plus, I have never met someone that I have talked into a BMW that didn't buy one again, and next time the “other guy” may have a better deal, and knowing someone the next time you go shopping is one less step in the process.

Using all of these strategies, I was able to get what I thought was a decent number off the sticker, a warranty till 2013, valet service, loaner cars when it is being serviced, and all the other luxuries you get from buying a new BMW (that not too many others offer, btw).  With CPO prices on some cars less than 20K, it is absolutely possible that you CAN afford the Ultimate Driving Machine.  Besides, go look for any warranted new car for around 20 grand with all of those amenities, you aren't going to find very much, and you won’t find anything the caliber of a BMW.

Technorati Tags:

CodeMash 2010, the Ocarina of Time

Well, CodeMash 2010 is in the books, and once again it was an awesome experience.  I find that throughout the whole conference I come up with tons of ideas to write about, I mean itching to write about, and then when I get home, and the whirlwind of reality hits me at work, here I am a week later and I haven’t written a thing…  Boo on me.

I arrived at the Kalahari Tuesday evening to avoid having to get up while it was still dark outside, and hope that I will be awake enough to be interactive in the “highly interactive precompiler sessions”.  I am starting to think that the precompiler portion of this conference is the most important day to attend.  I started off in the End To End Coaching session with Steve Harman and David Laribee.  Much like the similar session I attended last year with Dave Donaldson, both Steve and David were cool, down to earth dudes and the session was entertaining, educating, and fun.  The reason I think sessions like this are so important before the conference starts is that you are practically forced into meeting and talking to people.  I know, it’s kinda touchy feely hippie stuff, but the first exercise we had to do was interview a person and report our findings to the group.  I met a guy named Mike Wood (@mikewo) and found out that he once was very interested in law enforcement and was a cop in his former life.  I thought that was a pretty interesting story at a code conference.  Basically, because of this session, I had made a handful of friends that I found myself waving to or stopping to talk to in the halls throughout the rest of the week.

The second half of the day I attended Mary Poppendieck’s session on Competency and Leadership in Software development where she went into topics about expertise and team dynamics.  The one major thing I took away from the session was that she validated what I thought the characteristics of a highly efficient team were.  I was part of a team once that I felt she was describing as if she was there.  That made me feel good that my feelings about our now defunct team weren’t being pulled from thin air.  The other main highlight of this session was that I spilt @CharlieSears coffee all over himself when I punched him the in shoulder (unbeknownst to me that he was holding a freshly poured scalding hot cup of coffee).  After I hit him (lightly, he is kinda fragile-ish looking), he turned around with fury in his eyes ready to cuss out whoever it was that left a Gorbachev-style burn on his leg, to say “Holy shit, Lucas, what’s up?!?!”.  I told him that what this meant was that I was once again going to have to refer to him in my CodeMash post mortem post, so there you go.  Sorry about the coffee Charlie……

Thursday I woke up with the same excitement and exuberance that I have every year at this conference.  There was so much interesting content this year that I was actually having trouble deciding what to do all day.  I got to learn about Silverlight, Powershell, compete in a coding contest, multithreading and parallel solutions, and the Prism and Unity frameworks.  Friday I learned how to hack USB devices with F#, more Silverlight, and even attended a session that used concepts from World Of Warcraft to convey how to build good applications.

These days go by so fast because these people aren't here because their bosses made them, and they aren’t here for the free swag, or to get away from work.  They are here because they want to be here, they begged their companies to send them, or they even paid there own way.  CodeMash is a “Uber-User Conference”, and that is another aspect that makes it so special.  It is one of the only places where I am up way too late, and can’t wait to get up the next morning, hangover and all.  I am pretty sure that the race track and days that I am home brewing are the only other days like that for me.

The other thing that makes this conference unique (and there are a lot of them), as I recounted in last year’s recap (In summary, CodeMash 2009, the Hands of Fate), are the people you meet.  So, this year I tried a new method of doing that:  I’m not hanging out in the bars at Kalahari anymore, at least not when there are a few brave souls that have invited everyone to their rooms to hang out.  A good portion of the #codemash twitter feed was merely room numbers used as code to make the Kalahari a bonified CodeMash Around-The-World party.  Thursday night we hung out with some of the SRT crew, and a bunch of others.  Brian Genisio was sharing his homebrew (there are a lot of geek home brewers out there), and I got have a bunch of fun conversations about beer, making beer, code, writing code, etc, etc...  I found something in common with Phil Japiske (@skimedic) in that we were both in a fraternity in college and we reminisced on those days, all while mixing in geeky topics, and how we can be better speakers for the community.  Keith Elder welcomed us the next night, and I had a total blast partying with everyone.  I am amazed at how good these people are at remembering names and faces.  Many of the people I had met just once last year became fresh in each of our memories once I saw them again this year, it must be drunk recall.

All in all, I wish CodeMash lasted a lot longer, and it was another great year. 

I will end this with the obligatory CodeMash blog post ending, “Can’t wait till next year!”

Technorati Tags: ,

Twas the Night Before CodeMash…

OK, I know I don't update this blog nearly as much as I should.  To the point where it can barely be considered a “log” of anything.  It could be because of my insecurities that I will write about something that is new and challenging to me, that the rest of the world thinks is archaic and easy as pie. Or it could be because nobody actually reads this, but I digress :) 

Then again, there are nights like this one, nights before CodeMash, where I am yet again rejuvenated.  As you recall, my first real post ever (CodeMash 2009, the Hands of Fate)…or you can just scroll down, there isn't that much content on here, I’ll wait.  OK, as you recall in that post, I chronicled my last trip to CodeMash and it was the lone catalyst for me to start this blog.  Not only because it is a super conference, but I get to meet people from all expertise levels, talk to them, learn from them, learn what not to do from them, network with them, teach them.  These conferences aren't as much about the content (which is top notch, don't get me wrong) for me as it is about the people. 

On that note, I was packing my bag tonight and I thought of something.  A topic that came across the Google Group today was, “Dress Code for CodeMash, what should I wear?”.  Now, I am no fashionista, actually I am the exact opposite, so this isn't that kind of advice.  As my wife says, “how is it that you can be a snob about everything but clothes???”.  Anyway, one thing that I like to keep in mind when I am going to be in a large group of people is, wear a conversation starter.  Wear something that represents you.  It could be a hat from your home team to a t-shirt of your alma mater to short sleeves that expose your Horde tattoo (no Alliance please).  Remember CodeMash 2008 when Brian Prince dyed his hair blue?  I'm guessing he was thinking of the same concept.

Let me give you an example from my own experience.  When I know I am going to be in an airport I always like to wear a hat that has my fraternity letters on it (Sigma Tau Gamma, Alpha Alpha, Miami University if you were wondering).  One day, low and behold, a fellow Sig Tau from Texas walked up to me and introduced himself.  Those of you that partook in the Greek system know that if you were in the same fraternity you were family, and that was pretty cool to find one from halfway across the country.  We chatted for a few minutes and we were on our way.  Not that this had any major impact on my life, but that would have never happened if I hadn’t decided to put that particular hat on for that exact reason.  Plus, there is nothing better than living in Brownstown and hearing someone yell “WHO DEY!!!” (I know, they lost, I don't want to talk about it) across the grocery store because they saw your Chad “pre-Ochocinco” Johnson jersey you were wearing.

So, for the same reason I stared this, ehem, “blog”, I write again in anticipation for CodeMash 2010 (and hopefully I can put away my insecurities and keep it going for a little longer this time). 

I am likely to be wearing a blue BMW hat or a Bengals hat, so come up and say hello.  See you there!!!

 

Technorati Tags: ,

Organizing our lives with Google Calendars

It’s not everyday that wife comes to me with technology suggestions, so I felt particularly proud when one night over dinner she said, “Hey, have you seen Google Calendar?  Maybe that is something we could use.  Can you see if you can figure it out?”

Sweet.

Maybe forcing her to be the early adopter in the house is finally starting to work (she was the first computer in the house on Vista, Office 2007, first to get a Smartphone, first to get a Zune, etc).

To give a little back story here, my wife and I have extremely incompatible schedules.  She is a pediatric resident (about to be chief resident) and I work an hour away.  She is an early bird, and I am a nighthawk.  It is not at all outside the realm of possibility that she gets up at 5 AM on Monday, pokes the bear a little to wake me, and I hear “I guess I wont see you till Friday”. 

Now, Sarah is an extremely organized person, some would say UBER organized.  Really, you have to be to be able to maintain that kind of schedule.  Although, even her doctor friends laugh at her inventory of what’s in the freezer currently (software idea, anyone?).  Up until now the only way that I knew where she was, or what we had going on some weekend was to look at the paper calendar the she filled out every month hanging on the fridge.

I don't do paper.

So, this often put me in some bad situations when I constantly asked what the schedule was, or scheduled something for myself when I wasn't supposed to.  Enter Google Calendar.

I don't know how long its been out, but it says its still in Beta, and its completely new to me.  I started to check it out, seeing if we could merge (or share) calendars, and basically assessing if it would fit our needs.  So far, it does quite well.  I created us each Google accounts with our new krammesnet.com domains and created us both calendars.  I can add my events, she can add hers, and we can have access to each others via sharing.  The interface is also pretty user friendly.  I can highlight both calendars to see a merged view, or just view a single calendar.  Google has built in calendars as well that display the weather and US holidays. 

We have even taken it step further and created a “Family Birthdays” calendar and a “Food” calendar that helps my wife plan the meals for the week (yes, we plan our meals, but don't knock it till you've tried it, it really helps with the grocery shopping, I used to make fun of her too, but now I'm a convert). 

Wait…, I do everything in Outlook, and I just finished hooking up all the computers in the house with our shiny new email addresses.  Quite frankly, I love that Outlook syncs with my phone automatically with Bluetooth, and I NEED those Outlook reminders!  Not to fear.  Google has a small client app that syncs your calendar with Outlook and therefore automatically syncs with my phone.  Awesome!

Google has even introduced some features that I am starting to love.  One, the Google calendar (which is now a mirror of my Outlook calendar, updates every 15 minutes) has SMS support, so I have full control of receiving text messages when a calendar event is added, removed, and when one is coming up, just to give a few examples.  Secondly, Google calendar emails me every morning with a daily agenda so I know what meetings I have at work, whatever else is going on that day, and most importantly, what we are having for dinner :)

So, all and all using this Beta Google product has been a positive experience. 

How do you keep track of everyone in your family?

Technorati Tags: