Sunday, March 31, 2013

Guard


He stood in the scant cover of his booth as gentle rain swirled in the wind outside. He curled and uncurled his toes in time with each steaming breath, trying in vain to keep circulation to his extremities. It was about time to take another turn around his patrol route he supposed glumly. With a sigh retrieved his spear, jingled his mail into something like a comfortable position, and stepped out into the cold night. Low quality leather boots crunched on the gravel path, unnaturally loud in the otherwise total silence.
"Don't know why they can't let me watch from the tower," he grumbled, "this is just going to make my armour rust." Crunch, crunch, clack, the gravel path intersected a cobbled one, clack, crunch, cru...nch. There was a sound from somewhere off to the side, the kind of sound that a person makes while trying to be quiet.
"Huh? What's that?" He gripped the spear more tightly and headed toward the source of the noise, a gazebo near the keep walls. Another clunk. Boots on shingles maybe?
"Who's there?" he put what little bravado he felt into it as he left the path. Just as he was about to walk into the darkened area something caught his eye. A foot hanging over the edge of the roof, what he had thought was a patch of shadow revealed itself as a cloaked figure seemingly staring intently at the keep wall.
"Intruders!" He shouted, and ran towards the large bell in the corner of the nearby courtyard "Ring the alarms! Intruders!" About halfway there an arrow shattered on the wall next to him. He felt a splinter of it catch his cheek and draw blood, but didn't slow his pace. Frantically he bashed the bell with the butt of his spear, heard the reassuring sound of other guards waking in the guardhou...

...nch. Another fifty feet and he was under the cover of the eaves of the keep. There seemed to be some sort of rope stretched from the wall to the roof above but he paid it no heed. He wasn't the only guard on patrol, somebody else would have said something earlier if it wasn't supposed to be there. Another few moments and he'd be out in the open again. He hunched his shoulders and pulled his hood further forward over his face. Just before he took the first wet step there was a rushing noise and a dull thump behind him. He wheeled, spear at the ready, and saw a mangled heap laying on the path, one dagger in each shattered hand. He looked up at the roof above, and back at the body.
"Guess it's my lucky ni...

...nch. He blew on his hands as he approached the ugly back end of the keep. It didn't help, his knuckled were all but numb. Livestock grunted and gurgled in their pens, wood was stacked high for the coming winter, a stack of open barrels that served no obvious purpose stood in the middle of an expanse of mud. It would be hours yet before the kitchen staff began their day's work, so no chance of a sneaky five minutes in the warmth. There was a squeal of porcine surprise up ahead and he saw a shadowy figure sprinting across the grounds.
"Hey, you!" He shouted. "Intrude...

...nch. Out of nowhere a cloaked figure charged at him, sword held in both hands above its head. He was momentarily shocked, but recovered in time to point his spear at the figure and brace it against the ground. The figure ran onto the spear seemingly indifferent to personal harm and he felt the impact, the brief resistance, the crunch of bone. A dying cough from the figure spattered hot blood against his face. He laughed in relief.
"Try and attack me, will y...

...nch. The path took a hard turn where it met the keep wall. He felt strange as he approached the corner, as if he could see the corner but didn't know what it meant. He walked straight past the corner and into the wall, felt the cold hardness of it against his face, knew something was wrong but couldn't say what. His vision was filled with gritty grey stone, glistening in the rain. His feet kept walking but he couldn't figure out how to control the rest of his body, he stared in disbelief as he saw the tip of his spear repeatedly pass through the solid stone. Something was terribly, terribly wrong. He could hear footsteps behind him now, first soft on grass, then crunch, crunch, crunch. If he could just explain to his body that he had to turn around, that he couldn't walk through walls. The footsteps stopped, there was a blossom of pain in the small of his back. A tearing, horrible, fatal pain. The last thing he heard was a strange tone, like a dampened bell being hit twice. Whatever it was, it wasn't the celestial clarion he had always expected.

