It’s been a while since I’ve posting anything about coding/development… not because I’ve gotten out of it. Mostly because I’m swimming in it. Drowning some days, it seems like. And while I can’t talk specifically about what I’ve been working on over at Startly just yet (invoke your Carnac skills and I’m sure you can guess) there are some choice things I’ve created that might be interesting to you… my five loyal readers.

When you write code, you spend a lot of time wondering (usually out loud and with anger in your words) what exactly is getting passed around in your program… especially when things aren’t working right. And while debugging can get you those answers, it’s sometimes a pain to have to break in a method every single time just to see the value or address of an argument.

Yes, programmers are a lazy lot. Any time we have to do something more than three times, we get cranky and spend way-too-many hours coming up with a solution to never have to do that “thing” again. For me, writing NSLog()s at the top of methods is one of those things.

Cocoa methods look like this:

Code (objc)
  1. - (void)addSubview:(NSView *)aView positioned:(NSWindowOrderingMode)place relativeTo:(NSView *)otherView


where aView, place, and otherView are the arguments passed to the method addSubview:positioned:relativeTo: (For my non-programmer readers, you should have stopped reading a long time ago). So if you wanted to see what was passed to this method (and subsequently call super’s implementation so everything continues to work), you’d have to type all of this:

Code (objc)
  1. - (void)addSubview:(NSView *)aView positioned:(NSWindowOrderingMode)place relativeTo:(NSView *)otherView
  2. {
  3.     NSLog( @"addSubview:%@ positioned:%d relativeTo:%@ ", aView, place, otherView );
  4.     [super addSubview:aView positioned:place relativeTo:otherView];
  5. }


I know!! Look at all that typing! 262 keystrokes just to see if the subview you’re getting is the right one! (yes, I wrote a perl script to count the number of characters in that snippit…)

So this morning I wrote some perl code that, with a simple highlight of the method and a keystroke (or menu selection) will do all of that for you (sans telling you how many keystrokes you saved)

(No, I’ve not paid for Screen Mimic. $65 for a one-time ten second movie clip is a bit much so I’m not upset they put a watermark on the video. It’s pretty cool software, though. Check it out if you need to make videos like this.) My apologies for the way-too-large video… you get the idea, though.

Anywho, that’s what easyNSLog.pl does. It takes the tedium out of typing NSLog/[super] over and over again. It’s free (MIT License because everything needs a friggin’ license these days) and available here. I’d love to hear any feedback or requests for improvements. My email is in the script’s comments or feel free to leave a comment here.

Digg!

A week ago Wednesday (September 17th) as I was cooling down after an easy ten miler, I had an accident. As the title of this post hints, it wasn’t one of those “fun” kind of accidents people sometimes have either.

I finish up my runs, or I used to at least, with some sideways and backwards running. This activates other muscle groups not normally used while running and keeps my lateral and “not simply moving forward” muscles interested in this whole distance running training thing. This doesn’t amount to much, a dozen or so to-the-left bounds, then to the right… then I sprint backwards for maybe 20-50 yards. This is usually followed up with what looks like me pirouetting up and down my driveway. Rest assured my neighbors think I’m insane.

Anywho, on this day, running backwards was, in a word, a mistake. Right after I got up to full speed I simply tripped over my own feet. No gust of wind, no hot chick I was trying to impress, no strange alien intervention. And while it took all of one-half of a second to go from ‘exercise’ to ‘oh fuck’, I had enough time to know I was going down pretty hard.

I tried to get my right arm underneath me (in the conscious hope that I would break it breaking my fall… seriously) and instead ended up landing pretty squarely on my back with my head then whipping into the ground… which was the sidewalk.

You know when you hurt yourself there’s that moment of self-assessment time where you determine if you need medical attention or not? My “maybe I’m alright…” thought lasted just long enough for me to put my hand to my head and then notice my shirt was rapidly covering in blood. Oh boy, yeah, I’m in the shit. Plus it’s already starting to get hard to stay focused. I yell for the wife and from here, it gets a little fuzzy what exactly happens. I do know the Russian-speaking guy to who apparently stopped and stood over me and did nothing but yell (in Russian, we assume) to his wife(?) was quite real.

