Aside

A marriage of priority and purpose

Now that I’m back on the blogoblong (still my word, a decade later!) I flicked back and did a little bit of cleanup of the blog history.

I made all my ‘food diary’ posts private (self-shaming doesn’t work if you never read it), and passworded my occasional translations of Mew Azama’s old diary (“Mew”), to try take them out of the default view, and am working to rationalise the tags and categories, so am possibly breaking five-year-old permalinks, if anyone felt an entire subsection of my blog was interesting to follow.

Sorry, if you exist.

I also moved from tags to categories, because the latter reflected my tendency to over-subdivide. It was four or five levels deep, many leaf nodes with only one entry…

I also realised that in the 5.5 years between my last blog post in late 2011 and now, various changes happened in my life.

The main priority to mention (and the trigger for writing this ‘aside’ at all, beyond wanting to try out the ‘aside’ option) is that I married Trang, the “indescribably cute English teacher” I mentioned once. Still working on a description, but a photo may suffice.

IMG_0170.JPG

See how out-of-focus she is? That’s why she’s indescribable.

Which was actually my purpose on moving to Viet Nam in the first place — Trang specifically, not marriage in general.

MyZone, MyJob and MyHeart

As a small step back onto the exercise bandwagon, I ordered a MyZone heart rate-monitoring belt and associated watch. (They sent me a $70-off link if anyone wants to buy one. I don’t believe it kicks back to me; I hope it kicks-back to my gym).

Like the MeasureUp DEXA scan we take at the beginning and end of every F45 eight-week challenge, the idea is that “you get what you measure”. MeasureUp have that written on the side of their van. MyZone go with the shorter and more pithy “Effort rewarded.”

The same idea shows up a lot, it’s considered a “business truism” according to brief research using Google. Certainly when we started looking at Scrum and Agile/Lean at work, this came up a lot.

I mean “You get what you measure”, not “Effort rewarded”. The latter is a Dilbert comic:

 - Dilbert by Scott Adams

I tend to pull this one out when we’re talking about communication, not salary reviews.

In Agile, it was a warning to be careful not to measure the wrong thing (e.g., effort undertaken), because we would end up optimising for that thing rather than pursuing our real goal (i.e., value delivered).

So unless this “truism” is in fact false, there must be an actual cognitive basis for it. I was unable to find anything relevant on this handy Cognitive Bias Cheat Sheet, but an observation I saw somewhere else is that this works because human brains are very good at releasing dopamine when we achieve something or make progress towards it, and putting numbers on a thing makes it possible to achieve.

It’s much easier to see progress towards “Lose 10kg of body fat” than it is towards “Be healthier”. I would have achieved the latter half-way to the 10kg, but you can’t observe that the same way.

F45 Training (the gym franchise I attend) runs a regular eight-week challenge as I mentioned above. They have a large focus on measuring your changes at the beginning, the middle and the end. It’s from this that I have done the DEXA scans, and also been encouraged to purchase the MyZone equipment. Because these things are pricey, I’ve hopefully also engaged the Sunk cost fallacy, which should help me stick with the program, or even return after taking a period off, whether due to travel or sheer laziness.

I’m not sure if attempting to trigger the Sunk cost fallacy in myself is considered Precommitment or not. I’m also not sure if it works when you do it deliberately…

The “eight-week” part is quite interesting. I’m not sure where it comes from, but a lot of fitness plans, fitness bootstraps, and general “Get off the couch” programs will be eight weeks long. My theory is that someone’s observed that it takes that long for a habit to build, and that building a habit of fitness is good for you. My other, more cynical, theory is that someone’s observed that eight weeks is about as far as motivation based on “fear of my own mortality” will get you through an exercise program, before you drop off naturally, and that by limiting the program to eight weeks, it will be considered a success, with subsequent drop-off being attributed to one’s own laziness.

c7NJRa2.gif

Why not both?

The F45 challenge is clever because it’s not a once-off thing, but you repeat it with four week breaks (longer over the solar New Year). Again, that’s either “give the body a rest” or “give time for regret to sublimate into motivation”, but I couldn’t say which. They encourage you to keep attending between challenges. And you get measured at both ends of the break, so you can see how far you’ve fallen.

