I don’t know what chrisabarker is talking about: it was a little blustery, but wonderful weather for a quick job up Sugar Loaf Hill! I went up on the morning, as I woke up earlier than
the folks I was training during an away weekend for a voluntary organisation I’m part of, and loved finding this wonderful cache (and in
such a beautiful area!). TFTC.
This is the first in a series of four blog posts which ought to have been published during January 2013,
but ran late because I didn’t want to publish any of them before the first one.
2012 was one of the hardest years of my life.
My retweet of JTA’s sentiments, shortly after midnight on New Year’s Eve, pretty much covers my feeling of the year, too.
It was a year of unceasing disasters and difficulties: every time some tragedy had befallen me, my friends, or family, some additional calamity was lined-up to follow in its wake. In an
environment like this, even the not-quite-so-sad things – like the death of Puddles, our family dog, in May – were magnified, and the ongoing challenges of the year – like the
neverending difficulties with my dad’s estate – became overwhelming.
My sister Becky with Puddles, both younger and more-foolish than they eventually became. I don’t know why Puddles is wearing a t-shirt.
The sudden and unexpected death of my dad while training for his Arctic trek, was clearly the event which had the most-significant impact on me.
I’ve written about the experience at length, both here on my
blog and elsewhere (for example, I made a self-post to Reddit on the day after the accident, urging readers to “call somebody you love today”).
My dad, climbing Aladdin’s Mirror in the Cairngorms.
In the week of his death, my sister Becky was suffering from an awful toothache which was stopping her from eating,
sleeping, or generally functioning at all (I tried to help her out by offering some oil of cloves (which functions as a dental contact anesthetic), but she must have misunderstood my instruction about applying it to the tooth
without swallowing it, because she spent most of that evening throwing up (seriously: don’t ever swallow clove oil).
My dad’s clothes for his funeral. My sisters and I decided that he ought to be dressed as he would be for a one of his summer hikes, right down to the combination of sandals and socks
(the funeral director needed reassurance that yes, he really did routinely wear both at the same time).
Little did she know, worse was yet to come: when she finally went to the dentist, he botched her operation,
leaving her with a jaw infection. The infection spread, causing septicæmia of her face and neck and requiring that she was hospitalised. On the day of our dad’s funeral, she needed to insist that the “stop gap” surgery that she was given was done under local, rather than general,
anasthetic, so that she could make it – albeit in a wheelchair and unable to talk – to the funeral.
Five weeks later, my dad finally reached the North Pole,
his ashes carried by another member of his team. At about the same time, Ruth‘s grandmother passed away, swamping the
already-emotional Earthlings with yet another sad period. That same month,
my friend S****** suffered a serious injury, a traumatic and distressing experience in the middle of a long and difficult period of her life, and an event which caused significant
ripples in the lives of her circle of friends.
The notice of Ruth’s grandmother’s death, as it appeared in the online version of her local newspaper.
Shortly afterwards, Paul moved out from Earth, in a situation that was anticipated (we’d said when we first moved in
together that it would be only for a couple of years, while we all found our feet in Oxford and decided on what we’d be doing next, as far as our living situations were concerned), but
still felt occasionally hostile: when Paul left town six months later, his last blog post stated that Oxford could “get lost”, and that he’d “hated hated 90% of the time” he’d lived here. Despite
reassurances to the contrary, it was sometimes hard – especially in such a difficult year – to think that this message wasn’t directed at Oxford so much as at his friends there.
As the summer came to an end, my workload on my various courses increased dramatically, stretching into my so-called “free time”: this, coupled with delays resulting from all of the
illness, injury, and death that had happened already, threw back the release date of Milestone: Jethrik, the latest update to Three Rings. Coupled with the stress of the 10th Birthday Party Conference – which thankfully JTA handled most of – even the rare periods during which nobody was ill or dying were filled with sleepless nights and anxiety. And of course as soon
as all of the preparation was out of the way and the conference
was done, there were still plenty of long days ahead, catching up on
everything that had been temporarily put on the back burner.
My sister Sarah and I at the christening of a bus named after my dad. Click the picture for the full story.
When I was first appointed executor of my dad’s estate, I said to
myself that I could have the whole thing wrapped-up and resolved within six months… eight on the outside. But as things dragged on – it took almost six months until the investigation
was finished and the coroner’s report filed, so we could get a death
certificate, for example – they just got more and more bogged-down. Problems with my dad’s will made it harder than expected to get started (for example, I’m the
executor and a beneficiary of the will, yet nowhere on it am I directly mentioned by name, address, or relationship… which means that I’ve had to prove that I am the person
mentioned in the will every single time I present it, and that’s not always easy!), and further administrative hiccups have slowed down the process every step of the way.
On the first anniversary of my dad’s death, I cycled up a hill to watch the sunset with a bottle of Guinness and a Mars bar. And sent this Tweet.
You know what would have made the whole thing easier? A bacon sandwich. And black
pudding for breakfast. And a nice big bit of freshly-battered cod. And some roast chicken. I found that 2012 was a harder year than 2011 in which to be a vegetarian. I guess that a nice steak would
have taken the edge off: a little bit of a luxury, and some escapism. Instead, I probably drank a lot more than I ought to have. Perhaps we should encourage recovering alcoholic, when
things are tough, to hit the sausage instead of the bottle.
It’s been a while, old friend. A while since I used this delicious-looking photograph in my blog, I mean! This is the sixth time… can you find them all?
Becky’s health problems weren’t done for the year, after she started getting incredibly intense and painful headaches. At first, I was worried that she was lined-up for a similar diagnosis to mine, of the other year (luckily, I’ve been symptom-free for a year
and a quarter now, although medical science is at a loss to explain why), but as I heard more about her symptoms, I became convinced that this wasn’t the case. In any case, she found
herself back in the operating room, for the second serious bit of surgery of the year (the operation was a success, thankfully).
The “F” is for “Fuck me you’re going to put a scalpel WHERE?”
I had my own surgery, of course, when I had a vasectomy; something I’d been
planning for some time. That actually went quite well, at least as far as can be
ascertained at this point (part three of that series of posts will be coming soon), but it allows me to segue into the topic of reproduction…
Because while I’d been waiting to get snipped, Ruth and JTA had managed to conceive. We found this out right as we were running around sorting out the Three Rings Conference, and Ruth
took to calling the fœtus “Jethrik”, after the Three Rings milestone. I was even more delighted still when I heard that the expected birth date would be 24th July: Samaritans‘ Annual Awareness Day (“24/7”).
One of the many pregnancy tests Ruth took, “just to be sure” (in case the last few were false positives). Photo from Ruth’s blog.
As potential prospective parents, they did everything right. Ruth stuck strictly to a perfectly balanced diet for her stage of pregnancy; they told only a minimum of people, because –
as everybody knows – the first trimester’s the riskiest period. I remember when Ruth told her grandfather (who had become very unwell towards the end of 2012 and died early this year:
another sad family tragedy) about the pregnancy, that it was only after careful consideration – balancing how nice it would be for him to know that the next generation of his
family was on the way before his death – that she went ahead and did so. And as the end of the first trimester, and the end of the year, approached, I genuinely believed that the string
of bad luck that had been 2012 was over.
In Ruth’s blog post, she’s used kittens to make a sad story a little softer, and so I have too.
But it wasn’t to be. Just as soon as we were looking forward to New Year, and planning to not so much “see in 2013” as to “kick out 2012”, Ruth had a little bleeding. Swiftly followed
by abdominal cramps. She spent most of New Year’s Eve at the hospital, where they’d determined that she’d suffered a miscarriage, probably a few weeks earlier.
Ruth’s written about it. JTA’s written about it, too. And I’d recommend they read
their account rather than mine: they’ve both written more, and better, about the subject than I could. But I shan’t pretend that it wasn’t hard: in truth, it was heartbreaking. At the
times that I could persuade myself that my grief was “acceptable” (and that I shouldn’t be, say, looking after Ruth), I cried a lot. For me, “Jethrik” represented a happy ending to a
miserable year: some good news at last for the people I was closest to. Perhaps, then, I attached too much importance to it, but it seemed inconceivable to me – no pun intended – that
for all of the effort they’d put in, that things wouldn’t just go perfectly. For me, it was all connected: Ruth wasn’t pregnant by me, but I still found myself wishing that my dad could
have lived to have seen it, and when the pregnancy went wrong, it made me realise how much I’d been pinning on it.
I don’t have a positive pick-me-up line to put here. But it feels like I should.
A few days before the miscarriage became apparent, Ruth and her dad survey the back garden of the house he’s rebuilding.
And so there we were, at the tail of 2012: the year that began awfully, ended awfully, and was pretty awful in the middle. I can’t say there weren’t good bits, but they were somewhat
drowned out by all of the shit that happened. Fuck off, 2012.
Here’s to 2013.
Edit, 16th March 2013: By Becky’s request, removed an unflattering photo of her and some of the ickier details of her health problems this year.
Edit, 11th July 2016: At her request, my friend S******’s personal details have been obfuscated in this post so that they are no longer readily available to
search engines.
Edit, 26th September 2016: At her request, my friend S******’s photo was removed from this post, too.
You know how when your life is busy time seems to creep by so slowly… you look back and say “do you remember the time… oh, that was just last week!” Well that’s what my life’s been
like, of late.
Enjoying a beer at the launch of Milestone: Jethrik, the latest release of Three Rings.
There was Milestone: Jethrik and the Three Rings Conference, of course, which ate up a lot of my time but then paid off wonderfully –
the
conference was a wonderful success, and our announcements about formalising our non-profit nature and our
plans for the future were well-received by the delegates. A slightly lower-than-anticipated turnout (not least because of this winter ‘flu that’s going around) didn’t prevent
the delegates (who’d come from far and wide: Samaritans branches, Nightlines, and even a representative from a Community Library that uses the software) from saying wonderful things
about the event. We’re hoping for some great feedback to the satisfaction surveys we’ve just sent out, too.
The Three Rings Birthday Cake. It boggles my mind how they’ve managed to make the icing look so much like plastic, on the phone part.
Hot on the heels of those volunteering activities came my latest taped assessment for my counselling course at Aylesbury
College. Given the brief that I was “a volunteer counseller at a school, when the parent of a bullied child comes in, in tears”, I took part in an observed, recorded role-play
scenario, which now I’m tasked with dissecting and writing an essay about. Which isn’t so bad, except that the whole thing went really well, so I can’t take my usual
approach of picking holes in it and saying what I learned from it. Instead I’ll have to have a go at talking about what I did right and trying to apply elements of
counselling theory to justify the way I worked. That’ll be fun, too, but it does of course mean that the busy lifestyle isn’t quite over yet.
My sister Sarah, with TAS managing director Adrian Grant, prepare to announce the winner of the Peter Huntley Memorial Award for Making Buses A Better Choice.
And then on Tuesday I was a guest at the UK Bus Awards, an annual event which my dad co-pioneered back in the
mid-1990s. I’d been invited along by Transaid, the charity that my dad was supporting with his planned expedition to the North Pole before he was killed during an accident while training. I was there first and foremost
to receive (posthumously, on his behalf) the first Peter Huntley Fundraising Award, which will be given each year to the person who – through a physical activity – raises the most money
for Transaid. The award was first announced at my father’s funeral, by Gary Forster, the charity’s chief
executive. Before he worked for the charity he volunteered with them for some time, including a significant amount of work in sub-Saharan Africa, so he and I spent a little while at the
event discussing the quirks of the local cuisine, which I’d experienced some years earlier during my sponsored cycle around the country (with my dad).
So it’s all been “go, go, go,” again, and I apologise to those whose emails and texts I’ve neglected. Or maybe I haven’t neglected them so much as I think: after all – if you emailed me
last week, right now that feels like months ago.
Right now, Three Rings seems to be eating up virtually all of my time. It’s hardly the first time
– I complained about being incredibly busy
with Three Rings stuff just a couple of years ago, but somehow right now it’s busier than ever. There’s been the Milestone: Jethrik release, some complications with our uptime when our DNS servers
were hit by a DDoS attack, and – the big one – planning for this weekend’s conference.
Checking the timetable while I wait for inspiration to strike me about what to say about the “engagement” responsibilities of a Three Rings Administrator.
The Three Rings 10th Birthday Conference is this weekend, and I’ve somehow
volunteered myself to not only run the opening plenary but to run two presentations (one on the history of Three Rings, which I suppose I’m the best person to talk about, and one on
being an awesome Three Rings Administrator) and a problem-solving workshop. My mind’s been on overdrive for weeks, and I’m pretty sure I’m not even the one working the hardest (that
honour would have to go to poor JTA).
Still: all this work will pay off, I’m sure, and Saturday will be an event to remember. I’m looking forward to it… although right now I’d equally happily spend a week or two curled up
in bed under a blanket with a nice book and a mug of herbal tea, thanks.
In other news: Matt P‘s hanging out on Earth at the moment, (on his best behaviour I think) while Ruth, JTA and I decide if we’d like to live with him for a while. So far, I think he’s making a convincing argument. He’s proven
himself to be house trained (he hasn’t pooped on the carpet even once) and everything.
The other Three Ringers and I are working hard to wrap up Milestone:
Jethrik, the latest version of the software. I was optimising some of the older volunteer availability-management code when, by coincidence, I noticed this new bug:
Well, at least she’s being rational about it.
I suppose it’s true: Lucy (who’s an imaginary piece of test data) will celebrate her birthday in 13/1 days. Or 13.0 days, if you prefer. But most humans seem to be happier
with their periods of time not expressed as top-heavy fractions, for some reason, so I suppose we’d better fix that one.
They’re busy days for Three Rings, right now, as we’re also making arrangements for our 10th
Birthday Conference, next month. Between my Three Rings work, a busy stretch at my day job, voluntary work at Oxford Friend, yet-more-executor-stuff, and three different courses, I don’t have much time for anything else!
But I’m still alive, and I’m sure I’ll have more to say about all of the things I’ve been getting up to sometime. Maybe at half term. Or Christmas!
Those of you who’ve been following Three Rings over the last decade (either
because you’ve volunteered somewhere that used it, or because you’ve listened to me rave about it over the years) might be interested in this new post on the Three Rings blog. It’s about how Three Rings has evolved
over the last 10+ years of its life from a tiny system designed specifically for the needs of Aberystwyth
Nightline into the super-powerful charity management tool that it is today, and how it’ll continue to evolve to meet the needs of the helplines and other charities that use it
for the next ten years.
Three Rings as it appeared about seven years ago. Do you remember this?
It still blows my mind that something that began as a bedroom project has come to support over 13,000 volunteers around the UK, Ireland, and further afield (we’ve recently been getting
started with supporting Samaritans branches in New Zealand and Australia). Now, of course, Three Rings is a volunteer-driven company with a “core” team of half a dozen or so… as well as
tens of others who help with testing. It’s eaten tens of thousands of development hours and it’s become bigger and more-important than I’d ever dreamed. Of all of the volunteer work
I’ve been involved with, it’s easily the one that’s helped the most people and had the biggest impact upon the world, and it still excites me to be part of something so huge.
On this day in 2004 I
handed in my dissertation, contributing towards my BEng in Software Engineering. The topic of my dissertation was the Three Rings project, then in its first incarnation, a web application originally designed to help university Nightlines to run their services.
An early Three Rings Directory page. If you remember when Three Rings used to look like this, then you're very old.
I’d originally started developing the project early in the previous academic year, before I’d re-arranged how I was going to finish my course: Three Ringscelebrates its tenth birthday this year. This might be considered to have
given me a head start over my peers, but in actual fact it just meant that I had even more to write-up at the end. Alongside my work at SmartData a few days a week (and sometimes at weekends), that meant that I’d been pretty damn busy.
A page from my dissertation, covering browser detection and HTTPS support (then, amazingly, still not-quite-universal in contemporary browsers).
I’d celebrated hitting 10,000 words – half of the amount that
I estimated that I’d need – but little did I know that
my work would eventually weigh in at over 30,000 words, and well over the word limit! In the final days, I scrambled to cut back on text and shunt entire chapters into the appendices (A
through J), where they’d be exempt, while a team of volunteers helped to proofread everything I’d done so far.
Go on then; have another screenshot of an ancient web application to gawk at.
Finally, I was done, and I could relax. Well: right up
until I discovered that I was supposed to have printed and bound two copies, and I had to run around a busy and crowded campus to get another copy run off at short notice.
Looking Forward
Three Rings went from strength to strength, as I
discussed in an earlier “on this day”. When Bryn came on board and offered to write programs to
convert Three Rings 1 data into Three Rings 2 data, in 2006, he borrowed my dissertation as a reference. After he forgot that he still had it, he finally
returned it last month.
The inside front cover of my dissertation, along with a note from Bryn.
My dissertation (left) back on my bookshelf, where it belongs.
Today, Three Ringscontinues to eat a lot of my time, and now supports tens of
thousands of volunteers at hundreds of different helplines and other charities, including virtually every Nightline and the majority of all Samaritans branches.
It’s grown even larger than I ever imagined, back in those early days. I often tell people that it started as a dissertation project, because it’s simpler than the truth: that it
started a year or two before that, and provided a lot of benefit to a few Nightlines, and it was just convenient that I was able to use it as a part of my degree because otherwise I
probably wouldn’t have had time to make it into what it became. Just like I’m fortunate now to have the input of such talented people as I have, over the last few years, because I
couldn’t alone make it into the world-class service that it’s becoming.
This blog post is part of the On This Day series, in which Dan periodically looks back on
years gone by.
The last few months, and especially the last few weeks, have been incredibly hectic. The giveaway, I suppose, should have been how little I’ve blogged recently: it’s a dead giveaway
that I’m really busy when I’m able to neglect writing about how busy I am. I’m not complaining, of course, just apologising to the Internet at large.
Mostly, my time’s been eaten up by Three Rings. We launched Milestone: Iridium,
the latest new version of the helpline management software, at the weekend, after an extended testing period and a long-extended development cycle. There’s a metricfucktonofnewfeaturesinthisrelease, including the massive Rota Autopopulation feature, which uses some incredibly complicated mathematics and fine-tuneable
weighting preferences to find the best people for each shift, with minimal human interaction. Oh, and we got a new server. And launched a documentation website. I’ve no doubt that this is our biggest release to-date.
Some of you might be old enough to remember when Three Rings looked like this. Not many of you, but some.
It’s amazing to see how far we’ve come. It still boggles my mind every time I look at the statistics, and see that we’re now helping over ten thousand volunteers. When I started, we
were supporting about ten. Sometimes it scares me. Mostly it thrills me. It’s a great project to be involved with, even when it does consume all of my free time for weeks
on end.
This evening, I found myself momentarily at a loose end. I felt like there were things I ought be be doing, urgently, but there weren’t. There’s a backlog of personal
email to catch up on, and a stack of little jobs to be doing, but there’s nothing critical.
It took a few minutes to reassure myself that I really had nothing that needed doing immediately. Then I poured myself a glass of wine, popped my feet up, and played some video
games. My Steam catalogue has gotten bloated, full of games that I’ve bought over the last few
months to play “when I get the time”. Time to cut that list down.
Family Picnic: Joining Ruth and JTA at Ruth’s annual family picnic, among her billions of
second-cousins and third-aunts.
New Earthwarming: Having a mini housewarming on New Earth, where I live with Ruth, JTA, and Paul. A surprising number of people came from surprisingly far away, and it was fascinating to see some really interesting networking being done by a mixture of
local people (from our various different “circles” down here) and distant guests.
Bodleian Staff Summer Party: Yet another reason to love my
new employer! The drinks and the hog roast (well, roast vegetable sandwiches and falafel wraps for me, but still delicious) would have won me over by themselves. The band was just
a bonus. The ice cream van that turned up and started dispensing free 99s: that was all just icing on the already-fabulous cake.
TeachMeet: Giving a 2-minute nanopresentation at the first Oxford Libraries
TeachMeet, entitled Your Password Sucks. A copy of my presentation (now with annotations to make up for the fact that you can’t hear me talking over it) has been uploaded to the website.
New Earth Games Night: Like Geek Night, but with folks local to us, here, some of whom might have been put off by being called “Geeks”, in that strange way that
people sometimes do. Also, hanging out with the Oxford On Board folks, who do similar things on
Monday nights in the pub nearest my office.
Meeting Oxford Nightline: Oxford University’s Nightline is just about the only Nightline in the British Isles to not be using Three Rings, and they’re right on my doorstep, so I’ve
been meeting up with some of their folks in order to try to work out why. Maybe, some day, I’ll actually understand the answer to that question.
Alton Towers & Camping: Ruth and I decided to celebrate the 4th anniversary of us getting together with a trip to Alton Towers, where their new ride, Thirteen, is really quite
good (but don’t read up on it: it’s best enjoyed spoiler-free!), and a camping trip in the Lake District, with an exhausting but fulfilling trek to the summit of Glaramara.
Setting up camp at Stonethwaite.
That’s quite a lot of stuff, even aside from the usual work/volunteering/etc. stuff that goes on in my life, so it’s little wonder that I’ve neglected to blog about it all. Of
course, there’s a guilt-inspired downside to this approach, and that’s that one feels compelled to not blog about anything else until finishing writing about the first neglected thing, and so the problem snowballs.
So this quick summary, above? That’s sort-of a declaration of blogger-bankruptcy on these topics, so I can finally stop thinking “Hmm, can’t blog about X until I’ve written about
Code Week!”
Between SmartData work, Three Rings work, freelance
work, strange new bits of voluntary work, and the rapidly-looming wedding between Ruth & JTA (along with handling
all of the crises that come with that, like the two mentioned on the wedding blog and the threat of rail strike action on the weekend of the event, which may affect the travel plans of
guests from Aberystwyth), things are a little hectic here on Earth. And I’m sure that
I’ve not even got it the worst.
So in order to distract myself from it during this 5-minute moment-to-breathe, I’d like to share with you some photos on the subject of “living with Paul“. As usual, click on a picture for a larger version.
Paul – Single Lemon
Our shopping trips have become in different ways both more and less organised, thanks to Paul (seen here posing under a “single lemon” sign). More organised in that Paul does a sterling
job of making sure that our shopping list whiteboard is up-to-date, and less organised in that we’re even less likely to comply with it… not least because it’s cute the way that his
little head explodes when we deliberately and maliciously make minor deviations in our shopping plans.
Paul’s current status, according to WALL-E.
Well-known as somebody who outright rejects Twitter, Facebook and the like,
Paul’s come up with his own mechanism for sharing his current status with those he cares about: the low-tech alternative – note cards. Held up by a WALL-E figurine at the door to his
room, Paul keeps us up-to-date with a series of about half a dozen pre-written messages that cycle in accordance with what he’s up to at any given time. They’re quickly out of date
(right now, it says “In. Please wave.” but he’s clearly not here), limited in length, and mundane, just like the vast majority of Twitter posts… but at least he’s not attempting to
subject the world to them. I’m still not sure, though, whether this tiny protest against social networking (if that’s what it is) is sheer genius, complete insanity, or perhaps both.
Yorkshire pudding!
Paul is now officially in charge of all Yorkshire pudding production on
Earth, after we enjoyed this gargantuan beast.
Right: my break’s over and I need to get back to my mountain of work. If you’ve not had your fill of Paul yet, then I point you in the direction of a video he’s just uploaded to YouTube…
Some time ago, I wrote a web-based calendar application in PHP, one of my favourite programming
languages. This tool would produce a HTML tabular calendar for a four week period, Monday to Sunday, in which the current date (or a
user-specified date) fell in the second week (so you’re looking at this week, last week, and two weeks in the future). The user-specified date, for various reasons, would be provided as
the number of seconds since the epoch (1970). In addition, the user must be able to flick forwards and backwards through the calendar, “shifting” by one or four weeks each time.
Part of this algorithm, of course, was responsible for finding the timestamp (seconds since the epoch) of the beginning of “a week last Monday”, GMT. It went something like this (pseudocode):
1. Get a handle on the beginning of "today" with [specified time] modulus [number of seconds in day]
2. Go back in time a week by deducting [number of seconds in day] multiplied by [number of days in week] (you can see I'm a real programmer, because I set "number of days in week"
as a constant, in case it ever gets changed)
3. Find the previous Monday by determining what day of the week this date is on (clever functions in PHP do this for me), then take
[number of seconds in day] multiplied by [number of days after Monday we are] from this to get "a week last Monday"
4. Jump forwards or backwards a number of weeks specified by the user, if necessary. Easy.
5. Of course, this isn't perfect, because this "shift backwards a week and a few days" might have put us in to "last month", in which case the calendar needs to know to deduct one month
and add [number of days in last month]
6. And if we just went "back in time" beyond January, we also need to deduct a year and add 11 months. Joy.
So; not the nicest bit of code in the world.
I’ve recently been learning to program in Ruby On Rails. Ruby is a comparatively young language which
has become quite popular in Japan but has only had reasonable amounts of Westernised documentation for the last four years or so. I started looking into it early this year after reading
an article that compared it to Python. Rails is a web application development framework that sits on top of Ruby and promises to be “quick and
structured”, becoming the “best of both worlds” between web engineering in PHP (quick and sloppy) and in Java (slow and structured). Ruby is a properly object-oriented language – even your literals are objects – and Rails takes full advantage of
this.
For example, here’s my interpretation in Rails of the same bit of code as above:
@week_last_monday is just a variable in which I’m keeping the result of my operation.
7.days might fool you. Yes, what I’m doing there is instantiating an Integer (7, actually a Fixint, but who cares), then calling the “days” function on it, which returns me
an instance of Time which represents 7 days of time.
Calling the ago method on my Time object, which returns me another Time object, this time one which is equal to Time.now (the time right now) minus the amount of
Time I already had (7 days). Basically, I now have a handle on “7 days ago”.
The only thing PHP had up on me here is that it’s gmdate() function had ensured I already had my date/time in
GMT; here, I have to explicitly call gmtime to do the same thing.
And then I simply call monday on my resulting Time object to get a handle on the beginning of the previous Monday. That simple. 24 characters of fun.
+ params[:weeks].to_i.weeks simply increments (or decrements) the Time I have by a number of weeks specified by the user (params[:weeks] gets the number of weeks
specified, to_i converts it to an integer, and weeks, like days, creates a Time object from this. In Ruby, object definitions can even override operators
like +, -, <, >, etc., as if they were methods (because they are), and so the author of the Time class made it simple to perform arithmetic upon times and dates.
This was the very point at which I feel in love with Ruby on Rails.
(15:53:41) Dan: It [an online weather forecast on a web site I run] says we should expect a wet weekend, clearing up for an overcast week.
(15:53:54) Suz: and who puts it on the web site?
(15:53:59) Dan: The BBC.
(15:53:59) Suz: i always thought it was paul
(15:54:02) Suz: oh
(15:54:06) Dan: No – it’s taken from the BBC, who take it from the MET office.
(15:54:11) Dan: It’s entirely automatic.
(15:54:28) Suz: oh i see. i wondered why paul had the time or botherdness to do it
Sweet that she thought that Paul was spending about an hour a week keeping an online calendar up-to-date manually.
People who are in on the Secret Of The Jukebox will be delighted to hear that I’ve had a good long hack at it tonight (hence it being 4:30am) and I’ve managed to get heaps done
and ready for Paul to break test, including but not limited to the new “Alone, And With…” engine, which doesn’t seem to suffer any
longer from the age-old bug that gives it it’s name.
I’ve just finished listening to some old hard-to-get Goo Goo Dolls albums that I acquired a little
while ago. One is silly over-punky shouty hard rock stuff; very coarse and unrefined, much unlike their later stuff. The other, ‘Hold Me Up’, is much recommendable: some tracks I’d
heard before, some stuff I hadn’t heard, all very very good. In particular, enjoyed ‘Laughing’, ‘Kevin’s Song’, and the older version of ‘Two Days In February’. Toy.
It’s been a busy week. I’ve spent a lot of my time at the office, trying to get the replication model for Bovini working – causing much stress as it failed time and time again. For
those of you without a grounding in computer science theory, replication is the art of making data be identical (and editable) in several places at once without the fundamental problems
that this goes on to cause, such as data identity conflicts.
In this particular case, we have two master copies of a database, and five smaller copies of a particular one-fifth of the data each (plus a little shared data), split around seven
UK sites, and who’s computers can only be made to talk to one another between the hours of midnight and 4am each weekday. So: not only
does the program I’ve been writing (and sweating on, crying over, and shouting at, this week) have to pull all the data back together and spread it out, it also has to detect whether
two users at different sites edit the same piece of data during the same day, work out who’s most likely to be ‘right’, and ‘fix’ the data accordingly. Or, if it’s not sure, know who to
ask for assistance. It’s a clever program.
And now it seems to be done. And working. Great!
Unfortunately, working like a dog on this little project has only taken time (and energy) away from my preferred software project – Three Rings – a program I’m writing for free
for National Nightline. I’m likely to have a busy weekend catching up!
Regardless, tonight… will be a night for relaxing – Bryn, Claire, Paul, Kit and I are going to spend the evening in the Ship & Castle, drinking Real Ale
and playing Chez Geek. A perfect way to end a week.