October 2011 Blog Posts

Battlefield 3

I finally got a chance to crack open Battlefield 3 this weekend. I like it... to a point.

I've played through what I believe to be about half of the single-player campaign. The graphics and sound are really well done and the gameplay is reasonably engaging. I'm enjoying the story so far and the variety of missions is enough to keep me interested.

There are two things about the single-player missions that detract from my experience:

  1. The lights are too light and the darks are too dark. When you're in a daytime mission, the environment is extremely light, in some cases to a point where it feels like you're missing details in things because it's all whiteout. The night/dark missions are really dark, sometimes even making you tweak your video settings to turn up the brightness... which then kills you when you get back to daytime. It isn't just me - my dad noticed the same thing in his setup. I've disabled all of the dynamic contrast and super-black settings and all that junk in my TV. The only thing I can think is that they are trying to simulate your eyes adjusting due to lights - you're in the dark, some lights hit you and BAM you can't see anything. However, it's really frustrating because you end up always missing something, making the game harder than it needs to be.
  2. It's sometimes hard to figure out what you're supposed to do. Sometimes they give you visual cues of who you're supposed to follow or what buttons to push, sometimes they don't. I've run off and totally gotten lost because I think I'm going the right way when I'm not.

I've also tried the co-op missions. Well, I've tried two of them. I'd have tried more, but my dad and I can't get past the second one.

Aside: Neither my dad nor I are super players, but we can hold our own. We've beaten all but two of the "spec ops" missions in Modern Warfare 2 on the hardest level. I beat the single player campaigns of Modern Warfare 2, Operation Flashpoint: Dragon Rising, and Operation Flashpoint: Red River on the hardest level. My dad's gone Prestige in Call of Duty multiplayer. We're not winning any tournaments, but we're not newbies, either.

The difficulty on the co-op missions is ridiculous. We played the first mission on Easy and barely survived. The second mission involves flying a helicopter and giving close air support to a ground team. We'd have succeeded on that if the helicopter wasn't so damn hard to fly. I have an R/C helicopter but it has coaxial blades and no collective to mess with. Flying the helicopter in this game forces you to deal with full collective - roll, pitch, and yaw - and it's far, far too easy to dump it on its side. Anyway, it's hard enough to fly that we can't even beat that one on Easy, which means we can't unlock any more co-op missions (because you have to progress through them to unlock more).

Not that it makes much difference, since there appears to be only eight total co-op missions.

I thought, honestly, there'd be more in the way of co-op. The whole reason I got it was to play co-op with my dad since we thought there'd be some level of co-op campaign. Oh, well.

I have not tried the multiplayer part of the game. Not because it isn't good or whatever, but because I'm pretty much done with free-for-all, plotless game types. "Team Deathmatch" has no point. There's no real teamwork, it just means half the people aren't out to kill you. "Capture the Flag" just goes back and forth and never gets anywhere. "Horde Mode" sorts of things where it's just endless wave after wave of enemies isn't interesting either. What's the point? I really like co-op campaign sorts of things where there's both teamwork and a mission.

Anyway, like I said, Battlefield 3 is decent... but I may sort of be done with the war-based FPS until someone can bring back co-op campaign. (Seriously waiting for Borderlands 2!)

MVC3 Project Template Requires Solution Node in Solution Explorer

I've got Visual Studio 2010, MVC3, and the latest tools update. I'm all patched up. But I'm seeing something weird.

I start out and I have a solution with a single C# class library in it.

Solution with one class library.

I decide to add an MVC3 site to it, so I do File -> Add New Project. I select an MVC3 project.

Add new ASP.NET MVC3 Web Application

I click OK, and I select an Empty web application.

Selecting an empty MVC3 project.

When I click OK on this screen, I get an error "Cannot add the item because the item to add it to is not a solution folder or the solution."

Error: Cannot add the item because the item to add it to is not a solution folder or the solution.

I click OK to dismiss the error and I see there's a folder in the filesystem named the same as the project name I selected (like it started to put the project in there) but the folder is empty.

To work around this, you have to:

  1. Add a second project to your solution so that the solution itself shows up in Solution Explorer.
  2. Select the Solution node in Solution Explorer by clicking it once. It can't be one of the projects. It has to be the solution.
  3. Now do File -> Add New Project and go through the steps to add the Empty ASP.NET MVC3 web application and it will work.