So whichever mechanism they’re tapping in to, it should work.

Sadly, a combination of work travel, eating habit-breaking issues, and general laziness on my part meant that after a good result on the first challenge, my second challenge round was a write-off, and the third didn’t start so well.

Hence my decision to self-motivate by sinking more money into the program, beyond the already-expensive membership.

I spent the afternoon wearing my new MyZone band and looking at my new, ugly, watch to see my heart rate. I had confidently predicted a resting heart rate of 50-57 beats per minute, based on being measured in Viet Nam as having a slow heart rate, and taking my own pulse on occasion. I was hence shocked to see myself running at around 79bpm.

The best time to measure resting heart rate is first thing in the morning. So I’m going to take the belt home, and measure when I wake up. Hopefully I’ll get a more accurate, lower result.

Assuming that’s what will happen, why would my heartrate be so high at 1pm?

I’m not sure, but a few possible causes spring to mind:

  • At work, my zone is a standing desk, so I’m standing up all day, and hence more active than resting, which was the point of getting the desk.
  • I’m still stressed about my job, particularly wanting to get things done but have trouble making time, or working out what I can actually achieve in a day to get my dopamine hit.
  • My diet is still pretty poor, and while today was the day I got back into protein-heavy meals (protein shakes on work-provided cereal, wheat protein-based fake duck), there’s still one vice I haven’t shaken, which is possibly directly affecting my heart: Coffee, or the nearest substitute caffeine source I can stand…

Monster Zero Ultra

Really, it could be any of those…

To be brutally honest, I also ate a block of chocolate while writing this post, so it’s pretty clear my diet is not yet under control in any meaningful sense. Although at least I have not regained my daily chocolate habit, nor any real Diet Coke habit, except when travelling.

It’s really small steps that matter in self-improvement.

Clothes optional: Living from a suitcase

It’s amazing what you think you need when trying to fit under a luggage allowance. I have an enormous suitcase which I initially half-filled with clothes and half-filled with electronics… It weighed 30kg. Oops! I unpacked it all and went back to the beginning.

I was born. Or so I’m told, I don’t remember back that far. I do remember my last holiday to Vietnam though. You, dear reader (or spam-bot scanning for keywords) may also remember the beginning of the trip, until I was too busy, too poorly Internet-connected, too ill, or having too much fun to blog. That’s the brief summary of Saigon, Hoi An, Hue and Hanoi respectively.

So, Vietnam adventure completed and summarised, I returned home well and truly convinced that my newer sojourn plans were quite workable.

I informed my boss (the conversation actually started with my bosses’s wife at her business’s Christmas party) that I would have to be leaving my job as I wished to move to Vietnam. His response was “Oh, I’ve thought about opening a studio in Vietnam. You should do that for me.”

I’ll skip over the intervening months, to leave filler for later posts. A couple of spoilers though:

  • I am not at this point opening a studio in Vietnam, but instead I will be working remotely for BigWorld.
  • I’m enrolled at the ANU taking a Vietnamese language major, and continuing it in Vietnam.
  • I have a visa and probably somewhere to live.
  • I’ve been watching Lauren Faust’s My Little Pony series,and published my first Android App and a couple of PMVs on Youtube.
  • I own a Kobo Touch and much fewer novels than I used to, but just as many video games.

Having done all that, I repacked my suitcase taking all my relevant electronics and doodads, none of my books — except my tiny Vietnamese/English dictionary — and whatever clothing I could then fit. This came out to 23kg and four complete outfits, on the assumption that I’ll either find a washing service quickly, or find a sufficiently large clothing store quickly. That’s a store that sells sufficiently large clothing, not a sufficiently large store that sells clothing.

Hopefully this is sufficient preparation for an indefinite stay in Vietnam. Because it’s too late. Like Caeser, I’ve tossed my rubix cube; arrived in Melbourne with only the clothes on my back and a big suitcase, and will be leaving with the same — except 3kg lighter due to different baggage allowances.

Melbourne’s decided to help me prepare in its own way, by taking my three days here as pleasant (a half-day), unexpectedly hot (spent indoors watching TV and browsing the web), and torrential rain (for my walk to the train station…). I did pack an umbrella, so I’m taking this as a validation, not a warning.

