I fought the law   Leave a comment

And the law had a disable checkbox.

On Thursday the 19th work was quiet again, so after I had FxCop pointed out to me (by a non-Windows developer, even. I know nothing), and finally managed to find a place to download it (it’s freely available, but well hidden; eventually I found an old version. I think you need to reinstall platform SDKs, or buy the Pro version of Visual Studio, to get the new one, and I just can’t be bothered), I thought I’d throw some of my code through that to see what it said.

FxCop is Microsoft’s .net static analyser. Static analysis is where a program looks at your source or compiled code (the latter, in FxCop’s case) and then tells you you suck and can’t program. Somewhat depressingly, FxCop’s biggest single problem with my code was my spelling and capitalisation, because I don’t follow the Microsoft .net style and naming conventions (another thing I didn’t know about, and which seem to contradict the style and naming conventions used in plenty of other Microsoft code). Apparently parameters should start with a lower case letter, acronyms should be in capitals unless they’re three or more characters long in which case they should be in PascalCase, Hungarian notation is strictly verboten (*cough*), and “ID” should be “Id” because it’s an abbreviation never mind that it’s pronounced eye-dee not id.

So I spent quite a while a while getting angry and mentally shouting “What? Why?” at the error list, until I realised that it was just moaning about a set of code style guides I’d never heard of before. And I’m not going to start following it now (although I can’t be that far off, or it would’ve complained far more than it did). Sadly, there are plenty of names that could do with a good criticising, but they’re mostly in the database and the static analyser couldn’t possibly know about them (or, I suspect, understand why they’re awful). They’re on the list of things to change when I get to rip everything down and start from scratch.

There was still a list of stuff I should look at (after disabling naming and globalisation errors), but I was hoping the analyser would tell me more revelatory things than it did. Probably nothing to do with my skill as a programmer, alas, and more to do with the simplicity of the software analysed.

Anyway, I say work was quiet, but that was only true until after hometime (do home workers have a hometime?) when my boss decided to send me an email asking me to do something. Grr.

After that, the plan for the evening was to go to the gym. Unfortunately, when I was on one of the many trips between the bedroom and the kitchen, I managed to trip up the stairs (not terribly uncommon, thanks to my flappy slippers) and land heavily enough to badly graze my knee. The blood washed out of my jeans, fortunately, but I didn’t think that having it rub (and bleed) on my jogging bottoms, while getting hot and sweaty, would be a lot of fun.
Even gravity doesn’t like me getting some exercise.

I’m quite good at hurting myself backwards. Despite cycling around London and other places for years, bouncing off Mercedes, buses and the ground, a bike’s only landed me in hospital once. When I was a kid I was wheeling one along when I tripped, fell on to the bike and scraped my arm across the top of the unguarded chain-ring. That meant four stitches and four hours in A&E, but also a day off school so it wasn’t all bad. And because it was a wide, deep cut you could see the layers of meat, fat and skin in my arm, so that was quite cool. Twenty years later it’s still my largest scar (happily, I suppose).

Instead I played Deus Ex, and finished it! “At last!”, thinks the reader. I even managed to get the “good” version of the ending I chose. It’s not known how the game’s Santa function works, but you can be assured, if I’m ever turned into a super-human cyborg, that I’ll hardly kill anyone at all. So that will be alright, won’t it? I’ll knock out almost everybody, of course. But few murders.
I shan’t spoil the ending(s), but the choices available made me remember how strongly I feel about lying; two of the options involved distorting the truth, so they were thrown out without further consideration. I didn’t care about how “good” (their proponents thought) they were; I’d prefer a bad truth to a good lie any day of the week. I have absolutely no time for dishonesty; The world is complicated enough without being deliberately mislead or confused, and it completely destroys one’s ability to plan, deduce or predict. It’s utterly abhorrent and there is absolutely no excuse for it in any circumstance.
So that left two choices, and one of those was almost as bad as lying. So if you’ve played the game (and if not, why not?) you probably know what I decided.

The game’s story (and I’m using that in the widest sense of the word, not just the plot) was rather good, too, taking in various points of view on the subjects addressed and giving the player things to think about. Smarter than your average FPS/RPG hybrid.


Posted 26 January 2012 by Colthor in Diary

Tagged with , , , , ,

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s