What I Really Want for Christmas 2012

I am becoming less and less concerned about tangible things in my life. A minimalist, I am not…yet. My wife and I are certainly heading down that direction of our yellow-brick road. However, I still want “stuff” for Christmas!

So, if I don’t want tangible things, what do I want for the 12 days leading to Christmas this year? I’m glad you asked. I want:

  1. currency that is notfunny money“,
  2. the practice of switching back and forth between standard and daylight savings time to go away (it’s just plain unnecessary in 2012),
  3. a conscience that’s just a little more forgiving of me,
  4. to live in a city that’s not completely corrupt and a county that’s not completely broke,
  5. whole foods stores/markets within reasonable reach,
  6. game developers to focus more on co-op multi-player than deathmatch/PVP,
  7. a house that has less…right angles (you heard me),
  8. financial freedom,
  9. more chance to enjoy nature,
  10. deeper, engaging stories in single-player games,
  11. better chances to show my wife I care,
  12. and less worries about safety by moving away from the 2nd highest rated city in the country for violent crime (per capita).

SecuritySwitch 4 is Now Official

It’s now official! You can download the stable SecuritySwitch ASP.NET module for automatically redirecting your users to and from HTTPS. Check it out on Google Code, or just grab it from NuGet.

PM> Install-Package SecuritySwitch


SecuritySwitch 4 Goes Beta

SecuritySwitch version 4 has been in beta for a little while now. I’ve received some good feedback with no showstoppers at this point. I am also using the latest beta in one of my production environments with great success.

Check out SecuritySwitch on Google Code.

Nintendo Flashback

When going through old stuff, it is amazing what you can come across. I found my original Nintendo. I had wanted to get it out a while back, but wasn’t sure where everything was located. This time I found all parts and played just about every game I have. The plan now is to sell everything but not quite yet. I still have a few more games to play and one or two videos to make of gameplay.¬† Of course, we had to take some pictures to reinforce our memories.


IMG 6849 1 Nintendo FlashbackIMG 6847 1 Nintendo FlashbackIMG 6846 1 Nintendo FlashbackIMG 6840 1 Nintendo Flashback

Tiny Toon Adventures

IMG 6856 1 Nintendo FlashbackIMG 6854 1 Nintendo Flashback

River City Ransom, Pinball, Tetris, Monopoly, Uninvited

IMG 6857 1 Nintendo FlashbackIMG 6858 1 Nintendo FlashbackIMG 6860 1 Nintendo FlashbackIMG 6899 1 Nintendo FlashbackIMG 6861 1 Nintendo Flashback


IMG 6865 1 Nintendo FlashbackIMG 6866 1 Nintendo FlashbackIMG 6868 1 Nintendo FlashbackIMG 6869 1 Nintendo FlashbackIMG 6870 1 Nintendo FlashbackIMG 6871 1 Nintendo FlashbackIMG 6876 1 Nintendo Flashback

Castle of Dragon

IMG 6878 1 Nintendo FlashbackIMG 6877 1 Nintendo Flashback

Donkey Kong/Donkey Kong Jr.

IMG 6881 1 Nintendo FlashbackIMG 6880 1 Nintendo FlashbackIMG 6879 1 Nintendo FlashbackIMG 6882 1 Nintendo Flashback

Adventure Island II

IMG 6885 1 Nintendo FlashbackIMG 6883 1 Nintendo FlashbackIMG 6884 1 Nintendo Flashback


IMG 6898 1 Nintendo FlashbackIMG 6897 1 Nintendo FlashbackIMG 6896 1 Nintendo FlashbackIMG 6895 1 Nintendo Flashback


IMG 6863 1 Nintendo FlashbackIMG 6945 1 Nintendo FlashbackIMG 6862 1 Nintendo FlashbackIMG 6947 1 Nintendo Flashback

Where in time is Carmen Sandiego?

IMG 6892 1 Nintendo FlashbackIMG 6888 1 Nintendo Flashback

Maniac Mansion

IMG 6887 1 Nintendo FlashbackIMG 6886 1 Nintendo Flashback

Dragon Warrior III

IMG 6944 1 Nintendo FlashbackIMG 6943 1 Nintendo FlashbackIMG 6942 1 Nintendo FlashbackIMG 6938 1 Nintendo FlashbackIMG 6937 1 Nintendo FlashbackIMG 6935 1 Nintendo Flashback

Dragon Warrior IV

IMG 6948 1 Nintendo FlashbackIMG 6953 1 Nintendo FlashbackIMG 6950 1 Nintendo Flashback

