talideon.com

Do the Zombie!

Entries for February 2006

February 1, 2006 at 1:30AM How Syncope Works

Here’s how Syncope, the kinda-but-not-really-a-framework I mentioned before, works. It’s really just a library with a bunch of canned request lifecycles. Those are the only parts of it that vaguely resemble a framework. It’s made to be as simple and unobtrusive as it possibly could be. If you don’t like the way some part of it works, you can swap it out for something that suits you better.

It doesn’t try to be like Rails, Django, or anything like that. They’re fine, but the way in which they work doesn’t really fit well with PHP. I really don’t understand the ongoing Rails envy PHP developers have [1, 2, 3]. The whole point of Syncope is to play to PHP’s strengths.

Overview

The core of it is the Pipeline class, which takes some bit of data (string, array, object, it doesn’t care) and runs a bunch of filter objects on it. The only requirement for a class to be a filter is that it have a method called execute(), which takes the pipeline object and the data being passed along as argument and calls donext() on the pipeline to execute the next filter on the pipeline.

Web Lifecycle Outline

The filters starting with Simple are just that: simple versions that work as simply as possible, almost moronically so. For example, the view code uses plain old PHP templates and the request filter just ensures that the action parameter is well-formed and implements an IE workaround to emulate a lot of the <button> tag’s functionality with multiple regular <input> buttons.

Other Bits And Pieces

In addition to the above, it also has an XmlBuilder class I wrote a while back to make building feeds and other XML documents less painful for myself. Using templates for them doesn’t make an awful lot of sense to me unless there’s no better way to do it.

There’s also a bunch of helper functions covering a bunch of things I keep on having to do in templates and elsewhere.

Stuff To Do

While the stuff outlined above covers a lot of the annoying boilerplate I’ve ended up writing in the past, there’s a few ancilliary things I’d like to add to the library.

Things that would be important if others wanted to use it would be:

What I’m not going to do is write yet another ORM library. The fact I’m writing a library like Syncope at all is bad enough. [wink]

Update: I forgot to mention that code for caching HTML fragments (or anything like it) is also something I’m intending on writing. I just have to figure out how exactly to handle the dependencies between the various fragments.

February 2, 2006 at 5:56PM Finally! Digiweb pull their thumbs out and activate my DSL

After three months of trying to get broadband off them, first satellite and later DSL, I’ve finally got Digiweb to activate my DSL.

This all really should have been done a month ago, but until today, they’ve kept putting me off, giving excuses like “we’re waiting on equipment” (that was for the satellite), or “it should be all done within five working day” (constantly for the DSL). It took threatening them with the law to finally get them to straighten things out. I think I can also thank Damien Mulley of Ireland Offline for bending a few ears.

With any luck, I should have the modem within two days and all this will be behind me. However, I’m posting this up so nobody else ends up in the same situation I did.

For the full story, read this thread on Boards.ie.

Update: I have the modem! Hurray!

February 3, 2006 at 4:19PM The DSL modem’s arrived.

I received the DSL modem earlier today. I’m just testing it out right now. It’s sooooo fast! This rocks!

One annoyance though: I ordered a DSL modem with a wireless hub built in so that I could work in peace and quiet and not have to sit in our (big and cold) living room all day. But no wireless. Hmmm... I’ll have to do something about that.

Update: They sent me out the wireless hub and lots of apologies. Double hurrays!

February 9, 2006 at 1:12AM How to tell if somebody’s an addict.

Get them to cut back on their apparent habit and see how they react. If they can live with the reduction, there’s no problem; if they can’t, there is.

February 9, 2006 at 1:32AM Things I hate about the Weekly Standard website

Flash ads. Fucking flash ads. How do you expect me to read the stuff on your bloody website when there are things wizzing about in the corner of my eye? It’s impossible! This is one of the few times I’ve been thankful, yes thankful, that there was a print version of the page.

And they’re not alone. Nooooo! There’s lots of publishers who have so little disrespect for the people who grace their sites that they pull dumb stunts like that.

If you’re publishing articles online, don’t be an asshole: if you need to use advertising, make sure it doesn’t move, flash, fade in and out, or anything else like that. It’s like spitting in your readers’ eyes. And if it’s the case that you can’t avoid it, please, please, please, don’t make it loop.

Because of you dicks, I’m going back to using Adblock again.

Update: Adblock doesn’t seem to have been developed in quite a while, so I’m going to go with FlashBlock, a plugin that suits 80% of my needs right now.

February 12, 2006 at 12:09PM Bloody Snow!

I’m stuck in Shannon Airport waiting for my flight to Boston, but I’m stuck here for an extra three hours because of the blasted snow over there! And worse is that it’s flipping -2C there and I--stupidly--didn’t bring clothes for the weather. Serves me right for not checking the weather.

Seems like I’m going to be doing some shopping. Gah!

February 17, 2006 at 6:35PM Never code when you’re tired...

...because you’re guaranteed to do something mindblowingly stupid.

February 19, 2006 at 3:34PM Turns out I was sick rather than tired

