Oh, you know, just an update and stuff… Work, docker and running.

Goodness, it’s a week since I last blogged and a lot has happened. Well, some things, nothing too major.

In the first instance, I’ve basically been working solidly since the last post. I foolishly took a day to work through my accounts and so am now about two weeks behind with everything. How does that happen? Well, there was already a lot to do and the things that I did to try and pin them down and finish the projects didn’t seem to do the trick. So suddenly, I’ve still got a mountain of stuff to do.

Too many 2am bed times and early rises over the past week. It’ll pass, but it can’t come soon enough.

One fun thing, amongst all the various projects has been the excuse to play with some Docker containers. I’ve got a few sites that run on an old server which I want to rebuild sometime soon. In migrating them off it seemed like a good opportunity to stick them into containers and run them independently. Plus it would help enormously with a couple of the coding projects that we’re workign on. So today I’ve been playing with that. Great fun it is too, and you get the feeling that we’ve been so close to it over the past decade with all the virtualization techniques that it’s amazing it didn’t come about sooner.

Like most of these things, the chances are that a version of something like this has been kicking around for years, but it’s only now that it’s gained traction. That’s an uneducated guess, btw.

I’ll write more in a few days when I’ve got a few sites and applications running in it. The migration has started ok, though, with five different applications/sites moved into their own containers and ticking away merrily on a cheap old digital ocean vps.

In terms of the running, I’ve been out a few times. I did the parkrun route once more and then did some weights. Didn’t get a chance to do any running last Friday or Saturday because of work / London / weather / work, but did get a chance to see Arcade Fire at Earls Court. They put on a fantastic show, but I’m still trying to work out why they brought Ian McCulloch on stage – except that it’s a nice thing for them to do and a day out to London for him.

Running on Sunday was hard work. I tried to keep going over a 5k distance, but I had to slow down to a walk far too many times for my liking. I decided that I needed to wind back the training a bit, and so today I did a more structured run/walk session on the treadmill which seemed to go ok.

The intention was that it would make me build up my confidence again – as I’ve spent the last few runs just thinking that I couldn’t do it and that I was a fool for even thinking that I could try. The exercise today was fine, I felt ok while doing it and so had an initial rush of enthusiasm and a sense that, yes, I could get better again – albeit slowly.

That passed quickly, and as the evening wore on, all the doubts were hammering away again. I feel like I’m getting much worse while others are plugging on and getting better, and to be honest, it all seems a bit insurmountable. I had to go to ASDA on the way home to get some groceries and I just wanted to get some beer and/or chocolate and/or a big old bag of Doritos or something. I didn’t get any, and I’m sure that the feeling about the running will pass, but I probably need to put myself in a position where I’m getting more motivational feedback. The running alone thing is a double-edged sword.

I really don’t want to be involved in a running club – especially as my experience from a couple of weeks ago at parkrun reminded me of the “you’re obviously not one of us” mentality of some of them. I’m not feeling that motivated about parkrun on Saturday either. The idea of rolling in right at the back, exhausted and hating myself is not something that I am looking forward to. So I’m not sure. Perhaps it’ll all look better after a sleep. Any sleep would be good, as it’s 1am now and it looks like I’ll have to be up early. Tomorrow will be better, I’m sure.

Accounts, weights and cutting 500 calories a day

I hate doing accounts. It’s something that I’ve never enjoyed, but reluctantly accept that has to be done. Today was accounts day. The only thing that makes it bearable is using Xero. It has to be one of the loveliest web applications that I use regularly.

After years of using Sage at mytechie, my accountant pointed me over to Xero. It’s a delight to use – light years away from Sage which tortured me for years with an array of accounting jargon and an interface that harked back to the early nineties. I spent most of my time with Sage swearing and trying to find someone else to do the work for me. Xero, on the other hand, is like being eased gently into a warm bath of invoices and purchase orders, by someone who knows that you really don’t want to be there. Whoever wrote it deserves the web app equivalent of a Nobel peace prize.

So it’s been a mix of pleasure and torture – followed by a visit to Morrisons with the children, who seemed determined to make the visit mind-bogglingly stressful. Normally I’m a big fan of the self-service area. But with two children grabbing items and trying to scan / pack, constantly alerting the assistant and then dancing (I think) while surrounded by increasingly agitated shoppers, it was an ordeal. I just about managed to hold it together, but next time I will put out a large drink to be downed my return.

No such tasty drink today. The daily exercise hadn’t been done, so strong alcohol had to wait until we caught up with Game of Thrones – which it turns out was probably necessary.

After two days of torturing my legs by following the parkrun route, I went for some upper body and core exercises. Nothing too unusual – the New Rules of Lifting break in workout ‘B’, which has some decent upper body stuff. Not all that lunging and squatting that turned my legs into jelly. A couple of weeks of the break-in workouts and then I’ll take a look at their hypertrophy workout – which should probably take me through to August / September.

I quite enjoy the weights, although I’ve taken to looking at benches on ebay. This is probably very bad.

