Top of Cool

You are in a maze of twisty passages, all alike.
RSS icon Email icon Home icon
  • BYU’s Campus Gun Ban

    Posted on July 21st, 2014 Finster No comments

    This is a letter to the editor I recently wrote in response to a ridiculously one-sided front page “story” about BYU’s campus-wide ban on firearms.

    To The Editor:

    In light of recent college shootings, as BYU students and employees, we will naturally wonder, “What if that happened here?” A completely one-sided July 15 article on the cover of The Universe addressed some of the fears and concerns around allowing guns on campus and provided one view of what is not just a question of basic Constitutional rights, but a very real question of protecting life.

    Some common arguments were used by BYU Police Lieutenant Arnold Lemmon and the BYU students who agreed with The Universe’s opinion that armed citizens must remain persona non grata. Unfortunately, those arguments rely on fear, misinformation, and misrepresentation.

    Billy Hagee, a psychology major, said, “I have much more confidence in the police. . . . It seems there is so much risk involved in a situation with untrained shooters.” There is a fear, likely held by many, that an armed populace is inherently more dangerous than armed law enforcement officers.

    Lt. Lemmon said, “If you were an officer walking into an active shooter situation and you saw people with firearms drawn, what would you do?” A valid question, but the sad fact is that private citizens are more often on the right side of that question than the wrong side.

    Newsweek reported that 2% of civilian shootings involved an innocent person being shot (note: that is shot, not killed). The error rate reported for police was 11%, which counted innocent people killed–not just shot. In other words, the error rates for law enforcement are substantially higher than they are for typical, armed citizens. A University of Chicago study found that in 1993, 330 innocent individuals were killed in police shootings in Chicago, while about 600 alleged criminals were killed. That means that for every two criminals killed by trained police officers, one innocent person was killed by law enforcement.

    This is, by no means, a criticism of any police force, let alone BYU police. Police officers routinely are on the front line of danger and naturally encounter difficult circumstance. But when it comes to feelings about who you trust with firearms, people ought to be aware that common, armed citizens–statistically speaking–have a far better track record than law enforcement when it comes to shooting the wrong person.

    I could go on for many more paragraphs detailing study after study after study that shows that there is a correlation between gun ownership, concealed carry permits, and lower violent crime rates. The fact of the matter is, common perception of this subject is wrong: the statistics support confidence in an armed citizenry. Permitting concealed carry, in light of statistical evidence and in spite of what certain people seem to “feel,” would make everyone on campus safer.

    Sincerely,
    A gun owner and concealed carry permit holder

  • Test-Driven Development and me: NUnit vs. MSTest

    Posted on February 18th, 2014 Finster No comments

    We’re at a point in our development where I work that we’re re-evaluating our continuous integration process. Of course, like any good development group, this means thinking about our unit/integration testing.

    When I first joined this team, there really weren’t any good tests. There were a few tests that were doing things like testing setters and getters on various object properties, but most methods had no test coverage whatsoever. So, I dumped the property tests and had my team get to work implementing what we called “unit tests” but what actually ended up being integration tests. These tests would hit endpoints of our API’s and make sure the output was as expected. This was partially due to expediency, i.e. getting something in place so that we could have a battery of tests to run before we did check-ins. It was also partially due to wanting to avoid an onerous collection of tests that we spent more time maintaining than our actual code. Our architect has been down that road with past companies he’s worked for, so we were strongly cautioned against having a huge convoluted unit test base.

    Anyway, now that we’re trying to flesh out our continuing integration process, I’m taking the opportunity to really re-evaluate our testing infrastructure and patterns. A big part of that is going to be researching NUnit and seeing if we want to use that instead of Microsoft’s testing framework. I should probably mention at this point that we are doing mainly C# development. I also want to have a solution that doesn’t require re-engineering our codebase. That is a challenge as well as most mock object frameworks really only work well with dependency injection everywhere. And we don’t do dependency injection. So, we’ll see what shakes out.

  • Why I decided not to use ORM

    Posted on August 8th, 2013 Finster No comments

    My opinion is that it’s good to reexamine your approach early and often. I currently work on a service platform that is part of a larger service-oriented approach. We have one source of data, and want to push that to many different clients.

    I didn’t design the architecture or database schema, but it was fairly straightforward. We have a pretty flat object model. We do have some associations that could be implemented, but when dealing with Widget and SubWidgets we expose a lot of these relations through views.

    Now, switching to an ORM, like NHibernate, kind of presupposes that you have a certain amount of hierarchy in your data model. Things belong to other things and whatnot. Unfortunately, our data model isn’t really arranged like that. But honestly that’s not a big deal. No sacred cows, here. If going to an ORM is really the right option, then refactoring and rebuilding our data model should be on the table. Since we’ve done a good job of keeping concerns separated when it comes to database access, it wouldn’t be that complicated as we wouldn’t have to change much at the service layer. We would just be changing what happens at the layers below it.

    That’s all well and good, but there are some things I like about what we have right now. First of all, it’s fast. Really fast. Yeah, I know, you have to be careful for premature optimization, but in this case, where we need to be able to supply service calls to iOS, Android, Web, and another platform that has strict demands about service request call times and page load times, getting things out of the database should not be a bottleneck. On top of that, since we have a flat hierarchy with SQL views exposing related data in a single dataset, we know that at any given entry point, we are getting the right data and only the right data.

    With most ORM, and NHibernate is no exception, there is always the issue of lazy loading associated data sets. There is a certain amount of overhead in fine-tuning the data loading so that you don’t accidentally pull down an entire table’s worth of data when all you wanted were a few associated rows. The converse can also happen, where you want to get two or three layers of associated records but the lazy loading kicked in and you’re not getting it fast enough.

    NHibernate (unlike some PHP ORM) actually seems to handle all of this really well, with a lot of intuitive configuration and conventions to help make things performant when you need it. But it’s all this overhead. Right now, when I set up a new data contract, I can set it and forget it. With ORM, my experience has been there’s always this game of fine-tuning things. Otherwise, your code ends up generating ten or a hundred times more SQL queries than are really needed.

    One of the major things I’m looking for with this, besides performance, is maintainability. Our current system has a sort of home-grown migration process. It works for now, but requires a fairly high level of SQL knowledge to implement. That puts my platform developers in the position of almost having to be a DBA to make a change to a data contract. This is certainly not an ideal situation. Fluent NHibernate would help with that immensely. We could store our mappings as C# classes, and let version control handle the revisioning. Rolling back a database change becomes somewhat problematic unless we handle any rollback as just another change set. Unfortunately, it doesn’t really help with the process of migrating data.

    For these reasons, I’ll probably sit on what we have until I find something that not only abstracts the migration process, but also doesn’t require a lot of overhead in terms of performance tuning and maintenance.

  • Using Fakes Framework to Streamline Unit Testing Woes

    Posted on July 11th, 2013 Finster No comments

    I love having unit tests. However, sometimes there are… obstacles to generating the unit tests I want. Like any good unit tester, I want to be able to set up mock objects to help isolate the code I’m testing. Unfortunately most of the decent mock object frameworks rely heavily on dependency injection to get your mock object into the code you want to test.

    Dependency injection is fine, but I hate refactoring a bunch of old code (that is stable, clean, and maintainable) just for the purpose of getting a unit test working. Well, that’s where Microsoft’s new Fakes Framework comes in.

    The Fakes Framework provides two basic tools. Stubs are mock objects that work like most other mock objects you’ve dealt with. You give it an interface, it gives you a mock object that you can initialize for your unit test. Nothing too surprising there. However, the really interesting feature of the Fakes Framework comes in the form of Shims.

    Shims allow you to circumvent any .NET method so that it returns what YOU tell it to. The classic example provided by Microsoft is the DateTime.Now property. Typically, this returns the current date and time. We all know that. However, I can use Shims to force it to return an arbitrary date and time, like Jan 1, 2000, for example.

    1
    2
    3
    4
    5
    6
    7
    
    // create a ShimsContext; cleans up shims 
    using (ShimsContext.Create()
        // hook delegate to the shim method to redirect DateTime.Now
        // to return January 1st of 2000
        ShimDateTime.NowGet = () => new DateTime(2000, 1, 1);
        Y2KChecker.Check();
    }

    Now, anytime Y2KChecker.Check() calls DateTime.Now it will receive Jan 1, 2000 instead of whatever the date is now. The implications for testing any kind of time-sensitive code is pretty clear. But how does this help with regular mocking? Couldn’t you just Shim everything and then be good to go?

    Well, yes, I suppose you could, but the power of a good mock object framework is in reducing the amount of code you have to write, and helping you to not shoot yourself in the foot. Shims are flexible and powerful, but I’d still rather use a mock object framework that will provide useful features like verification.

    But let’s say you have some Legacy CodeTM that relies on some kind of data access objects that you want to abstract out of your current unit test. After all, you don’t want to test the database access, you just want to test your code to make sure it’s processing the data correctly. The catch is that you aren’t using dependency injection so there isn’t really a clean way to get your mocked object into your code… oh but there is. Shims!

     

  • Windows 8 is OVER!!

    Posted on October 22nd, 2012 Finster No comments

    There are quite a few things about Windows 8 that really bug me. While the context switching of Desktop vs. Metro apps is certainly annoying, I can deal with it. I can even handle that I must look in three different places to get all my windows updates (Windows Update from desktop control panel, Windows Update from Start Screen settings panel, and the Windows app store). Then there’s my Bluetooth never staying on. Ugh. But really, it comes down to two things that have pretty much been deal breakers for me when it comes to Windows 8.

    Power Options are Underpowered

    When I tell my laptop that I don’t ever want it shutting down when it’s plugged in and I’m away, I actually mean it. I’m the kind of person that likes to have multiple machines at my finger tips at any given time. That usually means remote desktopping (via Windows Remote Desktop or the super handy Chrome Remote Desktop). It’s hard to Remote Desktop into my laptop when it’s shutdown because Windows 8 went ahead and decided that it needs to sleep even though I have explicitly set the sleep timer to “never” when plugged in.

    It’s possible this is a bug. It’s also possible that I could dig through the “Advanced” power settings to find some poorly named setting that will tell Windows 8 to actually not sleep. I don’t know. I thought “Put the computer to sleep: Never” would have covered that. Silly me.

    It’s My Computer, I’LL DO WHAT I WANT

    No, actually I won’t. Like most tech-savvy power users, the first thing I do on a new system is disable User Account Control. It’s annoying, it hampers functionality, and I hate it. However, I noticed something interesting on my Windows 8 install. And by interesting, I mean infuriating.

    When you disable User Account Control under previous versions of Windows, there’s an automatic elevation process that happens behind the scenes, so that when you do something that requires you to be the literal Administrator of the machine (and not just a member of the Administrators group). So, most of your programs will automatically run in the context of “Administrator”.

    Well, that doesn’t happen on Windows 8, anymore. At least by default. There is a group policy that allows this automatic elevation to take place. Well, I didn’t think that would be a big deal. That is, until I lost all permissions to one of my extra hard drives. For any file operations performed in Windows Explorer, I would get a pop-up saying I don’t have permissions to do that (remove a file or folder) but I can click “Continue” to be given those permissions. What. So, the annoyance that was User Account Control has returned, but this time with a vengeance. Since desktop programs you start don’t automatically elevate, when they try to write to my extra hard drive, they are flat out denied. No message. No prompt. Just denied. Took me forever to figure that out.

    So, I went in and decided to flip the group policy to allow the elevation. By the way, if you’re editing group policies to restore basic, core functionality, that’s probably not a good sign.

    Everything was hunky dory until I decided I wanted to try out the cool new Xbox SmartGlass app from the Windows Marketplace app store. I clicked “Store” and was met with a terse, “you can’t open Store unless you enable User Account Control. Click here to turn it on, you filthy plebian.” Wow. Okay. I guess I can kind of see why that would be an issue. Well, I’ll open up the Metro Chrome app. Same Message. Huh?

    Yeah. You can’t open ANY modern-style Windows 8 apps if you disable UAC and turn on the elevation. I turned off the elevation setting in group policy and my access was restored, however then I had the issue with my extra hard drive. What is one to do? I decided I would take a page out of my old Windows 2000 playbook. Let’s log in as ADMINISTRATOR!

    By default, the Administrator account is disabled in Windows 8. Of course, I enabled it, and then logged out of my normal user account and logged back in as Administrator. Odd, it didn’t ask for a password or anything, but I figured I would worry about that later. I tried using some Metro apps, and was told I can’t because those apps are not allowed to be opened using the Administrator account.

    This means I cannot use my computer the way I want to, until Microsoft figures out this fustercluck of a permissions model.

    Windows 8 Post-Mortem

    Like a zombie breakout, there’s just too much garbage in my way to actually accomplish the things I want in Windows 8. I can understand that Microsoft has seen the light of Apple’s closed system gospel, but if they’re going to hogtie me on my own computer unless I do something akin to jailbreaking my Windows 8 install, I’ll stick with Windows 7 for the foreseeable future. And if Windows 8 is wildly successful and this is the new Windows truth, then I’ll probably have to do something distasteful like use Linux as my default OS. Yuck.

    So, at least for now, I’ll probably wash my hands of Windows 8. At least until the inevitable Service Pack 1.

  • Guild Wars 2: The Good Stuff

    Posted on September 6th, 2012 Finster No comments

    HURR DURR LF1M TANK SPEC BETTER HAVE GOOD GEARSCORE DURRRRI’ve played a lot of MMO’s. One of the only mainstream MMO’s I missed out on was the Grand-daddy of MMORPG’s, Ultima Online. I was too busy still playing MUD’s to worry about Ultima Online. As someone who’s played them a lot, there are many things that become old hat for the grizzled MMO veteran.

    Competition for resources, long travel times, crafting progress bars, difficult-to-use auction houses, login queues. Then there’s the gameplay that, since WoW came on the scene, ends up being very same-y. Copious action bars filled with loads of skills and abilities. Which of your 24-30 attack abilities should you use? Good question, but be assured that someone has already done all the math for you.

    The problem is MMO’s are, fundamentally, designed to waste time. You pay a monthly fee, so the longer they can keep you around, the better off they will be. The Free2Play models don’t help this, unfortunately. They are designed to waste time, as well, but you can buy in to get some shortcuts around some (but never all) of the time wasters.

    So, what if there was an MMO that eschewed monthly fees or the Free2Play models, and instead charged you a premium up-front? Those familiar with Guild Wars and Guild Wars 2 already know where this is going.

    I stayed away from Guild Wars, but the buzz surrounding Guild Wars 2 was too much for me. You see, I’ve always had a love-hate relationship with MMORPG’s. On the one hand, the possibilities of running around a persistent, virtual environment have fascinated me since those first times I read Neuromancer and Snow Crash. On the other hand, modern MMO’s (with a few exceptions) are so fundamentally flawed that playing them is like beating my head against a frozen cow hoping a scoop of ice cream will pop out.

    Almost every single MMO puts so many barriers between me and “fun” that it eventually becomes too laborious to even bother anymore. For some people, long sessions of grinding out XP or minerals is fun. I am not one of those people. I might as well just spin up Diablo and get my action there… if it weren’t for the lack of persistence.

    Playing Guild Wars 2 has been ridiculously refreshing. It’s like Arenanet took an MMO and then removed all the stuff that is just there to waste time. Long travel times? Nope, you can instantly fast travel to any warp point you’ve previously visited, a la Elder Scrolls games. Competing for the same mineral nodes? No way, resource nodes are “instanced” for each individual. If you see a resource node, then it’s yours and no one else can swoop in and jack it while you helplessly bash your head against your desk. Need to get to level 55 but you already did all the quests? Not in Guild Wars 2. There is SO MUCH CONTENT!

    I’ve been enjoying it immensely, and I feel like it’s because they’ve taken literally everything I hate about MMO’s and tossed it right into the drink. That isn’t to say that everything about Guild Wars 2 is perfect, because it certainly isn’t. Stability and security issues have been somewhat prevalent. Then, there were the permanent bans for doing seemingly innocuous things like buying something in-game with once currency (karma) and selling those things for another (gold).

    Arenanet certainly falls on its face from time to time, but I think it’s fair to say this is one of the most bug-free MMO’s that’s ever been released. Now, whether you think it’s fun, that is another question. If you enjoy killing the same creature or boss over and over again, then this may not be the game for you. If you aren’t really interested in well-implemented WvWvW (World vs. World vs. World, which I will probably get to in another post), then this may not be the game for you.

  • Random WoW chats I get

    Posted on September 2nd, 2010 Finster No comments

    [B?zzard] Dear players,your account is complaints by other players,please visit account information site validate your information,or else will stop using your account’s rights in one hour. warcraft validate site: {hilarious engrish url redacted}

    [Malo...] are you collecting the Gahz’ridian ornaments?

    [B?zzo疵rd]: Hello,you are drawn in the system to receive your gift.Pleast visit: www.Pet-prize.com.Celestial Steed will be yours.

  • Who buys this crap?

    Posted on May 3rd, 2010 Finster No comments

    AvP_10A few months ago, I got a press release about some new Playstation Home “outfits” available from SEGA. Apparently, for €3 you can get one of these costumes and prance around Playstation Home dressed up as a colonial marine or a predator.

    I want to know who buys this crap. Seriously. Who is it? Obviously, they are the same people who are buying Winnie the Pooh t-shirts for their Xbox Live Avatars.

    The whole concept of Xbox Live Avatars isn’t completely terrible, I guess, but the fact that they are charging real money so I can put some kind of stupid shirt on my avatar… is just bizarre. It almost proves the insane ideal that anything will be bought by someone at some point in time just because there is a price attached.

    If this crap were free would anyone download it? Aye, there’s the rub. This is something I like to think of as “the pet rock phenomenon”. Take something that is pretty much worthless, attach an arbitrarily low price to it, and suddenly it has worth. I guess that sums up this whole Playstation Home business model. It isn’t pure evil (don’t touch it!) or anything, but what happens when the PS3 and Xbox 360 go away? Never gonna happen, you say? Au contraire, mon frere.

    The part of all this that is the most infuriating to me, is that Sony and Microsoft wouldn’t be selling this garbage unless there were enough people buying it to make it profitable. That’s the worst part of this whole thing. This whole stupid, inane, pointless endeavor is actually working. I’ll admit, though, the face that Xbox Live is full of people who buy this crap makes me reconsider even subscribing to the service. Auto-renew: off!

    Maybe that’s me being elitist, but here I am… still subscribed to Xbox Live. So, who buys this crap? Apparently… I do.

  • U2 in Houston!

    Posted on October 16th, 2009 Finster No comments

    Just recently got back from seeing U2 in Houston. It was an amazing show, that’s for sure. Right before the show, we went to the Space Center in Houston and looked at the artifact gallery there. It was very humbling to be able to see the Mercury, Gemini, and Apollo capsules.

    And then, to go to U2′s show, with their “UFO has landed” stage was the perfect capstone to an amazing day.

    What an amazing show. The extra shoutouts to NASA were great, and it also seemed like the baby animation was redone as well, as it showed the baby in a space suit floating around. I wish I could better understand what the baby actually said. All I got was “Spacejacket” at the beginning. But the video and lights during “Your Blue Room” were truly amazing… and with a special coda from one of the ISS astronauts! It’s giving me chills right now, just thinking about it again! It’s great to be able to have a reminder of how great our space program once was.

    Everything about this show was brilliant, though. I think this is probably the best stadium tour U2 has ever done. I didn’t think they could pull it off, but the they really did make it feel like the entire stadium was part of the show. The Claw is brilliant! Magnificent stage design as well as how they used the video wall and light show. Really felt like we got our money’s worth, that’s for sure.

    Hearing Ultraviolet was a treat as well, as I’ve always wanted to hear this song live, but never got the chance. It’s like a dream come true!

  • Play the Eclipse Phase RPG

    Posted on September 12th, 2009 Finster No comments

    ep_cover_2Why should you play the Eclipse Phase RPG? A number of reasons.

    Firstly, the setting is cool. It’s like Cowboy Bebop meets Mass Effect meets Neuromancer. It also (on purpose, I’m sure) channels the old Paranoia RPG. Like… a lot. The overall tone, however, is decidedly less humorous than Paranoia, but certainly no less dark.

    That being said, the core Eclipse Phase rulebook and all future supplements are being released under the Creative Commons license. Specifically, the CC BY-NC-SA license. That is, you are free to share or remix Eclipse Phase as long as you do so non-commericially, attribute the original licensor (in this case, Catalyst Game Labs), and only share your remixed work under the same license.

    Unlike Wizards of the Coast and their “Open Gaming License” which wasn’t all THAT open, this truly is Open Source Gaming. Which is another reason you need to play this game. The potential within Eclipse Phase for the community to be able to develop and re-use the material is like few RPG’s before it.

    So, here is the torrent to download Eclipse Phase. Yes, it’s legal and cheap as free.

    Oh, just checked the Eclipse Phase blog, and apparently, Eclipse Phase is the number one seller on DriveThruRPG.com. Not bad for a free, open source product.