maybe i'll type stuff here…

Pulmonary Shunt Training

As I mentioned in my previous post, I will be testing out a training supplement I found over at men’s health in December.

What I plan to do is record my experience, etc. after each day of training. I will also follow each training week with a parkrun. This will give some measure of improvement over the 3 weeks. For December, however, I am not sure if there will be a parkrun on every weekend. To eliminate the possibility of results being skewed by adrenaline on actual parkruns vs. days where I’m just completing the route (freedom runs), I will do a freedom run at 7:00 on Saturday mornings and use its time. This will be the first run of the day and not be affected by any race hype, etc. I will also run a ‘benchmark’ parkrun before starting the training.

So, there it is. Plans for the training experiment of the year. Let’s hope it works out, and everyone could be faster runners for it.


Wow, I forgot I was blogging about my training for the Comrades Marathon. So much has happened since my last post!

The Half-Marathon
While training for my first half-marathon, I was encouraged to increase my longest single run to around 15km. I did this once by running a parkrun and then following it with 2 more parkruns, and then I entered a 15km race. I finished the race in 1:20:31 which boosted my confidence with regard to finishing my first half-marathon in under 2 hours. I also changed the date of my first half-marathon from 27 September 2014 to 16 August 2014. I ran – and finished – my first-half marathon in 1:57:02. To date I have completed 4 half-marathon races, and the distance or more an additional 4 or 5 times.

The next hurdle: Qualifying
With my half-marathon done and dusted, my next goal was to Qualify for the Comrades Marathon. In order to do this, I needed to run and finish a standard marathon in under 5 hours. Again, I increased my longest single run to 30km. This I did once while on holiday in Bela-Bela, and once the day after a tough half-marathon. The second was brutal. My legs and feet hurt from the day before. I felt better after about 7km but at 10km I was in pain again. Needless to say, I finished the 30km and once again my confidence was through the roof. I was going to run and finish a marathon, and I was going to do it in less than 4 hours.

05:30 on a rainy Saturday morning – exactly 6 months after my first run in 20 years – race day arrived. I was psyched. I was excited. I was ready. I was about to run farther than I’ve ever travelled without a motorised vehicle. I had a pace chart but forgot it in my room. Fortunately I had the most important checkpoint splits memorised. I had to hit 5km in 28:30, 10km in 57:00, halfway in 2:00:16, speed up a smidge and finish in 3:59:50. I reached 5km spot-on and felt really good. At 10km, I was a minute fast, but I felt so good that I wasn’t too bothered. Half-way came around and I was 3 minutes fast. I felt good, and did not bother too much about being a bit fast. My plan was to eat a gel at 10km and another at half-way. This should fuel me to the end. I had the first gel at 12km because this is where the water-point was. Second went down at half-way. On my way to the 32km mark, I had a though to eat another gel when I get there. When I reached the 32km mark, I didn’t feel like eating the gel, because they’re not the most delicious item I’ve ever consumed and because it wasn’t part of the plan I didn’t care too much about skipping it. And, despite the pain, I was also still feeling relatively good. This would later prove to have been a mistake. My body was clearly telling me I need fuel. The last 4km of the race consists of a constant climb, and it was consuming energy. At 40km I was slowing down a bit. At this point my average pace was 5:35/km. This was good. My target pace was 5:41/km. I was going to come in under 4 hours!

And then I hit the wall. That damn wall. I had nothing left. No amount of begging, threatening, or bribing could convince my legs to run any more. I strolled, drinking what was left of my ‘on-board’ energy drink, cursing myself for not eating the gel at 32km, and watching runners I passed a few kays back, regain their position in front of me. I eventually crossed the line in 4:07:58, the elation of finishing my first marathon – and qualifying for the Comrades Marathon – drowned out by the disappointment of not reaching my goal which was right there in front of me.

I learned 3 things from this marathon;

  • I must update the plan to include the third gel at 32km,
  • I must listen to my body, and
  • I can finish a marathon in under 4 hours

