End-o-feb

Saturday, February 26, 2011
While Sarah snoozes in the haze of post-brunch euphoria, I thought I'd run down quickly what I've been doing the past two weeks running-wise. I'm more or less happy with how things went in February, and am hoping taking a very down week this week (aka: run if I feel like it, which I've done twice) will help cure all ills. Not being able to get on any soft surfaces for a couple of weeks in a row really doesn't feel good - my shins / plantar fascia / hips were all complaining really loudly.

Week beginning Feb 6th -

Sun: 8 mi, 58 mins - Would've done more but got out a little too late and didn't want to get hit by a car.
Mon: off
Tue: 6 mi warmup / cooldown (roughly)
5 sets of 3x400, 60R, 3 minutes between sets, @ 3k 5k 3k 5k 3k pace.
This went pretty well and I actually went a little faster than assigned on a few reps (supposed to hit 70's and 74's). With Murner, Foote, Chris, and Dan L.
9.5 total
Wed: 9.5 mi, 68 minutes - On the treadmill @ work, lifted.
Thu: 8.46 mi, 60 minutes - Treadmill.
Fri: 4 mi, 32 mins - Stupidly went outside. Fuck you newtonites! Shovel your damn sidewalks like decent civilized human beings. Or hire someone to do it for you. You can afford it.
Sat: 8 mi, 59 mins warmup / cooldown

Ran le mile @ Valentine's, ended up with a 4:24 (which is exactly what I was shooting for). I was a little worried that I was just going to run a 66 and my legs would explode - I've never really run the mile off just 3k work before. Every training program up until this year has always included a huge volume of mile race pace work even before I get to my first race. It's a little scary going into your favorite event and feeling totally unprepared, so I ran very conservatively. As soon as the gun went off, I just dropped to the back and chilled - I was seeded at 4:20 so the front of the group was going to be running 63-64's...at the beginning, anyhow.

It was definitely a different kind of experience, running from the back like that - and being very conservative. For one, I had absolutely no traffic to deal with. I was sitting about 2 meters behind everyone else in dead last, and no one was attempting to cuddle or make out with me on the track. Almost every other race I've run indoors, I've had to fend off would-be suitors from my lane. The other difference is that I wasn't really in as much pain as I normally would be at the 800 mark, so I was able to make more conscious race decisions rather than relying on furious animal instinct to get me to the line intact. Admittedly, my conscious race decision was "chill out, you don't want to blow up" and I waited till 400 left to pass some people, but I could've made the decision otherwise too. I feel like there were maybe a few seconds left out there from running too conservatively, but the consequences of going out too hard were great enough that I think it made good sense to play it how I did.

Anyhow, total for the week: 49 mi, 343 minutes.

Week beginning Feb 13 -
Sun: 10.25 mi, 77 mins - Around BC for a small eternity. I think this was the day I saw Archard and Sasha out there. My hamstrings were extremely blackened toast after the mile.
Mon: 9 mi, 65 minutes - With Stewbeef and Willycizzle around BC.
Tue: 45 mins warmup / cooldown
4x 600 60R 400 2.5R (35, 34 pace) 6x150 at the end
Was supposed to be 5, just suckin' hard. Foot hurt, so I did it in trainers, and was around 2 seconds off every 600 and 1 second off most of the 400's.
9 miles total
Wed: off
Thu: 6 mi, 45 mins - slow around the res, but nice day.
Fri: 6.5 mi warmup / cooldown
1.5ish miles of 6 x 1 minute on, 1 minute off
Felt godawful, started pouring during the cooldown.
Sat: 7.8 mi, 56 mins - still felt like trash.
50 miles, 366 minutes o'erall

The next day I finished off indoor with an 8:51 in the 3k at USATF-NE's, playing it exactly the opposite of my mile at Valentine's - went out a little too quick, wound up in no-man's-land, and was in ruinous agony from 600 to go. Still a respectable time, but I wish I had split it a little more intelligently than 2:52 / 2:58 / 3:01. Going out in 2:52 actually felt surprisingly good - I didn't feel that bad till maybe 1k or 800 to go, which is a far cry from my experience at Terrier where I didn't feel great from maybe 1400 meters onwards. I would've liked to run faster than my opener but I feel like I'm at least in better shape, which is all I really wanted headed towards outdoors. Huzzahhhh.