I’m not panicing, and I’m carrying a towel. Today Melbourne, tomorrow Hanoi. And the day after that… probably Hanoi again.

In order to put sprites on screen, you must first compile the universe

I’ve just spent my weekend attempting to get pyglet or pygame going on Python for Windows AMD64 (2.6b2).

The process uncovered bugs in pygame and python, including one which is fixed in 2.6b3, although there’s no Windows builds of that version yet. Also, you can’t currently rebuild Python under mingw. Still some patches to go: pygame tries to build a safe version number for bdist_msi however it gets it wrong in release, I suspect the rules have shifted slightly in 2.6…; and whatever else I’ve modified in my build trees that needs to be sent upstream.

Mingw64 was able to build stuff now (thanks to @NightStrike on the #mingw-w64 IRC channel) but Python’s pretty insistent that I build against msvcr90 and mingw64 doesn’t have an import library for that yet (mingw32 does, but mingw64’s runtime collection is only up to 3.11 or so). @NightStrike informed me that pexports has been ported to amd64 on the mailing list, but I haven’t dug it up yet, but that should allow me to link to msvcr90 from mingw.

Either way, I now have a modified win32/Makefile.gcc for zlib which doesn’t use dllwrap (deprecated since 2002) and works with mingw64 nicely.

After mingw64 worked but I hit the requirement of msvcr90, I grabbed the Windows SDK and the DirectX SDK. Once you know to run dx_setenv.cmd in the Windows SDK cmd window and to use vcbuild /useenv (otherwise it’ll ignore the results of dx_setenv.cmd) things seem to just work. You need to set DISTUTILS_USE_SDK in your environment for Python to trust your compiler version choice, too.

Converting SDL‘s Visual C projects and solutions was easy. Change platform from win32 to x64, change any /MACHINE: entries from I386 to AMD64. I should submit that change to SDL, once I convert and test the examples as well. SDL also builds with mingw64, but I suspect it doesn’t produce a DLL at the end right now.

The Windows SDK 6.1 includes msvcr90 and the Visual Studio 2008 beta 2 toolchain, so that works for Python extensions.

However, after building everything fine, initialising pygame fails:

Microsoft Windows [Version 5.2.3790]
(C) Copyright 1985-2003 Microsoft Corp.

C:\Documents and Settings\root>python
Python 2.6b2 (r26b2:65106, Jul 18 2008, 18:24:10) [MSC v.1500 64 bit (AMD64)] on win32
Type "help", "copyright", "credits" or "license" for more information.
>>> import pygame
>>> pygame.init()
(3, 1)
>>> pygame.get_error()
'DirectInputDevice::SetDataFormat: Invalid parameters'
>>>

The Internet knows nothing about that particular error in reference to pygame. Since I had to install the DirectX SDK to get this far anyway, I’ll see what that produces in terms of debugging output, when I get back to it.

As for pyglet, which started me on this whole mess? Upstream says it’s not supported under x64, don’t bother submitting bugs. Before I found that, I tried to work through their hello_world.py but pyglet.window.Window() came back from OpenGL with “invalid operation” calling glGetString(GL_VENDOR). The whole exercise with pygame came about from me trying to find a way to test if PyOpenGL was having similar problems as both PyOpenGL and pyglet use opengl via ctypes.

OpenGL on windows is hard. There’s a huge amount of setup needed to get a context to be able to call openGL commands, and PyOpenGL doesn’t provide that code. PyOpenGL’s sample code relies on pygame to do this… -_-

And to think this all started because I wanted to prototype a game idea I had rather than just telling my work colleagues about it and hoping for the best. Oh well, maybe next weekend.

It does warm my heart to know that despite being a professional video games programmer I can still come home and spend a weekend doodling around programming.

I started watching Cheap Love, only two episodes in but I’m pleased to see that already the main love pairing have already met and realised they’ve feelings for each other. Most J-dramas I watch make us wait until half way through the season to let the characters know what’s been painfully obvious to the audience since the opening titles rolled.

And in further good news, I’m down below 136kg. ^_^

My task for this week is to turn my barcode scans of my book collection into something I can access while I’m in Melbourne next weekend so I don’t have to call home from Melbourne book stores again to get Mick to look at my shelves for me. I’ve also given my mother the book-barcode-scanning bug, but I imagine she’ll buy some software off the Internet to manage the collection. Recommendations appreciated. ^_^ (Obviously, if you want to recommend such software for me, go ahead as well. But my requirements are somewhat pathological)

Oh, and I’m in Melbourne next weekend for Medleys. Taking younger sister (they’re both younger, I’m talking about younger younger. Elder younger will be on stage) and hopefully catching up with Phil.

Been eating “Instant Stew” this week. Finally refined recipe down to:

  • ~1.2kg of mixed heart-smart meat, diced
  • 1kg bag of Home Brand mixed frozen vegetables
  • 1 tin (400g) diced tomatoes
  • Random spices as I find them in the cupboard

Combine all ingredients in crock pot. Put on before work, arrive home after work. Makes 6 lunch servings or 3 dinner servings, ~350 calories per lunch serving. I blame recent weight-loss success on this stuff.

Turns out that making stew, unlike Python games under Windows x64, doesn’t involve first creating the universe.

Tension in Debian changelogs

Holger Levsen wonders what tense people write their changelogs in. Andrew Pollock feels that his tendancy is past-tense.

Looking back over some of mine, FreeRADIUS from a long time ago, and openjpeg more recently, it appears that my preference is to actually write them as untensed fragments. I think I’m answering the question “What does this change do?” from the perspective of the change. This would make sense, mirroring somewhat the comments I put in dpatches (and the overly verbose names that have been known to occur) which are usually the patch talking about itself in the plural. Unless that’s the patch _and_ I talking about ourselves in the plural?

First rule of karma: You don't talk about karma

OK, so I made it to LCA08 in Melbourne, eventually.

However, I managed to have the following happen on the way:

  • Got the time of my flight to Melbourne wrong, arrived at 5:30pm for a flight that left at 5pm.
  • Caught the wrong tram from Melbourne CBD to uni accomodation, had to walk from Royal Melbourne Hospital back to the university. This was precipitated by me misreading the tram t
    imetable thingy.
  • Failed to wave at a traim outside the uni, meaning it sailed right on past me.
  • Locked myself out of my room, the third time I left it. (They’ve got those dumb swipe-card locks which are always locked except when you’ve just swiped from the outside, but are open from the inside.)
  • Asked on #linux.conf.au about the URL for Planet LCA 2008 while it was in the topic. (Unlike on #debian, not only was I not mocked for this, no one noticed before I did, a while later)

On the other hand, I caught up with Brad, Evelyn, Bek, Jason, Phil, Naoko, Geoff and Ange, all in the one day. That was fun, we had dinner, I stuck my sore feet in the ocean and felt better, and I manged to catch the right trams from the university _to_ the city. Well, lunch with Naoko, the rest with the others. (Actually, that’s in reverse chronological order)

The actual conference first day was interesting. I was at the Debian Mini-conf all day, seeing a neat thing about using git for managing packges sensibly, which is something I was trying to figure out when I was packaging Second Life last year, as well as some cool stuff coming into Debian over the next year or so.

After the Debian Mini-conf all went over to the keysigning (I didn’t go again this year, I wasn’t organised in time) I went to see a presentation about Ingex which is something the BBC have developed to try and take Digital Betamax out of the video production process (since Digital Betamax only works in real-time, as I understand it) with some success so far, and it’s pretty interesting.

Speaking of not being organised in time, I only thought today to look at the Tutorials, and both Wednesday’s tutorial about hooking up hardware to Second Life and Thursday’s tutorial about hacking on lguest require preperation. I was able to grab Jon Oxer at the Debian Mini-conf and get my name put on the one remaining spare development kit, and so now I’m down in the Junior Common Room of Trinity College (no wireless in the rooms yet) updating my blog instead of trying to get lguest running under qemu. I’ll have to go dig up Rusty’s and Robert Love’s instructions from LCA05 preparing for their kernel hacking tutorial that year. Wow. Archiving the old LCA websites kicks ass!

Edit: I actually was dumb on #linux.conf.au, not #debian. As an aside, I managed to lock myself out of my room again later that week.