.Net Nooks and Crannies

I really love Stack Overflow. It’s so cool to have a link to many, many great coding minds to help with the minutiae of my learning process, whether through asking a question myself or finding that someone else asked something similar months ago.

The last question I asked was about public properties that should be read-only (usually List<T> or somesuch thing), but allow the user to add an item still. The answer was to use a class called ‘ReadOnlyCollection<T>’. This is one of many, many classes that I’ve never heard of but would be incredibly useful if I had!

When I get to the end of the first run of Wargame Tools, I’ll definitely be refactoring it (especially since I plan to port the logic to an ASP.NET MVC 2.0 application and see how those work) and will be sure to blog about this class and how I find using it.

Apple Bites

Just a quick update today: Apple has gone up one point in my mind. One of my big problems with them has always been that iTunes, the ambassador to the Windows world, has only offered English (United States) as a language. Not just ‘English’ with a silent ‘whoops we thought this was English’ but ‘English (United States)’ as in ‘this is a specific language, and yours ain’t supported’.

Today, I installed iTunes just to get my iPod recognised (it comes off straight after, no fear!) and I realised that they finally had English (United Kingdom) offered on the installation.

Well done Apple, better late than never.

On a side note, I still dare some company to put English (England) on their languages list.

EDIT: That didn’t work. Now I have to uninstall all the additional junk Apple fills a computer with just for an MP3 player and software. MediaMonkey doesn’t do this. Nor does WinAmp. Still no solution.

Wargame Tools – a learning program

My name is Pete, and I am a wargamer. I am also a programmer. As a programmer and huge geek, I look for ways to apply programming knowledge to my other hobbies. So it only makes sense that I would try to apply it to wargaming.

Over the years, I’ve seen, used and abandoned various ‘army list’ programs. My favourite for the longest time was Army Builder but their licence restrictions are just a little bit harsh for me – apparently, a recent ‘minor’ upgrade means that anyone without an active licence (mine ran out years ago) must buy a new one, and the datafiles are not compatible with previous versions. It sounds more like a major version change than a minor one to me, but that’s their call at the end of the day.

So I’ve decided to build my own, as daunting a task as it may be, and see if I can bring something I work on in my spare time to the web as a useful addition to the choices around in the world today. At the same time (and extending the possible release by an indeterminate amount) I decided to use this as an excuse to learn WPF and apply some more object-oriented concepts to my code.

One of the biggest stumbling blocks, as Army Builder has always worked with and Army Roster discovered this year, is that it’s not nice to just give away the intellectual property of games manufacturers. So there is a need to give people the tools they need to make the data files, with which to build the actual army lists. It’s also pretty difficult to take what amounts to a domain-specific language that your datafile program writes and your army list program understands, and present an easy, graphical way for your user to interact with it without getting them too deep into the technical sides of it. It needs to be accessible for non-programmers.

So far, I’ve been working away on it slowly, and through evenings and weekends when I can snatch a few minutes. I’ve found WPF and XAML to be very, very interesting to work with but there’s a bit of a learning curve to get over if (like me) you’re coming from a Windows Forms background. I will be putting up anything interesting that I’ve learned, or link to samples that have helped me, whenever I find something useful.

Film Autopsy – Surrogates

surrogates

This film review is going to be heavy on spoilers. Move along if you’re not into that sort of thing. I will warn you to start with, I am a nit-picker of films. I will latch on to something and unravel it, and try and understand how the world of a film works. This often makes it look like I hate a film, or at least think too much. Sci-fi films set 10 minutes into the future are perfect for this – a lot of things can be assumed about the way the world works now with that one big difference.

To sum it up right here, I enjoyed this film. It’s a fun action flick, Bruce Willis is good as usual, and the style and appearance of everything in the film helps to sell the story. When people act as their surrogates, they are slightly off, but not entirely ‘uncanny valley’, if that’s even appropriate. The ‘cheaper models’ shown in the film are definitely sitting in the uncanny valley but everyone appears to have the equivalent of a Ferrari, as far as I could tell.

It does, however, suffer from a few rather wacky assumptions and simplifications. In no particular order:

Surrogate distribution
“Surrogate technology became cheap enough that 98% of the world’s population have surrogates.”
Really? 98%? Half the world can’t afford to feed itself, let alone buy a complex robotic device with two-way high speed permanently active (and highly reliable, since it’s their whole life being lived) broadband connection. By world, I think that they meant to say ‘Western world’ and quite possibly ‘USA’ only, since that’s all we see.