I don’t know whether it was that I picked up the ‘flu that’s been going around the office, or if I ate something bad while I was here, but I was in a complete mess Friday and Saturday. I was completely out of my head Saturday morning, but I seem to be ok now. I’m just a bit groggy and tired, and my stomach’s a bit worse for wear, but I’ll live.

I pity the poor chamber maids though: I would not want want to be the person scrubbing the toilet. It’s not blocked or anything, just a bit mank.

Ye Olde HTML Scrubber

On the plus side, though my weekend’s pretty much screwed, I did buckle down and start coding the HTML scrubber I’ve been threatening to write for months now. I’m starting it with a cut-down SAX-style liberal SGML parser, which is currently about 10% of the way done. I have the parsed character data part of it done (and was more awkward to do properly for a liberal parser than I’d expected), and the next bit will be to do the tag parser (which I’ve done the background work for), and finally, I’ll need to wire all that together and get it firing events.

Once the parser is done, I’ll concentrate on the the scrubber itself. It’ll use a stack to keep track of the tags and fire off events when it encounters start tags or unbalanced tags to some other bit of code which’ll know which tags to keep, which ones to ditch, and how to resolve the unbalanced tags.

Netbeans

Seeing as the I’m writing it in Java, I decided I’d take a look at NetBeans to see if it still sucked as much a I remembered. On the plus side, it’s much snappier and feels better. On the minus side, it’s still a big ugly, doesn’t use my Windows anti-aliasing settings, it uses that awful anti-aliasing (smudging’s more like it) system built into Java, doesn’t have decent Subversion integration. It’s intellisense is also just a little too helpful at times. But overall, I’m quite happy with it.

I was able to solve at least some of the UI ugliness by installing Kirill Grouchnikov’s Substance look and feel and by changing the colour scheme to one that doesn’t hurt my eyes.

First impression of Silent Universe

I’ve just started listening to Silent Universe and my first impression is awful, awful Irish/Scottish accent! That woman seriously needs lessons!

Monday Update

Still feeling like crap. I’m better: no I just feel flushed, lethargic and queasy. I decided I’d head to the South Shore Plaza to try and pick some stuff up for whatever’s making me feel ill, but after I was there for a short while, I was almost overcome with nausea. I did manage to pick up some stuff from the pharmacy while I was there and pick up a present for Niamh’s birthday, but after that I decided I’d catch a taxi back to the hotel. Not the best of weekends.

I’m heading into work now. I’d say I can hold up for the rest of the day.

February 24, 2006 at 6:00PM My Blogroll

Seeing as I can’t really be bothered to keep it synched anywhere else online, if you’re interested in who I read, go take a look at my Bloglines public listing, which gives the lot.

February 24, 2006 at 6:44PM Massachusetts drivers suck (and so the crossing signals)

Is it so hard for these people to obey a bloody red light? I stood for twenty minutes in the cold waiting for the blasted crossing signal to change. And what happened when it eventually did? The cars to my left decided to ignore the red light and pass out in front of me! Wankers, wankers the lot of them.

No wonder Boston has a problem with jaywalkers: the poor pedestrians have to take whatever slim chance they have of crossing.

February 25, 2006 at 6:08PM The lot of you can bugger off back to Northern Ireland

Clashes in Dublin over loyalist march.

It’s time for some righteous anger and disgust from me over what’s been happening back home. However utterly wrongheaded and pointless I think the Love Ulster (sic.) march was, I’d no problem with it going ahead. However, the last thing anybody with a brain in their head would have wanted is the violence that erupted due to the clashes between republicans and the GardaĆ­. Sure, the march might have been rather provocative, but the manner in which the counterprotest took place did nothing to promote the republican cause. Nothing. Get that into your thick heads. All it’s done is portray the Republic, a country I’m proud to be a citizen of, to be as backward and sectarian as Northern Ireland, which I know it’s not.

As far as I’m concerned, everybody involved in this, both loyalist and republican, can bugger off back to that hellhole up north they call home. Nobody wants any of you here. You’re a boil on our collective arses and want nothing to do with any of you. Come back when you’re willing to join the rest of Ireland and the UK in the twenty-first century.

And that goes for the Republican Sinn Fein gobshites from the Republic who were involved in this: grow up, assholes. You’re never going to turn us into the twisted, dysfunctional state you want us to be. We’ve moved on since partition. You do not represent me nor anybody else in the Republic. Go read the Easter Proclaimation:

The Republic guarantees religious and civil liberty, equal rights and equal opportunities to all its citizens, and declares its resolve to pursue the happiness and prosperity of the whole nation and all of its parts, cherishing all of the children of the nation equally and oblivious of the differences carefully fostered by an alien government, which have divided a minority from the majority in the past.

You people claim to support that, but you’ve done nothing but spit on those ideals.

More on Slugger, Back Seat Drivers, Planet Potato, United Irelander, Free Stater, Damien Mulley, Planet Potato (with video of the scumbags in action), El Blogador and Balrog.

