May 2012
2 posts
May 22nd
Show me the code
Backbone.js, I have nothing against you. I’m merely singling you out because you’re popular, and it’s endemic. What’s endemic, you ask? Look at the home page. Backbone.js gives structure to web applications by providing models with key-value binding and custom events, collections with a rich API of enumerable functions, views with declarative event handling, and...
May 14th
April 2012
1 post
Apr 5th
March 2012
7 posts
Things that went badly this afternoon
After a wonderfully sunny and productive morning, I: Fell down a kerb on the way to the library, grazing my hands. Had to pay a £15 library fine. Had to go home to pick up the Bluetooth dongle I forgot. Had to go home (again) to grab the pizza I had intended for dinner. On the way home, someone stepped in front of my bike. I swerved, caught the pegs on a low-lying wall, and I flew over the...
Mar 26th
Fibers →
I wish I’d heard about Fibers a month a go, before I’d started rewriting Gusto using Promises.
Mar 26th
Dear Tumblr,
Today is the 25th of March. In what universe is the 27th of December two months ago? Use round, not floor, please.
Mar 25th
What would be great
If Samuel L. Jackson would read to me the lyrics of “Meet Me on the Corner” by Lindisfarne. If Coco’s error message line numbers weren’t off by one. Every time.
Mar 25th
No. Bad Chrome.
Stop preferring your autocomplete to what I’m typing. You don’t know better than me.
Mar 15th
5-minute Chocolate Cake →
In a mug. I ate two. I feel ill.
Mar 14th
Mar 14th
February 2012
6 posts
It terrifies me how much time I spend on the internet, consuming for consumption’s sake. Given half the chance, I’ll while away hours middle-clicking TVTropes links. So I’m taking the chance away. I’m allowing myself but ten cumulative minutes per day on any remotely distracting website, courtesy of StayFocusd. And I’m giving myself more opportunity to create. I...
Feb 28th
Deactivating my Facebook account was one of the least pleasant experiences I’ve had in a long while. The page is littered at the top with pictures of me and various people, with the captions “ will miss you”. It went on to ask me why I’m leaving and list all the things that would break were I to go through with it: pages I was the sole admin of, apps I was the sole...
Feb 22nd
I have, two days running, on two separate email clients, on two separate operating systems, accidentally replied by email to myself. This is 2012. This kind of shit shouldn’t happen anymore.
Feb 16th
kriskowal/q - GitHub →
I wish I’d found out about promises when I started writing Gusto. Because now I want to rewrite it.
Feb 10th
It turns out that Struct was a rather poor choice of name. Dammit, Apache. It shall heretofore be known as Gusto.
Feb 5th
I went for a walk in the snow.
With a scarf around my face, a camera over my shoulder and two pairs of socks, I headed toward campus. Through wind, sludge and gates, I arrived at a pond that two freshers were pushing a tonne of snow into. It sank. My lens cap promptly embedded itself inches deep in snow. Up spiral stairs and frosty ladders I came to a gravelled roof and views of everything. Down and home to...
Feb 4th
January 2012
7 posts
Blofeld →
Easy Git website deployment.
Jan 25th
Jan 22nd
Better Touch Tool →
Lets you map actions to trackpad and mouse gestures. Also has an Aero Snap workalike. Oh, and it’s free. Configuration dialog could use some work, but that’s by the by.
Jan 18th
Zsh, where have you been all my life?
Jan 12th
So it turns out Struct actually runs on the TouchPad. More surprising is the fact that it runs on Node 0.4.x.
Jan 9th
“How many SEO experts do you need to change a lightbulb lightbulbs buy light...”
– (via clientsfromhell)
Jan 6th
727 notes
http://www.emacswiki.org/emacs/SmartTabs →
This.
Jan 6th
December 2011
7 posts
SHE LIVES. →
It only took my a month to port Struct to Node.js. Only.
Dec 27th
TouchPad & webOS, day 1
The Good Cards. Android and iOS’s multitasking can suck it. Form factor. Looks smaller and thinner that the iPad. It’s neither, but that’s by the by. The built in apps. Mail and Facebook are top-notch. Synergy. Like Android’s contact syncing, but actually works, and lets you manually merge them. Also works with, say, calendar events. “Rooting” is a matter of typing “webos20090606” into the...
Dec 26th
My hobby: putting occasionally adverbs in unusual...
Dec 14th
Things people write in JavaScript that make me...
if(typeof something !== 'undefined' && something !== null) As “the” “correct” way to check for an undefined variable. Argh. First things first, nothing is ever null unless you’ve told it to be. If you’re setting something to null, you’re never going to want to check if it’s undefined. So we can remove that: if(typeof something...
Dec 14th
Dec 9th
Dear internet,
Fitts’ Law is not the kind of law you can break. It does not say “put things near screen edges”. It says “the bigger an object is in the direction of mouse travel, the easier the object is to hit”. What you think is Fitts’ Law is an fact a corollary of Fitts’ actual Law: since the cursor stops at a screen edge, an object at that edge essentially has...
Dec 8th
“I do not write tests for my code. I do not write very many comments. I change...”
– JavaScript needs a _whytheluckystiff.
Dec 7th
November 2011
5 posts
You know what? Fuck Rhino. I’m moving to Node. I don’t care about having JavaScript 1.8.5. I want a sensible API and to be able to debug the goddamn thing.
Nov 30th
Georgia Pro & Verdana Pro →
So you concede that: Verdana and Georgia’s prevalence is no accident: they were distributed widely, then relied upon by web designers for years. And then sell your fonts for $40 per weight.
Nov 17th
Nov 14th
1 note
Ok, Rhino, seriously?
> new Boolean(true) == true false > new Boolean(false) == true false > new Boolean(true) == new Boolean(true) false > argh ReferenceError: "argh" is undefined > new java.lang.Boolean(true) == true true > new java.lang.Boolean(true) == false false
Nov 10th
How to bloody well make sure you read the entire...
let stream = htex.getRequestBody(), buf = new java.lang.StringBuilder(), read = -1, bytes; do { bytes = java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, stream.available()); read = stream.read(bytes); buf.append(new java.lang.String(bytes)); } while(read != -1); stream.close(); Took me hours to figure out it wasn’t reading the whole thing in the...
Nov 9th
October 2011
4 posts
Oct 31st
Here's another one for the radio
Wait. Did I just quote McFly? Crap. Uh. All we hear is radio gaga Better. So, me and Ed have a radio show. It’s nothing serious. Good heavens, no, quite the reverse, in fact. We giggle, lots. Ed disparages me while I’m out of the room. We call it a Sorry Excuse, but really, it’s no excuse. If you got us alone and pointed at us a microphone for an hour, occasionally shutting...
Oct 19th
Great moments in commit messages, episode 1
[master 6a46f76] FUCKING RHINO AND ITS FUCKING PROPENSITY TO FUCKING SET FUCKING UNDEFINED FUCKING PARAMETERS TO THE FUCKING GLOBAL FUCKING OBJECT FUCKING FUCKING FUCKING FUCKING FUCKING FUCKING FUCKING FUCKING FUCKING FUCKING FUCKING FUCKING FUCKING FUCKING FUCKING 1 files changed, 6 insertions(+), 9 deletions(-)
Oct 13th
The best cookies in the world [Citation needed]
And I’ve finally perfected my chocolate-chip cookie recipe. Here goes: Ingredients Mug and a half of unsifted wholewheat flour Half a mug of unrefined molasses sugar Half a mug of golden caster sugar Quarter of a pack of butter (5 ounce) An egg Half a teaspoon of baking powder Bar of plain cook’s chocolate, smashed into tiny fragments Lots of cinnamon As much vanilla extract...
Oct 9th
September 2011
10 posts
From the "make your bloody minds up, browsers"...
In Chrome, percentage values on padding are calculated relative to the element with the padding. In Firefox, they’re calculated relative to the container, as with width. Both calculate margin with respect to the container. Argh.
Sep 27th
Seems that, in Rhino at least, exceptions thrown within a com.sun.net.httpserver.HttpHandler are invisibly caught, making debugging difficult at best.
Sep 3rd
And of course, I’ve easily fixed the previous problem (eval) and the one before that (verbosity) by using JavaScript to define my routes, not some stupid custom text format.
Sep 2nd
Sep 2nd
Sep 2nd
Writing JavaScript in Rhino is an unusual experience at best. On the one hand, it’s JavaScript, one of (if not the) most flexible, dynamic languages there is. On the other hand, you’re using the behemoth of verbosity that is the Java API. So you end up writing like var buf = new BufferedReader(new InputStreamReader(new DataInputStream(new FileInputStream("conf/routes"))));
Sep 2nd
alphabetical-lies asked: DAMN I CAN'T ASK ANONYMOUS QUESTIONS NOW YOU KNOW WHO I AM. AWKWARD.
Sep 1st
tumblrbot asked: WHAT IS YOUR EARLIEST HUMAN MEMORY?
Sep 1st
Post number two in the ongoing "I just learnt this...
So yeah. Go really is as awesome as I was hoping, but sadly not one microstinson more. The Good Google’s right: it feels like an interpreted language. Stuff like slices and first-class functions give the impression that you’re not shouting down the phone to a compiler that has its own ideas of how to do stuff, you’re nicely asking an interpreter, and it comes back with...
Sep 1st
On apathy
I really am utterly terrible at blogging. Things happen that I should blog about and then two or so weeks pass in which I don’t; cue guilt. Part of it is that I don’t give quite enough of a crap. Most of the rest is the omission in my short-term memory of this blog’s existence. To combat the latter I’m installing the Share on Tumblr extension for Chrome. Let’s hope...
Sep 1st
June 2011
4 posts
On the GNOME Shell JavaScript Style Guide
GNOME Shell’s Style Guide encourages extension developers to write classes along the lines of: function ClassName(arg1,arg2) { this._init(arg1,arg2); } ClassName.prototype = { _init: function(arg1,arg2) { // initialisation goes here this._privateMember = arg1; this.publicMember = arg2; }, _privateFunction: function() { }, publicFunction:...
Jun 25th