Back to IT

A blog commenter noted that my LinkedIn said I was back in IT. This is correct and has been for over a year.

If you want the full story as to exactly how that happened, you're welcome to buy me a beer ūüôā - there was a simultaneous push away from my parish in Wellington and a corresponding pull towards Whanganui and our extended family.

I am now working as a Principal Engineer with Koan, an AWS Advanced Tier Partner based in Wellington. Fully remote, from Whanganui, although I make the occasional trip down to Wellington. I have spent the last year making bits of customer AWS network talk to each other, remediating ancient code, making architectural improvements to an IoT system, even writing some new code when I get the opportunity. I was recently interviewed on AWS's Twitch channel, about a small app I built to make the "where do I find things in your Amazon environment" questions easier to answer.

In my copious spare time - I still preach in the parish we're members in. I'm also trying to power my house off an old Nissan Leaf battery (see future posts), recently built a new chicken coop, and ... various other things. Hopefully I'll even blog about them!

{ Add a Comment }

What’s up with the world?

Donald update: since my last post I accepted a call to be Minister at Wadestown Presbyterian Church in Wellington, starting in early 2020. The eagle-eyed among you will notice that it is now 2022 which tells you something about how often I blog.

One question which has increasingly weighed on my mind in the last five to ten years is -- what's up with the world? What's up with the church? Everything seems like it's gone crazy.

How has western society & culture got the way it is?

The big reflection I've had is that current middle-class, big-city New Zealand life is a bit of an abberation. So much social change has occured over the last century and we just don't think about that at all. The word Teenager was first used in the 1930s, around the time high school became compulsory. My grandfather was working for the bank at age thirteen.

If you look at the world described in the Bible it sounds very foreign to us. But if you look at the world as it was even a hundred or two years ago actually that sounds pretty foreign too. We have no sense of perspective. We've had two world wars in the 20th century, all before my time. Before my parents' time.

I've read all sorts of books trying to understand how my corner of the world got the way it has. Charles Taylor, a bit of Alastair Macintyre, more. Half read some James K A Smith. Probably need more book-reading time. It felt like they all have bits of the puzzle.

In the last year I came across Mark Sayers' work. And the story he tells of how the world got this way, and how the church got the way it is, is the best story of this that I've heard. He's read even more books and seen more as a pastor and weaves the stories together into a cohesive whole that really makes sense.

A bonus for us Kiwis is that he's Australian, and speaks from an Australian context. When I read stuff from the USA, which overproduces Christian content, their culture is in a very different place. They're just grappling now with the sort of church decline we've had for a decade or three. The Australian context is much closer to ours.

I'm not going to tell you his answers but I can thoroughly recommend his (old) podcast that I'm slowly working through, This Cultural Moment. I find myself listening and nodding along and frantically making notes. I've even done the IT thing and passed it through a transcription service so I don't miss bits.

The question after you absorb all of this stuff is, of course, where to from here? I don't have that answer yet!

{ 1 Comment }

Ultra cheap yogurt

I eat a lot of yogurt at the moment. I'd like it to cost less money. Two litres a week is easily $10 from our grocery budget, and that's more than 5%.

For a while I've been using an Easi-Yo maker. You get a $5ish sachet of milk powder and bacteria, mix it up to a litre of lukewarm milk-ish liquid, and keep it warm in the yogurt maker. The instructions always say it only takes 8 hours but I find it's more like 18.

This saves a bit of money. But milk is cheaper than $5/litre! Why do I have to spend so much on sachets?

If you spend some time with our dear friend Google, you'll find instructions on how to make yogurt in an Easi-Yo maker, with normal milk. And an accurate thermometer. And a saucepan. And half an hour or more of fiddling with the stove. Nope. Not going to do that.

Next stop, milk powder. It doesn't need to be heated to 85 degrees, it's already been heated enough to dry it out.

Experiment one: Milk Powder

I took half a cup of yogurt from my last batch, ~130g of milk powder, mixed it up, and left it overnight.

Yahoo! The yogurt set! It tastes great!

But that texture ... kind of grainy. Odd. Ok on my breakfast but still ... odd.

Experiment two: THE BLENDER

I did basically the same thing but mixed everything in the blender and let it sit for half an hour for the bubbles to pop before putting it in the yogurt maker.

Yahoo! Not gritty!

I kept doing things this way for a week. It works well.

But ... Half a cup of yogurt is over 10% of my last batch, surely I can be a bit more efficient.

Experiment three: a quarter cup of starter

Yup - less starter. Worked fine.

Possible future work