Update: It appears Charlie Bird was the journalist injured during the riots. Apparently, those attacking him called him an “orange bastard”, which shows they were probably RSF supporters from the North, because he’s one of the most recognisable people in the country, and you’d need to be from abroad not to recognise him.

February 25, 2006 at 7:00PM Happy Birthday, Niamh!

It’s my sister Niamh’s birthday today, and I just thought I’d broadcast it to the world. I hope you’ll like what the present I got you when I get back (unlike nearly every other one I’ve ever gotten you [smile]). Any word on the new job you applied for?

February 25, 2006 at 8:44PM WTF is up with my PotB and IrishBlogs.ie listing?!

The Planet of the Blogs cache of my site hasn’t been updated in a fortnight, and my blog’s disappeared from Irish Blogs. WTF?!

Update: Irish Blogs does (kinda) list it, but the search form is horribly broken. I’d expect it to search by blog title too, but it doesn’t. That’s pretty retarded. I’m pissed at both right now because the ping interface is documented for neither of them. Bloody hell! I’m hoping this is just down to my feed having some dodgy characters in it or something, but even the shouldn’t their parsers be liberal enough to chew through all that kind of thing?

Ah-ha! It appears all the trouble was down to a stray degrees character, so apologies to the PotB crowd. Still pissed that the ping interface doesn’t appear to be documented, but anyway...

February 26, 2006 at 5:25AM Planet of the Blogs and IrishBlogs.ie Ping Proxy

Here’s a little something I’ve just knocked together: the talideon.com Planet of the Blogs and IrishBlogs.ie ping proxy. It’s a wee form that lets you ping these two sites without having to use the XML-RPC interface.

I wrote it because my site runs on ColdFusion 5. CF5 is old and its <CFHTTP> tag lets you do regular POSTs and GETs, but won’t let you do raw posts where you can specify the entire body of the request yourself. To hack around this limitation, I wrote a small PHP script that sits on this server. I can post to it using <CFHTTP>, and it can then call the two blogging services using XML-RPC.

My assumption is that both of them use Weblogs.com XML-RPC interface, but whether this is true or not isn’t exactly clear from everything I’ve read. In my tests (and sorry to the sites’ admins for all the noise), IrishBlogs responded pretty well, but POTB was a bit ambiguous as to whether it worked properly or not. Also, POTB’s XML-RPC endpoint appears to be a little buggy (go test using the proxy if you want to see: it dumps back the XML-RPC response).

I hope it’s useful to somebody out there besides me.

Update: Added flushing after each step in the pinging process. Each ping can take a while, so this should ensure that you’re not waiting around wondering if something’s gone wrong.

February 26, 2006 at 4:43PM Leaving Boston today.

I’ve to check out of the hotel at 12pm. My flight’s just after 7pm. I might be meeting up with Mark later, which would help kill a lot of time. Of course, that’s all moot unless I can check in early.

Good news is I managed to get down to Barnes & Noble and pick up copies of Patterns of Enterprise Application Architecture, Programming Ruby, and Agile Web Development with Rails. Bad news is that it looks as if I’m not going to be able to pick up the pin my mother asked me to get as a souvenir, nor am I able to get that packet of Oreos (because they apparently taste better in the US) and Reese’s Peanut Butter Cup for Brietta. Oh well, I’ll be back in about three or four weeks, so I’ll do it then.

Snow-wise, things are looking good. There’s only a few centimetres of the white stuff and with any lucks that’s the way things will stay. Worst comes to worst, I’ll be stuck waiting in the airport an extra hour or so.

Must take photos.

February 26, 2006 at 6:02PM McDowell says Gardai ‘were unprepared for Dublin riot’

Here’s the Breaking News article.

What kind of fools does he take us for? Really. There wasn’t a cognizant person in this country who didn’t think there’s be some trouble. Does he really think that saying that “An Garda Siochana had prepared for a low key peaceful unionist parade through Dublin city” is really going to wash? As Bernie wrote earlier today, you plan for failure with these things. You expect the worst to happen. If there’s a potentially divisive march or parade, you assume that something like what happened yesterday will happen. It’s common sense.

Is there something the rest of the country knew that he and the Garda Commissioner didn’t know? This beggars belief, and completely destroys any shred of confidence in his ability to perform his duty as Minister for Justice. I’m sick of the man. Since he came to office, he’s done nothing but erode our civil rights, and now he tops it all off by demonstrating gross incompetence. McDowell must go.

February 27, 2006 at 7:08AM Back in Ireland, and some enhancements to make to the ping proxy

It’s early morning, and I’ve got off the plane. That has to be the most boring flight yet. I’m going to get something to eat, and then--somehow--make my way up to John and Marie’s. Then I get some much-needed sleep.

I came up with a few ideas to enhance the PotB and IrishBlogs.ie ping proxy. I’m going to add some code so that it can remember your settings in a cookie. I’m going to kill the rantings at the top and instead just present the form, what it does, and a link to the rantings. I’m going to add a ping for corkblogs.com and a number of other aggregators, and allow you to check which one you want to ping.

This is slowly turning into an Irish version of Ping-o-matic, not that that’s a bad thing... [smile]