FBI Monitoring
It appears common knowledge in the film that the FBI watches through the eyes of every surrogate. Privacy advocates aren’t shown in the film, but I can imagine a vocal minority refusing to use surrogates (but also refusing to move to the primitive ‘low-tech’ reservations) simply because they don’t want the government – or anyone, for that matter – looking at whatever they look at, whenever they want to. I can’t say I’d be thrilled about it. I would also be fairly confident that the UK government would be a little wary of Americans watching what every British person is up to, and that’s a shadow of what the French would feel!

Military Applications
The moral and ethical problems of using disposable soldiers are quite huge – war would be won and lost on a financial basis. “Oh, we lost more surries? Best call up the factory.” There isn’t such a downside to declaring war, if all you need to do is send thousands of surrogates into your neighbour and shoot everything that moves. You don’t lose men, you only lose tax money – and since surrogates are so cheap, there’s not even a lot of that lost.

The other major military implication is that if surrogates are used to fight wars, why would they be exported from the country? Any of the more advanced models could be reverse-engineered to create the more basic (cheaper) military version, giving other countries equal footing on the military basis.

Are they Communist now?
The economic clue in the ‘cheap’ surrogates makes corporations seem less realistic. All surrogates are on the same network but not everybody in the world is on the same internet service. Likewise, if everyone can afford this extremely expensive piece of equipment (and the requisite maintenance, energy cost, etc) are iPhones treated like confetti? There’s obviously a demand for surrogates – a huge demand, since they apparently make things safer and solve society’s ills – so any capitalist corporation would sell for whatever they could get, especially in a market that seems devoid of competition.

In addition, inequality has been solved. Crime is much lower now everyone’s using surrogates. Surely, violence against surrogates will increase because the consequences are less severe? Early in the film, a surrogate is destroyed by a car and it’s written as ‘criminal damage’ (possibly vandalism, I don’t quite remember). A human would be classed as ‘hit-and-run’ or ‘attempted murder’. Perhaps that’s how crime is reduced… all crime is declassified.

Meatbags!
I don’t remember exactly, but I believe the film is set 15-25 years in the future. And people seem to have become allergic to people, some even go as far as to call the real humans ‘meatbags’. The anxiety of being out without your surrogate and the slightly concerned, off-kilter reaction from surrogates to humans is good, but people using surrogates calling others ‘meatbags’ I just don’t understand. I can grudgingly admit that violence against humans would happen just for being without a surrogate, because people will find any excuse to hurt each other, but the actual revulsion shown is… well, stupid. Sooner or later their meatbag is going to have to meet someone else’s meatbag and mix their meat together to have a family. Maybe they put a bag over each other’s heads and make tiny motor noises.

Space in the future
Families might even be getting smaller in the future – buying a new surrogate when your kid grows out of theirs? Wow. That’s going to suck. Plus, since no more unprotected sex (unless your surrogate is really basic), the birth rate will drop dramatically. With people not getting out of the house, obesity will rise… And of course the surrogate control beds. They’re enormous! We have, I think, a good sized house for three people. We could easily squeeze another child, maybe two in here. But in the world of surrogates, we would need to convert the loft into a surrogate room or else lose our dining room to put up two of those beds. Any kids will have to move out young so they can have a place to put their own surrogate bed. Houses will need to be a lot bigger, and I don’t know that their price will come down in line with surrogate prices.

Endgame
Taking these points into consideration, the end of the film makes things look very interesting. No surrogates connected to the FBI network… but every other country presumably still has theirs. Would military surrogates even be connected to the FBI? Perhaps. Are other countries military surrogates? Hell no! America is at war with someone, they’re almost definitely going to lose it now thanks to Bruce. Unfortunately, his brave new world of human connection doesn’t get past the fact that the world was apparently safer, with less crime, and there’s all this infrastructure set up to build, sell, modify and run surrogates just lying around… Plus the fact that the engineers know how to improve on the old system, and the dangerous terrorist leader leading the anti-surrogate movement is dead (and soon to be exposed as a surrogate himself). It’s not going to be too long before people slip back to their happy network beds and plug in again.

To summarise, the premise could have been a little more realistic or thought out (a lot of it just by cutting scenes showing military surrogates!) but it’s an interesting idea and a good plot overall.

On my own personal meter, I would watch this film again (probably with friends and beer) but I doubt I’ll actually get it on DVD.

Work-Safe Stripping Models

First post on miniature wargaming! About time!

I’ve noticed over the past year that this hobby is not designed for random searches on a work computer. More than once, I’ve been blocked by an internal filter from searching for sites that describe ‘paint stripping model acrylic’. It got worse when I tried to look for ‘latex’ – I quickly clarified that with ‘model latex rubber’ and wished I hadn’t! These are, of course, perfectly innocent search terms to a wargamer but some overzealous web monitors don’t always get the context…

