Firefox Download Button

Pages

100 Push Ups: Week 1, Day 3

I just finished the last set for this week, which was 11, 15, 9, 9 and max (at least 13), with a 2 minute rest between sets. I finished 20 push ups on the last set.

Today was much more difficult than on Tuesday. My muscles were tired after the first set, but I think I am improving, I was surprised to have been able to do 20 on the last set. Next week the rest period drops back down to a minute, so we’ll see how much of an effect the rest period has!

Week 1 completed! Total push ups so far: 192.

100 Push Ups: Week 1, Day 2

Just finished day 2 of the training. Pretty similar requirements to last time, today was 10, 12, 8, 8 and max (at least 12) but with a 90 second rest between sets. The extra 30 seconds of rest made this much easier than last time, and I finished the last set with 18 push ups. I can definitely feel different muscles getting a workout though!

100 Push Ups: Week 1, Day 1

As I mentioned yesterday, I’m starting the 100 push up challenge.

I decided to start today. Mondays always suck, so the chances that I would be able to work up enough motivation to exert extra physical effort would be pretty slim.

The requirement for today was 5 sets of push ups: 10, 12, 7, 7 and max (at least 9) with a minute break in between. Today wasn’t too bad, I finished all the sets without a problem, and managed 13 on the last set. I think I could have squeezed in two or three more, but Thomas decided to try and climb over me as I was finishing #12 and #13.

So, a break on Monday, and then Day 2 of training on Tuesday! I’m actually looking forward to it!

PHP is now officially the dumbest language ever

From Slashdot: PHP Gets Namespace Separators, With a Twist.

I’ve never been a big fan of PHP. Yes, it’s easy to get up and running, and there are about a bajillion PHP developers out there, but I’ve always felt that it was a language with no clear direction behind it, riddled with inconsistencies and features that were not well thought out.

This latest decision to use ‘\’ as the namespace separator in PHP is simply braindead. Most programming languages in use today use ‘\’ as an escape character. Including, I should add, PHP!!!. Maybe you’re supposed to think of using ‘\’ to ‘escape’ from one namespace into the next?

What’s wrong with ‘::’? It’s not like PHP prizes readability or brevity. How about ‘.’? Oh wait, that’s right, ‘.’ is used for string concatenation (wouldn’t want to use ‘+’ for that…)

So yeah, I’m just happy I haven’t had to do much in the way of PHP work lately. Any chance I get, I use Python for web stuff, usually with Pylons.

I survived my second half marathon!

On the start line

After taking a bit of a hiatus from racing, I completed my second half marathon last week. I did the same race as the one two years ago, the Toronto Marathon. I liked the course when I ran it before, and the weather in October is usually better than in September.

I finished in 1:52:45.6 (compared to 1:52:58.4 in 2006). So I’m 13 seconds faster! Woohoo! Halfway through the race I thought I might beat 1:50, since I was consistently doing less than 5 minutes per kilometer….but that part was mostly downhill :P Once the course flattened out I slowed down again. The weather was perfect again this year: a bit chilly waiting in on the starting line, but very comfortable once you got going.

Signing up for races is a great way to keep motivated. I’ve signed up again this year for the Egg Nog Jog, and I’d like to actually do the Around the Bay race this spring…I registered for it in 2007 (and have the shirt to prove it!), but my training was kind of thrown off by Thomas’ birth, and our move to the new house.

One Hundred Push Up Challenge

I’m a bit of a sucker for silly physical challenges. For example, I’m hoping to complete the Canadian Death Race one of these days.

So when I learned about the 100 Push Up Challenge, it immediately appealed to me. The gist of the challenge is to progress along a 6 week program, at the end of which you should be able to do 100 push ups in a row.

I did the initial test tonight, and managed 23 push ups. Pretty pathetic, I know :P I thought I could manage at least 25!

I intend to post updates semi-regularly on how I’m doing. Haven’t decided whether I should start tomorrow, or wait until Monday. Stay tuned.