Try this with UHT milk instead of milk powder, it would save the half hour of mixing. But then you're producing more waste - a 1L UHT carton is much bigger than an eighth share of a 1kg milk powder bag.

Rough cost analysis

  • 1 litre equivalent of Milk Powder - about $1.25
  • 60ml of yoghurt - add 6%
  • Cost per litre of yogurt - $1.33
  • Cost per sachet of commercial mix - $3.75 on special
  • Savings - minimum 64%. Milk powder is marginally cheaper at other supermarkets and the sachets are usually more expensive.
  • Savings - no refrigerated transport or storage required while the milk is in powder form, and the only waste is the milk powder bags. Unfortunately they have to be thrown in the bin, they're not recyclable here.

Full instructions for ultra cheap yoghurt

The first batch - just use a sachet

Buy an easi-yo maker from an op shop, and a second Easi-yo yogurt jar and a sachet of natural yoghurt mix from the supermarket. Try to get the one with all the yummy bacteria - the ones with only L.bulgaricus and S.thermophilus don't taste right to me, make sure it's got L.acidophilus and B.bifidum too. Hansells is fine. Follow the instructions and make up some yoghurt. Wait 12-18 hours, refrigerate, eat. I usually eat some while it's still warm which feels a little odd.

Second and subsequent batches - milk powder FTW

When you're almost out, mix up in a blender

  • 3 1/4 cups of lukewarm water
  • 1/4 cup of the remains of the last yogurt batch
  • ~120g milk powder (roughly enough to make a litre of milk)

Wait for the bubbles to die down, fill your yogurt maker thing with boiling water, pour the milky mix into the yogurt jar, put it in the yogurt maker, and wait 12-18 hours.

{ Add a Comment }

Computers and phones: distraction central

This isn't the first time I've tried to give up Facebook and Twitter.  It's not even the first time I'm blogging about it.  What I did last time helped, but not enough.

I find computers and smartphones a terrible distraction.

The "efficient" part of me thinks that being beeped at by emails/etc is efficient because I deal with things when they come up, rather than checking my emails every so often.  Edge triggering is better than polling, right? (that was nerd humour, feel free to look confused)

But this really doesn't work for me.  What actually happens is that I get beeped at, and that triggers off a round of distractions; getting back to the task in hand can take me quite some time.

Part of my identity has been found in my interest in computery things.  This leads me to spend too much time on technology news & forum websites.  And a bit on general news websites.  I used to be able to use the excuse that this was related to my study or work but now it's not.

Now I don't see "going and looking at some news" as inherently bad but it is one of the ways that I can fritter away time.  It draws me away from what I was doing and doesn't release me for some time.

A lot of the stuff I read is interesting in a general sense but not terribly useful, even in my old IT career.  Low grade news.  Junk food for the brain, PKE for the soul.  Hacker News is full of stories about the latest Javascript frameworks and NoSQL databases and general middle-class-nerd startup-wannabe wish-we-were-rich-like-Zuckerberg verbiage.  Geekzone has some good stuff but quite a lot of talk about expensive gadgets and services that is ultimately boring and comes from a middle-class lots of discretionary spending money world.  If the last will be first and the first will be last, then the technology nerd forums might find themselves a little lower down the pecking order than they currently imagine themselves.

But spending too much time reading this stuff has been a thing for me since the late 90s.  It's a habit of over half my lifetime.  Carrying a "device," internet-connected or not, is something I've done since I got a PalmPilot in 1997, and I'd read books and some tech news on that.  At some point I even had it set up to get internet through my non-smart-phone, back when that was exciting and new.  I remember browsing the web, much the same as I do now, on a second-hand Nokia 6600.  That was a good phone.  But I digress.

How do you break a habit that's so ingrained?  Just saying no is quite hard.  It doesn't stick.  When your default "I'm tired/bored/procrastinating" response is to pull out your phone and read something short and unfulfilling, how do you stop?

Using the cloud makes this hard.  Google Docs doesn't work too well without the internet.  I do use online resources during my sermon preparation.  So just turning the internet off is tricky.  I am trying to wean myself off some cloud services, but I'm not there yet.

Technology can help here.  I'm using Mozilla Firefox on my PC and my phone, and it lets you install "add-ons."  One of those is called LeechBlock, and it lets you set time limits and complete blackout periods for website.  So news websites can be helpful sermon input and the church has a Facebook page, but I can limit myself to a maximum of 15 minutes of news & facebook per four hour period.  Twitter, not useful for ministry, just block it outright during work hours.  Geekzone, the same.  And maybe I should be blocking or limiting this for all time, not just during defined work/study periods.

