GeekApproach

Just one Geek's approach…

Blister Trauma

Tuesday’s hill workout session went less than well as planned.  Having thicker socks did save my feet a bit, but as soon as we started climbing hills I could feel my feet rubbing (or maybe my sock rubbing) on the bottom of the shoe.  Combined with the difference my foot makes when landing downhill vs uphill, by the second go round I was in pain.  I muscled through it but I definitely had to ice my legs and feet that night.

One of the coaches suggested gel inserts as my next try-out.  Wednesday I did my normal run at Seward Park (in the moonlight no less) with my old shoes and no inserts.  I ran my fastest average mile about 9’25″ which is insane considering the foot damage the previous day, but I definitely felt it again at the end.  Yesterday’s run took me to Lincoln Park again with my newly purchased inserts.

Oh and a word about those inserts: Apparently only ladies need these, and only when they wear heels?  I call BS.  There were many choices but all of the men’s varieties were huge full foot inserts.  I don’t need additional padding on my heels, just along the balls of my feet. I found the ladies variety (and a steal with two pairs included for $5) and went on my merry way.  A word of caution if you’re going to try what I did: Spend the time to get the insert properly aligned under the balls of your feet or wherever you think you need it most.  I spent 15 minutes and after finding something that I felt worked, ended up stopping 5 minutes in to readjust. I’m still not thrilled with their location but, it definitely helped–on the outbound anyway.

The way back? Pain.  Not as bad, but I was definitely running in a different way.  It’s gotta be the hills along the route.  Either I’m getting tired and adjusting my foot’s plant on the ground, or there is something completely awkward with the way I run back downhill.  Gotta figure it out though; this Saturday’s run is at the Washington Park Audobon for 120 minutes.  Hoping I’ve got this thing figured out this time around….

Lincoln Park…and the blisters

This week was good.  Tuesday we started our hill runs at Green Lake, and while I didn’t get where I wanted to I felt pretty good about the workout overall.  Wednesday and Thursday were wonderful days, although Thursday I went to Alki and fought a massive headwind for most of my 50 minutes.  Bonus: Ran it 9:50/mi even including the warmup time and headwind.  You could say that I was going into Saturday feeling quite good.

Saturday did start out good.  I found myself pushing my stride and my speed on the outbound leg and in fact made it all the way out to Alki from Linconln Park, about 5.1 miles.  The turnaround was a bit more frustrating though. I can’t tell if it is my stride that changes and causes my foot to slide a bit in my shoe, or the fact that my feet are finally sweaty enough to move around in my shoe but dammit: My feet started to wiggle and I developed two blisters on my feet.  Let’s just say that getting back out of the hills of Lincoln Park was arduous.

We visited our awesome West Seattle Runner store for a consult and some ideas–thicker socks are what I’m going to try this week.  I’d hate to have to shift shoes again, but we’ll see how it goes.  I was feeling sore enough today that I didn’t do the recovery run, but we’ll definitely do some sort of rapid walking tomorrow in prep for Tuesday’s hill session again.  In the meantime, I have another post about nutrition I’m prepping and trying to find my caffeine count and exactly what I should be having on a run.

Where I’m having trouble now is in my donations– I’m drastically low and not where I want to be.  Seriously folks, anything you can do helps.  This money isn’t for me its for blood cancer research!  Please consider clicking the Donate link above!

Calculator (CS193P)

…And per that last post, I finally have the code in the way that I want it.  I think I’ll eventually getting around to showing some screenshots of what’s happening with the memory leak, but I think I’ve gotten everything correct thus far.  I’m uploading the working code as an Xcode 4 project, without any sort of build data with it.  You may need to fire up your copy of Xcode and adjust the build settings to not use iOS 4.3 but provided the API doesn’t change too drastically, you should be good.  Grab that zip file, here.
Also, I’m leaving out the XIB files– I think you can grok your own interface design, no need to steal my binaries.  If you have any questions, I’d be happy to try and help you out but really…it’s all stuff explained in the lecture or in the Assignment 2 request sheet.

What I will do is expose a bit of code here that gave me the most frustration.  It was a class method designed to evaluate an algebraic expression by spawning a working copy of itself to sub the vales of the variables in and return a result.  It was a bit of work to get my head around abstractly, and I think the resulting code is quite efficient and nice (and doesn’t leak!).

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
+ (double)evaulateExpression:(id)anExpression usingVariableValues:(NSDictionary *)variables
{
    double dubNum=0;
    CalculatorBrain *workerBrain = [[CalculatorBrain alloc] init];
    for(id item in anExpression)
    {
        if ([item isKindOfClass:[NSNumber class]])
            {
                NSNumber *workingNum =item;
                [workerBrain setOperand:workingNum.doubleValue];
            }
        else if ([item isKindOfClass:[NSString class]])
            {
                NSString *workingString = item;
                if ([workingString hasPrefix:VARIABLE_PREFIX]) {
                    NSString *subFromDict = [variables objectForKey:workingString];
                    [workerBrain setOperand:subFromDict.doubleValue];
                }
                else
                {
                    dubNum = [workerBrain performOperation:item];
                }
            }
    }  
    [workerBrain release];  
    return (dubNum);
}

Anyways, I’m proud enough that I’m heading on to Assignment 3 which implements a Graphing mode. Hopefully I’ll get the instruments post, as well as a bit of a video demonstration of the Calculator in action up here.

Builds are never done…

I finally finished my Stanford CS193P Assignment 2 project, which was to create a working calculator that also implemented an algebraic solver.  I technically “finished” the entire thing and was moving onto the next assignment and packing up the existing bundle to dump up here as example code.
…When I found a bug. Specifically a memory leak that with the help of Instruments I was able to determine was a pretty big freakin deal as I was hemorrhaging resources left and right when I started to call that aforementioned algebraic solver mode.  Grr, not good.  So, I’m going to work it out before I back-commit it and call the second assignment done.  Hopefully I can figure that out today…