The final terrifying thing of the day is that I’ve installed “weight diary” on my phone. Yet another weight tracking app, but at least I don’t have to convert into pounds or kg. Instead it works in good old fashioned stone and pounds. The downside is that the stark reality is presented in large 100pt narrow sans serif font. It has also helpfully calculated that if I cut 500 calories from my diet every day, then I’ll hit my target weight sometime near the end of NEXT YEAR. Not 2014, but October 2015. The absolute impossibility of this makes me want to bury my head in a bucket of ice cream. However, I’m encouraged that when I was last exercising in January, I lost a lot of weight quickly. The trick is keeping it off (ho ho!) – or not getting injured. Or both.

Running again tomorrow. God knows when I’m going to get time to do it, but that’s the plan. Let’s see how the legs hold out.

Downhill all the way. Except when it’s uphill.

Today has been one of those days where everything seems to have gone backwards rather than forwards. I had a plan to get a bundle of projects finished, and I feel like I’m no further forward with any of them. It’s been a day of mostly Android programming and trying to get to the bottom of why a database is not running properly.

On the database side, it looks like badly written/tested code – written by someone else, but I’m now responsible for getting it working again. I wouldn’t mind, but it’s written in .net and is mostly incomprehensible. I’m wondering why I’m even looking at it, to be honest. It’s a distraction and the errors have thrown my happy plans into ruin.

The android code is nicer though. It’s an app for someone which I’m just cleaning up and getting ready for pinging over to them. Then I need to finish off the iphone version. Again I’d had a happy plan of doing it one way – HTML5 with a teeny tiny bit of bespoke code behind it, then getting someone to do the bulk of the coding. But I was let down by my usually-reliable coding agency, and so I’ve had to do it myself.

As it is, when I started working on it, it made sense to do the Android version native, and so the iPhone version is native as well. They’ll be fine, but all the best plans are getting trashed it seems.

The running has been similarly difficult. Yesterday I pulled up because my calf muscles were hurting. Today wasn’t much better. But rather than pulling up and stopping, I trudged on – taking it very slowly and having to walk occasionally. So 4.5-ish km put in, but at a super slow pace. Lots of stretches and TLC didn’t seem to do the trick, so tomorrow it’s a weights day.

It probably wasn’t helped by trying the route of the parkrun again today. The route is gently undulating with two steepish runs of 50m near the beginning and then later in the run. Normally these would be fine, but I’ve put on quite a bit of weight since the half marathon and I can really feel it. So I might try a much flatter route the next time I run – on Thursday, with legs that feel like they have wings. Hopefully.

Not really juneathon, but well, I’ll give it a go

I haven’t signed up for Juneathon yet, but I’m blogging and running just to keep my hand in. You never know, I might even add my name to the spreadsheet at some point. Chances are that I’ll blog about a mix of things rather than just the running – Android nameservers, for example. I’m off to Glastonbury at the end of the month and so would probably fail at the very last hurdle. I like the idea of running around the streets of Pilton and Glastonbury, but I prefer the idea of crawling out of the tent, blinking in the midday sun and going to find some cider and music.

Yesterday I took things easy, well mostly easy – we went for a walk up Rivington Pike in the morning. I didn’t measure it, but the fancy fitbit app thing said that we’d walked 7k – which is obviously a vast under-estimation. Or not. It felt like a lot more, probably due to all the walking-up-hill. And yes, I understand that half of it was downhill, but we took the long way uphill, and the short way down. Or at least that’s what I’m going to say.

I also did half an hour picking up the weights and dipping my toe into the New Rules of Lifting again. After the MK half marathon I had a very sore calf muscle for the best part of six weeks. The Manchester 10k was really difficult and so I’m determined to do some more varied training to try and avoid injury. Well, it’s my plan. Let’s see how it goes. It was difficult, but I feel like I got two exercise sessions in yesterday.

Today, however, my calf muscles were out to get their revenge. Probably due to the hill walking, and the lunges and the squats. I set out to follow the parkrun route at Edge Hill and could only manage 2k before I had to stop because of the absolute tiredness and soreness in my legs. Nothing like the pain when they were injured, just unable to lift them. Hey ho. Will try again tomorrow. At the moment it’s all about getting back into a routine and so I’m not going to beat myself up after a bad run.

I’ve not yet worked out a schedule, which I’ll do sometime soon. The January schedule seemed to work fine, but once I’ve got something, I’ll post it here.

Finding nameservers in Android 4.2

I’m having some trouble finding out how to pull out the currently active nameservers in recent versions of Android. This goes back to the SetDNS app that I’ve been maintaining on and off for a few years since writing it.

I’ve had a new version 90% written for about a year. I keep going back to it and think about releasing it, but I’m really unhappy with the way that I can’t detect what the current nameservers on the device are. So I can throw IP addresses into the ndc binary with resolver commands, but I can’t get anything back with whether it was a success or what the current IPs are.

So, setting the nameservers is achived by running:

/system/bin/ndc resolver setifdns [interface] [dns1] [dns2]

but for general usefulness, it’s handy to know if the settings have actually changed.

My current plan is to work through the Android bionic source code – specifically the resolv section. Then to try and augment the functions there with a binary written using the Android NDK.

It might all be hopeless, but I’d prefer to have something that worked in the same way as the old app, rather than something that feels like a kludge.

Having said all that, I’m conscious that the app doesn’t work for a lot of people and so I’m close to just kicking out a version that sets the nameservers without any visual feedback in the app. I’m not sure if that’s a good idea. If I come up with something then I’ll post it here.