An aside: Firefox is produced by a non-profit, which has some Christians involved, some of which I hope to meet someday.  One of them heads their Auckland office.  Mozilla are not out to track your every move online so they can better target advertisements at you -- at the root, online advertising is about making money out of distracting you -- and that's how Google makes its money, that's how Facebook makes its money.  This can only make my problem worse.  It's telling that the smartphone version of Google's Chrome browser doesn't let you install add-ons on your phone, so you can't install ad-blocking or distraction-blocking add-ons.  Surprise!  Global megacorps do not have your best interests at heart!

This is part of the reason I'm trying to wean myself off the cloud: those wonderful free services I use are at root paid for by selling my attention to the highest bidder. And the ones that cost money tend to be outside my budget.

So: this is an ongoing battle for me.  I'd appreciate prayer.  And do point out what I'm doing if you see me staring at my phone for more than a minute.  It's so easy to pull the thing out, meaning to look at the weather forecast, and realise ten minutes later that you've been sucked into the world of the little screen and you still don't know if it's going to rain today.

{ 1 Comment }

A new chapter

For many years of my life I saw my identity as, to put it bluntly, a computer nerd.  See, for instance, most of the old posts on this blog.

When I went to university, I studied computer science.  I was at it long enough to leave with a Masters degree.  Ask me some time about ownership in dynamic object-oriented programming languages.

Then I went out to work in industry.  I did horrible things to cellphones, built build pipelines, and worked on a secure document management system.  I'm very, very, very good at this stuff.

But I've chucked it all in for Jesus.

In the middle of the "being a nerd" story three big things happened.

I rediscovered my faith.  I'd always gone to church and believed in God but hadn't thought about how this affected what I did with my life.  I started reading books.  I joined a community mission group and would help run an after school programme for kids in the council flats.  I went on a mission trip to the Philippines.

I met my now-wife Angela (at church!) and eventually realised that of course I was going to marry her and merely (ha) had to work up the courage to do it.  Since then we've moved towns and had two children.  Angela is very smart and studied all sorts of actually useful stuff at university, like criminology and psychology, not just nerd stuff like me.

Not too long after getting married, I received the call (from God!) to become a minister.  I've done a theology degree, part-time, and finished that in 2017.


So we got our belongings loaded in a container, hopped on the ferry, and headed to the mainland.


I'm now the ministry intern, sole charge, at Point Presbyterian in Pleasant Point (pop 1,300) in rural South Canterbury.

I've got the next two years to work out what that means.  There's lots of work to be done.  Leading worship, preaching, visiting, organising.  But there's something more.

I look out my window and see people who need God in their lives.  And a community that needs the salt and light of Christians, the healing touch of Jesus, and a solid, thriving local church.

This is a part of the world that still knows how to do community.  They'll all come out for working bees on the steam rail museum.  The local towns still have proper A&P shows.

But the town has 1,300 people.  I'd hazard a guess that no more than 5% go to church in Point, some make the trek into Timaru, and of course most won't go to church at all.

So what's missing?  What are we doing wrong?  Are we so caught up in doing "church" together that we've let our gaze drift downwards and forgotten that an open door is only half the story?


Time for a lot more prayer, and a lot more listening.


Burn Myself While Soldering 2016

It's Christmas time!

Time for Light Up Your Home!

As you can see from that list, Smithfield Rd is Christmas Lights Central this year.  There's us, then the neighbours at 79 and 81 who must have got a shipping container each of LED lights, and then someone a bit further down.

This year I pulled out the Arduino, a pile of relays, and with some help from my little[*] brother put some camels and a star lit up by LED floodlights.  Here's a photo of me fiddling with the timings:

And here's the finished result:

{ Add a Comment }

A tale of two sensors

We've got a cheap monitored alarm at home, similar to what you get if you search for "GSM alarm" on AliExpress or eBay. It's got two wireless PIR sensors, and a few door/window sensors.

I had a project in mind that required listening in on the PIR sensors to detect when they saw movement.  I'd got a shiny new RTL-SDR dongle, and a small amount of investigation demonstrated that the PIR sensors used On/Off keying (OOK) at 433MHz.  But how to decode their transmissions?

On/Off keying is a simple scheme where either you transmit a carrier, or don't.  Amplitude modulation with two amplitudes, one of which is zero.  It's easy to see as a stream of binary pulses.

I bought a small pile of 433MHz OOK recievers and transmitters.  I settled on the SYN470R receiver as various blog posts / etc suggested it had the best performance.

