GeekApproach

Just one Geek's approach…

Wow, long overdue…

I am way, way overdue for a post.  Things have been kind of hectic on the running front.  In great news I ran my furthest ever last Saturday– 16.60 miles at Marymoor Park….in the rain…and the cold.  It didn’t entirely suck, but I was definitely paining afterwards.  My habit of pounding Gu I’ve replaced with a more moderate sipping model which prevents my stomach from acting like it just a loaf of bread on a run.

We’re down to just a few weeks before the event.  This weekend we’re at Lincoln Park for a “short” 110 minute run, and next week is the longest of the season: 180 minutes at Gasworks.  I’m looking forward to them, honestly.  I’m getting really jazzed about the marathon and it seems like its just in reach.  I need to post some more, but it’s not going to happen this morning…

The Changing Face of Apps

Over the last week I’ve been doing some serious hacking/coding in a variety of languages.  Some of it is necessary for a work project I’m doing, a couple of customized WordPress installs for a company in Seattle that’s required a bit more PHP hacking to get working properly.  Other parts of it are reading books in my (not available) spare time, and still trying to focus on ObjC and CS193P.

I continually amaze myself with the PHP stuff.  I never officially studied the language but I can understand the bulk of it and maybe most important: I can articulate what I need to do in a good Google query.  For me to become really proficient at it I think I’ll need to start using the shell accounts on some of my boxes to make sure this stuff happens the right way.  While flipping through an old C# book at Fry’s a few days ago I stumbled across the realization that I can grok the syntax of just about any modern language!  Most of these languages are all derivatives of C so it’s not a huge surprise, but I could definitely start to implement code that isn’t language specific which is a huge step for me.  Being able to write platform or (lightly) language independent code is what separates a programmer from a Computer Science major I think.  Each language obviously has its own subtleties and nuances and some will always be a mystery to me (like Perl) but I’m feeling more confident in my skills again.

I spent a few hours this weekend futzing around with Canvas, an HTML5 element that allows you to implement drawing and other animation routines in a div in HTML.  My goal was to finally come up with a logo for REV-DEV my other side-biz that definitely needs to start getting a leg off the ground.  Having checked out some cool HTML5 samples I thought this would’ve been easier, but it wasn’t to be.  I found some greatly bouncy balls, starfields, even a text particle generator.  What I was looking for was a text swell/shrink effect similar to what I’d seen in….well, Flash to be honest.  But I’m trying to be proactive and future-proof, and platform independent and all this….and the thing I want is in Flash.

Adobe has seen a bit of the writing on the wall lately, releasing a free preview of Edge ,their Flash exporter to HTML5 app.  It’s not quite available for real-world use yet, but if I could get the download link to complete I’d probably check it out.  I digress, I’m rambling here.

My point about this was that everyone is starting this slow shift to these frameworks and API’s that are smarter, cleaner and more platform agnostic.  Take the Windows8 Metro incarnation– Metro apps will do UI through HTML5 and JavaScript which has included AJAX for a while now.  That’s amazing!  There’s a movement on the iOS side to use the same structure to drive UI and let the native code take care of the back-end tying things together.  I’m not entirely sold on this for iOS5 for reasons I can’t divulge yet….

Finally, this morning Google announced the availability of Dart, a structured web language that provides optional typing and also compiles out to JavaScript.  It’s a language that will work on modern browsers, with the JavaScript intermediary coming out in browsers that won’t support it’s optional MIME type.  It appears to be light, offers easy to read syntax, and is open-source under a BSD license.  It appears to also support a mode for enterprise use that allows the execution of the code in a VM, but I’m kind of lost right now as to usable case for that one.  I’m going to try and get my hands dirty with it a bit today and see what develops…

Dart Header

Etc 10/2/11

I’ve got a whole host of things going on lately and really not enough time to think about or write about them all.  I’ve got some cool new projects I’m working on, and work may take a big potential upswing this week (fingers crossed!).

In the meantime, this week there are a few things goin on in tech land.  Tuesday is the launch of id Software’s latest game, Rage, which I have happily pre-ordered like every other id game that I own.  Rage promises to illustrate id Tech 5 the latest incarnation to their engine and probably the only competitor (IMHO) that the Unreal engine has.  I have nerd adoration for id’s Technical Director, John Carmack and the impressive amount of things he has created or envisioned over the last 20 years.  If you do anything with computer graphics you owe this man a lot.

Anyway, Rage looks awesome.  3 discs? 25 gigs of data?  This thing has to rock….

On Tuesday, Apple’s holding some press event.  I expect them to announce a lower-end iPhone 4S model and a top-end iPhone 5 and a release date for iOS5.  While I am in the beta, I’ll report on what others are surmising, namely FaceBook integration at a system level.  Personally I’m more happy about iCloud persistent storage for apps and what that means for devices: Game saves in the cloud anyone?  How about automated push downloading of the Daily without me having to manually fire up the app?  It’s very exciting.