Convert a Value to Nullable

I’ve decided to start a new series-like set of articles on highly reusable code snippets. I write a lot of these types of snippets and figure it’s time to share. Kicking off will be the ConvertToNullable function.


I despise boilerplate code in general, but I really hate writing the same code over and over to check if a variable equals some “default” value and acting on that case. That’s why I wrote SafeDataReader (article to come) years ago. SafeDataReader is constructed with a DbDataReader and adds a ton of new Get method that let you easily and safely access fields on the underlying data reader with strong typing.

One of the key benefits of SafeDataReader is that every Get method has an override for supplying a default value. If you use this version of a method, it will return your default value if the field is null (DBNull.Value).

Unfortunately, I wrote SafeDataReader before the much needed Nullable type was introduced to .NET. I also have not taken the time to go back and update it to support nullables. That leads us to the “dilemma” behind today’s code snippet.

The Problem

Have you ever written something like the following?

DateTime? someDate;
DateTime someTemporaryDate = GetSomeDate();
if (someTemporaryDate == DateTime.MinValue) {
  someDate = null;
} else {
  someDate = someTemporaryDate;

The GetSomeDate function may be legacy code, but it only returns DateTime (or another value type). However, you write code for the new millennium and want to use nullables for a clearer intent of the unknown value. Regardless, this type of code block is a PITA that bleeds unreadability.

Going back to my SafeDataReader example, here is some code that is nice and tidy until the DateTime value needs converting to a Nullable<DateTime>.

var setting = new Setting {
  Title = reader.GetString("Title"),
  Quantity = reader.GetInt32("Quantity", 1),
  BeginDate = reader.GetDateTime("BeginDate"),
  EndDate = (reader.IsDBNull("EndDate")
      ? (DateTime?)null
      : reader.GetDateTime("EndDate"))

Ugh! I hate that bit with the EndDate. Since Setting.EndDate is a nullable DateTime, I have to jump through ugly hoops to handle a null just because my GetDateTime method doesn’t yet support nullables.

The Reusable Solution

Nothing beats a generic reusable solution to such a problem. Let’s see it!

protected static T? ConvertToNullable<T>(T value, T defaultValue)
  where T : struct {
  if (value.Equals(defaultValue)) {
    return null;
  return value;

protected static T? ConvertToNullable<T>(T value) where T : struct {
  return ConvertToNullable(value, default(T));

Now, we have something that will clean-up those previous examples.

DateTime? someDate = ConvertToNullable(GetSomeDate());
var setting = new Setting {
  Title = reader.GetString("Title"),
  Quantity = reader.GetInt32("Quantity", 1),
  BeginDate = reader.GetDateTime("BeginDate"),
  EndDate = ConvertToNullable((reader.GetDateTime("EndDate"))

That is much better! Enjoy!

Reece Grenades

To all of those wives and girlfriends of gamer guys out there…

Next time your guy is playing one of the first person shooters, grab some mini Reece cups or some treat that is comparable and throw it toward him – not at him but in the general vicinity of where he might be able to catch the item and it has to be in his field of view. See how good his reflexes really are and not just in the game. This could bring some real live effects to his in-game action. Just beware since you might not know how he might react – gauge it on his normal personality to make sure he wouldn’t react angrily.

I just threw my husband two mini Reece cups while he was playing Uncharted 2 and he caught one in mid-air and the other dropped. He joked that it felt like he had grenades thrown at him.

Just a little fun!

SecuritySwitch Grows Up on Google Code

Edit: Due to a trademark infringement, this open source project will now be named SecuritySwitch. What a huge PITA it was to migrate to a new project on Google Code! Since you cannot rename a project, I had to create a new one and move everything over to it. I so enjoyed blowing 2 hours of my day off on Good Friday.

I recently posted about an update to my WebPageSecurity module project to the newly named SecuritySwitch. One of the best ways to ramp up coding on the project again is to get it into a public code repository.

Get with Git?

I thought about using Git on GitHub, but I want to get moving on this and that would not be the case if I had to fumble through learning Git now. Although, I do really like the concept of a distributed version control system (DVCS). Instead, I will stick with Subversion (SVN) for now.

Google Code

That lands the project in the capable arms of Google Code, which I find to be a very nice new home for SecuritySwitch. I will likely have a dedicated page here on GeekFreeq for SecuritySwitch that refers visitors to the project on Google Code, and/or I will just pipe updates from the project site here via RSS.

Anyway, this is the first stage of a “grown-up” SecuritySwitch.

WebPageSecurity becomes SecuritySwitch

Edit: Due to a trademark infringement, this open source project will now be named SecuritySwitch. Feel free to read the comment posted by the holder of the trademark on the name I originally planned to use. It was a polite enough message. I think there may be ground for me to stand on with the first name, but I don’t care to go to court over the name of a project that is free for anyone to download.

After a bit of a struggle supporting my WebPageSecurity module on Code Project, I’ve decided to put some quality effort into the project in the very near future. One of the first things that needed attention was the name.

What’s in a Name?

Could I have named it something more generic all those years ago? Perhaps, but not likely. After a few minutes of running through some of the key nouns and verbs that describe the project’s purpose, it will now be known as SecuritySwitch.

Educational Value vs. Quality Functionality

Another change to the project will be the maintenance of the dual source code languages. Since I originally started the module, a distinct project for C# and VB.NET have been maintained. While this was great for the educational aspect of the article and accompanying code, it is not ideal for a quality “product”.

After some consideration, I decided to drop the VB.NET version of the source code in favor of a single project written in C#. An immediate benefit to the community of this decision is faster releases.

What’s Next?

All of this change should be balanced with something to make it all worth while. I intend on stopping development on the 2.x version of the module for .NET 1.1 where it is now. Of course, I’ll fix any bugs, but no new features will likely be added. Version 3.x for .NET 2.0 will continue until version 4.0. That’s when I will add some of the new features in the queue and enable full support for ASP.NET MVC as well.

Keep checking back for more progress on this project.

Pitfall: The Big Adventure on the Wii

For Christmas 2008, we received Pitfall: The Big Adventure for the Wii. We are game junkies and get a bunch most Christmases ranging in lots of different skill sets. We were excited to check this one out since we had played the original Pitfall on Atari and Intellivision.

Sometimes it takes us a whole year to play all of the games we get since we do have lives outside of gaming. Pitfall was one of those games we didn’t get to until early December 2009. As we were playing it and getting to the point of finding more idols so we could purchase more items from the shamans, we began to search online for a list of the locations of the idols to speed up the process. It wasn’t that we were unable to run around in the game and search for them, but it is just a matter of time and we didn’t want to waste it looking and looking in the game. So, on I looked online. I couldn’t find much of anything in the way of guides for Pitfall: The Big Adventure. I did find a lot of questions and answers but no true guides with people who could actually type full sentences and know how to spell.

I finally found a guide but it was under the name Pitfall: The Lost Expedition. It is one of my favorite sites for game guides: Gamespy powered by IGN. As I was looking at the pictures of the locations of the idols, I saw places and names I recognized. I then started to search for what was going on – two games with similar places, names and pictures? – there must be something odd going on.

After only a few minutes of researching, I found out that Pitfall: The Lost Expedition was released on the GameCube, PS2, Xbox, GameBoy Advance, and PC back in 2004 and has now been discontinued by the manufacturer. After the Wii came out, it was decided to re-release the same Pitfall game but under the new name Pitfall: The Big Adventure on the Wii in 2008. They changed the artwork on the box cover to make it look different but the game is the same other than it has controls that work with the motion of a Wii remote and nunchuk.

I never played the game released in 2004. The re-release has been a fun game that has its frustrating moments due to poor controls at times and a camera that has a mind of its own at the worst times. The graphics (especially) and other parts of the game make a lot more sense now that I know this game, released in 2008, was actually one released in 2004. There is a very cool bonus where you can play the original Pitfall.

So, Pitfall: The Big Adventure is Pitfall: The Lost Expedition. When you are looking for hints or where to find something for Pitfall: Big Adventure just look for Pitfall: The Lost Expedition and you will find tons of help!

How To: Send a Bulk E-mail Considerately

If you send bulk e-mails (i.e. messages to several contacts), you really should be considerate of your recipients. While you know (hopefully) all of the contacts in the “To” list of the message you are about to send, there’s a good chance that all of them do not know each other.

A considerate bulk mail sender (that’s you), should respect your contacts’ privacy. Listing all of your receiving contacts in the “To” field reveals their e-mail addresses to each other. That could be thought of as plain rude! In addition, some of your friends and/or family will likely have an e-mail program that collects any addresses from incoming messages. That means, when they forward that wonderful e-mail to their entire address book, demanding that it be forwarded on to 15 others, everyone that you sent your message to will get that person’s bulk messages now. Very uncool!

Luckily, there is an extremely easy way to be respectful of your list of e-mail buddies.