Achievement Unlocked: Perfect Killer.

Saving...

Next week's word will be genre.

Sunday, March 24, 2013

Football


I want to make clear at the start that I am writing this post after my team had a comfortable 35 point win. If you don't know anything about Australian rules football, it was the equivalent of a soccer match that a team wins 3-1 after going down 1-0 early. If you don't know anything about soccer either I could probably come up with analogues in half a dozen other sports, but "comfortable win" says enough. Back to the point:  these are the reflections on a good week.

Tonight (Friday) was the opening night of the 2013 AFL season and the team I support, Essendon, was in the first game of the round with the opening bounce at 8:30pm. At around 6pm, shortly after leaving work, I started getting the beginning of a headache, a tightness at the base of the skull that I get when I'm tense. I ordered some pizza as is tradition on a Friday night and took a a couple of paracetamol for my headache while I waited for dinner to show up. The pizza arrived and I ate it watching the match preview. Almost nobody missing from the best 22, we have the team we want out there and playing. Everywhere I look at the opposition's team I see problems: that guy's too fast, that guy's too tall, we can cover one of those three but not all of them. How on earth are we going to win this, on the road against a team that last year finished nine places above us on the ladder, and second overall? Am I in for another year of potential turned to mediocrity, another year of weekends tainted by a team that can't be consistent? Consistently good would be best but even consistently bad is tolerable; watching and knowing it's going to be a loss is no big deal, it's having to watch and knowing you can win but dreading you won't that causes elevated blood pressure. Half an hour before the game started the indigestion kicked in and got worse the closer the start time got. I had just about decided that I needed to do something about it when the siren sounded, so it would have to wait until quarter time.

Quarter time rolled around and I started crunching chewable antacid like candy. We had been destroyed in the first few minutes and just started to claw back by the time the quarter time siren sounded, 13 points down but it could be worse. By half time we were 14 points up, a huge turnaround and the commentators were nattering on with their usual jocular indifference about how Essendon were in the driver's seat and should win it from here. I know all about "should win it from here", it rhymes with "shock loss" and "couldn't handle the pressure". "Should win it from here" is the starter pistol for the hundred metre collapse-in-a-screaming-heap. "Should win it from here" is how every football fan's nightmares begin. I munched some more antacids, trying to ignore the burning in the back of my throat and tightness in my forehead. Essendon played well and were 20-odd points up for much of the rest of the game, but every time Adelaide kicked a goal or intercepted a kick that little voice reminded me how quick a turnaround can be, catalogued every time we'd lost from a winning position in the last decade. Playing well is a platform for disappointment.

With under a minute remaining in the game Watson kicked a goal and there was no possible chance of losing, not even for a pessimist like me. For the second time in the course of the game I let out an inarticulate shout and thumped the arm of the couch with an almost painfully tightly curled fist. I can't even remember what the first shout was for, a bad free kick perhaps? An excellent tackle? Who knows, I just remember worrying I might have knocked my drink over. To the impartial observer that moment of victory had come probably twenty minutes earlier, and the commentators wondered aloud why the players were celebrating so exuberantly when the game was already won. I could feel the tension drain out of my shoulders and neck. Not the tension of work and deadlines but solely the tension of watching a misshapen leather ball get kicked around by people I'd never meet in a city I've never been to. Despite what people say, football is not a way to forget about your worries and your cares. Football for me is a place for where for a few hours a week the only thing that matters is the most inconsequential thing in the world, and the suggestion that I could find it enjoyable makes no sense at all.

Sunday, March 17, 2013

Fantasy


Elves are a mainstay of fantasy canon, tasked with the role of being awesome and magical and just a little bit tragic to let you know you're in a traditional fantasy setting. And I hate the smug, glamourous bastards.

