Roller coaster is an understatement

Yesterday morning I ran the Schenectady Firefighter’s Run 4 Your Life. After being so down (translation: lazy) with the weather (translation: using it as an excuse), I ran it basically cold. My training consisted of two short jaunts on the treadmill… which weren’t enough. Even with that, I was still able to pull off a fairly respectable time.

The run was… obnoxious. Snow? Spring? Nah.

That was the start of the morning.

The rest of the day consisted of this.

20140308-212940.jpg

First ride of the year

Finally, today was a halfway decent. Finally, I got my bike off the trainer and onto the road. Finally, I was able to go outside and get some exercise.

I’ve kind of let myself go since the beginning of the year. I am not sure what it is, but this year has just felt so cold, worse than I remember from any recent winter. Maybe it’s because I wanted to be outside so much this winter, I don’t really know. Maybe it’s because we had several polar vortexes.

Anyway, enough sobbing about the cold. This was the first time I had been on the bike on asphalt and not the trainer. Oh my it is so much nicer than my old bike. It fits better, it rides better, I don’t feel as crammed in there as I did on my old bike. I’m pretty sure it’s faster too.

I also had my Virb with me recording video. It is kind of boring, but it is cool to see telemetry, not just on a map but while watching where I was. I imagine my hill climbing technique will yield some nausea inducing video.

Brace your code

You know, I’ve been lazy before with my code… Unfortunately, I’ve done this more than once (exaggerated intentionally, I’m not this bad):

while(some condition)
    for(some iterator)
        if(some other condition)
            some method call

After the reason behind iOS 7.0.6 came out, it was discovered that this was the cause of the bug:

if ((err = ReadyHash(&SSLHashSHA1, &hashCtx)) != 0)
    goto fail;
if ((err = SSLHashSHA1.update(&hashCtx, &clientRandom)) != 0)
    goto fail;
if ((err = SSLHashSHA1.update(&hashCtx, &serverRandom)) != 0)
    goto fail;
if ((err = SSLHashSHA1.update(&hashCtx, &signedParams)) != 0)
    goto fail;
    goto fail;
if ((err = SSLHashSHA1.final(&hashCtx, &hashOut)) != 0)
    goto fail;

This sort of subtle bug deep in the code is a nightmare. I believe that it’s just a mistake and I feel very bad for whomever might have slipped in an editor and created it.

(from here)

See something wrong there? Two goto’s in a row, the second one will always be evaluated. A merge gone bad as theorized? Probably. A plant by the NSA? Meh.

There’s a site out there to test if you’re vulnerable, with a funny name to boot: gotofail.com

On Monday, I’m making sure all of my code is braced.