Archive of: polytechnic
Over the last couple of weeks I’ve been reading Jeremy’s excellent book Going Offline. It’s a step by step exploration of Service Workers. If you’re not sure what a Service Worker is the Mozilla Developer Network has a series of articles to get you up to speed:
Service workers essentially act as proxy servers that sit between web applications, the browser, and the network (when available). They are intended, among other things, to enable the creation of effective offline experiences, intercept network requests and take appropriate action based on whether the network is available, and update assets residing on the server. They will also allow access to push notifications and background sync APIs.
I already had a service worker on this site that had been built with Google’s Workbox library, but it always felt a little like “magic” to me. I wasn’t entirely sure what was going on under the hood, and I only ever managed to get it to do some caching of static assets, nothing more interesting than that. It felt like I was learning how to use a library, not the underlying tool.
To that end, this site now has its own home-grown, organic, corn fed, Service Worker.
As well as the caching of static assets it now cleans up after itself by deleting old caches, and more importantly will serve an off-line page if the user’s connection goes down. That page isn’t anything special right now, but one of the techniques that Jeremy talks about is caching pages that the user has visited, so at least they can load something from the past. One for me to think about.
I highly recommend picking up a copy of Going Offline, it’s a brilliant read and a great introduction into the power of Service Workers.
I say “inspired”, what I mean is “blatantly ripped off from”.
The repository sits in a subdirectory hanging off one of my domains. I can’t quite remember why it ended up in a subdirectory, it’s not like I’m running short of domains, but there it sits. One thing on my to-do list is moving it somewhere else.
Like Ethan there isn’t much technical going on behind the scenes, it’s a standard Apache directory listing which gives me simple ordering. It’s refreshing in an old school way, but I do sometimes get the itch to dig into Apache’s AutoIndex Formatting and fancy it up a bit.
Transferring files isn’t something I’ve spent a huge amount of time over. I’ve always been a bit of command line nerd, so interesting files get saved to my desktop, and then secure copied up to the server. It happens so often now that there are 75 entries in my history file for running that one command for the last 3 months alone.
This post came about from a little back and forth with Ethan where I said I would write something, and he’s good people, so I hate to let him down.
Plus it’s fun to write about little projects.
Go forth and create little projects!
If you are in any way linked to Oxford, you may have heard that The Cellar, one of our most beloved music venues, is under threat of closure.
My first exposure to The Cellar was before I moved to Oxford, or even thought of doing so, back in 1995.
I was living in Coventry, and helping out my friend’s bands where I could. One of the bands I crewed for booked a gig in at The Cellar, so we loaded the gear in the back of the van, and after a trip down the motorway, the doors opened.
It wasn’t quite the Oxford I’d heard of, the home of Radiohead and Supergrass, the Dreaming Spires. There we were, on Cornmarket, hungry, tired, trying to work out where the gig was. We found the alley…
“Fuck, that’s a lot of stairs” 1
The Immaculate Assassins played to a couple of people, but it was a fun gig, and I remember the bar staff being lovely.
Cut to 2003, I’d been in Oxford six years now (that’s another story), and The Cellar had become part of my life. At least once a week I’d find myself there, discovering a new band, meeting new people, a lot of whom are friends to this day.
I wasn’t from here, but this had become my home. This was my Oxford.
I was playing guitar in a band 2 with some friends (I say “playing”… I was trying to find interesting ways to get effects pedals to cover up for my lack of talent) and we’d been having fun rehearsing at Glasshouse. We’d started to get a set together, and we’d invite friends to rehearsals to hear what we were doing. They’d bring beer, we’d swap instruments, play some covers, arse around, but we kept coming back to the set. And we got tighter.
I can’t exactly remember how it came about, but talk turned to actually playing the set in front of people. An actual gig.
Then we got a gig, and it was at The Cellar. Playing support… but it was an actual fucking gig.
I remember panicking slightly.
(…it’s the Cellar…)
Then I panicked a lot.
(…we can’t play there, that’s where… proper bands play…)
The day of the gig I was a wreck, I was so nervous I could barely speak. My partner was an absolute rock, we sat in my flat watching films, and she held my hand the whole time and told me it would be okay.
We set up, we sound checked, I had a confusing conversation with the sound engineer about the amount of feedback I was producing (“…I’m going for Jesus & Mary Chain, I’ve got this… I think”), we got a round of applause from the bar staff (I told you they were lovely), and then we waited.
Next thing I remember is seeing my band mates on the stage, and my partner saying “shouldn’t you be up there?”, I panicked, ran round the back of the artist area, up on to the stage smacking my head on the lintel on the way (if you’ve played The Cellar, you’ll know the bit of architecture I mean), plugging my guitar in, and thinking “this is it, I’m on stage at The Cellar, and I’ve given myself concussion, I’m about to pass out. Good work Garrett”.
I didn’t pass out, and by all accounts we played a good gig. I don’t remember much of it. At the bar after the gig a friend said that I had an “unconventional” style of guitar playing. I took that as a compliment.
The Cellar is an important part of my life, and it’s an important part of countless other lives.
The Cellar is one of those place where memories are formed.
(I’m amazed I haven’t used that title before)
Apologies if anyone following had a huge amount of updates appear in their RSS readers, but I recently flipped the switch on moving this site to Perch and a new responsive design, something that’s been in the works for quite a while now.
This is the start of some long overdue improvements around here, including more frequent posting and moving to more of a POSSE type publishing method.
Finally got round to updating to Drupal 5.1. I’ve done some pretty thorough testing and it all looks good, but if you notice anything strange please leave me a comment (which are no longer moderated, thanks to the new captcha, we’ll see how long that lasts).
Now that I’m up to date expect to see some changes in the near future. There’s a new theme in the works and some toys that I’ve been wanting to roll out, but could only do on 5.x
Caveat: The appearance of said theme and toys depends wholly on how much free time I have in the next few months.
Polytechnic has been coming under a sustained comment spam attack for the past few days and unfortunately, as well as the spam module is doing, it isn’t catching all of them. So for the time being, until my workload eases up and I can work out a better plan of defense, I’ve switched comments to be moderated instead of going live immediately.
This will mean that if you leave a comment there will be a delay before it appears on the site (the delay will be dependant on my free time).
Well, this looks like it all worked ok.
I’ve decided to take a break from posting for a while. There are some personal things happening that I need to focus my attention on, and this place is a too much of a distraction to handle right now, so I’m putting it in stasis.
Hopefully I’ll be back at some point.
So here we go again, this time trying out ecto. I’ve had this installed for a long time but never got round to firing it up and seeing what it could do. First impressions are that the UI exposes a lot more functionality than Marsedit (not something that I really mind as i like to tinker) but I have that new-software “where the hell is everything?” feeling.
Still, If it manages to post without anything too untoward happening then we’re off to a good start.
Update: Well that went swimmingly. Just a few things to tweak in the generated markup, but that’s nothing. Ecto has it.
Another in a long line of incredibly boring posts from Garrett Corp, I really must try harder.
Update: Well that was a bit of a non event. Marsedit didn’t have an entry for the title, which turned out to be what the first paragraph became, html and all. Think I need to do some tweaking.