Migrating Twitter API apps from basic authentication to OAuth is up there with hoovering the bathroom and taking out the recycling in the “irritating chores to put off for another day” stakes. However, Twitter’s announcement that they’re dropping basic authentication support at the end of this month has made this task altogether more urgent, like an unexpected visit from the mother-in-law.
If you’re using the Ruby Twitter gem by John Nunemaker, you’ll be happy to learn that it supports OAuth. You’ll be less happy to see that the example code on the homepage merrily omits the difficult part:
# NOT SHOWN: granting access to twitter on website
# and using request token to generate access token
If your Twitter app is of the simple ‘bot’ variety, with a single dedicated account where everything happens, and no need for end users to authenticate against it, then most of the example code and documentation floating around the internet is overkill, sending you down the path of sessions and callback URLs, when all you really want to know is: what do I put in the ‘register an application’ form? How do I get hold of these tokens? And what do I do with this PIN code it’s just given me?
I eventually found a blog post at BeefyApps which cleared things up immensely, and so I’ve now reshuffled their code snippet into a mini command line utility which will spit out those all-important tokens and tell you how to use them.
We offer instructions for upgrading your 2.x WordPress install via Subversion, so we certainly wouldn’t do anything silly between versions like deleting the entire directory that contains the ‘default’ theme, leaving your blog as a blank page with no indication of what’s gone wrong.
Oh, you found the ‘appearance’ tab in the admin backend? Ah, that’s my cue to notice that your website is broken, and instantly replace it with a nice picture of some trees. You like trees, don’t you? They’re very pretty, and I think sometimes you’ve got to put that above more practical concerns like not suddenly breakingeveryone’s website.
What, you want your old theme back? Aww. OK, here it is in our themes repository. Oh, sure, I could just tell you where you can download it, but I have a better idea. Let me install it automatically for you instead! Just give me your FTP password, and everything will be juuuuust fine.
No, I don’t think there’s a plugin that will let you punch programmers in the face. Why do you ask?
A quick heads-up that I’ll be playing my first ever proper not-just-an-open-mic gig this Thursday night as part of the Date Horse comedy and music night at the Vauxhall Griffin, London. Come along for some silly songs about Paris Hilton’s pet monkey and much more (and RSVP on the Facebook event)…
The epic Pacman 30th anniversary Google Doodle, along with Ben Firshman’s dynamicaudio.js library for dynamically generating audio, collectively persuaded me that I haven’t done any mad Javascript hacking for far too long. My response to this state of affairs is JSModPlayer, a player for .MOD music files (the mainstay of Amiga and PC sample-based music circa 1990).
So far it only implements a subset of the possible sample effects, and it demands a very fast Javascript engine – luckily all the new breed of browsers are pretty competitive at that now. Even so, unless your CPU is an absolute behemoth, it’ll probably struggle to keep up – the audio output is fixed at 44100Hz, and that’s rather a lot of numbers for Javascript to crunch, especially when the MOD file gets up to 16 or more channels. Which, amusingly enough, is exactly the situation we had back when we were using Gravis Ultrasounds on 386es. Hurrah for progress!
Update 2010-06-08: Oops. In the process of testing how Safari 5 shapes up, I discovered a rather silly oversight: the audio buffering routine was set up to never use more than 10% of CPU. Now that I’ve fixed it, it turns out that Chrome and Safari (at least) have no trouble at all playing Jugi’s Dope theme in its 28-channel glory. (However, taking the brakes off the buffering does mean that we can’t reliably pause the audio any more. A small price to pay, I think you’ll agree.)
I’ve rewritten the DivIDEo converter app in pure C, and as a result it’s now available in friendly standalone Windows and Mac OS X command line executables (and slightly less crazy and Ruby-ish to compile for other platforms). All the necessary libraries (including a major chunk of ffmpeg) are compiled in, so now there’s nothing standing between you and full-on ZX Spectrum video converting action. Head over to the DivIDEo website for the downloads.
Incidentally, a couple of people have asked about the identity of the singer in the Outline presentation. Apparently, while that clip is what we sneeringly refer to as an “internet phenomenon”, it’s not quite reached 100% saturation, so: it is Edward Anatolevich Hill, with a Russian TV performance of the song “I am very glad, because I’m finally back home”, or as it’s becoming increasingly better known, Trololololo.
Six years after my first tentative attempts at streaming video from the DivIDE interface were presented at Notcon 2004, I’ve finally come up with a system that I’m happy with. It boasts 25fps playback with audio somewhere above the ‘nails in a vacuum cleaner’ quality of previous attempts (through the use of delta compression on the video data and variable bitrate audio to use up whatever processor time is left), a one-shot conversion utility that handles all the video decoding, rendering and re-packing, and a player routine that more or less respects the ATA spec (so won’t fall apart as soon as someone else tries it on a different CompactFlash card. Hopefully). Here’s how I presented it at the Outline demo party:
The BBC Micro Men comedy/drama shown last October starring Alexander Armstrong and Martin Freeman as Clive Sinclair and Chris Curry has, unsurprisingly, gone down a storm in 8-bit enthusiast circles.
There’s been a lot of demand from the international Speccy community for subtitles, since it’s apparently rather heavy on colloquial English – and so as a contribution to this weekend’s Forever party, I spent several highly pleasurable hours in front of the rather spiffy Miyu subtitling package to put these together. It’s definitely a show that rewards repeated viewing – for instance, take a close look at what’s on the whiteboard behind Hermann as he says of the newly laid-off engineers: “They are clever people. They’ll think of something. Maybe they already have”…
Yesterday’s Full Frontal javascript conference turned out to be the ideal setting to compare notes with Ben Firshman of JSNES fame on the finer points of implementing emulators in Javascript – so this new release of JSSpeccy is the natural consequence of that. I’ve put in an optimisation which might possibly be a speed boost on Chrome (only writing bytes to ImageData when absolutely absolutely necessary), and the much-needed ability to load your own snapshot files, using the little-known getAsBinary method on file upload objects. (Unfortunately Firefox 3.5 is the only browser which supports it right now, but it looks like it may be in the process of getting the official W3C blessing right now.) And since I was on a roll, on the train back I implemented tape loading traps and the ability to load .TAP files (again, only on Firefox 3.5). Wahey!
Recognising that there was a gap to be filled in news reporting for the ZX Spectrum community (since other commitments have pulled icabod away from regularly updating raww.org, and other contributors – myself included – have not exactly rushed in with the same fervour), I’ve set up the Speccynews Twitter account.
The idea is that it’s a lower-maintenance way of keeping on top of developments in the Speccy world, as something that can be updated on the spot as and when you encounter a story, with no obligation (indeed, no way at all) to write a long erudite commentary on every news story. Following an encouraging call for volunteers on WOS forums, I set the service up through CoTweet, and it’s been running successfully for a couple of weeks now. More contributors would be very welcome, especially non-UK people who can share their perspective of those wonderful developments in Spain, Russia, Poland, the Czech Republic and elsewhere which are being overlooked by the English-speaking crowd. Drop me an email / tweet with your email address if you’re interested, and I’ll send a CoTweet invite in your direction. No previous Twitter experience necessary!
(And, of course, all feedback and story submissions will be gratefully received via Twitter itself – tweet them to @speccynews.)
Anyone typing it in in its entirety would be rewarded with this:
Not bad for an evening’s work. Mind you, I did take an ever so teeny shortcut, by writing a Ruby program to convert a MIDI file to BEEP format. (Any .mid file will do, although ones with a single instrument will survive the rather primitive selective-note-butchering process better. Oh, and anything much longer than this one will exceed the 48K Spectrum memory…) And now you can try it out too:
Update 2010-05-26: Karl McNeil has adapted Midibeep into a variant called Mid2ASM, which outputs an assembler listing rather than Basic – this enables the data to be packed much more efficiently, paving the way for altogether longer pieces of music. Download Mid2ASM (453K, Windows EXE included)
Update 2010-06-02: Another update from Karl, featuring a Windows GUI, more space-saving tweaks, and embedding the output in a Basic REM statement. Download Mid2ASM v2 (3.4Mb)
"Blue notes ... can be heard on any instrument capable of producing them." Another nugget of wisdom from Wikipedia there. http://j.mp/bMCHwF#2010/09/01
@sgtruck Hey, we didn't get to chat about Z80. You're 3rd/4th person to ask- I made an early start on writing a decent tutorial. Must finish #2010/08/29
@othello Thanks! Sounds like I have a spot of Official Complaining to do then... #2010/08/27
@_lemon I want it to be true as well. :-) #2010/08/27