Now I'm going to go eat a clementine. Au revoir, pour maintenant.

Something Witty About Mileage

Monday, February 7, 2011
Hooray! A week of decent running despite the weather. Mostly my good fortune in getting in any kind of mileage arose from a combination of unwillingness to admit that running around the Res was lunacy...and the fact that my workplace has a treadmill.

Without much more ado about nothing:
Sun: 85 mins, 11.75 miles -  around Newton with WillyCizzle.
Mon: 44 mins, 6 miles - cold windy putzfest around the Res.
Tue: 68 mins, 10.75 mi - uglytough workout with Dan L., Foote, and Avery.
1 mi - 2k - 1 mi - 1k - 1k, constant 2.5min rest.
Hit something like 5:05, 6:33, 5:04, 3:05, 3:03.
Wed: 60 mins, 8.34mi - on the treadmill at work, lifted.
Thu: 47 mins, 5.5 mi - Snowy res run.
Fri: 60 mins, 8.5 mi - treadmill.
Sat: 60 mins, 9.79 mi - 9 am workout with Dan L.
1 x mile, 4 x 400 - 2 sets. 4 mins after mile, 2 mins between 400's.
4:54, 68's for first set.
5:19 (ow), 68, 67, 65, 64 for second set.

tot: 60 miles, 428 minutes

Una Selva Oscura

Tuesday, February 1, 2011
Running hasn't been the most wonderful thing in the world for me the past month - after recovering from being sick for a week starting around Dec 24th (then going to Quebec City with Sarah and enjoying the living fuck out of it...) I got nailed again two weeks ago with the flu. I was finishing up a pretty decent workout on January 14th and the last two reps or so I noticed that my muscles were aching pretty hardcore. Then I realized that they were ones that have nothing to do with running at all - lower back, neck, shoulders - the places that typically indicate that my immune system is losing both the battle and the war. I crawled into bed and emerged 7 days later and 10 pounds lighter.

Just this past week I felt like I was actually myself again when running, but despite that I did not have stunning success at the Terrier Invite this past Saturday. Running 9:12 or so for 3k wasn't really what I'd hoped for, and I'd be less annoyed by it if it wasn't an indication that I probably will not be able to give the Elder Statesman Jeffpa a good race. The wheel will turn, though, and my legs will stop complaining and do what I want again - just maybe not by the time he'll be retired. If I cannot give him a good race, I will at the very least buy him a good beer.

I'll have some real running numbers again beginning this week - I'm kind of pretending January didn't happen, or at least trying to hit the reset button. It wasn't godawful (150ish miles - which was standard for me in college) but it's certainly not what I want to be doing.

As running hopefully begins to fall into place again, other things fall out. That just seems to be the way the world works. On Thursday when I went to go blast my car out of the snow and head to work I noticed as I walked up that...oh hey...the bumper is kinda hanging off. Hmm. That wasn't like that before. Wonder if they left a note? Nope.

I'm a little conflicted about how angry that makes me. I have no interest in being a person whose entire self-worth and happiness is caught up in their possessions - but damnit I really love that car. There's not a day when I don't feel like driving it, and the experience of being on point, focused, and ...tuned in, let's say, to the feeling of the car, it's just not comparable to anything I know. It's similar to a track race...less noise in your head, and the howling of all your nerves, of course. More cerebral skill than brute willpower. Squealing tires and screaming engines versus on-fire muscles and pounding blood.

I've been dinking around with No Way But Down a little bit since I last updated it and I'm running into a few stylistic / programming problems. One of the primary quandaries I'm running into is how to deal with the control flow.

In the old days (for me, at least) of BASIC control flow is a really simple concept. Reading what would happen next in a program was a matter of going down the page according to line numbers:


10 INPUT "What is your name: ", U$
20 PRINT "Hello "; U$
30 INPUT "How many stars do you want: ", N
40 S$ = ""
50 FOR I = 1 TO N
60 S$ = S$ + "*"
70 NEXT I
80 PRINT S$
90 INPUT "Do you want more stars? ", A$
100 IF LEN(A$) = 0 THEN GOTO 90
110 A$ = LEFT$(A$, 1)
120 IF A$ = "Y" OR A$ = "y" THEN GOTO 30
130 PRINT "Goodbye "; U$
140 END