I'm not sure what's going on where the project template is somehow keyed to the solution, but there you go.

NuGet Doesn't Help Me

There's been a lot of hoopla around NuGet and the whole .NET package management "thing." There's a lot of praise going around, and I think they've done a good job for what they're doing.

That said, I have what I'm sure is going to be an unpopular opinion:

NuGet doesn't help me.

It seems to me the primary benefits of NuGet are:

  • Get third-party dependencies into new projects faster.
  • Help you more easily update packages in your project.

That's all well and good, but I think I'm not the target audience for this, and I think I may not be alone.

I don't create a bunch of new projects. I work primarily in an established environment. We add new functionality to existing stuff. We refactor and fix and add features and clean up old code. We don't create a bunch of new projects. When we do, there's more ceremony than one person on the team deciding "File -> New Project." How does that new project affect our installers? How does it change our deployment model? Was there any analysis done to see if there's already a project in the system that overlaps what the intent of this new project is?

Since there aren't a lot of projects created, there's not a lot of need to hurry up and get new third-party dependencies in them.

Even if there were a ton of new projects, we have a central repository of third-party dependencies. That's necessary because we have a lot of teams working on a lot of different projects and solutions that integrate and if we don't keep ourselves unified on an agreed-upon dependency version, we have DLL Hell and Massive Assembly Redirect Configurations to maintain. Plus, there are legal issues with redistribution of libraries and licensing. Before you can update a dependency, did you check to see if the license changed? Did anyone do the cost/benefit analysis of taking that new dependency? Did someone try it in an isolated environment to see if it broke anything?

The point is, you can't just right-click and update a dependency. Maybe a more accurate statement, then, is:

NuGet solves problems I don't have.

I have other problems, sure, but NuGet isn't helping me with those.

So when I see that really great projects like AutoMapper have stopped offering a straight-up zip-file download and are making me jump through the hoops of creating a temporary location, futzing with the NuGet command line to "install a package" that I'll never use, then manually peel the assemblies out of that and delete all the package junk... I'm disappointed. I know it's free software, but that's not terribly customer-friendly.

CORRECTION: There are zip files for AutoMapper, you just have to dig for them. I have come across other projects that don't do zip downloads, though, and that's sad.

There is still something to be said for distribution in a standard downloadable zip format. I mean, whatever happened to xcopy deployment? Does it always need to be more complex than that?

It also doesn't help that the latest MVC templates all have NuGet built in. Now it's not File -> New Project and go. It's File -> New Project, delete packages.config, delete the packages folder, and go. And that's in an "empty project." Yay for additional steps!

Mozilla Firefox with Hanselman

Bing released a Firefox With Bing addon, which prompted Scott Hanselman to tweet a bit:

Ok, can we get a Mozilla Firefox with Hanselman branded browser now?

Looking at the addon code, it was released under MPL 1.1/GPL 2.0/LGPL 2.1 so...

In response to the peoples' demand, I present to you

Firefox With Hanselman

(Click to get the addon.)

This addon does pretty much exactly what the Bing addon does:

Free. No warranty expressed or implied. Works on my machine, etc.

Waiting for November 2

Vegas 2011

Back on the week of October 11, Jenn and I dropped Phoenix over at Grandma and Grandpa Illig's for a week and we went to Las Vegas. We've been to Vegas plenty of times and used to go almost yearly, but it'd been a couple of years and we were totally ready for a vacation.

We stayed at Aria, which is one of the new hotels in the City Center development put up in the last couple of years. I totally recommend it. It's located right in the middle of the strip between Bellagio and Monte Carlo. It's very clean and has some nice restaurants and cafes as well. But the really sweet part is the room - total automation. You open/close the blinds, turn on/off lights, adjust the temperature and everything all through the TV or a little touch screen by the bed. When you walk in the room the first time, the room "greets" you by turning on the TV (which displays your names) and opening the blinds. There's even a sweet A/V panel hooked up to the TV with every connector - DVI, HDMI, composite, component, USB - so you can hook your electronics into the system. The on-site wireless is good and is included with the room.

Oh, and we got a rockin' city view room on the 33rd floor to boot. Love it.

City view from our room at Aria Las Vegas.

Since we'd been to Vegas a ton of times before, we were mostly interested in seeing what had changed and checking out a couple of our favorite places.

