Hacker's Diary
A rough account of what I did with Emacs recently.
- October 31
- A few days back I noticed I could no longer read XKCD from
home. It seemed like maybe a transient problem, but this morning
it was still broken so I investigated. It would appear to be on
account of being unable to reach imgs.xkcd.com, which in turn
appears to be because I can't look it up, which is in turn because
the results returned by the DNS server for this address are so
damned big it tries to switch to TCP mode and, whoops, it appears
I don't have the firewall open for TCP mode transfers between my
local server and everything else. My bad, or maybe Apple's,
because I don't specifically recall doing anything to
enable DNS access in the first place. Anyway, a quick poke around
in the firewall and DNS config panel doesn't reveal anything that
might immediately fix the problem, so I'm going to have to go
digging in config and log files. Boo.
Of course, as soon as I'd said that, something I tweaked evidently
took effect, and presto, working website.
According to this diary, I've never before watched Brassed Off, or at least not since
time began. I have, but
anyway. Fun movie, a bit stark in places (well, it's about
unemployment, black lung, suicide, financial issues, a sad clown,
a lost love...), and featuring excellent music throughout (if the
performance of the William Tell Overture at the end doesn't move
you in some way regardless of the movie's plot, you are officially
dead), this is a definite one to watch.
Trying to get MRTG running as a launchd job, and running
into issues. The interaction of KeepAlive with everything
else seems poorly documented; ideally I'd like to say something
like, "run this every five minutes as long as there's an
available network connection", but I get either "run
this every five minutes" or "run this repeatedly, as
quickly as possible, as long as there's a network
connection". Oddly, it appears I even have to explicitly set
KeepAlive to false. There are hacks around this, of course, such as
playing with the respawn time, but it's mildly bothersome as it
stands. Anyway, here's what I wound up with:
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE plist PUBLIC -//Apple Computer//DTD PLIST 1.0//EN http://www.apple.com/DTDs/PropertyList-1.0.dtd >
<plist version="1.0">
<dict>
<key>Label</key>
<string>oss.oetiker.ch.mrtg</string>
<key>UserName</key>
<string>nobody</string>
<key>GroupName</key>
<string>nobody</string>
<key>ProgramArguments</key>
<array>
<string>/sw/bin/mrtg</string>
<string>/etc/mrtg/mrtg.cfg</string>
</array>
<key>KeepAlive</key>
<false/>
<key>StartInterval</key>
<integer>300</integer>
<key>StandardOutPath</key>
<string>/var/log/mrtg/stdout.log</string>
<key>StandardErrorPath</key>
<string>/var/log/mrtg/stderr.log</string>
</dict>
</plist>
U2: From The Sky Down isn't
as good as I'd hoped, in as much as it's a lot of Bono talking and
it seems to lack a certain depth, but the sequence where they
reveal the genesis of One, from a bridge shoved into the
bones of Mysterious Ways to a full song in about ten
minutes of stand-up noodling at their instruments, really is one
of those hairs-on-the-back-of-your-neck-standing-up moments. Well,
maybe it is if you're a U2 fan, at least.
- October 30
- The usual confusion after a clock change where the iGadgets have
quietly updated but the clock radio is still on "old"
time.
As an approach, I'm sufficiently impressed with Test-Driven
Development to want to use it, but I still find my instinct is to
code first, test later. I'm currently (still) retrofitting unit
tests into my initial attempts at reworking the RSS toy into
Java, and some of the tests are revealing bad program flows that
really need fixing, and I'm torn between "do it right"
(set up a test that matches the existing behaviour before changing
things) and "not so right" (fix the weirdness
and update the tests as I go). Since this is a piddling
little hack project, it doesn't much matter either way, but I
guess there's the bigger issue of establishing a principle (that I
can, of course, discard when I choose).
Also, those familiar with the territory who've read about my
wrestling with use of a database for testing will probably wonder
why it is I'm not using a dependency injection framework to handle
the problem; the reasons are much the same as my reason for
starting out with raw SQL rather than going straight to Hibernate
- I want to understand what's happening at a lower level to some
extent before I gloss over it, and I'm converting an existing
project which makes it easier (in some sense) to do the new code
at the same level of building block as the existing stuff before
trying to improve on it.
Neglected to mention that my "clever" solution to Time
Machine's incessant spinning of fans didn't work, so my next plan
is a launchd-operated script that notices changes in the
networking configuration, and if I'm on a wired connection spins
up a backup. I might also have it nag me from time to time if I go
too long without a backup.
Hmm, and then I noticed that the local backup folder had a recent
datestamp. Looks like it does work, but I still want to
add the bit that switches on the full Time Machine if I plug the
laptop into the router downstairs.
- October 29
- Robots (last watched January 28th, 2006) is still
laugh-out-loud funny in spots.
- October 27
- The Machinist was a good enough
movie, but afterwards I kept wondering about bits of it. Like why
Miller seems remarkably laid-back about his accident, instead of
being a basket case in need of therapy. But anyway.
- October 25
- Seen in RSS feed (presented here as a mysql query):
BBC News - World | 2011-10-26 13:00:02 | Winehouse 'was four times limit' |
The Irish Times - | 2011-10-26 13:00:24 | Winehouse 'was five times limit' |
The Irish Times - | 2011-10-26 14:51:31 | Winehouse 'three times over limit' |
The Irish Times - | 2011-10-26 15:00:26 | Winehouse 'five times over limit' |
It's like an auction or something. Can I get six? Will anyone go
for six? No? Sold to the Irish Times at five times over the
limit.
Not long back, I signed up to the RSS feed of a well-known one-man
website for Apple-related news, thinking, from the brief passes
I'd made on the site, that the tone was even, the view unbiased
(or at least somewhat so, anyway) and the discourse reasonable.
I was wrong.
The thing you'll notice about the RSS excerpt above, although
maybe it isn't obvious, is that I track changes to stories over
time; to be specific I poll feeds at half-hour intervals (unless
they say otherwise, and I do so using ETags and If-Modified-Since
to avoid being a nuisance) and record updates to existing stories
as entirely new stories. What this shows is that a few authors (or
publishers, maybe) have a tendency to fiddle with the entries a
bit for a short time after a story has been posted; for example,
BBC has a tendency to play around with their headlines often in
ways that look like responses to editorial or other feedback
(including one instance where the initial headline was either a
terrible pun or in really bad taste, and it was very quickly
replaced with something more appropriate).
To return to my story, the aforementioned Apple news site turns
out to be (a) rabidly against everything that isn't Apple; (b)
supercilious, arrogant, mocking in tone to these things that are
not Apple; (c) constantly tweaking the short needling stories
about how laughable these non-Apple things are. There has been,
for example, some discussion on the interwebs about the new Google
Android release, and in particular a font therein named
Roboto; the site I will shortly be removing from my RSS
feed had a dozen updates on this "story", and while
there was some of the tweaking mentioned above, not all of the
discussion was confined to a single post. What's really making me
turn this off, though, is that somewhere in the middle of all this
concentrated hatred for a mere font, he takes the time to laugh -
ho ho ho - at the idea that he's biased in Apple's
favour. Of course, I'm just a shill, he laughs, with the
same tone of false modesty you get from people who say, really
it was nothing when they really mean phew, I thought
you'd never notice how awesome I am.
So anyway. Longwinded way of talking about what I read, and
without mentioning names (although I'm sure if you're familiar
with the subject matter you'll know who I'm talking
about).
- October 24
- I vaguely recall a bunch of negative press and reviews for Pirates
of the Caribbean: On Stranger Tides, but I'm pretty sure it's
the best of the PoC movies since the first one as they're not
quite so obviously trying to build another franchise out of it (in
as much as a good deal of the second movie was a setup for the
third). There's not a lot to say about it content-wise: pirates,
zombies, mermaids, swashbuckling, the Fountain of Youth, and
Johnny Depp staggering around in that drunk-yet-somehow-not-drunk
way of his, with supporting swaggers, punches and drinking from a
bare handful of previous cast regulars, and Ian McShane as Bill
Nighy, Penelope Cruz as Keira Knightly, and some guy I don't
recognise as - sort of - Orlando Bloom. This is a lot of fun, and
worth a look.
- October 23
- Selene hadn't seen Definitely, Maybe, while I
had (last watched: 30th
November, 2008), and it was showing on Film Four, so we watched
that. I think my opinion of it is about the same, although knowing
that the derail at 90 minutes is on its way lessens the impact
somewhat and means it's definitely more in the formula I was
expecting. Maybe. (You see what I did there?)
Hadn't noticed before, but the Address Book app doesn't allow you
to consolidate entries across accounts - so for example I have two
entries for The Brother,
one being the iPhone/Mail/iCloud/etc. listing and one being the
Yahoo! listing.
Ah, turned out that there is a switch I didn't notice to swap
between photos and faces when trying to match faces, at least when
you're doing the "confirm these photos are this person"
part of the process.
- October 22
- I upgraded iPhoto mainly to get the face tagging, and while it's
a nifty enough thing the whole "I've scanned your library and
there are 5,297 unknown faces" interface would be much nicer
with the ability to click on a blurry face and see the photo from
which it comes, or at least some metadata - a whole bunch of my
photos have filenames that list all the people in the photo.
I'm also slightly appalled at the number of photos I have of
people whose names I should know and don't (mainly friends of
friends that I'm in touch with sufficiently frequently to
recognise, but insufficiently to wedge their names into my leaky
brain).
After much fiddling about I got a database connection successfully
injected into my JUnit tests. This seems to be one of those tasks
that should be a no-brainer, and/or should have a clear
step-by-step guide, but I wound up pulling bits and pieces of a
half-dozen Google searches before getting it sorted out. The
method I wound up with creates an InitialContext, then
builds a datasource using Properties and
BasicDataSourceFactory, which it then binds to the
InitialContext. For now, it works, so I'm not too
concerned with the ugliness.
- October 21
- Hissy fit with TimeMachine: I turned off the over-the-network
version and turned on the local version. Not sure if this will
actually work, however. If it does, what I'll do is tie it to
something that checks the state of the network connection, and if
I'm on wireless it won't do network backups, since that's when it
seems to get all in a tizzy with indexing.
- October 20
- Even with the much-vaunted OS-level integration of Twitter in
iOS5, I'm still finding it more of a nuisance than anything on
account of there being no notion of server-side bookmarking to
keep track of what you have and haven't seen. So I glance at a
tweet or two on my phone, and then have to page through the same
ones on the laptop.
- October 16
- Got my Java project back on the rails. Managed to replace some
hacky testing with some cleaner stuff with Mockito, which is
nice. Slightly less nice was figuring out how to get a test to use
a database, since I'm still doing cargo-cult programming when it
comes to things like connection pools. I have something in the
test that is deeply ugly but actually works, and I'll need to
replace it with something a bit more graceful at some point when
I've sorted out things that currently don't
work.
The Sixth Sense is another
movie that I hadn't seen when it was doing the rounds, and never
got back to. I found out the twist some time ago (after initially
thinking that the twist was the line that featured in the trailer,
"I see dead people") and tried to watch the movie
without taking note of what I knew was coming, but really, it
wasn't possible. Basically, the movie has nothing going for it if
you know how it works out in the end, i.e. it's all about the
destination rather than the journey. Not helping is the fact that,
particularly as you close in on the big reveal, the director /
screenwriter are basically walking behind you with a megaphone
yelling "DUN DUN DUN THE SECRET IS...", which is a bit
distracting to say the least. Watch it once, I guess.
- October 15
- iTunes migrated to the Mini with minimum fuss. I think iPhoto
might not be out of place there either, if it was more
"cloudy", but since it's not I'm keeping it on the
laptop for now.
True Grit: a good deal more
entertaining than the last couple of Coen Brothers movies I
watched. It's a fairly decent by-the-book western, aside from the
fact that one of the protagonists is a lippy teenage girl; Jeff
Bridges is a good grizzled US Marshall, although it's hard to
understand what he's saying at times. Gunfights, hanging,
horse-riding, whiskey, robbery (offscreen, but mentioned),
campfires, snakes, Indians... it's all there. I'd probably watch
it again if it was on the box, but I'm not sure I'd say it's a
must-see.
- October 14
- Everything is now iClouded. I need to see if I can move the
iTunes setup to the Mini so that I'm not tethered to the laptop,
but on the whole it's working nicely. One odd thing I've noted:
despite having location services, Reminders on the iPad don't have
the same location-based functions as the iPhone version. Or maybe
I'm missing the right knob to switch them on.
I Am Number Four suffers from
the same complaint as Salt - nothing wrong with it for
its genre, per se, it's just mundane within that
genre.
- October 13
- Moving to iCloud... upgrading the MacBook and the Mini were a
little fraught as I was competing with everyone else to download
the 10.7.2 update, plus the updates to the update, plus... still,
it went smooth enough, aside from the bit where my router
spontaneously rebooted, killing all the downloads. The iPhone
steadfastly refused to update; I gave up after three attempts. The
Apple TV worked on the third attempt. The iPad2 displayed a
worrying set of basic setup questions that made it look like it
hadn't bothered restoring my backup, but that turned out not to be
the case. Selene's iPad had a similar oopsy; some fiddling around
with iCloud cleared that up. I'm retrying the iPhone for the
fourth time now, and this time it looks slightly more
convincing.
Also, very funny, guys:Oct 13 19:58:21 twong AppleMobileDeviceHelper[356]: AMDeviceConnect (thread 0xaccce2c0): This is not the droid you're looking for (is actually com.apple.mobile.restored). Move along, move along.
- October 10
- Eclipse code rot is becoming seriously annoying at this point. I
have a working project, which I save. I leave it for a week. I
reopen Eclipse, and suddenly I am faced with bizarre errors, such
as the inability to find my database driver, or a Java compiler
environment mismatch which had previously been resolved, or other
non-code-related issue. How do people get work done with this,
exactly?
- October 7
- American Graffiti is one of
those movies I saw a long, long time ago and couldn't remember
much about. On watching it tonight, perhaps that's because it
simply isn't worth remembering for anything other than the
soundtrack; it's possible that the sound mix was screwed up by the
DVD transfer and the original was clearer and had less dynamic
range, but that doesn't fix the fact that it's a largely storyless
collection of dated set pieces that belong to a cultural mythology
that is alien to me. Maybe if you grew up in America the accolades
this film received make sense, or maybe they make sense in the
time it was made, but I can't see this as something I'd
recommend.
- October 5
- Elizabeth: The Golden
Age was better the second time around (last watched: 21st March, 2008). That is
all.
- October 3
- I saw the trailer for Bright Star and thought,
"Cool, a biopic about John Keats". Turns out that (a)
it's a biopic of a slice of Keats' life just before he died and
(b) it's not a great movie. Hard to identify what, exactly, is
wrong with it; I felt it lacked a cohesive narrative, that it
seemed to randomly jump from scene to scene with no connection and
sometimes with abrupt cuts (one such that sticks in my mind is a
kitchen scene which ends as someone calls, "come here, I need
your help" or similar, and it seems like there should have
been at least a few seconds more). I wouldn't particularly
recommend this.
- October 2
- Backup vs. Indexing problems continue, which means the laptop is
spending an awful lot of time running its fans. I may once again
have to simply trash the backups and start over, although I may
also wait for iCloud to arrive and move the backups there.
In other nerd news, I've been hunting down error messages in the
system log and trying to figure out where they're coming from. So
far I've managed to get rid of all the stuff concerning my
long-defunct Palm Pilot, and also a stray mount point that
referenced the Cube. Still bothered by: constant usbmuxd messages,
the presence of a utun0 interface, and something about
mobilemesync being unhappy. Oh, and the ever-present backup
messages concerning index failures.
- October 1
- Add Doubt to the list of Meryl Streep
movies I've seen that I don't like. Her character was
so... despicable throughout that, for me, it completely
obscured any moral issues that might have been under
consideration.
previous month | current month | next month