Life at Mozilla

Well, I’ve survived my first two weeks at Mozilla.

It’s been rough, what with the mandatory Rock Band, and the always excellent and plentiful coffee.

Thanks to John and the rest of the Release Engineering team for their very warm welcome. The whole team got together in Toronto last week, so it was great to get to meet everybody. We’re a pretty geographically diverse group, Toronto actually has the highest concentration of RelEng people…with 2 people.

I’m slowly getting up to speed on how all Mozilla’s systems work, but something tells me that I haven’t felt the full strength of the Mozilla firehose just yet!

Upgrading WordPress with Mercurial

Since Mozilla has started using Mercurial for source control, I thought I shoud get some hands on experience with it.

My WordPress dashboard has been nagging me to upgrade to the latest version for quite a while now. I was running 2.5.1 up until today, which was released back in April. I’ve been putting off upgrading because it’s always such a pain if you follow the recommended instructions, and I inevitably end up forgetting to migrate some customization I made to the old version.

So, to kill two birds with one stone, I decided to try my hand at upgrading WordPress by using Mercurial to track my changes to the default install, as well as the changes between versions of WordPress.

Preparation:
First, start off with a copy of my blog’s code in a directory called ‘blog’.
Download WordPress 2.5.1 and 2.6.3 (the version I want to upgrade to).

Import initial WordPress code:

tar zxf wordpress-2.5.1.tar.gz # NB: unpacks into wordpress/
mv wordpress wordpress-2.5.1
cd wordpress-2.5.1
hg init
hg commit -A -m 'wordpress 2.5.1'
cd ..

Apply my changes:

hg clone wordpress-2.5.1 wordpress-mine
cd wordpress-mine
hg qnew -m 'my blog' my-blog.patch
hg locate -0 | xargs -0 rm
cp -ar ../blog/* .
hg addremove
hg qrefresh
cd ..

The ‘hg locate -0′ line removes all the files currently tracked by Mercurial. This is needed so that any files I deleted from my copy of WordPress also are deleted in my Mercurial repository.

The result of these two steps is that I have a repository that has the original WordPress source code as one revision, with my changes applied as a Mercurial Queue patch.

Now I need to tell Mercurial what’s changed between versions 2.5.1 and 2.6.3. To do this, I’ll make a copy (or clone) of the 2.5.1 repository, and then put all the 2.6.3 files into it. Again, I use ‘hg locate -0 | xargs -0 rm’ to delete all the files from the old version before copying the new files in. Mercurial is smart enough to notice if files haven’t changed, and the subsequent commit with the ‘-A’ flag will add any new files or delete any files that were removed between 2.5.1 and 2.6.3.

Upgrade the pristine 2.5.1 to 2.6.3:

hg clone wordpress-2.5.1 wordpress-2.6.3
tar zxf wordpress-2.6.3 # NB: Unpacks into wordpress/
cd wordpress-2.6.3
hg locate -0 | xargs -0 rm
cp -ar ../wordpress/* .
hg commit -A -m 'wordpress-2.6.3'
cd ..

Now I need to perform the actual upgrade to my blog. First I save the state of the current modifications, then pull in the 2.5.1 -> 2.6.3 changes from the wordpress-2.6.3 repository. Then I reapply my changes to the new 2.6.3 code.

Pull in 2.6.3 to my blog:

cd wordpress-mine
hg qsave -e -c
hg pull ../wordpress-2.6.3
hg update -C
hg qpush -a -m

Voilà! A quick rsync to my website, and the upgrade is complete!

I have to admit, I don’t fully grok some of these Mercurial commands. It took a few tries to work out this series of steps, so there’s probably a better way of doing it. I’m pretty happy overall though; I managed a successful WordPress upgrade, and learned something about Mercurial in the process! The next upgrade should go much more smoothly now that I’ve figured things out a bit better.