Exactly how photogenic is Damian Conway?
I’ve been catching up with James Duncan Davidson’s blog and one entry caught my eye, coming as it did with a fabulous black and white photograph of Damian Conway
The personal website of Piers Cawley
(they/him)
—
FolkSinger, photographer, carer and occasional programmer.
I’ve been catching up with James Duncan Davidson’s blog and one entry caught my eye, coming as it did with a fabulous black and white photograph of Damian Conway
As usual, substitute nails it.
“Good news! Those lovely people at Fotango, grateful for the use of the photo of their MD I took, have offered to pay for a EuroStar ticket to Brussels for EuroOSCON.”
It may not be a nice theme, but it’s my theme. Look! There are adverts again!
Why not click on some of them?
Ahem. Sorry about that. I shall shortly return you to more usual fare.
I just realised something about the workings of new style Typo Sidebars: it’s just an application of the Parameter Object design pattern; the render_sidebar
helper method takes a Sidebar
parameter object and produces a chunk of HTML. The fact that we persist the parameter object using ActiveRecord is almost beside the point - the persistence is more important to the render_sidebars
method than anything else.
I’ll let you into a secret. You can tell when I’ve done a big svn up
on this blog simply by looking at the theme. If it’s all black and white and sans serif, then it’s a racing certainty that I’ve just done an upgrade which has broken my usual custom theme.
I was going to save this until I’d rejigged my blog to a three column layout and had left everyone mystified by how I’d managed to get sidebars on both sides. But, let’s be honest here, it’s going to be ages before I do that. So, I shall spill the beans preemptively.
Typo Sidebar’s are now controller free!
Which probably means nothing to the vast majority of people reading this. But it makes me very happy.
Until a couple of revisions ago, Typo sidebars were rendered through a convoluted route, which involved n + 1 calls to render_component
, where n is the number of items on the sidebar. Calling render_component
isn’t something you really want to do even once if you can help it. It’s not as slow as it used to be, but it’s still unpleasant.
Guess who couldn’t sleep?
So, I’ve been productive and have ported 9 Typo sidebars to the new, controller free, sidebar architecture. Sadly, it’s not something I can write a program to do, but the work involved is still fairly minor.
Many thanks to Paul Ingles who has just written a fantastic article about writing a Typo sidebar in a test driven way.
For too long we’ve been assuming that Typo sidebars are, in fact, detestable (“If it’s not testable, it’s detestable” - someone at the Sydney XP group, by way of Martin Fowler). Paul neatly demonstrates that sidebars are perfectly testable, we just haven’t been testing them. Bad us.
We’re in the process of doing up our house. Which means that there’s a bunch of stuff that we need to get rid of that’s not really good enough to ebay, but a wee bit too good/big to chuck in the bin.
Just in case you’ve been caught by it, the recent instability of this site doesn’t appear to be because of typo and rails bugs, but because the hard disk at my hosting services appears to be in the process of going bad. Hopefully it’ll be resolved soon.
This made me laugh a lot.
I was just about to start writing a multimethod system for ruby when I realised how much I miss Perl tools like Module::Starter. CPAN has a whole suite of tools which make it at least as easy to do the Right Thing when setting up your project than it is to succumb to ad hockery. Start your project using Module::Starter, and you get a sensibly laid out that works well with standard Perl build/installation tools, a stub of your module, with the various boilerplate bits of the documentation filled in, a test directory, README, etc…
I’m still in two minds about going to EuroOSCON this year. That’s not quite true. I want to go, but I can’t afford to go. I certainly can’t afford to pay for my own ticket, and if I could I would probably have put it towards a Macbook Pro.