For example, we had dinner at Margaritaville, where we always get the nacho (Best. Nacho. Ever.), and we found they'd expanded it to be a restaurant as well as a significant portion of the casino in the Flamingo.

We also went to see the Lion Habitat at the MGM Grand. My dad and I had our picture with some lion cubs there years ago and the next time we went they were all grown up. It's just fun to see the lions.

The lions in the MGM Grand.

As for changes, The Sahara closed down, about which I have mixed feelings. It wasn't like I hung out there or anything, but it's a little piece of Vegas history dying. Plus, they had a fantastic roller coaster called "Speed: The Ride" which was well worth the money. Now it's all boarded up.

The Sahara, all boarded up so you can't go in.

Another change is the set of stores. There seems to be a huge split between "stores affordable to normal humans" and "stores targeted to the 1%." Pretty much all of the shops in Caesar's Palace are high-end now, where some used to be places we could buy things (like FAO Schwarz). All the new shops in the Crystals at City Center mall are also ridiculously high-end, like those places you see have four pieces of clothing on hangars and that's it. On the other hand, Ross Dress for Less has made an appearance on the strip. (I'm all for affordable, but I think this is a sign of the apocalypse.)

Ross Dress for Less - right next to the Hard Rock Cafe on the Vegas strip.

As for trying new things, we went to see The Beatles LOVE by Cirque du Soleil at The Mirage. WOW. You absolutely must go see this show. We've seen several Cirque shows, and they are all unique in their own way, but this thing was crazy awesome. I can't even explain it well. Things were constantly happening. It was overwhelming and beautiful and fantastic. It didn't hurt that we were right in the front row, either, so we felt like part of the show. (Especially when some set pieces landed on the floor at our feet!)

Our seats at LOVE. Front row, baby!

Finally, Vegas has a chain of places called Fat Tuesday that sells all nature of daiquiri and margarita flavor. We always stop in, but I've never gotten one of those big "yard long" drinks. I always say I will but I don't. This time I did.

My 32oz "mini yard" of 190 Octane.

I didn't go in for the 100oz "super yard" that comes with a neck strap, but I did get the 32oz "mini yard" which is actually closer to 18" tall... but it's still a lot of drink when you consider it's their strongest drink made with 190-proof grain alcohol.

Of course, I did take down two of these (over the course of two days) so maybe I should have tried the 100oz. Might have hit "Man vs. Booze" territory at that point, though.

We took a pedometer with us this time to see how far we walked. Here's a table based on an average 2000-steps-per-mile:

Date Steps Miles
10/10 4343 2.2
10/11 24391 12.2
10/12 22949 11.5
10/13 31556 15.8
10/14 7438 3.7

Keep in mind the first and last day were travel days. The rest of the time, we walked our asses off.

So, a week in Vegas, we came back, and it's back to normal life. Next time, maybe we'll head over to the Palms/Rio area since we never quite make it there.

Threw Away a Perfectly Good Saturday

Or maybe it was thrown away for me, sort of. Regardless, it's the end of Saturday, and while I guess I could say I got some stuff done, I'm not 100% sure that much of it was worth doing.

My mom came over to help out and watch Phoenix while Jenn worked on her Halloween costume and I got errands done. I definitely appreciate that help because, while I love Phoe with all my heart, she gets to be a handful and it gets hard to really get anything done when you have to watch her, too.

Jenn and I headed over to Jo-Ann, where we both picked up some additional materials for costumes. This is actually where things started to go awry. Jenn had a non-trivial amount of stuff to get and needed help picking things out, while I had like three things to get. This trip lasted close to two hours, all told, which ate up a bit of the day I wasn't really anticipating getting eaten. Not Jenn's fault, just that's how it happened.

Then it was lunchtime, which normally I'll skip if I'm out or get something on the run, but I had to take Jenn back home so we stopped and got some food, went home and ate... which was another, say, hour down.

At that point Jenn went upstairs to work on her costume and I finally left to get my errands done. I stopped at the dry cleaner to get a shirt cleaned, stopped at the comic store (which was a good point of the day), and then went to a couple of stores to get a little bit more for our costumes. Then - home.

By this time, we're well into the afternoon. Jenn's upstairs taking over the only baby-off-limits room up there with her work, so, since I can't get my costume done, I decide to take care of comic book inventory since I'd been neglecting it.

I love collecting comics, truly. I have a great time reading the fun stories and love the art. There are two problems, though.

First, I don't get much time to read them anymore. I can't do it when Phoenix is around, and when I'm home, she's around. So I get a pretty big backlog of comics to read and end up eating a full day catching up, which makes the reading feel more like a chore than the recreation it really should be.

Second, since the comics are actually worth something, I have them covered by insurance. But in order to keep the insurance up, I have to have a current inventory. I keep mine in ComicsPriceGuide.com. Problem is, it's sort of a manual inventory process. No bar code scanner or any of that - it's search for a title, find the issue, click the "add" button, enter some price data in. For each comic. This is where I get that "my stuff owns me" sort of a vibe and I'm not sure what to do about it.

Anyway, I spent a lot of time doing inventory because I bought each of the 52 new DC #1 issues and with the manual inventory process, looking up and adding each issue takes about a minute. Given I had about 80 or so comics, I stopped to get a glass of water... we're looking at another two hours of inventory.

Once I finished that, I noticed that I still had a ton of photos I haven't filed yet all sitting on my computer desktop. We took advantage of a Groupon that let us send 1000 photos in to get scanned. It turns out doing this is both a blessing and a curse. It is nice - really nice - to have our photos in digital format. We can look at them, back them up, share them, and so on. However, physical photos don't scan and magically get the right date metadata embedded. You have to name them, or set that data, or whatever all by yourself. And if the photos aren't written on (or imprinted with a timestamp) you realize that you really don't remember much beyond maybe a five-year-window around when some photos were taken. This turns filing the photos and/or naming them so you can find them again... non-trivial.

So I work, iteratively, on filing these things so eventually they'll all be done. I wish I could get Jenn's help with that, but she's still got photos sitting on her computer desktop from several months ago that she keeps promising me she'll get to. So it's all me. Since I was sitting here, I decided to do a few photos.

After putting them in the right folders on our Windows Home Server, I fired up Picasa so it could auto-discover them and scan for people in the photos, etc. Here's where the real clusterfuck hit.

As the new photos were being scanned, I noticed that Jenn had two entries in the list of people. What that means is that Picasa thinks there are two different Jennifer Illig people and it was splitting the pictures of her between the two people. Try as I might, I couldn't unify them. Every time I did, other, different pictures would pop into this odd doppelganger contact.

Ignoring that, I saw that Picasa had some suggestions for face tags. It has this nice feature where it "learns" everyone's face and can give intelligent recommendations on tagging. "Is this Travis Illig?" Usually it's right.

Anyway, I saw the suggestions and I clicked to accept them. The suggestions were accepted... then reverted back to suggestions again. I tried several times to accept the suggestions to no avail.

This was very weird, so I researched what I could do to fix it. Several places in the help forums, you see that if Picasa is doing weird things or behaving oddly, you're supposed to uninistall/reinstall so it can re-build its internal database. Fine. I took a backup of everything, did the uninstall/reinstall.

First problem I found is that about half of my albums were lost. It appeared to be arbitrary which half, but half. I followed several suggestions on how to restore these from backup, but none of them worked. Every time I tried to restore the albums, Picasa would delete them for me again. Thanks, Picasa. This caused me to have to manually recreate all of the missing albums.

Once I recreated the albums, I noticed that the synchronization with Picasa Web Albums was broken. Figuring all I needed to do was turn it on again, I clicked the button to enable sync... and it turns out this creates a duplicate copy of the web album. Fantastic.

The way you re-attach an album is:

  1. Re-create the album with the exact same name, date, etc.
  2. Put the pictures into the album, ideally in the right order.
  3. Right-click on the album and select "Upload to web albums."
  4. When the dialog pops up, scroll down to find the existing album that's already been uploaded. Select that.
  5. Click OK and the upload should happen pretty quickly because Picasa will see the photos are already there.
  6. Now click the sync button and things should sync up right. Should.

Let me tell you the ridiculous amount of trial and error that went into that.

I had Picasa back up, I had my albums attached... but now I had facial recognition problems.

Any faces I had marked to be ignored had to be marked ignored again. Thousands and thousands of faces. All over again.

Some people in the pictures it basically forgot. It put "unknown person" for several people who used to be named. All of those had to be reassigned.

And remember the original issues? Where I couldn't accept suggestions and I couldn't get Jenn to unify? Still fucking there.

Doing a bunch more searching, I find a help forum where, it turns out, all of this appears to have started recently and is somehow tied to synchronizing albums with Picasa Web Albums. All that work I did to get it re-syncing? Turn that off.

After I turned off synchronizing, sure enough, I could get things filed right. After I had them filed right, I thought I'd be smart and turn synchronization back on. Big mistake. It broke everything again.

That means the last, say, three or four hours fighting with Picasa was basically all for nothing. I'm still at square one.

And that's where my Saturday went.

I'm at the "my stuff owns me" point with these photos, too. Kind of, "who cares if we ever look at these pieces of shit ever again?" style. I mean, I know academically that they are important, but my mood is saying, "fuck it."

Now it's close to midnight and I'm beat. Jenn went to bed a couple of hours ago. I'm at a stalemate with Picasa so I'm abandoning that for now... and I would love to do something fun before going to bed, but really, I'm so tired. Mentally drained, emotionally drained. If I sat to watch some TV or something I'd fall asleep. I don't think I have the concentration to read a book or play a game. So I'll just go to bed, Saturday wasted.

Tomorrow Jenn will be up super early because Phoenix can't sleep past 5:00a and I just don't hear her. Once I finally come out of my coma, I'll be watching her while Jenn continues on her costume all day. Which means tomorrow I won't really get to do anything relaxing, either.

I guess there goes the weekend.

Lego Imperial Shuttle - Time Lapse

A while ago I did a time lapse video of me building the Lego Imperial Shuttle kit and I thought I blogged it, but I guess not. Hmm.

It took about 11 hours to build and I got it down to about three minutes in the film. I'm really pleased with the model - really well done and nice quality. I have it sitting on my desk at home now.

If you want to see it better, open it up full screen in HD.

Adding Top Level Menu Integration to a DXCore Plugin

Most of the DXCore/CodeRush plugins I write are Tool Window plugins like CR_Documentor or are plugins you'd bind to a hot key like CR_JoinLines. For Tool Windows, DXCore automatically gives you menu integration...

DXCore Tool Window plugin menu integration

...and for hot key plugins, you don't need it. But sometimes your plugin isn't really a tool window, or maybe you need to integrate into a different menu, like the standard "Tools" menu. I'll show you how to do that.

Before you begin, consider if you really need this. It's not hard to add, but if you're like me, you already have a ton of stuff flooding the various menus. Before you add that to your plugin, determine if you really need to. "With great power comes great responsibility," right?

OK, so you want the top level integration. Let's do it.

First, I'll create a standard plugin project and call it TopLevelMenuDemo. If you already have a plugin project, you can add a new plugin to your existing project. The key here is you need a "standard plugin" rather than a "tool window plugin" for this.

The TopLevelMenuDemo plugin in Solution Explorer

Next, I'm going to drag an Action onto my plugin designer from the "DXCore" part of my toolbox. I'll name it "menuAction" so we know what it's for.

Select the "menuAction" Action and open the Properties window. You need to set...

  • ActionName - Set this to the name of the action. It won't be visible, but I usually set this to the text I expect to see in the menu.
  • ButtonText - This is the text you'll actually see in the menu.
  • CommonMenu - This is the top-level menu to which your item should be added.

For our demo integration, we'll set "ActionName" and "ButtonText" to "Demo Menu Integration" and we'll set "CommonMenu" to "DevExpress" so we appear in the top-level DevExpress menu.

Properties on the plugin action.

Switch the Properties menu over to show events and set an Execute event handler. The Execute handler is what happens when someone clicks your menu item.

Events on the plugin action.

For our demo handler, we'll just show a quick message box.

private void menuAction_Execute(ExecuteEventArgs ea)
{
  MessageBox.Show("Demo success!");
}

That's it!

Hit F5 to start debugging. A new instance of Visual Studio will pop up and you should see your menu integration in place.

The plugin menu integration in action.

Selecting the menu item, you should see the message box pop up. Success!

The demo success message box.

For the more advanced users... check out the other events you can handle on the action if you want even more control. For example, the PositionMenuButton event can give you more control over the positioning of your menu item within the parent menu. There's not a lot of documentation out there on this, so you'll need to experiment a bit, but a lot can be achieved.