The next step
So, this is where we are now. I consider myself an athlete, now. Actually, I did that after my first half-marathon. My next goal is to get that marathon under 4 hours. It’s scheduled for 24 January 2015. From there, I’ve got two 50km ultra marathons on the radar before the big C. My ultimate goal (beyond Comrades) is to complete a marathon in less than 3 hours.

I’ve found a training supplement that suggests I can improve my fitness by 28% in 3 weeks. That’s a 54 second improvement on my pace (calculations on request). It means that I can take my 5km from 24:11 to 19:15 or my 10km from 49:26 to 40:20 in just 3 weeks!!! These are best-case scenarios and I don’t foresee an improvement like that in just 3 weeks, but I am going to give it a shot in December and will track my progress, etc. here.

Happy running

Comrades Marathon

It’s crazy, I know. I’m touching 40, I smoked cigarettes for half of those years, and now I’m thinking of running nearly 90km in one day!

But I am quite serious about doing this so, at the beginning of May, I started running again. I say again because I used to run when I was in school. Never bothered to ‘train’ much, but running was something I knew my body was designed to do, so I did it. And enjoyed it.

But the first run in 20 years I did NOT enjoy. It was torture. I use Endomondo to track my running and decided to start of with one of its ‘Cooper Tests’. It’s a fitness test that uses the distance one can run in 12 minutes to determine one’s fitness level. So, that was it; I ran for 12 minutes and felt like I could die. I covered exactly 2km in those 12 minutes which isn’t fantastic, but wasn’t too bad either considering my physical condition.

I used the result of this test (a fitness score of 30) to create a training plan for running a 5km by 30 June. The training plan started 1 May, and I could not believe how much I enjoyed the first run! I felt on top of the world! My body started remembering how awesome it felt to run. I completed my first 5km 3 days later on 4 May!! It took 38 minutes, but I finished it. From there, I was running 5km parkrun’s every weekend. I stuck to the training plan, but because I hit my goal long before intended, I shifted the goal to running a 5km in under 25 minutes by the end of June.

On the 24th of May, I entered and ran an actual 5km race. It was tough. Really tough. But I finished in under 30:00, so I was satisfied. I also had my first taste of a proper race and loved it.

On the 31st of May I quit smoking. I chose the 31st because the Comrades Marathon 2015 will then be on my 1 year anniversary.

Then, after some thought and ‘pep-talks’ from friends, I decided to move on and ran my first 10km race on the 7th of June. I had 2 goals for that race; 1. Finish the race, and 2. do it in less than 60 minutes. The particular race was an easy one. Good for someone to cut their teeth on. I succeeded in both goals, finishing the 10km in 55:33. What’s even more awesome (and astounding) was that I finished 90th which earned me a silver medal!

The rest of June saw me running 2 more 10km races, 2 more parkrun’s, and joining a running club. I did not make my goal of running a 5km in under 25 minutes by the end of June, but I was OK with that. I have already exceeded all of my expectations regarding my running.

On July 5th I ran my first race as a running club member. It was an important race for running clubs in Gauteng North because it was a league race. In a league race, each runner gets a score toward the club’s league standings. Our club was in third position in the first division league, trailing second by one point and first by two. I had a consistent 10km time and knew I could score 3 points, but I was only 2 minutes away from 4. It was a fast race. A so-called ‘PB route’. Maybe I could get those 2 minutes. It’s only 12 seconds per km. I did not want to let the club (or myself) down so I ran hard. It was tough. The last 2km was brutal. But I did it! I completed the race in 51:43 and scored the 4 points. Our club won the league event, which moved us into second place. Endomondo also found a section where I completed 5km in 24:53 so my sub-25 minute 5km goal was hit, even if it was 5 days late.