Unrelated to these searches, I came across A Year of Frugal Gaming last year. It is a one-man project to ‘spend less, game more’ and is extremely interesting – offering game reviews, money-saving tips, modelling projects on a budget and advice on how to make some money from your hobby too! One of the most useful tips was how to remove paint from plastic models… effectively, completely, quickly and without damaging the model.

The secret is Dettol antiseptic disinfectant.

I too, now, know the joy of wandering around a house in marigolds, holding a toothbrush and stinking of disinfectant. I have, in my collection, a lot of partially painted and poorly undercoated models from the mid-90’s, when I started collecting Dark Elves. I’ve been looking for a way to strip the paint from these models for a long time, so I can start again with the experience I’ve gained since then. There’s models undercoated white (a nuisance for an evil army to paint over), most of them done with car body spray rather than proper acrylic spray (it was cheaper back then…) and most effective paint-stripping techniques have a tendency to melt plastic.

What I’ve Learned While Dettol De-painting:

  • Wear marigolds, and remove wedding rings!
    My fingers began to itch the first few nights I did this, and a couple of days after a particularly brutal session I spotted lots of skin flaking off. Marigolds are essential.
  • Honey-coloured disinfectant
    I initially tried a lime green Tesco variety, figuring it would be cheaper and just as good. I was wrong, it was a complete dud and barely touched the paint.
  • About 24 hours is right
    I’ve not yet performed the experiments to work out how long is too long, but I imagine that anything that works as well as this will eventually damage plastic models.
  • Put down paper, or take it outside
    Not the time of year for it at the moment, but toothbrush scrubbing will make a mess and the paint scum flying off tends to stick to things like sinks and kitchen worktops and really aggravates spouses and mothers. I found that scrubbing under the surface of the Dettol is better, but not great once it’s really mucky.
  • Paint will come off as a gloopy scum
    This will stick to and stain your toothbrush, and float in the Dettol and get onto other models. Keep a piece of tissue near by to wipe your brush on.
  • Wash models off after stripping
    I used an overnight soak of warm soapy water.
  • You can reuse the bowls
    Up to a point, you can use a bowl of disinfectant more than once – but it’s slightly less effective each time and will collect a lot of paint scum in the bottom (this makes cleaning the models harder).

I was very pleasantly surprised by how well this works, and even my mother-in-law pitched in and brought me a bottle of Dettol last week. She explained that she wasn’t sure whether I wanted the original one, or the new purple one ‘that smells of lavender’. I briefly contemplated an elf army that smells of lavender, and as fitting as that may be I opted for the original in the end. There may be a missing market niche for thematically scented base inserts… anyone have any thoughts on that?

WPF for those who know WinForms

As a programmer, I am primarily self-taught. I’m at the stage now where some new technology articles I can read at the highest level and follow and understand, but others I am looking for the absolute most basic beginner’s guide around.

I recently began a project in WPF to try and learn what it could do – I find the best way to learn a new technology is to come up with an application for it and just go for it! The more complicated your application, the better, since it will force you to find more stumbling blocks, gaps in your knowledge, and interesting quirks. Of course, some things may just be a little too much to take on all at once (as I’ve discovered) and my first try was by no means going to be a releasable app! WPF was definitely in the category of ‘most basic beginner article please’ and although there are some beginner’s articles around, I just couldn’t get my head around what was going on.

I struggled for a while, then blamed it on the fact that WPF was really just very different to WinForms. It needn’t be – you can make a WPF app as if it were a Forms app – but to really use WPF to it’s potential, templates, styles, binding and the rest, there’s something very different about how to approach the problem. Accusing this of being my flaw (since a bad craftsman always blames his tools) I smashed in the relevant keywords to Bing and eventually crept upon jfo’s coding: Getting Started in WPF. The title of the document is “WPF for those who know WinForms” and it’s an excellent primer for… well… those who know WinForms to get their heads around WPF. There’s a lot of talk about the prototype and code names for what are now older versions of Visual Studio, but altogether it’s a good first resource. I just can’t seem to find any up-to-date blog from jfo, which is a shame given how helpful this document is!

I never realised this would become a political blog…

So, the British Nationalist Party managed to get on Question Time and almost the entire audience was wanting to ask questions about Nick Griffin’s nasty policies.

I have to say that I think to anyone who sees the BNP as just another political party (whether or not they would actually vote for them), Griffin presented himself calmly (more so than the frustrated panellists disgusted at having to be near him) and said all the right things. Send back immigrants who commit crimes, etc etc. When the discussion moved onto someone else to talk about current immigration policy, they totally dropped the ball.

To people who shiver any time they hear about the BNP, they were exposed as frauds, liars and snakes who haven’t abandoned their wicked ways. But that requires that you already believe Griffin and the BNP to be inferior creatures – people who don’t are more likely to see them as an underdog after this, being almost the sole subject of scorn and derision.