I'm not a huge fan of non-human sentient races in fantasy as a general rule because they tend to just be an excuse to create a stereotype that could be as easily achieved with humans. There's no need to make the denizens of the northern kingdom dwarfs, humans are more than capable of brusqueness, wild facial hair, odd customs and stand-offish behaviour; it's called the IT industry and we're not all short. The shorthand use of elves is a grating, self-pitying "look, there was a wonderful golden age and then humans came along and ruined everything and here are its final, tragic, remnants. Aren't people just the worst?" It's your world, author, you didn't have to include the effete, pointy-eared shits, then they wouldn't have had to suffer in graceful silence for eons.

In terms of narrative structure, elves provide an easy way for authors to perform massive info dumps care of an ancient culture with long-lived members who like to wax lyrical about the past. An elf answering the questions of some young ignoramus about the idyllic dawn of the world is third only to italicized songs and timeless wizards when it comes to fantasy exposition.

Then, when they're not talking about about the ways of the Bhal'dryl'kanh'ei'll (because they never use the word 'elf' to describe themselves of course) their job is to be the solution in every conceivable situation, an entire race of Mary Sues. Ambushed? Nothing to worry about, the elf is lithe and lightning fast and his sword moves like quicksilver. Trapped by magic? No you're not, the elf can sense its delicate tendrils resonating with the magic that ties his very soul to the planes of mystery. Trying to ambush someone? The elf is on it with his arrows that fly straight and true with the blessing of Lsuorh'Eullis the Moon Mother. Need to sneak somewhere in the dark? Silly clumsy humans, make way for the feather-light tread and catlike dark sense of the fey elf. Lost in the forest? It's fine, the elf will commune with the spirit of the fucking trees and guide you out.

My genuine hatred for elves didn't blossom until I took up RPGs of the pen and paper variety. There are two reasons that people pick an elf as a player character in any setting: the pragmatic decision to play an elf because they have good bonuses, or because you elves are really cool. I don't have a problem with the first reason, if a decision is being made based on that then the same decision would have been made if elves were unkempt toadmen with unfortunate odour problems. The second reason makes me want to punch a baby in the face. There is a annoying sadness about someone in effect saying "I don't want to play as a human, I want to play as something that is like human but beautiful and faster and mysterious and with hidden depths. I'm going to make everyone super jealous of how cool I am." Sure you are, buddy, sure you are. Now wipe the pizza grease off your fingers, pick up the dice, and roll for initiative just like the rest of us uncouth barbarians.

Because next weekend is the start of the 2013 season proper here, next week's word is football.

Sunday, March 10, 2013

Exit


The app I work on (AsdeqDocs) has been rejected from the App Store, by my count, three notable times (and accepted probably a dozen times). The first time was because we hadn't gone through the correct process to get an export exemption for using weapons grade encryption or whatever that particular US insanity is called that means you need to apply for permission to use strong encryption (in fact I think it still isn't available in the French App Store because they have even more ridiculous restrictions around encryption). The second time was because we had a link to the purchase page for our server product in the app. Their logic on that is fine, they don't want people selling app-related content that Apple don't get a cut of, and fair enough. We took the link out of the PDF and we were golden again. The third time I can't remember the exact reason just that it was a rejection of some feature that was already in the approved version in the App Store which held up a critical fix being pushed for a solid three weeks.

One of the features we support is the ability for administrators and device owners to log into the web app and issue a remote wipe command on the app. This destroys all of user's documents, deletes encryption keys, and generally nukes everything related to our app. It's a pretty obvious feature for anything that stores documents on a mobile device prone to being lost/stolen and something that didn't make the 1.0 release for various reasons.

I was in charge of implementing the feature and it was pretty straightforward: when a remote wipe request was received delete everything then quit the app. The first part was trivially easy, which just left quitting the app. The quit part is pretty important because although deleting the data out from under the app renders it prone to crashing, we wanted to make sure the period of time from wipe command issued to app is completely unavailable as short as possible. I was going to just use the old C++ stalwart exit(0) but thought I should hit the Internet to find the correct way to quit an iOS app programmatically. There is no way to do it. In fact Apple's human interface guidelines have this to say:
Don’t Quit Programmatically
Never quit an iOS app programmatically because people tend to interpret this as a crash.
If you have ever dealt with Apple as anything but a regular consumer you may be aware that things in their documentation that use the word guideline are only being polite: it's a special definition of guideline that means you can and will be rejected for not following it. You might know such things by the more common name of rules. Look at the above guideline in its original form here. That font size does not brook opposition.