Since 5km runs have become warm-ups, and I’ve become comfortable on 10km races, I’ve shifted my attention to the next hurdle in my way towards the Comrades Marathon; the half-marathon. There seem to be a big shift here. The 5 and 10km races seem to be more speed oriented while the longer runs (let’s make it longer than an hour at my pace) are the endurance races. I like endurance races. You run at a comfortable pace for a long time. That’s it. The secret to winning and good times is to get your comfortable pace to be fast. But it remains comfortable. I have not had a run that lasted longer than an hour. But it’s coming. For endurance training, you need to get distance in the legs. That means long, slow runs on the weekends.

I’m still running 10km races on the weekends. If my long, slow run is 12km (for instance) I’ll finish the race and add an extra 2km to the end (or I might warm up with 2km, but I don’t know how that will go). My first half-marathon is scheduled for 27 September 2014. I have 2 goals for this race; 1. Finish the race, and 2. do it in less than 120 minutes.


This is something that makes my OCD bash away at my skull:


This is either a ‘B’ or a ‘3’. THIS IS NOT AN AMPERSAND!

Ampersand (representing the junction word ‘and’) comes from the latin ‘et’ meaning ‘and’ (duh!). Et. An ‘E’ and a ‘t’. If you’ll excuse my MSPaint skills, it should have been:


I’d expect graphic designers to at least know what they are doing.

I was working on a game that required the roll of a die, so I spent a couple of days with blender to make a few movies and created digital die as a test app.

I figured I’d stick an ad in it and drop it on the market.


That’s the latest;

I got myself a sweet Samsung Galaxy Tab 8.9 and fell in love with android immediately. It is beautiful!

Of course, being a developer, I downloaded the SDKs and Eclipse and familiarised myself with Java. A whole lot of new things all at once.

I did a couple of ‘hello world’ apps, and then decided to dabble a bit with the multi-touch feature of the screens. I wanted to test it as quickly as possible, but still have something decent to show for it, so I decided to remake the classic Pong and allow two people to play against each other on the same device.

Pongz (as I decided to call it) is currently in it’s beta stage and requires feedback from unsuspecting users, but it’s my first real Android App so I don’t expect much love…


Prime numbers using Python

I recently saw a post over at Stack Overflow on calculating prime numbers. In one of the responses the poster posted a C# example using the Sieve of Eratosthenes on a single line of code and although this is not ideal and extremely hard to read/figure out, I really wanted to see if I could do this in python. This is what I came up with:

reduce(lambda r, i: filter(lambda m: not (m > r[i] and m % r[i] == 0), r), \ 
	[range(2, 1000000)] + range(n + 1))[:n]


This is virtually an exact copy of the example at SO.

The 1,000,000 limit is overkill (and slow) if you only want to get the first 10 primes or so, since it only calculates the first num primes but runs through the whole list of 1,000,000 initial numbers (Getting the first 10 primes resulted in a list with 152,850 values of which only the first 10 are guaranteed to be prime).

Silly primes

Since there is no constant rate of change between primes, it is difficult to determine what the limit must be based on num. The limit is really a value greater than the num‘th prime.  A simple solution would be to multiply num by 10 and using that as the limit. This follows the assumption that there will be at least one prime every 10 numbers, i.e. there will be at least 1 prime between 1 and 10 and there will be at least 10 primes between 1 and 100. This is by no means foolproof, and only works up to prime 6,453 (64,499).

If you want to go bigger, check if num is greater than 6,453 and if it is, multiply it by 20 instead. This should then work up to prime 69,709,734 (1,394,194,679) but you might not reach it because it takes quite a significant amount of time and memory to get there. In fact it failed on my machine due to memory issues. The only way I could determine the last prime this could calculate was to multiply several num‘s by 20 and checking when the prime at num position exceeds the result and subtract 1;

limit is 69,709,735 * 20 = 1,394,194,700
prime at position 69,709,735 = 1,394,194,723 <- prime is higher than limit

limit is 69,709,734 * 20 = 1,394,194,680
prime at position 69,709,734 = 1,394,194,679 <- prime is lower than limit