My criticism of Question Time is that the show was not nearly long enough to really get to the bone of any of Griffin’s claims and lay them out in simple enough terms that he could not claim he was misquoted. Although that would have made it more of an inquisition, rather than a “meet the politicians” sort of thing. Since he managed to wriggle long enough on each specific accusation, they had to keep moving onto the next question and he wasn’t forced to actually say “Yes, when we talk about Ice Age Britons we know full well we’re ignoring the dozen different major cultural eras that took us from barely sentient cave-beings to the almost entirely sentient McDonald’s employee, we just use that as an excuse to hide our racist views.”

The thing I took away from the show about the BNP is that if they have changed (and I don’t believe that for an instant, just talking hypothetically) then they are still taking us as a culture backward. Ignoring the immigration issue, they want Christianity placed above other religions in this country. Although technically it is the state religion, we have moved far in that everyone gets a level ground, and everyone’s religion is equal. In the same vein, anyone not ‘obviously’ British would have to start proving it, even if their family has been here for more generations than most. And their view on homosexuality not being taught or talked about is just plain wrong. People are homosexual, bisexual, or whatever they are, and just because they’re not told about it when they’re young won’t change that fact. It’ll just cause more problems for them in their own personal life, and act as a stepping stone backwards to situations like Alan Turing, and the way he was treated by the government for being homosexual – despite inventing a code-breaking computer that contributed immensely to our efforts in the Second World War.

Basically, I think it shows that our culture has moved on to ignoring differences between people, and focussing on people themselves. The BNP would be taking us back to an “Us and Them” culture, where anyone like the party-in-power is Us and any minority is Them.

(disclaimer: this does not constitute my entire feeling on the BNP, which can easily be simulated yourself by ramming a fork into your eyes, but merely a few things I had to get off of my chest this week. Thank you.)

I can’t think of a good "battle-cache" pun

Today marks the 943rd anniversary of the Battle of Hastings, a very important battle in British history. For the foreigners, it’s the last time that foreign invaders have taken over the country. It was fought between William the Conqueror (or William the Bastard, to his own troops) of the Normans and Harold Godwinson of the English.

Harold had just come fresh from repelling the invasion of Harold Hardraada (a Dane), but couldn’t do it twice in a row. The Normans won, built castles all over the place, and William I became King of England.

And while looking to double-check I had the date right, Google’s search results showed something strange about both Google’s cache and Wikipedia’s open nature. By the time I got home, the cache had refreshed so I couldn’t grab a screenshot but for a wonderful few hours, Google’s cached result for Wikipedia’s Battle of Hastings page listed the date as 13th November, 1991.

There was probably a calendar change over the years, but I don’t think the margin of error is that great…

Archived Introduction

History

I’ve had a website for a very long time. It’s gone through brief (sometimes extremely brief) flashes of popularity before it sinks into lack of updates, real life gets in the way, other projects crop up. Recently, it’s really just been a testing place for programming projects.

So that’s a nice bleak start to the proceedings.

Recently, I’ve tried to write a blog/forum application to run the whole thing off of for a major relaunch. But as time went on, I was spending more time adding features to the wish list and trying to design them into a cohesive whole than I was actually implementing those features. This was obviously not a way to get ahead. I swallowed my pride and grabbed an open-source engine (BlogEngine.NET) which I can fiddle with and write extensions to later, if I really want those little bells and whistles I first tried to build. I wish it had forum functionality straight away, but I can live without that for the time being.

So What’s The Point?

I enjoy reading blogs, and I enjoy writing for the net. I may not get to update this as much as I would like (and as much as I had planned, once upon a time) but I will try and fill things in when they occur to me. Certainly more often than Rob. One bonus of BlogEngine.NET is that I can write things when I think about it, store drafts, and even put in an advance publish date for automatic updating when I forget!

What’s This Going To Be?

Once, it was going to be an example of programming ability to get me a job, and into the bargain would be able to put all the things that get in my head every now and again. Now, since it’s not my own work, it’s going to be more of the latter. This includes:

  • Film and book reviews
  • Things I’ve learned programming
  • Game reviews
  • Painting and modelling stuff
  • Warhammer things
  • My programming projects
  • Some journally stuff
  • Other projects (ie, Haphazard Tours and Noodledude!)

I don’t know when things will update. And I hope to put up all the stuff that once-upon-a-time made my website interesting, at some point. I doubt it’ll be back-dated though. And we’ve missed the 5-year anniversary of Haphazard Tours, so there’s an opportunity missed.

Anything Else?

I don’t know. Questions welcome in the comments!