Moving on, I have Kristie drive me to the closest Emergency Care Clinic mostly because I know I’ll never make it to the actual Emergency Room downtown and it’s probably best my wife doesn’t have to deal with her bleeding, unconscious husband in her car. From the clinic, I remember being asked a bunch of questions I couldn’t seem to answer, passing out, and telling people I was going to throw up and them saying “don’t do that”. Every thread of memory I have for the next twelve or so hours is of different people asking the same questions in slightly different rooms… and two very distinct moments of vomit. Very strange.

When I finally “woke up”, it was 6:00 am or so the next morning and I had been transported to the emergency room via ambulance (which I don’t remember at all). I had a very painful IV in my right arm, my head felt like a large throbbing balloon, and Kristie had been sitting there all night (apparently talking to me about the patients in the next room over and how they didn’t sound like they were going to make it). Yeah, I have a very cool wife:)

To say I had a concussion is an understatement. Officially, I fractured a temporal bone somewhere near my left ear, hence why it filled with fluid almost immediately after impact. The cuts on my head, which leaked blood like a 1980’s slasher film, were relatively minor. An MRI and CT scan both revealed nothing out of the ordinary. And apparently head trauma can affect the nerves that control smell as I couldn’t smell or taste anything.

I spent four days in the hospital, being released late Saturday morning. By Monday, however, the pain in my ass made me wonder if I had broken a bone somewhere in my hip area. A return trip to the clinic resulted in a determination of “it’s roughly whiplash of the ass muscles”… a lot of energy in the fall was probably transmitted violently through that area. Some muscle relaxers and time are all that’s needed.

So that’s where I’m at now. No running, forwards or backwards, right now until the sporadic pulsing head pain goes away (and my ass likes me again). I guess I am pretty fortunate that I didn’t have more memory loss and that I’m not in a coma or some shit. In 32 years of being alive, that’s the worse fall I’ve ever taken though. I’ll see what I can do about having it retain that title for a very long time.

Digg!

The Nike+ Human Race, a global race where Nike wanted everyone everywhere to run a 10K, was held this past Sunday. I had signed up for the Des Moines race but Kristie and I were going to the Minneapolis area to visit her family for the weekend, so I changed plans.

Marathon Sports was the local Minneapolis store sponsoring the race, so I called and confirmed that they were still planning to have the event. Should’ve known something was up when the lady who answered the phone had not a clue what the “Nike+ Human Race” even was.

I got up and prepared for a short/middle distance race like I always do. The wife and I hopped in the car and arrive at Marathon Sports a bit too early (there was no one there, at least that we could see) so we drove around the area for a little bit. At 7:40am (the race starting at 8am), with still no one around, I parked the car and we walked to the “starting area”… the back door of Marathon.

John, the owner, greeted us warmly, offered us water, bathroom, etc. Talking with John, we found out there were seven people registered to run this 10K. “Well, we’ll have eight now with me here” I said. In reality, we had three. Myself and two women who work for Best Buy corporate. When it was clear this was going to be it, John gave us the “prizes” that were supposed to be drawn for after the race; a new Nike+ Sportband for each of us. Pretty cool (although I have little use for it with my Nano).

At 8:05am (or so), the boyfriend of one of the women yelled “Go!” and we were off, two laps around Lake Harriet. It was pretty clear by, oh the first 500 meters, that this wasn’t going to be much of a race. I was running a pretty comfortable pace and already I was way ahead of second place. I finished with a time of 43:38.

Even though this wasn’t an official race nor one that held much of a challenge, it did have the best prize I’ve received to date, one of the best run routes (the loop of the lake is beautiful and separate paved lanes for runners and bikers), probably the nicest “race director” I’ve met (for a race with three people) and two very excited competitors who were going to get their first second and third places in a race.

While I probably won’t run another Nike+ Human Race (nor will others, this was kind of a weak event Nike) I’m glad I got out of bed Sunday morning. A $60 toy for running a 10K training run. I just wished that was the reward for every training run:)

Digg!

[Results] [Photos]

Hmm, realized this wasn’t even on my list of races that I’ve signed up for. Bad blogger!