Further investigation revealed stories of people whose apps had been rejected for the specific reason of including an exit statement. After talking with the other developers and tossing around some silly ideas like just doing something deliberately asinine (e.g. dividing by zero) to make the application crash and thus achieve the same as an exit call, we eventually decided on including the exit call and having a backup plan for when it got rejected.

In this case, the "we" who made the final decision was more precisely "me" and a not 100% accurate description of the final implementation given to the product manager. To be honest I assumed it was something that the automated testing Apple do on submissions would pick up as a matter of course and that it would be rejected quick smart. In close to record time (for our submissions at least) the email came back saying that the build was accepted and was now available in the app store.

Ever since then I've been waiting for a version to be rejected for our app having the temerity to terminate.

Sunday, March 3, 2013

Exercise


When I was a young child I played quite a lot of sport, of both the officially organised and backyard pickup variety with no external motivators required. During my high school years I played at different times cricket, soccer, royal (aka real) tennis, table tennis, and I orienteered (or whatever the past tense of doing orienteering is). I wasn't any good at any of them, mind you, but I played nevertheless and for the most part enjoyed it. The fact that it was compulsory in high school certainly helped get my motivation up, but enough kids managed to weasel their way out of it that I feel comfortable saying i would have played sport even if it wasn't.

Then I left school and promptly stopped being involved in any sort of organised sporting activity whatsoever. You don't realise until the supporting infrastructure of school staff and parents disappears just how much damn organising there is to be done to get fifteen people to show up every week to play a game of soccer, let alone how much it costs. All through university I didn't engage in any exercise, started again when I got a full time job and there was an indoor cricket team organised by someone at my workplace then stopped again not long after I switched jobs to somewhere where there was nothing organised.

I mention this to provide some context to my situation and attitude; I am not a once and always slob, in fact for a bare majority of my life organised and regular physical activity has been part of my lifestyle, and for a solid majority I've done some exercise. My attitude to sport is that of the interested but ill-disciplined: I'm totally on board if someone else is organising it.

I'm at the age now where a number of workmates and friends have had their lifestyles make the transition from being aggressively sedentary to having medically-prescribed activity. Weight moving from uncomfortable to dangerous, the occasional stiff back turning to bed-ridden pain, bad diet becoming imminent heart disease. Given a solid family history of heart attacks, strokes and late onset diabetes it's hard to imagine what my possible excuses are for not doing something. Worse, for stopping what I already was doing. (I do play lawn bowls, but considering the level of exertion and the fact it involves a weekly free sausage sizzle, I think it may actually be worse than doing nothing)

If I'm too ill-disciplined to play sport without someone else organising it, why not doing something simple like running? No teammates to organise, no rosters, no remote locations to travel to, just me and my lazy ass. It's not time constraints. Steam tells me I've spent 14.8 hours playing games in the last two weeks and in the same time period I've read three books, watched about a season and half of Archer, a few football games, and a half a dozen movies. Hard to look at those numbers and say there wasn't an hour here or there available for some exercise. It's not physical ability. Most anyone can run, I'd probably need to get some decent shoes to compensate for my once club foot but that could be dealt with in a lunch break. There's no external factors to stop me stepping out the front door an going for a jog a few times a week, no dangerous weather or civil war.

All that leaves as an excuse is that it's not easy. That doing something I have the time and good reason to do is slightly more effort than lying on the couch. That's all it boils down to: not doing easy things is hard. It's pathetic, but there it is.

Next week's word is exit.