This is straight from Wikipedia's page on BASIC. Some of the keywords may not make a ton of sense, but the basic gist is: read from top to bottom, and wherever there's a GOTO ## the program is jumping to that line number. 


In object-oriented languages, you can still program this way. The only problem is that things get...messy when your programs get complicated. Writing a roguelike game is a pretty straightforward enterprise (at least in terms of algorithms and whatnot - I don't have to reticulate any splines) but it's not brief by any measure. 

In the pseudo-est of pseudocode, here's the control flow for No Way But Down:



* Wait for keyboard / virtual keyboard input
* Determine what state the game is in
* Process input according to game state (d key does different things if you're viewing your inventory as opposed to looking at the dungeon map...)
* Update the world
* Re-draw the world



The problem that has arisen is that there are probably 20 or 30 different 'game states' that all should process keyboard input and draw to the screen differently. I had figured something like this might happen, but hadn't designed for it, so I ended up with code like this...






else if(GameState.Inventory == GameState.InventoryMode.CARRIED) 
{
 if(unicodeChar == 10) 
 { 
    GameState.Inventory = GameState.InventoryMode.OFF; 
    GameState.InventoryOffset = 0; 
    updateWorld = false; 
 }
}




Consider briefly that the enum GameState has about 10 values right now, and that there are an awful lot of Unicode characters, and you can see my problem. Keeping a long list of else if's just ain't gonna work, especially when the string you're constructing to display is modified based on what GameState you're in.






What I'd like to do (and am currently attempting to implement in fits and starts) is mimicking the stack-based approach of Activities in the Android OS. I'm creating a static singleton class, DisplayStack, which I can push and pop objects called GameScreens onto and off of. Each GameScreen will have input handling logic - and return the display string for its particular screen. The DisplayStack will merely pass the character codes for input to the topmost GameScreen. Some characters may cause the topmost GameScreen to change (closing the inventory, for example, or opening it) by either pushing a new GameScreen or popping the current one. 



It might take a few days, and the code changes will be completely unnoticeable to anyone playing the game, but it does mean I'll be able to add new ideas quicker. Right now the notion of adding a dialogue screen is just really painful to contemplate given all the potential switches for each character I'd have to do. 





I just realized I could probably forego my own implementation and just make each GameScreen into an Activity...but honestly that feels a little heavyweight to me. It does mean I could use a different XML layout for each GameScreen...hmmm! I probably won't go this route but its nice that just writing about it gives me some ideas. Plus this is the first time I'll actually be writing a stack...ever. Might as well, ya know?






I've been listening to WGBH on the way home from work (and sometimes to it) recently and paying some attention to the Tunisian revolts giving way slowly to the Egyptian protests. I'm sure that Iraq and Afghanistan are not exactly the models of democracy that Tunisia and Egypt are looking towards and longing for, but I am curious if their presence in the region has had any effect. It would be weird to have the idea of infectious democracy espoused by the Bush administration to actually have some merit. The utilitarian in me actually questions whether the Iraq and Afghanistan wars were actually more worthwhile if that's so. It's very clear that the Egyptian and Tunisian people have been suffering - you don't get thousands and thousands of angry people in the streets by treating them well. 

I doubt it's anything quite that direct, if at all, and there's no guarantee that Egypt and Tunisia will emerge from the tumult any better for the chaos, but...something very good could happen in time. If working with people from China, India, Georgia (country! not state, though they're pretty far out too...), Haiti, etc - has taught me anything, its that the world's population is one big mongrel of fairly similar ideas and rockin' fellows. Or maybe just the engineers from those countries. Except the engineers who like Objective C and Perl...and whoever the dude was who hit my car. He's excluded from my world-party.


Just so we're clear, so are the Blogger formatting tools. Argh! Annoying to no end. That's why the second half of this post looks gimpy, but I am too lazy to fruit with it any longer. I bet the guy who designed it is named Duane.