Plus, I’m looking forward to getting rid of the “razor blade” phone that my dropped, cracked, but-barely-there-still-works iPhone 3GS currently us.  I’m due for an upgrade and I’m hoping to hear something good on Tuesday.  Stay tuned.

Oy….

So, it’s been a while since I’ve updated. I’ve had a mess of things going on in my life personally, as well as trying to get trained up for the marathon.  It hasn’t been easy but I finally feel like things have settled out.

The past 3 weeks have been great training-wise.  I’ve worked out my blister situation, and aside from the fact that I still get them they don’t hurt any longer.  The past few weeks have all been about hill training and figuring out how to add in hills into the workout without falling apart.  I’ve felt that I’ve done pretty good with it.  Last week though, I pulled my back muscle a bit much at the gym– like hobbling around and not doing any running for the week issues.  I visited the chiropractor (my first visit ever), but generally I’ve just tried to ice it a lot, stretch, and be as gentle as I can.

I feel antsy about not running at all though.  Like perhaps I’m screwing myself over by not doing anything? Or that my event day performance is going to be completely trashed by not running for this week.   I do feel better though– my calves have had a chance to heal up, and I currently don’t have any blisters.  My knees don’t hurt, and my quads are working normally– that is to say, they don’t ache and burn when I walk.  I need to get back into it this week.

I also tried to quit the team.  There’s a financial component that I wasn’t feeling comfortable with hitting externally or taking on my own plate.  Luckily, my team stepped forward and isn’t letting me quit.  We’re trying some group fundraising ideas, and I’m hopeful they’ll work before race day.  Hoping to get some more data up here soon, but no promises.  As always, you can donate by clicking the link abovee

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…

Marymoor Run

Been kinda sore over here, but hanging in there! Yesterday our large run took us out to Marymoor Park for 90 minutes. I took the opportunity to try a couple of energy products: an actual GU-brand Gu (Orange) and Clif Blocks (Strawberry). The GU…its so weird eating/drinking that stuff. The flavor was ok, but the energy boost was lackluster. The blocks though…wow. Strawberry fruit snacks! Makes me wonder just what the hell was in the ACTUAL fruit snacks I ate as a child. Energy level…still not great.

I’m not sure what the deal is. The product I tried before was a Power Bar-branded Gu thing and its result was instantaneous even if the flavor was completely awful. I think I need to do a bit more experimenting with products before committing to something.

Definitely lookin forward to getting out there again today to do a recover run. My legs are sore but I know I’ll feel better the sooner we get out there. As always, many thanks for your donations!

LA Noire (X360)

Well, it took me nearly 4 months but I finally finished LA Noire.  In an earlier post I was describing how much I really enjoyed the product, with its engaging storyline and a great game mechanic that involves interviewing characters and determining if they’re lying or telling you the truth as you try and put together the details for the case.  Was I engaged to the very end?  Read on…

Yeah, no.  I wasn’t engaged.  The last third or so of the game turned out to be drastically off-balance.  The MO up until this point had been playing as one cop as he worked his way up (or down) through the ranks of the different desks at the LAPD: Vice, Arson, Homicide, and Traffic.  The later third switches up your main character a bit as you work to solve the “meta-story” and “meta-case”.

And spoiler alert here: really?  Insurance fraud?  That’s the big bang? 21 cases with the last few being rather involved kinda left me with an ending that didn’t feel appropriate.

The meta-story is interspersed through the entire game and deals with your character (Phelps) and his time in the war with his unit.  An inappropriately given Medal of Honor also takes center stage here as well, augmented with the pan flute and hard strings of instruments from Asia.  I was so sick of seeing these cutscenes….

So where’d it all go wrong? For starters, the cases in the beginning were easier to figure out who was lying and double-crossing you.  The late cases I was averaging 2/5 questions correct per interview or getting stuck at scenes with no idea of where to go next.  I grew tired of having to drive around the city; I started using fast-travel all the time, and I’m sure Rusty got tired of me saying ” You drive.  I need to review the case notes.”  I didn’t do the extras: Finding all the cars, reading all the newspapers, and those film reels? Forget it.  I’m also a bit peeved that there were no end of game achievements: I rounded out with 31/60 achievements at game end, and a few of those were from DLC.  Speaking of….

The “Nicholson Electroplating” DLC case is integrated with the rest of the game.  You’ll take a break between case 20 and the last one, 21 to do some weird side case the freaking took forever.  I wish they had let met at least choose when I was going to do it rather than foisting the choice upon me.

So, while I did enjoy my time in LA Noire I have to say that it ended up like every other Rockstar game I’ve ever played: I have to force myself to play towards its conclusion and often I feel overwhelmed with the amount of things one can/should do in the game world.  I already had the remainder of the DLC so I’m sure I’ll be back in the world soon, but I can’t say for sure when.  The holiday gaming season is right around the corner and Deus Ex is already leading the pack…