DSO Nano, Arduino, SYN470RIn my fabulous garage full of junk, hidden away in a component drawer, I found my old DSO Nano. I rigged this up to the SYN470R, and could see a stream of binary pulses.  Unfortunately, they were very noisy.  It turns out the 433MHz OOK receivers have an automatic gain control (AGC) so when nothing is transmitting, the gain gets turned up and you see lots of noise.

I was looking for a nice regularly clocked signal.  How would I find it?

I wrote a dumb arduino app to measure each pulse, and dump this out the serial port.  It produced a series of lines with the length of each mark and space in microseconds.  I wrote a python app to analyse this and look for sequences of pulses where the mark and space widths tended to be from a small set of widths.

detected signalsI have never had to write a graphical python app before.  I looked at the documentation and decided that if the only graphics library that let me easily draw a few lines was "turtle graphics", that's what I'd use.

It worked!  I could see some clear, repeated sequences of pulses.  But Turtle Graphics failed me at this point: there was no way to let me detect the mouse was over a pulse train and display some information about it.

At this point I remembered that Linux had a graphics library, aimed at games, called SDL, and this would probably do what I wanted: drawline, fillrect, where is the mouse?

PIR signal with PySDL2I rewrote the analysis-display app to use pysdl2. ¬†The mouseover code wrote a set of pulse lengths to standard output. ¬†Eyeballing this showed that the pulses were all (approximately) a multiple of 400¬Ķs. Having discovered that the pulses were all a multiple of 400¬Ķs long, wrote a discriminator function that would tell me if a pulse looked like a multiple of¬†400¬Ķs, and showed sets of 5 or more pulses that the discriminator said had signal. ¬†The mouseover code was rewritten to display the pulses as "number of¬†400¬Ķs units high" and "number of¬†400¬Ķs units low".