In what I’ve come to call the “Pork Chop Run” (because of the ridiculously awesome pork chops they feed you post-run), the Maffitt 5 Mile Trail Run is what it sounds like: a trail run around a lake. This being the second year for said run, they made some slight adjustments. Most noticeably was that this run was actually file miles (not the 4.5 it was last year).

A pretty good run except for the brief off-course excursion (the sign was obscured by the fire hydrant they were spraying runners with… which, by the way, is something I could really do without if any of the event planners are reading this), a slip on some wet grass and some wood chips in my shoe.

This race provided a couple of firsts for me. The aforementioned off-course jaunt and represents the first race where I didn’t come in first yet beat all female runners. I’m never fast enough to catch the better women runners. Maybe they all went off-course too…

The old man ran the race as well, his second formal race. I think he quite enjoyed it (although I did lie a little and say the course wasn’t too hilly when, in fact, there are plenty of rolling hills to content with). He finished in 57:36 and is planning on coming back next year.

Dan finished in 40:12 after a blisteringly-fast start (our first mile was 6:36, which is within my range for short distances but Dan’s fastest mile ever). RAGBRAI apparently served well for training for this event. Riiiight. Me thinks he was trying to show me up. Nice try, Mr Dan:)

Digg!

[Results] [Photos]

Another year, another Urbandale 5K. My third this time around, Dan and his daughter’s first. Wonderful weather, no moss, nice crowd… pretty much what you’re looking for in a race.

As is my custom with this and the Beaverdale Beaverdash 5K, I pretty much try to run balls-to-the-wall the entire way through. Luckily, Friday’s are my speed training days so this fit in very well with my schedule. Unfortunately, the amount of bike riding I’ve been doing commuting to and from work is having an effect.

While my knees are loving the cross-training, I felt a little sluggish through the first mile (mostly like my legs were full of lead… a by-product of the biking). Really got into my grove during the second and was sucking wind pretty hard core for the third. I did finish with a time of 19:16, a personal record for the 5K (although this race isn’t a certified 5K… we don’t worry about such things though). So apparently the heart rate training is already having an effect. Must continue to improve VO2…

First place was an unbelievably fast 15:19… so no, I didn’t win. Nor will I ever if that guy keeps showing up. I ran a 6:12/mile pace, which is very fast for me. No way I’m going to pull down a sub 5:00/mile anytime soon (or ever).

It’s a fun race, though. Always look forward to it each year. Would have liked to eek out a sub 19:00 time, but it just wasn’t in the cards. There’s always next year…

Digg!

I signed up for the 2008 IMT Des Moines Marathon this morning… I have no fear this year as I know I’m quite capable of finishing the distance. I just want to do it without the ridiculous amounts of pain.

I put down an estimated finishing time of 3:45:00, but really, I’m hoping for sub-3:30:00. If I can run a 4:06:48 with a seriously hurt leg, 3:30:00 should be attainable.

Must… keep… weekly milage… in check…

Digg!

Or better yet that he knew me… see here for my initial post.

His name is Forey and he’s the guy you always point at and say “What in the living shit is that guy doing running with no shoes on?!” during races held in the Des Moines area. And he’s a “Mom Hates this Blog” reader (one of six!). Hi Forey!

  

I caught up with him after this year’s Dam to Dam and he and the other crazy dude (not sure who that is, sorry Mr. Tie Guy) got a couple of pictures. Yes, that’s a kilt. No, I’ve not a clue what is or is not under it. Maybe when he decides to run a marathon on his hands we’ll all find out.

If you happen to see Forey at a race… or half-naked in a snow drift preparing for Living History Farms, stop and say hi. He is, as my parents would say, good people. I’m quite proud that the local insane runner guy 1) likes my blog and actually remembered my name and 2) isn’t actually insane, just a bit more dedicated to the running addiction than most of us. And if you get a picture of you and him and you’re getting said picture because you said to him that you read about him on this blog, let me know. I’ll post the picture (if you send it to me) plus I’ll give you a hundred million dollars. (note that one of those two things won’t actually happen).

Sorry it took so long to get these up, Forey… see previous post for my lame excuse.

Digg!

Next Page »