I quickly saw the pattern: 4000¬Ķs (10 units) low, then 36 1200¬Ķs (3 unit) symbols, which were either low for¬†400¬Ķs and high for 800¬Ķs (I've guessed this is a "1"), or low for 800¬Ķs and high for¬†400¬Ķs (a 0?). ¬†In other words, signal is low for 400¬Ķs, either low or high for 400¬Ķs, then high for 400¬Ķs. ¬†I modified the visualisation program to decode these pulses, and this is what my sensors send:

Sensor 1: 011110111101001111010000101110110000
Sensor 2: 011110111100110111110000101110111101

This is not the end.  The sensors don't just send "I see you" events.  They can also send tamper-detect events, and either low battery events or general keepalive events.  Now that I've got a signal detection function that doesn't take masses of CPU time, I can put the receiver in a cupboard and run it for 24 hours to see what other signals are around.  To capture tamper-detect, I have to do this while everyone's out.  My two year old son does not like the sound of the alarm going off.

Some of you will read this and say "Why don't you try the RC-Switch library?"  Part way through, I thought "I'll try RC-Switch" but it doesn't decode the signals from my alarm's PIR sensors.  It does decode the signal from another cheap PIR sensor I bought off eBay, though.  I intend to roll my decode login into RC-Switch and submit a pull request soon.

{ Add a Comment }


I started teaching an eleven year old to program with an Arduino last night.  After an hour we had the light on the board flashing in different patterns.  Seeing the lights turn on in his head, and the raw excitement as we changed the program and watched the results of the changes was too amazing for words.

Also, I met the Mayor (again) and Chester Burrows, our local MP.  He's really friendly, and we had a good conversation.

{ Add a Comment }

The Twitface Diet

Hi. My name is Donald. And I spend too much time staring at my phone.

Bad habits are easy to form. Social media and its constant temptation of more vaguely interesting things to read is like Exterm-an-ant for presence, concentration, and actually getting things done.  Just like my favourite ant killer, sold at Farmlands,1 they draw you away from your path, providing you with something that smells yummy but is ultimately death.2

Back when I was a student writing up a thesis I realised that I spent too much time reading Slashdot.3 So I modified my web browser configuration, via the under-appreciated proxy autoconfiguration system, to not let me visit Slashdot at all. So when my code (or thesis) was compiling, I'd reflexively switch to my browser and type and ... it wouldn't work, and I'd remember that I was supposed to have finished writing up several months ago and my enrolment had lapsed but the university hadn't noticed that I still had an office and I should really get back to that thesis.

This seems trickier to do with mobile phones. I deleted the Facebook (good riddance!) and Twitter (moderate riddance!) apps about a year ago. And immediately shifted to just using them via the web browser instead. I didn't spend any less time at either site.  In fact, due to such wonderful misfeatures as Twitter's sending you back to the latest tweet when your page was reformatted due to turning the cellphone around, I probably spent more.

I'd love to ditch the smartphone entirely. Now that I work from home, I don't need to listen to music or read things on my phone while commuting. Ironically, the one killer app for me owning a smartphone over a cheap feature phone is the budgeting app we use, GoodBudget. It's like an "envelope system" Рyou allocate weekly expenditure to different categories Рexcept that you don't have to deal with cash. And it's only available for Android and iPhone.

So I'm stuck with keeping the smartphone, yet not using Facebook and Twitter.  I've demonstrated that I will jump small hurdles to keep using them.  So I'm trying a two-pronged approach.

Unfollow people I don't have a very good reason to follow

I follow a lot of people on Twitter. Some of them say interesting things occasionally. Some say interesting things often. Some are close friends. Some are colleagues or ex-colleagues. Some are local. Some are far away.

That's a lot of people. If my Twitter use has any purpose at all, it seems to be to collect potentially interesting people so I can spend lots of my time reading what they write or link to.

That purpose has to change, or I have to drop off Twitter entirely. So I will enact a new following policy: I will only follow you if

  • I know you OR
  • I'd like to know you and there's actually some chance of that happening OR
  • You're local (which is really a special case of the above)¬†OR
  • You're the Pope, John Darnielle or Brian Zahnd.

The Pope's pretty quiet on Twitter (clearly prefers quality over quantity). I absolutely must know if there's a new Mountain Goats album (or book) out. And I still mean to read A Farewell to Mars.

Remind myself to stop using the darn things

I'm not an idiot. Surely I should be able to remind myself that I don't want to spend much of my day staring at small rectangle. I have several half-finished books to read, after all.

If you see less of me online, this is why.  If you want a quick response I recommend calling me; if you don't mind, I hear email was quite popular before Facebook messages reared their ugly head.  Please don't be offended if I unfollow or unfriend you.  It's not that I don't like you.  It's just that I'm trying to opt out of social media as low grade habitual entertainment. I'll still buy you a coffee if you're in my neck of the woods, and you are welcome to hold me to this promise.

  1. The last time I went to Farmlands the lady asked if I had an account with them. I was wearing a straw hat...
  2. To presence et al
  3. A then-popular tech news site. I have a four digit UID. If that means nothing to you, either you are young or your geek creds are a little tarnished.

{ Add a Comment }

From the archives: SWANS and the WiPhone

[note to readers: the pictures of the WiPhone are from the archives but the text is new]

I'm a nerd.

I've been a nerd for a long time. I feel that the label "geek" has been taken up as a banner by a bunch of Johnny-come-latelies. No one ever called me a geek at high school, and I was by no means even remotely cool.

Some people asked if I could dig up from my archives pictures of the WiFi VoIP phone I built back in ... er, mid 2004.  This ran on the Interface club's wireless network at Victoria University.

SWANS. as it was known, was the first "student-usable" BYOD wireless network at any tertiary institution in Wellington.  It was built out of bits scrounged from the Computer Science systems people (thanks, Mark Davies!) and some fortuitous buys from TradeMe.  The access points were either old laptops or old PowerMacs, rescued from being used as monitor stands in the dungeons in the ground floor of the Cotton building.  I put Linux on them, found Prism2-based cards supported by HostAP, and plugged them in.  As no one would give us a VLAN, we used a tool called vtun to tunnel Ethernet frames over UDP/IP, over the University network.  We had coverage in the second floor of Cotton, where the computer science labs were, and in the Quad.

Through the Software Engineering Research Group (ELVIS), I knew Brenda Chawner who had an office overlooking the quad.  We eventually got ITS to give us another live network port there.  An old laptop with a broken screen from the computer science department sat on her windowsill, offering internet access to Interface club members.

The WiPhone itself was a bodge-job.  I used a Linksys WRT54G, all the rage among the hacky-stuff-with-wifi community at the time, to connect to SWANS, and to CafeNet downtown. I put a rather heavy 12V SLA battery in my backpack to power it.  Then I used a Sipura SPA-200 VoIP adapter to plug in a cheap Warehouse headset phone.

The Spiura needed 5V, so Chris Andreae lent me a 5V regulator which I used to provide the right voltage. Back then, no one had stacks of spare switch-mode DC-DC converters in their junk drawers, so we used a linear regulator which turned the excess energy into heat.  The photos below, taken downtown when I was using Citylink's relatively new CafeNet WiFi service, show the regulator hanging out of the back of my backpack.  This was because it was getting so hot in the bag I was worried that either the bag would melt or catch fire.



The irony in all of this is that I didn't make many phone calls in those days and really had to scratch around to find some people to call. There's not much conversation in "Hi, I just wanted to call you to try out this new mobile phone I made."

{ Add a Comment }